[Gambas-user] Problem with float value

Jussi Lahtinen jussi.lahtinen at ...626...
Sun Apr 25 19:06:38 CEST 2010


Hi!
I have problem with my code, there is point where x = rx[31-ii] should
be true, but it's not.
So I added this for debug (variables x and rx are float and ii is integer):

Print x - rx[31 - ii]
Print rx[31 - ii]
Print x

Result:
1.110223024625E-16
0.377913931573
0.377913931573

So, I tried this:
Print x - rx[31 - ii]
Print Format$(rx[31 - ii], "#.###########################")
Print Format$(x, "#.###########################")

Result:
1.110223024625E-16
 .377913931572549
 .377913931572549

So, I guess my problem is how to print whole content of float variable?
Mean while I'm trying to guess where is my error with math...

Jussi
Gambas3 rev 2879
Ubuntu 9.10 64bit




More information about the User mailing list