Skip to content

Instantly share code, notes, and snippets.

@tildedave
Last active December 20, 2018 20:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tildedave/7371282 to your computer and use it in GitHub Desktop.
Save tildedave/7371282 to your computer and use it in GitHub Desktop.
Of course NaN is a number
user=> (/ 0.0 0.0)
NaN
user=> (type (/ 0.0 0.0))
java.lang.Double
irb(main):001:0> 0.0/0.0
=> NaN
irb(main):002:0> (0.0/0.0).class
=> Float
> 0.0 / 0.0
NaN
> typeof(0.0 / 0.0)
'number'
> return (0.0 / 0.0)
nan
> return type(0.0 / 0.0)
number
@MACSkeptic
Copy link

<3

@apretto
Copy link

apretto commented Nov 8, 2013

At least there's consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment