[Python-ideas] float('∞')=float('inf')
Joshua Landau
joshua at landau.ws
Fri Jul 12 17:35:43 CEST 2013
On 12 July 2013 16:23, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Jul 13, 2013 at 1:16 AM, Gerald Britton
> <gerald.britton at gmail.com> wrote:
>> "Considering that Python can't represent π in a float anyway, I
>>
>> wouldn't be too bothered. "
>>
>>>>> import math
>>>>> type(math.pi)
>> <class 'float'>
>
> That's an approximation to pi, which is a standard floating-point
> value. It's simply 3.141592653589793, nothing more nor less.
Actually, it's 3.1415926535897932. 3.141592653589793 isn't a real
floating-point number, and is "rounded" on evaluation.
//Seriouslypedanticcomment
More information about the Python-ideas
mailing list