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
    35
    Posts
    3,345
    Mentioned
    168 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,055
    Level
    24
    vBActivity - Bars
    Lv. Percent
    6.96%
    Daily Activity
    0%
    Weekly Activity
    3.38%
    Monthly Activity
    13.18%
    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.
    [téknolŕiz]

    ffcscript.zh 1.1.1 - Updated 2014-08-19
    ghost.zh 2.8.2 - Updated 2017-09-10
    tango.zh 1.3.1 - Updated 2017-12-27

  2. #12
    The Timelord
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,084
    Mentioned
    96 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,745
    Level
    19
    vBActivity - Bars
    Lv. Percent
    53.87%
    Daily Activity
    0%
    Weekly Activity
    30.41%
    Monthly Activity
    107.77%
    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.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  3. #13
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    35
    Posts
    3,345
    Mentioned
    168 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,055
    Level
    24
    vBActivity - Bars
    Lv. Percent
    6.96%
    Daily Activity
    0%
    Weekly Activity
    3.38%
    Monthly Activity
    13.18%
    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.
    [téknolŕiz]

    ffcscript.zh 1.1.1 - Updated 2014-08-19
    ghost.zh 2.8.2 - Updated 2017-09-10
    tango.zh 1.3.1 - Updated 2017-12-27

  4. #14
    The Timelord
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,084
    Mentioned
    96 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,745
    Level
    19
    vBActivity - Bars
    Lv. Percent
    53.87%
    Daily Activity
    0%
    Weekly Activity
    30.41%
    Monthly Activity
    107.77%
    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?


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  5. #15
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    35
    Posts
    3,345
    Mentioned
    168 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,055
    Level
    24
    vBActivity - Bars
    Lv. Percent
    6.96%
    Daily Activity
    0%
    Weekly Activity
    3.38%
    Monthly Activity
    13.18%
    Yes, it's -214747.9999.
    [téknolŕiz]

    ffcscript.zh 1.1.1 - Updated 2014-08-19
    ghost.zh 2.8.2 - Updated 2017-09-10
    tango.zh 1.3.1 - Updated 2017-12-27

  6. #16
    The Timelord
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,084
    Mentioned
    96 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,745
    Level
    19
    vBActivity - Bars
    Lv. Percent
    53.87%
    Daily Activity
    0%
    Weekly Activity
    30.41%
    Monthly Activity
    107.77%
    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.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

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