# [OctDev] Can we implement isinteger this way?

11 messages
Open this post in threaded view
|

## [OctDev] Can we implement isinteger this way?

 Hi, I'm new here, and I have a question: can we implement isinteger this way? function retval=isinteger(A) if ismatrix(A) && (round(A) == A)   retval=1; else   retval=0; end William Poetra Yoga Hadisoeseno                         __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php_______________________________________________ Octave-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/octave-dev
Open this post in threaded view
|

## Re: [OctDev] Can we implement isinteger this way?

Open this post in threaded view
|

## Re: [OctDev] Can we implement isinteger this way?

 In reply to this post by William Poetra Yoga H On 11/6/05, William Poetra Yoga H <[hidden email]> wrote: > Hi, I'm new here, and I have a question: can we implement isinteger this way? > > function retval=isinteger(A) > > if ismatrix(A) && (round(A) == A) >   retval=1; > else >   retval=0; > end Are you happy with the way this function will handle large exponents where the interger part is lost? For example octave:6> isinteger(1e10/3) ans = 0 octave:7> isinteger(1e20/3) ans = 1 Andy ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php_______________________________________________ Octave-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/octave-dev
Open this post in threaded view
|

## Re: [OctDev] Can we implement isinteger this way?

Open this post in threaded view
|

## Re: [OctDev] Can we implement isinteger this way?

Open this post in threaded view
|

## Re: [OctDev] Can we implement isinteger this way?

Open this post in threaded view
|

## Re: [OctDev] Can we implement isinteger this way?

Open this post in threaded view
|

## Re: [OctDev] Can we implement isinteger this way?

Open this post in threaded view
|