Skip to content
Tcl Source Code History Of Ticket 532537ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 532537ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 532537ffffffffffffffffffffffffffffffffff

  1. Ticket change [158b1677bf] (rid 124579) by nobody on 2002-03-20 16:03:35:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Try following script under Window NT:
      
      proc testDouble {} {
          set a0 [expr {double(2.63624325102e-308)}]
          set b  [expr {double(0.19024736769)}]
          set a  $a0
      
          set count 30
          while {[incr count -1] > 0} {
              # just make a lose its double repr
              # string length $a
              puts "a = $a"
              set a [expr {$a*$b}]
          }
      }
      
      a is decreasing until 0.0.
      
      Now uncomment the [string length] line, and try it
      again. This gives the error message:
        can't use non-numeric string as operand of "*"
      (Is it possible to have "floating-point value too
      small to represent" ?)
      
      This work fine under Linux. Can I conclude that my
      Windows NT strtod() is buggy ?
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "11. Conversions from String"
    10. title initialized to: "Buggy Windows strtod() ?"
    11. type initialized to: "Bug"
  2. Ticket change [fb3f308700] (rid 92021) by hobbs on 2002-03-23 07:09:12:

    1. closedate changed to: "2002-03-23T00:09:12"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      perhaps ... but I get the following on Win2K with a VC++6 
      compiled 8.3.4 (ActiveTcl 8.3.4.2):
      
      (tkcon) 50 % testDouble
      a = 2.63624325102e-308
      a = 5.01538339097e-309
      a = 9.54163488088e-310
      a = 1.81527091955e-310
      a = 3.45350514088e-311
      a = 6.57020262356e-312
      a = 1.24996375432e-312
      a = 2.37802313969e-313
      a = 4.52412642615e-314
      a = 8.60703143633e-315
      a = 1.63746507553e-315
      a = 3.1152341918e-316
      a = 5.92665091618e-317
      a = 1.12752993739e-317
      a = 2.14509469586e-318
      a = 4.08098223465e-319
      a = 7.76374755875e-320
      a = 1.47725628107e-320
      a = 2.81123352484e-321
      a = 5.33590897509e-322
      a = 1.03753785627e-322
      a = 1.97626258336e-323
      a = 4.94065645841e-324
      a = 0.0
      a = 0.0
      a = 0.0
      a = 0.0
      a = 0.0
      a = 0.0
      
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. status changed to: "Pending"
    7. username: "hobbs"
  3. Ticket change [378f268af7] (rid 107302) by beric on 2002-03-25 15:16:29:

    1. icomment:
      Logged In: YES 
      user_id=493507
      
      Have you uncommented the [string length] line ?
      
      % expr {double(4.94065645841e-324)}
      floating-point value too small to represent
      % expr {double(5.92665091618e-317)}
      floating-point value too small to represent
      
      with both AS 8.3.4.1 and 8.4a4 compiled with VC6
      on two NT 4 station.
      
      
      
      
    2. login: "beric"
    3. mimetype: "text/plain"
    4. username: "beric"
  4. Ticket change [5a953a357a] (rid 118168) by dkf on 2002-03-25 17:51:20:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Can duplicate this in 8.3.4 under Solaris/SPARC as long as I
      remember to uncomment the [string length] (which acts as a
      complete destroyer of the double rep, as it converts to the
      wide-character internal rep)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dkf"
  5. Ticket change [d232206deb] (rid 113489) by beric on 2002-03-25 20:09:07:

    1. icomment:
      Logged In: YES 
      user_id=493507
      
      Being surprised to found in <float.h>
      #define DBL_MIN 2.2250738585072014e-308
      I have tried a c code declaring two double:
        2.63624325102e-308
        5.01538339097e-309
      It compile on both windows and linux, linux strtod()
      works with both string repr, windows (VC6) fails with
      errno == ERANGE for the second.
      
      The following page show that doubles have normalized
      and denormalized representation:
       http://babbage.cs.qc.edu/courses/cs341/IEEE-
      754references.html
      DBL_MIN is the minimum normalized double.
      
      It looks like windows's strtod() doesn't work on
      denormalized double, whereas linux does.
      
      
      
      
    2. login: "beric"
    3. mimetype: "text/plain"
    4. username: "beric"
  6. Ticket change [81069b7fef] (rid 116965) by dgp on 2003-11-13 08:53:17:

    1. foundin changed to: "obsolete: 8.3.4"
  7. Ticket change [dca0fc4363] (rid 114516) by kennykb on 2005-01-25 22:20:42:

    1. assignee changed to: "kennykb"
    2. icomment:
      Logged In: YES 
      user_id=99768
      
      This problem is in the scope of TIP #132 -
       assigning it to myself.
      
      The fix may be as simple as including 
      strtod.obj in COMPAT_OBJS, depending on
      whether compat/strtod.c has the same bug.
      But depending on the native C library in this
      area has proven to be a mistake; FP conversion
      bugs have been recurrent.
      
      
    3. login: "kennykb"
    4. mimetype: "text/plain"
    5. username: "kennykb"
  8. Ticket change [61909bd2e6] (rid 92262) by kennykb on 2005-01-25 23:03:32:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      Nope, compat/strtod.c doesn't do denormals either - and it
      fails silently,
      which is worse.
      
      % expr 2e-308
      1.9999999999999998e-308
      % expr 2.63624325102e-308
      0.0
      
      So we'll need to bite the bullet, fix this in compat/, and
      promote the
      fix to generic/.  I did *not* need to hear this, but I'm not
      really surprised.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  9. Ticket change [b02b9d00b6] (rid 97937) by kennykb on 2005-05-11 02:07:17:

    1. status changed to: "Closed"
  10. Ticket change [df786ea60b] (rid 115021) by kennykb on 2005-05-11 02:07:18:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      The changes that implement TIP #132 fix this problem as a side
      effect, so I'm going to close this out as "fixed in 8.5". 
      An 8.4
      backport is probably not worth the effort.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. resolution changed to: "Fixed"
    5. username: "kennykb"
  11. Ticket change [1d7a8db2cd] (rid 90820) by kennykb on 2005-05-11 02:07:19:

    1. closedate changed to: "2005-05-10T19:07:19"
    2. closer changed to: "kennykb"