Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70021 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2014-04-10 03:25 -0400 |
| Last post | 2014-04-10 03:25 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Plotting the integer-and-fraction remainder of a function value modulo 360 Terry Reedy <tjreedy@udel.edu> - 2014-04-10 03:25 -0400
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-04-10 03:25 -0400 |
| Subject | Re: Plotting the integer-and-fraction remainder of a function value modulo 360 |
| Message-ID | <mailman.9123.1397114775.18130.python-list@python.org> |
On 4/10/2014 1:03 AM, Kim Plofker wrote:
> Thanks, the % operator is indeed what I want, but I want to use it with
> a function expression rather than with numbers alone. And that seems to
> create a type error.
>
> Here's an example of what goes wrong:
>
> t = var('t')
> L(t) = t*725.5%360.0
>
> This produces the following error message:
>
> ...
> TypeError: unsupported operand type(s) for %:
> 'sage.symbolic.expression.Expression' and
> 'sage.symbolic.expression.Expression'
>
>
> I can use other arithmetic operators such as + and / in this function
> expression, but not %, and I don't understand why. Is it indeed a
> Sage-specific problem rather than something I could work around in Python?
It seems that someone either forgot to implement % or decided not too.
You will have to ask the sage people.
--
Terry Jan Reedy
Back to top | Article view | comp.lang.python
csiph-web