help - why is this no work?!

Jim Bufalini jim at visitrieve.com
Thu May 14 08:41:33 EDT 2009


Shao Sean wrote:

> Was doing some geeking with a friend in Finland and he wrote a Perl
> script that got the correct answer and then we discovered that Rev is
> not getting the correct answer for the multiplication.. Where is Rev
> getting the extra "1" from? I have written a 64-bit binary math
> library that gets the correct answer and will need to do further
> testing with it to see if I get the correct answers for all the tests.
> 
> 
> Rev: 16777619 * 2166136261 = 36342608889142560
> 
> Perl: 16777619 * 2166136261 = 36342608889142559

Is it the same thing we ran into using straight math in the scripting
competition that after 16 digits the 16th digit is rounded and you get zeros
after that? The answer is 17 digits long.

Aloha from Hawaii,

Jim Bufalini




More information about the use-livecode mailing list