[Python-Dev] Deprecating float.is_integer()

Mark Dickinson dickinsm at gmail.com
Wed Mar 21 18:53:09 EDT 2018


On Wed, Mar 21, 2018 at 8:49 PM, David Mertz <mertz at gnosis.cx> wrote:

> For example, this can be true (even without reaching inf):
>
> >>> x.is_integer()
> True
> >>> (math.sqrt(x**2)).is_integer()
> False
>

If you have a moment to share it, I'd be interested to know what value of
`x` you used to achieve this, and what system you were on. This can't
happen under IEEE 754 arithmetic.

-- 
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <[Python-Dev] Deprecating float.is_integer()

	
  • Next message (by thread): [Python-Dev] Deprecating float.is_integer()
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  • More information about the Python-Dev mailing list

    Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

    Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant