[Python-ideas] Python Numbers as Human Concept Decimal System
Mark H. Harris
harrismh777 at gmail.com
Sat Mar 8 22:54:11 CET 2014
On Saturday, March 8, 2014 3:35:14 PM UTC-6, Andrew Barnert wrote:
It looks like you're trying to emulate a pocket calculator here. The
> question is, why are you accepting floats in the first place if that's your
> goal?
>
That's fair... if it were me, or you, I wouldn't. In fact, if it were
just me, or just you,
I don't think any of us would be talking about this--- I wouldn't even have
brought it up.
I am advocating for people--- I am going to say, " if you want just a tad
more than double
just to check things out, please use the decimal module and import pdeclib.
These folks
are what Guido called newbies, I'll call them naive users, and these folks
are using
a calculator (like the TI89) and they will be prone to keying in
sqrt(2.345) /
Its just easier than explaining to them (at this point) all the stuff they
need to understand to use
the functions by making sure they feed decimals to the function; either by
quoting their
numeric inputs, or even using a decimal literal, &c. They know what the
functions do,
and will want to use them to get more digits, but may not remember the
rules to get the
"correct" digits. So I'm advocating for them, to make it easier.
If it were just me, I'd just make sure the functions got decimals and be
done with it.
If you look at my square root function, its really not right; but its
closer. For instance if you give it
1/3 it still is only slightly better than before. I don't have all the junk
after the 16 th
digit, but, I only have .33333333 to 15 places. So, believe me, I know
there is no
one truly good answer here. Just trying to make it easier for the most
people.
marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140308/8b8a914b/attachment.html>
More information about the Python-ideas
mailing list