How to set calculation with the highest possible accuracy?

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

How to set calculation with the highest possible accuracy?

#1 Post by Eugene Lutsenko »

How to set calculation with the highest possible accuracy? I used SET DECIMALS TO 15, but I have such impression that 0.99 is perceived as 1. Please...

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: How to set calculation with the highest possible accurac

#2 Post by Tom »

SET DECIMALS has nothing to do with calculation precision. SET DECIMALS and SET FIXED just set the number of digits behind the comma when numbers are displayed (maybe using "? in CRT mode).

Since Xbase++ only knows the datatype "numeric", which always is a 64-bit floating number (IEEE), calculations should be almost precise for up to 16 digits behind the comma. When it comes to display numbers, a value like 0.9999999999 may show up as 1.0, depending on the format.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply