• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Float bug ?
#1
Hello, I am working on height calculation. But some places seem incomplete and inaccurate. Can you help with this issue?



My code:



Code:
for (new i = 1; i <= 35; i)

{

new Float: X = 1.50  float(i) * 0.01;

printf("%.2f", X);

}



Output:



Code:
1.50

1.51

1.52

1.53

1.54

1.55

-> There is a deficiency here.

1.57

1.58

1.59

1.60

1.61

1.62

-> There is an error here.

1.62

1.63

1.64

1.65

1.66

1.67

-> There is a deficiency here.

1.69

1.70

1.71

1.72

1.73

1.74

1.75

-> There is an error here.

1.75

1.76

1.77

1.78

1.79

1.80

1.81

1.82

-> There is a deficiency here.

1.84

1.85
C, PHP,?Pawn
  Reply


Messages In This Thread
Float bug ? - by NexoR - 2020-04-19, 01:33 PM
RE: Float bug ? - by Markski - 2020-04-19, 05:49 PM

Forum Jump: