Re: (was Int Function) mod bug
Re: (was Int Function) mod bug
- Subject: Re: (was Int Function) mod bug
- From: email@hidden (Michael Sullivan)
- Date: Mon, 19 Aug 2002 19:22:43 -0400
- Organization: Society for the Incurably Pompous
email@hidden (Deivy Petrescu) writes:
>
set x to 62
>
set b to ((x + (2.6 - (2.6 mod 1))) - x) as integer
>
>
now try this:
>
>
set x to 61
>
set b to ((x + (2.6 - (2.6 mod 1))) - x) as integer
I ran into this in PseudoRand, and some other similar code.
AFAICT, this never produces a bad answer:
set x to 61
set b to (((x + (2.6 - (2.6 mod 1))) - x) div 1) as integer
Michael
--
Michael Sullivan
Business Card Express of CT Thermographers to the Trade
Cheshire, CT email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.