开发者

How to check for NaN in Scheme?

开发者 https://www.devze.com 2022-12-10 06:17 出处:网络
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

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

精彩评论

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