The not–a–number value, NaN for short, represents the result of a wrong computation. NaN can appear as literal in Scheme source code as ‘+nan.0’ or ‘-nan.0’, and it can be the result of an expression composing Scheme arithmetic functions. NaN has no sign, ‘+nan.0’ and ‘-nan.0’ have the same semantic meaning.
What follows is just a set of notes with no commitment to rigour in Mathematics. For more informations on NaN, start from:
Wikipedia contributors. “Not a number”. Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/w/index.php?title=NaN&oldid=303402207 (accessed July 21, 2009).
see also:
Wikipedia contributors. “Division by zero”. Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/w/index.php?title=Division_by_zero&oldid=303258289 (accessed July 21, 2009).
Being that NaN is a little weird, let’s start by understanding how to deal with infinities first.
• notes nan inf: | How to deal with infinities. | |
• notes nan nan: | Understanding not–a–number. |