Hi Josh! On Mon, Apr 12, 2010 at 11:37 AM, Josh <[email protected]> wrote: > I just started using sympy a couple of days ago and am playing with an > example from the R documentation for the uniroot routine. > > http://stat.ethz.ch/R-manual/R-patched/library/stats/html/uniroot.html > > The second example tries to find the smallest x for which exp(x) is > computationally positive. So, here it goes in sympy... > > > Python 2.5.4 console for SymPy 0.6.5 > > These commands were executed: >>>> from __future__ import division >>>> from sympy import * >>>> x, y, z = symbols('xyz') >>>> k, m, n = symbols('kmn', integer=True) >>>> f, g, h = map(Function, 'fgh') > > Documentation can be found at http://sympy.org/ > > In [1]: F = Eq(1e80*exp(x) - 1e-300) > > In [2]: F > Out[2]: > x > -1.0e-300 + 1.0e+80*e = 0 > > In [3]: tsolve(F,x) > Out[3]: [log(1.0e-380)] > > > Is there a way to specify the domain to search over? It looks like I > can do this with solve (without an effect though) but can't with > tsolve... > > In [5]: solve(F,x, domain=[-1000,0]) > Out[5]: [log(1.0e-380)] > > In [6]: tsolve(F,x, domain=[-1000,0]) > --------------------------------------------------------------------------- > TypeError Traceback (most recent call > last) > > TypeError: tsolve() got an unexpected keyword argument 'domain'
as I understand, tsolve returns all roots. If it doesn't, it's a bug. What is the correct solution that you expect from your computation above? Ondrej -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
