#14229: Remove vacuous solutions from solve
-------------------------------+--------------------------------
Reporter: ppurka | Owner: burcin
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.3
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues: port to upstream
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------+--------------------------------
Comment (by nbruin):
One may be concerned with performance when we have to set these flags all
the time. On the expect interface that's probably silly anyway, and on the
library interface we can reach a little deeper and save some time:
{{{
sage: maxima_calculus(1) # make sure maxima_lib is initialized
sage: from sage.libs.ecl import EclObject
sage: set_complex=EclObject("(setf $DOMAIN '$COMPLEX)")
sage: set_real=EclObject("(setf $DOMAIN '$REAL)")
sage: sage: %timeit set_complex.eval()
100000 loops, best of 3: 5.31 us per loop
sage: %timeit maxima_calculus("domain: complex")
10000 loops, best of 3: 145 us per loop
}}}
For comparison:
{{{
sage: %timeit solve([x<y],[x,y])
100 loops, best of 3: 4.6 ms per loop
}}}
so I think we can afford a little `set_real.eval(); ...solve iquality;
set_complex.eval();`. We could keep a flag on what we set last and be lazy
with flipping, but I expect that solving inequalities is relatively rare,
and always slow, so we shouldn't slow down other operations with testing
for a flag. To give you an idea, the following does call into maxima:
{{{
sage: %timeit integrate(x,x)
1000 loops, best of 3: 693 us per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/14229#comment:14>
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.