Re: detecting NaN and Infiinity
"Oleg A. Paraschenko" <[email protected]> Tue, 29 May 2007 18:04:00 +0400
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Organization | private person |
| Message-ID | <[email protected]> |
Hello, On Tue, 29 May 2007 09:07:40 -0500 "Scott G. Miller" <[email protected]> wrote: > On Tue, May 29, 2007 at 08:11:21AM +0400, Oleg A. Paraschenko wrote: > > Hello, > > > > I've tried to detect infinities and numbers using different > > combinations of '=' and 'eq', but failed. Would you please suggest the > > correct way? > > Try equal? Unfortunately, no: $ sisc which: no rlwrap in (/home/olpa/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/games) SISC (1.15.3) #;> (define (gx:nan? x) (equal? x #!nan)) #;> (map gx:nan? (list (/ 0.0 0.0) (/ 1.0 0.0) (/ -1.0 0.0))) (#t #t #t) (#t #t #t) instead of (#t #f #f) > > Scott > -- Oleg Parashchenko olpa@ http://uucode.com/ http://uucode.com/blog/ Generative Programming, XML, TeX, Scheme http://tohtml.com/ Online syntax highlighting ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/