[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: numerator? denominator?
On Sun, Feb 06, 2000 at 12:13:04PM -0500, Nils Barth wrote:
> Thus spake George:
> > On Fri, Feb 04, 2000 at 09:31:07PM -0500, Nils Barth wrote:
> > > Thanks George!
> >
> > BTW: I saw you in the libs calculating mod by using the '/' operator. But
> > there is in fact a '%' operator that calculates mod. The 'mod' operator did
> > modular math on a full expression. I dunno how soon I'll implement it again,
> > there are some issues with it and the precalculation of constants.
>
> OIC, I got confused.
> It's been corrected.
> (so `mod' was something like: (2 == 5 mod 3) etc.?)
Yes, the 'mod' operator was basically something that would take an entire
expression and evaluate it under mod n. the % operator just takes the left
side already evaluated and then mods it just like any other operator.
The way it worked was that it first modded any arguments (except for say
power in which it modded only the left argument) and then did the operation
and moded the result. I need to figure out how to do the precalculation in a
different way because now operations with constant number arguments are
evaluated first.
George