[SciPy-user] Can SciPy compute ln(640320**3 + 744)/163**.5 to 30 places?
fperez.net at gmail.com
Mon Jan 15 16:32:53 CST 2007
On 1/15/07, Dick Moores <rdm at rcblue.com> wrote:
> Is there a better way to print the result without the leading "mpf('"
> and the trailing "',55)"?
Not that I can see right away.
> The only clnum manual I found was
> <http://calcrpnpy.sourceforge.net/clnumManual.html>, which is
> obviously incomplete. How does anyone learn as much about it as you do?
I don't know how good the manual is, I've never had a look at it.
I just use the tab key and the ? operator in ipython. It's a handy little tool:
In : n.*cos*?
In : n.mpf?
Base Class: <type 'type'>
mpf(x) -> extended precision floating point number
mpf(x,prec) -> extended precision floating point number
Convert a string or number to an extended precision floating point number,
if possible. The optional prec is the number of decimal digits.
> And finally (I think), could you show me how to do division and
> multiplication with precision? Say 7596.52/632517 and
> 123.45678987654321 times 298374.287364827364287346?
In : f = n.mpf
In : f('7596.52')/632517
In : f('123.45678987654321')*f('298374.287364827364287346')
More information about the SciPy-user