@hj @matrix @sampo This is actually the same in C++. 2 NaNs are never equal.

@hj @Mac_CZ @matrix @sampo no, it's a standard, IEEE 754 specifies that NaN's are NOT equal and also make every other number nan on interaction
@hj @matrix makes sense, NaN is a number so it can't be NaN
@sampo @matrix both NaNs are numbers, therefore type check passes, value of NaNs is what not equals.

@sampo @hj @matrix NaN means it’s not a real number

sqrt(-1) is definitely a number but it can’t be stored as a real number. Just another case of americans leaving out words because the meaning is “implicit” from “the context”

@sampo @hj @matrix the real crime is that parseFloat and parseInt use NaN as the return value for parser errors

@hardbass2k8 @matrix @sampo oh js has a lot of crimes and people don't usually point those out, it usually be like "huh huh hehehe js casts types automatically in weird way"
@hj @sampo @matrix get this

>false == 0
>true == 1
>true^false === false^true
@okl @matrix @sampo >==

nigga do you even ===

> 1 XOR 0 === 0 XOR 1

nigga do you even boolean algebra
@hj @matrix @sampo it's the power-to operator in normal languages, like matlab :^^^^)
@okl @matrix @sampo oh i DON'T miss matlab. especially running one under wine on my shitty EEEPC in university circa 2011
@hj @okl @matrix virgin matlab vs chad sage. my favorite maths teacher was a diehard advocate, has some code in it too if I remember right

@matrix show me one language where 0.1 + 0.2 is not 0.30000000000000004

@matrix How in the fuck is Math.max() resulting in -Infinity though

@alex @matrix the lowest “number” Javascript can think of is -Infinity. The maximum between two nulls is still a number (somehow), and the value of that number is the lowest number possible.

@sev @matrix Makes sense when you think about it comparing two nulls. Thanks!
@alex @matrix most likely one of those "return specific value instead of throwing exceptions" cases
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.