Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Number values won't stay correct?

Asked by 8 years ago

Apparently, roblox isn't even competent enough to handle numbers. I have a NumberValue set to 2.8, and instantly after setting it, it goes to something derpy like "2.7999999999999998"

This is just annoying. How2fix?

0
Try an IntValue. shayner32 478 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

Double Percision floating point format (DPFPF)

Now everyone reading this, is dumbfounded. That's right, I guessed it. Anyways, according to Wikipedia, this is..

Double-precision floating-point format is a computer number format which occupies 8 bytes (64 bits) in computer memory and represents a wide, dynamic range of values by using a floating point.

Funky right? I'll put this in my own language, and hopefully you will understand. This is a number that takes up 8 bytes. Maybe you'll think of something? right? Now, let me tell you the truth. The fancy words Double Percision Floating Point Format has been nicknamed something we all know, a double

gasps in audience

So they reason this is happening is because these values are fancy little things called double values. There is no way to fix this. They are double values themselves. An explanation to something like this will make your head explode surely, and I cannot deliver it. An explanation of a problem like this cannot be given by a simpleton like me, but I have given you an answer to your real question.

There is no way to fix this

0
Thanks, roblox. Maxwell_Edison 105 — 8y
Ad

Answer this question