Re: Precision and 'abs'

2015-02-04 Thread Earthednet-wp
Why not try the round function to limit the number of digits being compared? Put round(myNum,nDigits) - round(num2,nDigits)=theDiff Bill William Prothero http://es.earthednet.org > On Feb 4, 2015, at 4:17 AM, Peter W A Wood wrote: > > Graham > > I think that it is a documentation error. As fa

Re: Precision and 'abs'

2015-02-04 Thread Peter W A Wood
Graham I think that it is a documentation error. As far as I know, LiveCode uses binary floating point numbers when performing arithmetic. Not all non-whole decimal numbers cannot be accurate represented in binary floating point numbers. I cannot see how just comparing the absolute value of th

Precision and 'abs'

2015-02-04 Thread Graham Samuel
I’m having some trouble comparing numbers with lots of decimal places - numbers that ought to be equal are slightly unequal. In the LC Dictionary entry for ‘numberFormat’ there’s a warning about this, and a suggested solution: > > Note: Since LiveCode does not use decimal numbers for its intern