User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: [2.50.2] Negative Max Float Error?

  1. #11
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,451
    Level
    24
    vBActivity - Bars
    Lv. Percent
    73.19%
    I get a truncation warning on -100000, but not -99999. Perhaps it truncates the integer part to six digits and is including the minus in that.
    It used to be that constants couldn't be negative. It could be related to that; that truncation would have been safe originally.

  2. #12
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    Quote Originally Posted by Saffith View Post
    I get a truncation warning on -100000, but not -99999. Perhaps it truncates the integer part to six digits and is including the minus in that.
    It used to be that constants couldn't be negative. It could be related to that; that truncation would have been safe originally.
    Add a decimal portion to it. It will error on:

    const float NN = -999998.9999;

    Any negative integer smaller than 999999. and any negative float smaller than -21473.0001 is truncated.

  3. #13
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,451
    Level
    24
    vBActivity - Bars
    Lv. Percent
    73.19%
    Do you mean -99998.9999? -999999.9999 is much too low. I don't see any errors on -99999.9999 or -99998.9999.
    I noticed this, however:
    const float ASDF=-100.9999;

    Trace(ASDF);
    Trace(-100.9999);

    That prints
    -99.0001
    -100.9999

    That seems to support the hypothesis that it's simply dropping a digit. It only checks six characters before the decimal point, then adds everything after that.
    In any case, I can probably figure out how to fix it.

    Edit: Yep. Fixed.
    Last edited by Saffith; 12-19-2015 at 10:50 PM.

  4. #14
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    Quote Originally Posted by Saffith View Post
    Do you mean -99998.9999? -999999.9999 is much too low. I don't see any errors on -99999.9999 or -99998.9999.
    I noticed this, however:
    const float ASDF=-100.9999;

    Trace(ASDF);
    Trace(-100.9999);

    That prints
    -99.0001
    -100.9999

    That seems to support the hypothesis that it's simply dropping a digit. It only checks six characters before the decimal point, then adds everything after that.
    In any case, I can probably figure out how to fix it.

    Edit: Yep. Fixed.

    Oh, yes, I did mean that. Typed an extra 9 there; didn't I?

    The sign as a string char...that figures. Good to know that it's fixed for the future.

    Does it now support MIN_FLOAT of -214747.9999 ? or some other value?

  5. #15
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,451
    Level
    24
    vBActivity - Bars
    Lv. Percent
    73.19%
    Yes, it's -214747.9999.

  6. #16
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    Quote Originally Posted by Saffith View Post
    Yes, it's -214747.9999.
    Good, very very good. Thank you.

    As a side- note, this just created an blindingly easy 2.50.3 versus 'earlier versions' validation. At least I will be sure of completing all the std update and zscript docs files before that is ready. :p

    Seriously though, I truly am almost done with everything except the std.txt docs. Those are on my list. I'm rewording some thing sin zscript.txt now, and adding some sections. I added a heading on system timing, that you might want to verify, and I'll send you that as a PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social