Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77980

Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))`

References <06397cb3-8baf-4af1-8152-ff7c3f6ceb62@googlegroups.com> <mailman.14066.1410916403.18130.python-list@python.org> <fd859066-7068-4a43-a9f0-0e9cc6949cf6@googlegroups.com> <CAPTjJmozvQ-Ndda46UcQELfCOjYi3xjUiyCoHOJKbQmmHPVpdg@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2014-09-17 12:03 -0600
Subject Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))`
Newsgroups comp.lang.python
Message-ID <mailman.14086.1410977055.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Sep 17, 2014 at 9:10 AM, Chris Angelico <rosuav@gmail.com> wrote:
> And while it's
> conceivable to define that infinity divided by anything is infinity,
> and infinity modulo anything is zero, that raises serious issues of
> primality and such; I'm not sure that that would really help anything.

I missed that this point was already discussed. Can you elaborate on
the "serious issues of primality and such"? Since infinity is not a
natural number, its primality is undefined, so I don't see the issue
here.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` cool-RR <ram.rachum@gmail.com> - 2014-09-16 14:40 -0700
  Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Terry Reedy <tjreedy@udel.edu> - 2014-09-16 21:12 -0400
    Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` cool-RR <ram.rachum@gmail.com> - 2014-09-17 07:55 -0700
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Chris Angelico <rosuav@gmail.com> - 2014-09-18 01:10 +1000
        Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` cool-RR <ram.rachum@gmail.com> - 2014-09-17 08:16 -0700
          Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Chris Angelico <rosuav@gmail.com> - 2014-09-18 01:29 +1000
            Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` cool-RR <ram.rachum@gmail.com> - 2014-09-17 09:33 -0700
              Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Chris Angelico <rosuav@gmail.com> - 2014-09-18 02:37 +1000
              Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-18 13:11 +1000
                Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` cool-RR <ram.rachum@gmail.com> - 2014-09-18 01:43 -0700
          Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-17 09:34 -0600
          Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Chris Angelico <rosuav@gmail.com> - 2014-09-18 01:40 +1000
            Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-18 12:50 +1000
          Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-17 10:12 -0600
          Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-17 10:30 -0600
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-17 12:03 -0600
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Chris Angelico <rosuav@gmail.com> - 2014-09-18 07:37 +1000
        Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-18 13:29 +1000
          Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Chris Angelico <rosuav@gmail.com> - 2014-09-18 13:47 +1000
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Terry Reedy <tjreedy@udel.edu> - 2014-09-17 19:23 -0400
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-18 00:51 -0600
  Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-17 09:35 -0600
  Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` wxjmfauth@gmail.com - 2014-09-17 23:22 -0700
    Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Marko Rauhamaa <marko@pacujo.net> - 2014-09-18 09:45 +0300
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` wxjmfauth@gmail.com - 2014-09-18 00:13 -0700
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-18 19:25 +1000
        Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` wxjmfauth@gmail.com - 2014-09-18 05:57 -0700
        Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Grant Edwards <invalid@invalid.invalid> - 2014-09-18 14:33 +0000
    Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` chris.barker@noaa.gov - 2014-09-18 09:35 -0700
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-18 11:05 -0600
      Re: Why `divmod(float('inf'), 1) == (float('nan'), float('nan'))` wxjmfauth@gmail.com - 2014-09-18 23:48 -0700

csiph-web