Menu

#1382 32-bit tests: BIF's and methods see 1.000000009 as a whole number

5.0.0
closed
nobody
None
none
1
2023-01-01
2016-06-20
Erich
No

For 32-bit only, we're failing a bunch of ooRexx 5.0 tests for BIF's and methods of the form

say space("x x", 1.000000009)      -- should fail because 1.000000009 + 0 = 1.00000001, but it doesn't fail
say space("x x", 1.000000009 + 0)  -- correctly fails

Discussion

  • Rick McGuire

    Rick McGuire - 2016-06-28

    One question, does

    say "x x"~space(1.000000009)

    Also fail? The answer could help narrow the search.

     
  • Rick McGuire

    Rick McGuire - 2016-06-28

    I have a suspicion this test in NumberString::checkIntengerDigits is wrong.

        // now check to see if the first excluded digit will cause rounding
        // if it does, we need to worry about a carry value when converting
        if (*(numberDigits + digitsCount) >= 5)
        {
            carry = true;
        }
    

    I think this should be

        // now check to see if the first excluded digit will cause rounding
        // if it does, we need to worry about a carry value when converting
        if (*(numberDigits + numDigits) >= 5)
        {
            carry = true;
        }
    

    If this is not the problem, this method is likely the place where the bug is occurring.

     
  • Erich

    Erich - 2016-06-28
    • status: open --> pending
     
  • Erich

    Erich - 2016-06-28

    Thanks, exactly that fixed the issue - committed revision [r11072].

     

    Related

    Commit: [r11072]

  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB