Skip to content

Instantly share code, notes, and snippets.

@tildedave
Last active December 20, 2018 20:16
Show Gist options
  • Select an option

  • Save tildedave/7371282 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

<3

@apretto
Copy link
Copy Markdown

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