Integers by definition already have infinite precision...
Integers by definition already have infinite precision...
This does 2 things. It allows for arbitrary size integers (whereas before, javascript had integers up to FLOAT.MAX), and it represents all these integers with perfect precison.
In those languages, an integer is actually infinite precision with limited range. A quick Google shows that the "number" primitive in JavaScript is a double. Are you telling me JavaScript has NO integer type?
Maybe I haven't seen enough languages yet, but that seems pretty crazy to me.
Yet, I do see the morbid sense in only using floats.
BigInt is for whatever reason the most common name used
Floating point numbers are used for values that have finite precision but typically much larger range.
I guess I'm making a distinction between precision and range. I was pretty sure they couldn't be used interchangeably. Now I'm seeing "precision" being used to describe the size of the integer. I feel like that's a bit of a misnomer.