[Numpy-discussion] Number of digits
Tim Hochberg
tim.hochberg at cox.net
Mon Jul 10 08:30:06 CDT 2006
Nils Wagner wrote:
> Hi all,
>
> how can I increase the number of digits in the output of str(.) ?
>
You can't as far as I know. For floats, you can use "%.nf". For example:
"%.13f" % 493.4802200544680
-tim
>
>>>> lam**2
>>>>
> 493.48022005446808
>
>>>> str(lam**2)
>>>>
> '493.480220054'
>
> '493.4802200544680' would be fine.
>
> Nils
>
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>
>
>
More information about the Numpy-discussion
mailing list