help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to test for "integer"?


From: Mike Miller
Subject: Re: How to test for "integer"?
Date: Sun, 15 May 2005 20:10:27 -0500 (CDT)

On Sun, 15 May 2005, Robert A. Macy wrote:

if (floor(x)==abs(x))
 message="x is a positive real integer"
endif

If x is zero, it is not positive, but it is still non-negative.


What is the advantage of using a built-in function?
Does a built-in function make it faster?

Yes.

Mike



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]