Transcript from the "Numbers" Lesson
>> Brian Holt: So the last one we kind of talked about a little bit about but I just wanna go over it again. The last type, these are called primitive types, which means that they're irreducible. You cannot split them into further other things, right?. There's strings, there's booleans, and now we're gonna talk a lot again about numbers right?.
[00:00:18] Number can't be split into something else, it's just a number, right?. So if you ever heard the term primitive type, that's what we're talking about. So the last primitive type that we're going to talk about is a number. So constant num equals five right constant num and like I was saying before.
There's no difference between a float and a float in another language, it would be like 5.001, right?
>> Brian Holt: And all of that is just shoved into one data type, one primitive type which is called a number, unsurprisingly.
>> Brian Holt: Mm-hm.
>> Brian Holt: So just like you would normally expect, like if I do num plus one divided by two here, this is going to follow what you would normally expect from your math class. I'm not gonna teach a math class today.
[LAUGH] But this is gonna be executed first, right? Because division has a higher priority than num, or than addition, right?
>> Brian Holt: So, yes, it follows typical order of operations.
>> Brian Holt: Yeah, the numbers are quite large.
>> Brian Holt: So gotta remember, math dot,
>> Brian Holt: Or, no, it's Number.MAX_SAFE_INTEGER, that's the biggest number you can have. It's usually enough for most people. We'll talk about what that is later, there's also admin's safe integer as well. Which is gonna be roughly the same thing in the negative direction. So if I try to do plus one, or rather minus one.
[00:03:47] I'm not guaranteed what the results are gonna be. So in this case, it actually does handle it correctly. But that's what that safe means that if once you're beyond this point, good luck. [LAUGH] We wish you the best. Most of your math hopefully it falls within that realm though, right?
I don't know what that is. That would be
>> Brian Holt: Thousands, millions, billions, trillions, quadrillions, something that.
>> Speaker 3: It's in my Netflix bill.
[00:04:35] So, for now this is gonna be what you're gonna be using 99% of the time.