A string doesn't equal itself

Joe Lewis Wilkins pepetoo at Cox.Net
Thu Apr 12 18:12:01 EDT 2007


Thanks for the patient explanation. Sometimes I feel kind of dumb on  
this list, but then programming is not my main field of expertise   
and probably never will be. (smile) On the M$ front, don't worry.  
I've given that up "here"!

Joe Wilkins

On Apr 12, 2007, at 2:25 PM, Bill Marriott wrote:

> Joe,
>
>> But Bill, did you notice THEY AREN'T THE SAME. ONE ENDS IN 1; THE   
>> OTHER
>> ENDS IN 2!
>>
>>> put "3.141592653589793238461" is "3.141592653589793238462"
>
> Um, yes, that was the point :) I think Rev handles up to 20 digits of
> precision after the decimal point. So as the 1 and 2 are beyond its
> precision, it considers the two (numeric) values equal. As numbers,  
> they are
> "equal"; as strings they are not.
>
> FYI, Excel only gives you 14 digits of precision, so it would think
>
> 3.14159265358972222222 = 3.141592653589791111111 is "true."
>
> Please no Microsoft jabs, I'm just trying to illustrate the #1 number
> cruncher out there is not immune from these issues.
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list