Works great, thanks!  But now I'm having problems with the modulo operator 
returning negative results on floating-point operands.  E.g.,

4.9 % 10
 
returns 4.9000000000000, as I would expect.  But

5.1 % 10

returns not 5.100000000000 but -4.900000000000.  This is independent of 
whether I'm invoking it in a function or in a standalone Sage expression.

I'll try to figure it out and make a new thread if I'm stumped.

Thanks again!

On Thursday, April 10, 2014 9:24:37 AM UTC-4, Jeroen Demeyer wrote:
>
> On 2014-04-10 07:28, Privasie Invazhian wrote: 
> > I can use other arithmetic operators such as + and / in this function 
> expression, but not %, and I don't understand why. 
> Modulo in *symbolic* expressions is simply not implemented. 
>
> > Is there an alternative or workaround 
> Yes, use a normal Python function: 
>
> def L(t): 
>      return t*725.5 % 360.0 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to