[SciPy-user] Can SciPy compute ln(640320**3 + 744)/163**.5 to 30 places?
Dick Moores
rdm at rcblue.com
Sun Jan 21 23:14:58 CST 2007
At 09:01 PM 1/21/2007, you wrote:
>On 1/21/07, Dick Moores <rdm at rcblue.com> wrote:
> > At 08:01 PM 1/21/2007, you wrote:
> > >On 1/21/07, Dick Moores <rdm at rcblue.com> wrote:
> > > > Sorry, I replied to the wrong post. What I really want to see is how
> > > > to use clnum to do (5/23)**(2/27).
> > >
> > >The answer was already in the message you quoted:
> > >
> > > > > >In [7]: n.exp(n.log(n.mpq('5/23')*n.mpq('2/7')))
> > > > > >Out[7]:
> > > > > >mpf('0.0621118012422360248447204968944099378881987577639751
> 5527949',55)
> >
> > No, think it's this:
> > >>>from __future__ import division
> > >>>(5/23)**(2/7)
> > 0.64660732406541122
> >
> > No?
>
>Well, since your question was:
>
> > > > Sorry, I replied to the wrong post. What I really want to see is how
> > > > to use clnum to do (5/23)**(2/27).
>
>I gave you a clnum answer (with 2/7 instead of 2/27) (this assumes
>"import clnum as n"):
>
>n.exp(n.log(n.mpq('5/23')*n.mpq('2/7')))
>
>
>Now, if your question had been
>
>"What I really want to see is how to use /plain python/ to do (5/23)**(2/7)."
>
>then the proper response would indeed be
>
>In [1]: from __future__ import division
>
>In [2]: (5/23)**(2/7)
>Out[2]: 0.64660732406541122
>
>or (without the __future__ statement):
>
>In [1]: (5/23.)**(2/7.)
>Out[1]: 0.64660732406541122
OK, I'll reclarify. Of course, I'm trying to learn clnum. I thought
that was understood. Please show me how to use clnum to compute
(5/23)**(2/7) (that's 5/23 to the 2/7 power), with a precision of
50. Surely the answer is not
mpf('0.06211180124223602484472049689440993788819875776397515527949',55)??
Just by inspection this is clear, is it not? A number between 0 and 1
raised to a power between 0 and 1 will get closer to 1, right? (5/23
is 0.217391304348) I believe you've given me (5/23.)*(2/7.).
Thanks for your patience,
Dick
More information about the SciPy-user
mailing list