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

Benoît Minisini gambas at ...1...
Fri Jan 28 02:07:05 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?

I cannot reproduce that. As usual, please provide a project that shows the 
bug. And check that you use the latest revision.

> 
> 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.

They will be removed sooner or later. You don't have to compile the latest 
revision. You can compile any revision you want by passing the "-r XXXX" to 
the subversion command, where "XXXX" is the revision number.

Regards,

-- 
Benoît Minisini




More information about the User mailing list