chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] How to detect when you have +nan.0 or similar?


From: John Cowan
Subject: Re: [Chicken-users] How to detect when you have +nan.0 or similar?
Date: Mon, 29 Jan 2007 21:04:48 -0500
User-agent: Mutt/1.3.28i

Matthew Welland scripsit:

> What is the right way to do this? I resorted to using :

I like the definition (lambda (f) (not (= f f)), which depends on the
fact that NaN is not numerically equal to NaN.

You can define "infinite?" as (lambda (f) (= f (+ f f))).

-- 
"Well, I'm back."  --Sam        John Cowan <address@hidden>




reply via email to

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