Status: Accepted
Owner:
Labels: Type-Defect Priority-Medium EasyToFix
New issue 1473 by fab...@fseoane.net: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
In [3]: Real(2.3) % 2
---
T
Comment #1 on issue 1473 by Vinzent.Steinberg: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
It also works with float and float:
>>> 231 % pi
1.6637362879451025
--
You received this message because you are listed in the owner
or CC fields of this issue,
Comment #2 on issue 1473 by Vinzent.Steinberg: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
def mod(a, b):
"""Modulo for real a, b."""
return a - b * floor(a / b)
--
You received this message because you are listed in the owner
or CC fields of
Comment #3 on issue 1473 by Vinzent.Steinberg: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
mpf % mpf should be rather used for efficiency.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starre
Updates:
Status: Started
Owner: Vinzent.Steinberg
Labels: NeedsReview
Comment #4 on issue 1473 by Vinzent.Steinberg: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
Patch sent to the list.
--
You received this message because you are
Updates:
Status: Fixed
Comment #5 on issue 1473 by ondrej.certik: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
Pushed in.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue
Updates:
Status: Started
Owner: ---
Labels: -NeedsReview
Comment #6 on issue 1473 by fab...@fseoane.net: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
I reopen this because patch should be improved IMO. It makes extensive use
of
N
Comment #7 on issue 1473 by ondrej.certik: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
I agree.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notif
Updates:
Labels: Milestone-Release0.6.6
Comment #8 on issue 1473 by fab...@fseoane.net: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
I encountered this bug while doing complex exponentials:
In [1]: oo % 2
-
Comment #9 on issue 1473 by fab...@fseoane.net: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
this las thing can be easily fixed implementing __mod__ in Inifnity:
diff --git a/sympy/core/numbers.py b/sympy/core/numbers.py
index 11a2b72..59e86e5 100644
---
Comment #10 on issue 1473 by fab...@fseoane.net: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
Here is a patch for #9. However, there is a very strange failing test...
Attachments:
0002-Implement-Infinity.__mod__.patch 1.8 KB
--
You received thi
Comment #11 on issue 1473 by Vinzent.Steinberg: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
You drew back your patch on the list, iirc. Why?
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you star
Comment #12 on issue 1473 by fab...@fseoane.net: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
It did not have proper log/documentation/tests.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you star
Updates:
Labels: -Milestone-Release0.7.2
Comment #22 on issue 1473 by asmeu...@gmail.com: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
This shouldn't be blocking any releases.
--
You received this message because you are subscribed to the Google
Updates:
Status: Fixed
Comment #23 on issue 1473 by smi...@gmail.com: __mod__ does not work on
reals
http://code.google.com/p/sympy/issues/detail?id=1473
OK this is fixed and the Mod class has been implemented:
2.3 % x
Mod(2.3, x)
(n+2)%2
Mod(n, 2)
--
You received this message b
Updates:
Labels: -Milestone-Release0.7.0 Milestone-Release0.7.1
Comment #14 on issue 1473 by asmeurer: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
(No comment was entered for this change.)
--
You received this message because you are subscribed to
Comment #15 on issue 1473 by pr...@goodok.ru: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
It works:
>>> Real(2.3) % 2
0.300
>>> 2.3 % 2
0.3
>>> oo % 2
>>> nan
It is not but exception is right (in my opinion):
>>
Comment #16 on issue 1473 by pr...@goodok.ru: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
Sorry, for mis-printings, I want to say:
2.3 % x
2.3 % x
*or*
2.3 % x
2.3 mod x
--
You received this message because you are subscribed to the Google Groups
Comment #17 on issue 1473 by sherjilo...@gmail.com: __mod__ does not work
on reals
http://code.google.com/p/sympy/issues/detail?id=1473
How about a Mod class ?
Or should this be added to Relational ?
--
You received this message because you are subscribed to the Google Groups
"sympy-issues"
Comment #18 on issue 1473 by sherjilo...@gmail.com: __mod__ does not work
on reals
http://code.google.com/p/sympy/issues/detail?id=1473
Sorry, This isn't a relational. Its an operation. Should we consider making
a Mod class like Add, Mul ?
--
You received this message because you are subs
Comment #19 on issue 1473 by brad.froehle: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
Perhaps it should be a class like Add, Mul, etc, so as to avoid issues like:
from sympy import *
Rational(7,5) % 1
2/5
Rational(7,5) % Integer(1)
0
--
You receiv
Updates:
Blockedon: 2490
Comment #21 on issue 1473 by asmeurer: __mod__ does not work on reals
http://code.google.com/p/sympy/issues/detail?id=1473
This is issue 2490.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this gro
22 matches
Mail list logo