[Python-ideas] Python Numbers as Human Concept Decimal System

Mark H. Harris harrismh777 at gmail.com
Sun Mar 9 07:57:27 CET 2014



On Saturday, March 8, 2014 10:06:04 PM UTC-6, Alexander Belopolsky wrote

.. and what would you call this?
>  
> >>> int(6.02e23)
> 601999999999999995805696         <=====   a big fat surprise, and WAY not 
> enough atoms / mole     :)
>

Well, the number of atoms|molecules in one mole of gas at standard 
temperature 
and pressure is actually more precisely   6.02214129x10^23  (depending on 
who you talk to)

However, back in the day--- Chem 201 UMKC 1975,  I set the cursor of my 
dual base 
log log slide rule (Pickett)  just to the right of  6  and then kept track 
of the decimal place
myself in my notebook...    ;-)

... but now I have python:   whoohoo!

>>> d(6.02214129e23)
Decimal('6.02214129E+23')
>>> av=d(6.02214129e23)
>>> int(av)
602214129000000000000000       <=====    yousah like this better?
>>> 

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140308/45ca7942/attachment.html>


More information about the Python-ideas mailing list