A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/047456.html below:

[Python-Dev] Re: Decimal type question [Prothon]

[Python-Dev] Re: Decimal type question [Prothon]Andrew P. Lentvorski, Jr. bsder at mail.allcaps.org
Mon Aug 9 21:49:12 CEST 2004
On Aug 9, 2004, at 10:29 AM, Mark Hahn wrote:

> 3) A binary Float implemented with the hardware floating point with the
> constant/__str__ form of +-NN.NN+-eNN such as 0e0, -123e0, 173.39e+3,
> 2.35e-78, etc.

Be careful defining string representations of numbers.  It is a 
non-trivial
problem to adhere to the correct internationalization standards.

> There would be no automatic conversion except the / operator would 
> convert
> from Int to Decimal

Int goes to the default type of float (which is currently binary FP) 
already
upon using the / operator.

>  and the Math module would convert Int and Decimal
> values to Float for almost all functions (except simple ones like abs, 
> min,
> max).

This is not necessarily a good idea.  Exponentials are very useful in
financial situations and want to be decimals, not binary floats, in 
those
cases.

-a

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4