开发者

How to check for NaN in Scheme?

Also is there a place where I could look up all the floating points ops in Scheme?开发者_JAVA百科


I think this explains it well.


In most programming languages, you can determine NaN values by comparing a value with itself.

(define (nan? x)
  (not (= x x)))


Have you read the RnRs document for whatever version of scheme you're using? Other than that you could try looking at your implementations manual for things that aren't in the language spec.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜