javascript quiz 

is `-(a + b)` always the same value as `-a + -b`?

Follow

javascript quiz answer 

(no)

· · Web · 2 · 0 · 0

javascript quiz qualification 

assume `a` and `b` are integers, numbers, and that `a + b` is less than `Number.MAX_SAFE_INTEGER`; this isn’t a gotcha where `a` and `b` are strings and i’m not talking about rounding errors here

re: javascript quiz answer 

@Lady is this because of floating point arithmetic

re: javascript quiz answer 

@aescling technically

re: javascript quiz answer 

@aescling (by which i mean BigInt does not have this quality)

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.