#7660: arithmetic with equations and inequalities confusing
-------------------------------------+-------------------------------------
Reporter: burcin | Owner: burcin
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: symbolics | Resolution:
Keywords: inequality, | Merged in:
solver, maxima | Reviewers:
Authors: Burcin Erocal, | Work issues:
Ralf Stephan | Commit:
Report Upstream: N/A | 14ede75c5f56554ef9e61c094d3bb4e971280314
Branch: public/7660 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by rws):
Replying to [comment:42 jdemeyer]:
> Why convert to `RR`? I would simply use
> {{{
> if right == 0:
> ...
> elif right >= 0:
> ...
> elif right <= 0:
> ...
> else:
> raise ArithmeticError(...)
> }}}
> This handles non-constant symbolic expressions also.
Seems we have to open a ticket?
{{{
sage: def f(ex):
if ex==0:
print 'zero'
elif ex<0:
print 'minus'
else:
print 'else'
....:
sage: ex=-I
sage: f(ex)
minus
sage: bool(-I<0)
True
sage: bool(I>0)
True
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/7660#comment:43>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/d/optout.