First question: What exactly are "inf" and "nan"? I'm guessing they're values out of the BYOND variable range.
Second question: Is there any way I can have very large or very small numbers not display in exponential notation?
I had a third one, but I completely forgot what it was... I'll think of it later.
Thanks.
ID:180388
Jul 9 2001, 10:53 am
|
|
In response to Leftley
|
|
On 7/9/01 2:55 pm Leftley wrote:
Sorry, I don't actually know the answers to any of these, I just couldn't resist. That's more like it! |
In response to Cinnom
|
|
On 7/9/01 3:01 pm Cinnom wrote:
On 7/9/01 2:55 pm Leftley wrote: Experience makes me guess that (at least for me, I might be wrong), large numbers turn into goobly numbers when they get over a million. Or maybe it's a billion. anyway, you would just have to add a cap to the number, much like you do with damage, when it's below 0, you set it to 0, if it's above a billion or whatever, you set it to a billion. Of course, this probably isn't what you're looking for but otherwise I can't help. |
On 7/9/01 2:53 pm Cinnom wrote:
First question: What exactly are "inf" and "nan"? I'm guessing they're values out of the BYOND variable range. 1.Your right on this one. 2.look up num2text ;) |
In response to Xzar
|
|
On 7/9/01 3:23 pm Xzar wrote:
2.look up num2text ;) Doh! Now why didn't I think of that? Thanks. =) |
On 7/9/01 2:53 pm Cinnom wrote:
First question: What exactly are "inf" and "nan"? I'm guessing they're values out of the BYOND variable range. I can't remember my original third question, but here's another one that's been on my mind: How can I tell how long a text string is? |
In response to Cinnom
|
|
On 7/9/01 3:42 pm Cinnom wrote:
On 7/9/01 2:53 pm Cinnom wrote: Nevermind, I found what I was looking for. |
In response to Cinnom
|
|
On 7/9/01 3:42 pm Cinnom wrote:
On 7/9/01 2:53 pm Cinnom wrote: Infinite, and Not a Number. But yeah, that's pretty much a good description of them. I'm not sure what the difference between them is, because I've never really had an applicable situation that becomes them. Second question: Is there any way I can have very large or very small numbers not display in exponential notation? Yup, as said before, num2text(). Note that higher numbers lose resolution. For example, if you have several septillion, and you add a hundred, the end result will still be several septillion. The bigger the number, the more trailing zeros it has. This is another problem of rounding errors. I had a third one, but I completely forgot what it was... I'll think of it later. The answer is 42. I can't remember my original third question, but here's another one that's been on my mind: lentext() and/or length() They'll both do the same thing, except lentext() is text-only, while length() works for lists and other items as well. |
Sorry, I don't actually know the answers to any of these, I just couldn't resist.