Atm always wrong php

Hi guys,

I literally tested all the outputs and it gave me the right answer every time. I have no clue what’s wrong.

Anyone has an idea?

<?php

fscanf(STDIN,"%f\t%f", $x, $y);

if ($x % 5 === 0 && $x < 2000 && $y < 2000 && $x > 0 && $y > 0 && $y > $x)
{
$n = ($y - $x) - 0.5;
$r = number_format((float)$n, 2, '.', '');
printf("%.2f", $r);
}else{
printf("%.2f", $y);
}