MOD function does not work! So be warned!

Dar Scott dsc at swcp.com
Sun Mar 31 15:59:01 EST 2002


On Sunday, March 31, 2002, at 11:54 AM, Rob Cozens wrote:

> I think there's more to it than that:
...
>   put (var1=var2)&&((var1 mod 5)=(var2 mod 5))

I think you are right.

on mouseUp
   set the numberFormat to "0.#################"
   put (1+.000000000000001) & linefeed after field "Report"
   put (1+.000000000000001) = 1 & linefeed after field "Report"
end mouseUp

--->

1.00000000000000111
true

Equality between numbers seems to either have a tolerance, 
round/truncate digits or round/truncate internal bits.  
(Mathematicians would concerned about the first; the tolerance 
method means = is not an "equivalence relation" and "transitivity" 
goes out the window.)

Dar Scott






More information about the use-livecode mailing list