[Tutor] My function correct_num()
Dennis Lee Bieber
wlfraed at ix.netcom.com
Thu Mar 30 22:23:43 EDT 2023
Mea Culpa
On Thu, 30 Mar 2023 21:47:25 -0400, Dennis Lee Bieber
<wlfraed at ix.netcom.com> declaimed the following:
>>>> print("%21.14e" % x)
> 3.00000000000000e-01
>>>> print("%21.14e" % -x)
>-3.00000000000000e-01
>>>> print("%23.16e" % x)
> 3.000000000000000e-01
Whoops, ignore that one -- I'd edited in the PythonWin console before
duplicating it to a fresh line.
>>>> print("%23.16e" % x)
> 3.0000000000000004e-01
>>>> print("%23.16e" % -x)
>-3.0000000000000004e-01
>>>>
>
More information about the Tutor
mailing list