[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to test for "integer"?
From: |
Keith Goodman |
Subject: |
Re: How to test for "integer"? |
Date: |
Sun, 15 May 2005 18:23:20 -0700 |
On 5/15/05, Mike Miller <address@hidden> wrote:
> If x is zero, it is not positive, but it is still non-negative.
Another problem is infinity:
>> x=Inf; floor(x)==abs(x)
ans = 1
you could replace ~isfinite(x) with 3.14.
By the time we're done isint will be 100 lines of code.
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------