inaccurate division

Just starting out? Need help? Post your questions and find answers here.
PBasic
New User
New User
Posts: 6
Joined: Tue May 22, 2007 2:47 pm

inaccurate division

Post by PBasic »

Code: Select all

a.f = 1.00 / 2.00
PrintN(Str(a))
It results in 0, not 0.5
How can I make it calculate correctly?
Thanks!
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Code: Select all

a.f = 1.00 / 2.00
Debug StrF(a) 
--Kale

Image
Post Reply