Decimal number on a 4x20 Hitachi LCD

Your code works fine, but i am finding it hard to tun it with the If comando.
Listed code below will allways print the c value when executing the if comando. It will never see p as greater then c.
Something i am missing ?

void loop() {  
  
  float c = analogRead(analogPin0) * 0.00491; 
  lcd.cursorTo(1,6);
  printDouble(c,2);

if (c > p){ 
  lcd.cursorTo(1,16);
  printDouble(c,2);
  float p = c; 
  }