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

2011-01-30 Thread Kevin Fishburne
On 01/27/2011 08:07 PM, Benoît Minisini wrote: >> 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.rel

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

2011-01-27 Thread Benoît Minisini
> 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.747

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

2011-01-25 Thread Kevin Fishburne
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