Query about mod operator

Colin Holgate coiin at rcn.com
Tue Apr 22 12:25:48 EDT 2008


At 7:52 AM -0700 4/22/08, Richard Gaskin wrote:
>True.  Let's say we account for the delimiter, since we're proposing 
>an engine change and it's a one-liner to obtain that from the OS.


It seems wrong to try and fix a math issue with a string hack.


>Can you think of any reason why a high-level language wouldn't 
>return results like what's proposed?

No. Either it should be integer and only return integers, or it 
should be floating pointing, and return decimal values too. Flash 
does floating point mod, but with the limits of binary arithmetic 
(4.3 % 2.1 = 0.09999999999999964), Director uses integers (4.3 mod 
2.1 = 0), and Rev and HyperCard use floating point, but with repaired 
results (4.3 mod 2.1 = 0.1).

I'm now not sure what the problem case is?




More information about the use-livecode mailing list