Precise calculations
Ben Finney
bignose-hates-spam at and-benfinney-does-too.id.au
Fri Nov 7 17:10:29 EST 2003
On 8 Nov 2003 08:26:07 +1050, Ben Finney wrote:
> On Fri, 07 Nov 2003 13:17:44 GMT, Ladvánszky Károly wrote:
>> Could anybody help me on how to do precise calculations with Python
>> the way hand-held calculators do?
>
> Use rounding, e.g. as implemented by the str() function.
Apologies; str() doesn't do rounding per se, it shows the float values
with fewer significant digits without changing the internal value.
--
\ "Once consumers can no longer get free music, they will have to |
`\ buy the music in the formats we choose to put out." -- Steve |
_o__) Heckler, VP of Sony Music, 2001 |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list
mailing list