Livecode's math precision

Jerry Jensen jhj at jhj.com
Tue Mar 17 22:04:01 EDT 2015


They diverge at the 15th decimal digit. That is about where the 64 bit format runs out of mantissa precision. You only get about 7 with the 32 bit format.
.Jerry


> On Mar 17, 2015, at 6:55 PM, Peter W A Wood <peterwawood at gmail.com> wrote:
> 
> Mike
> 
> This explanation from Mark Waddingham confirms that numbers are held in IEEE 754 format - http://quality.runrev.com/show_bug.cgi?id=9349
> 
> I’m pretty sure it is 64-bit. I tried multiplying a value of Pi with more significant digits than a 32 bit number can hold in the message box:
> 
> Code:
> 	put format ("%.30g",3.14159265358979323846264338327950 * 1.0)
> 
> Result:
> 	3.14159265358979311599796346854
> 
> Hope this helps
> 
> Peter
> 
> 
>> On 18 Mar 2015, at 06:21, Michael Doub <mikedoub at gmail.com> wrote:
>> 
>> Can anyone point me to a reference  that discusses the precision of livecode's math calculations?   Is it doing IEEE 754 64-bit floating point under the covers?
>> 
>> Thanks
>>  Mike
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list