Skip to content
Tcl Source Code History Of Ticket 85ce4bf928
Login

History Of Ticket 85ce4bf928

Artifacts Associated With Ticket 85ce4bf928

  1. Ticket change [26ff2520d3] (rid 141137) by anonymous on 2015-02-02 08:21:54:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      % binary scan [binary format R Inf] R x
      % set x
      3.4028234663852886e+38
      
      This is FLT_MAX - see the bit pattern described near the bottom of http://wiki.tcl.tk/41088
      
      The issue seems to be the test at http://core.tcl.tk/tcl/artifact/fee105a45aaf25a3?ln=1915-1917
      
      By my reading, the condition should become:
      
          if (!isinf(dvalue) && (fabs(dvalue) > (double)FLT_MAX))
      
      In the chat, kbk adds:
      
      If the float64 is less than FLT_MAX + 1/2 ulp, then it's not a 'true' overflow, and it should [binary format] to FLT_MAX. Greater than that, and it should be Inf.
      
      Exact FLT_MAX + 1/2 ulp should round to FLT_MAX (round to even).
      
      I have implemented a fix in http://chiselapp.com/user/aspect/repository/tcl/timeline?r=aspect-binary-float-inf
      
      The first checkin http://chiselapp.com/user/aspect/repository/tcl/ci/f4d7334db9 corrects behaviour for Inf/-Inf only, and adds some tests.
      
      Following checkins follow kbk's advice (I hope!) to correct out-of-range rounding behaviour, but with some questionable aspects:
      
        * c99 reliance for INFINITY
        * FLT_MAX+1/2ulp is calculated with an expression I don't entirely trust
        * changes results (!!) of some existing tests which expect rounding to FLT_MAX
      
      The included tests should be complete, but those in the 3rd checkin don't conform to conventions of their neighbours.
      
      Another way to create FLT_MAX+1/2ulp for comparison would be as follows, though I can't vouch for its portability.
      
          /* smallest double that should round to +Inf */
          double flt_min_inf {} {
              uint64_t bits = 0x47effffff0000001;
              return *(double*)&bits;
          }
      
          /* largest double that should round to FLT_MAX */
          double flt_max_dbl {} {
              uint64_t bits = 0x47effffff0000000;
              return *(double*)&bits;
          }
      
      Let me know if there's anything I can do to make this patch easier to consume.
      
    5. foundin initialized to: "8.6.3"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "cb02a4a25e8da92f2790bc307bf01ef24ce6053e"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "48. Number Handling"
    15. title initialized to: "[binary format R Inf] stores FLT_MAX"
    16. type initialized to: "Bug"
  2. Ticket change [ee2071a2ce] (rid 141139) by dgp on 2015-02-04 15:12:30:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  3. Ticket change [8616f05c52] (rid 141140) by dgp on 2015-02-04 15:15:50:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  4. Ticket change [089b6e5d66] (rid 141141) by dgp on 2015-02-04 15:21:35:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  5. Ticket change [b1718f14da] (rid 141142) by dgp on 2015-02-04 15:43:29:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  6. Ticket change [d1f53302e6] (rid 141143) by dgp on 2015-02-04 18:03:16:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  7. Ticket change [035c4feada] (rid 141144) by dgp on 2015-02-04 18:10:28:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  8. Ticket change [b87cfdf45c] (rid 141146) by dgp on 2015-02-04 18:14:59:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  9. Ticket change [6e6905b4e2] (rid 141147) by dgp on 2015-02-04 18:18:08:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The patch changes the expected result of
      existing tests in the test suite, so I'd
      prefer to have a review from kbk.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  10. Add attachment "aspect-binary-float-inf.fbun" [d63c3c2716] (rid 141248) by anonymous on 2015-02-20 23:00:56.

  11. Ticket change [6a072f6b9e] (rid 141249) by anonymous on 2015-02-20 23:02:20:

    1. icomment: "fossil bundle attached to this ticket."
    2. login: "anonymous"
    3. mimetype: "text/plain"
    4. username: "aspect"
  12. Ticket change [d9e89537bb] (rid 141393) by dkf on 2015-03-17 12:01:32:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. resolution changed to: "Remind"
  13. Ticket change [7bd484521b] (rid 141786) by dkf on 2015-05-15 22:17:16:

    1. icomment:
      Imported as branch bug-85ce4bf928 (see [21866fab39])
      
    2. login: "dkf"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "dkf"
  14. Ticket change [c56e1999c0] (rid 149481) by aspect on 2016-11-10 13:01:19:

    1. icomment:
      As another data point, the same is not true of doubles:
      
      % binary scan [binary format q Inf] q x
      1
      % set x
      Inf
      
    2. login: "aspect"
    3. mimetype: "text/plain"
  15. Ticket change [93e86f2f9a] (rid 206355) by jan.nijtmans on 2022-11-02 15:06:58:

    1. icomment: "Rebased to core-8-branch: [20959e0da2451a45]"
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  16. Ticket change [0d0318ebc8] (rid 206735) by jan.nijtmans on 2022-11-10 13:56:50:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459894.08114273"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [48706a2425734695|here]. Since it depends on C99, the fix will not be in 8.6, but in 8.7
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"