Alaska Software Inc. - Older version cannot calculate ???
Username: Password:
AuthorTopic: Older version cannot calculate ???
Chris PalmerOlder version cannot calculate ???
on Thu, 17 Nov 2005 13:48:24 +0000
I am running Alaska version 1.2 (old I know) but when I add this simple 
command :-
    ? 44.28 - 44.27
I get the answer :-
    0.00
I stumbled upon this by mistake whilst using varables.  This is very 
worrying, any idea why it's happening ???

thanks
Chris Palmer
Thomas Braun Re: Older version cannot calculate ???
on Thu, 17 Nov 2005 15:35:42 +0100
Chris Palmer wrote:

> I am running Alaska version 1.2 (old I know) but when I add this simple 
> command :-
>     ? 44.28 - 44.27
> I get the answer :-
>     0.00

I get 0.01 ... but with a 1.8x version.
I don't have a 1.2 anymore to test this...

> I stumbled upon this by mistake whilst using varables.  This is very 
> worrying, any idea why it's happening ???

The method used by Xbase++ (and almost every other programming language) to
represent floating point numeric values (IEEE-something) can't accurately
represent every float (because you can't represent an infinite number of
possibilities with a finite number of bits) - so floats are only
approximations and as such can produce various problems:

http://en.wikipedia.org/wiki/Floating-point_number
-> Problems with floating-point

Thomas