Re: [Python-Dev] New math functions

2008-02-20 Thread Isaac Morland
On Fri, 15 Feb 2008, Mark Dickinson wrote: > On Tue, Feb 12, 2008 at 1:52 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > >> Also, it would be useful to have a new method, float.is_integer(). This >> would be better than the current approach where we make the >> test: if x == floor(x). > > Ho

Re: [Python-Dev] New math functions

2008-02-15 Thread Neal Becker
Mark Dickinson wrote: > On Tue, Feb 12, 2008 at 1:52 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > >> Also, it would be useful to have a new method, float.is_integer(). This >> would be better than the current approach where we make the >> test: if x == floor(x). >> > > How common is this

Re: [Python-Dev] New math functions

2008-02-15 Thread Mark Dickinson
On Tue, Feb 12, 2008 at 1:52 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Also, it would be useful to have a new method, float.is_integer(). This > would be better than the current approach where we make the > test: if x == floor(x). > How common is this test? Given the inexact nature of

Re: [Python-Dev] New math functions

2008-02-15 Thread Christian Heimes
Raymond Hettinger wrote: > Was some thought given to possibly adding these as > float methods instead of as separate functions? > > float.isinf() > float.isnan() > > Also, it would be useful to have a new method, float.is_integer(). This > would be better than the current approach whe

[Python-Dev] New math functions

2008-02-11 Thread Raymond Hettinger
Was some thought given to possibly adding these as float methods instead of as separate functions? float.isinf() float.isnan() Also, it would be useful to have a new method, float.is_integer(). This would be better than the current approach where we make the test: if x == floor(x).