Where can I download this again? 334 is making me mad now. It's bugging everything, making stats NaN / M NaN
RaeKwon
ID:136216
Mar 19 2003, 3:08 pm
|
|
Mar 19 2003, 3:19 pm
|
|
NaN means it's not a number. For example, if you have 1/0 you get that (or a runtime error, I forget). Or, if you have the square root of a negative number.
|
In response to Garthor
|
|
Garthor wrote:
NaN means it's not a number. For example, if you have 1/0 you get that (or a runtime error, I forget). Or, if you have the square root of a negative number. How would I correct this? It happened spontaneously after months and months of hosting, and never had this problem before. it's contagious, also :S RaeKwon |
In response to RaeKwon
|
|
Are you using square roots or really, really, really big numbers anywhere?
|
In response to Garthor
|
|
Garthor wrote:
Are you using square roots or really, really, really big numbers anywhere? Max it 200 mill, highest number used that is. RaeKwon |
In response to RaeKwon
|
|
RaeKwon wrote:
Max it 200 mill, highest number used that is. Are you dividing by 0, or performing any kind of mathematical operation thats not allowed? That will produce NaN, in any version of BYOND. |
In response to Alathon
|
|
A question...
What is NaN? --Lee |
In response to Mellifluous
|
|
In response to Alathon
|
|
Thanks Alathon, must have read over that a little too fast >:D
--Lee |
In response to RaeKwon
|
|
RaeKwon wrote:
Garthor wrote: Bear in mind that BYOND's numerical precision isn't high enough to give you even ±1 accuracy at that range. BYOND uses standard floating point math, which means its precision isn't exact or even what you might hope it would be. I believe standard floating-point gives a 24-bit mantissa (at best), which means your best accuracy around 200,000,000 is 200,000,000/224, about ±11. Likely the problem you're having is simply that one of your procs is overestimating BYOND's ability to do math at the range of the numbers you've given it. Lummox JR |
In response to Garthor
|
|
but the square root of a negative number x is xi, isn't it? So the root of -2 is 2i?
|
In response to Jp
|
|
Computers can't handle complex math. Yes, sqrt(-2) is 2i, but if you are going to be working with complex numbers, then you'll need to use strings instead of numerical values.
|
In response to Jp
|
|
Jp wrote:
So the root of -2 is 2i? Nope it's 1.4142135623730950488016887242097... * i. Well the decimal numbers go on and on since root 2 is irrational. But the square root of 2 definantly isn't 2. |
In response to Theodis
|
|
Oops, you're right. sqrt(-4) is 2i.
|