Posts ID:180388 Favorites
 ID:180388   Jul 9 2001, 1:53 pm 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.
 #1 Jul 9 2001, 1:55 pm 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. 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. Sorry, I don't actually know the answers to any of these, I just couldn't resist.
 #2 Jul 9 2001, 2:01 pm In response to Leftley (#1) 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!
 #3 Jul 9 2001, 2:13 pm In response to Cinnom (#2) On 7/9/01 3:01 pm Cinnom wrote: 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! 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.
 #4 Jul 9 2001, 2:23 pm 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. 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. 1.Your right on this one. 2.look up num2text ;)
 #5 Jul 9 2001, 2:32 pm In response to Xzar (#4) On 7/9/01 3:23 pm Xzar wrote: 2.look up num2text ;) Doh! Now why didn't I think of that? Thanks. =)
 #6 Jul 9 2001, 2:42 pm 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. 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. 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?
 #7 Jul 9 2001, 2:46 pm In response to Cinnom (#6) On 7/9/01 3:42 pm Cinnom wrote: 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. 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. 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? Nevermind, I found what I was looking for.
 #8 Jul 9 2001, 2:48 pm In response to Cinnom (#6) On 7/9/01 3:42 pm Cinnom wrote: 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. 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: How can I tell how long a text string is? 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.