[Gambas-user] gb3: incorrect result from equation using singles

Kevin Fishburne kevinfishburne at ...1887...
Wed Jan 26 01:33:06 CET 2011


The variables cx and Client.relx are of datatype single. The initial 
value of cx is 0 and Client.relx is 51. The code

cx = (cx + Client.relx) / 2

assigns the value 0 to cx. It should be 25.5.

When I enter

?(cx + Client.relx) / 2

in the debug/immediate window I get 2.7476892520342E-315. Have I lost my 
mind, or is something seriously wrong here?

Also, Benoît, have the MkXXX$() functions been taken out of gb3 yet? I 
want to compile the latest revision but haven't converted my networking 
code to use structures yet.

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271





More information about the User mailing list