Re: [amibroker] IEEE 754 Standard

 

Hello,

Thank you very much for your e-mail.

In IEEE 754 24 bits are used for mantissa that decides about precision and you can't change that.

Best regards,
Tomasz Janeczko
amibroker.com

On 2016-02-29 01:23, 'TA' tagroups@sbcglobal.net [amibroker] wrote:

Tomasz

 

I one of the previous conversations you had mentioned AB uses floats and that all integers upto 2^24 are represented accurately in floats. Is there a way around this issue (using mathematical tricks)? The following sum produces 268,460,128. The correct calculation is 268,460,113.

 

ic1 = 1;
ic4 = 16;
ic6 = 64;
ic13 = 8192;
ic14 = 16384;
ic28 = 268435456;
alliCs = ic1 + ic4 + ic6 + ic13 + ic14 + ic28;
_TRACE("alliCs: " + NumToStr(alliCs, 1.0));


__._,_.___

Posted by: Tomasz Janeczko <groups@amibroker.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon