Skip to content
Tcl Source Code History Of Ticket 866469ffffffffff
Login

History Of Ticket 866469ffffffffff

Artifacts Associated With Ticket 866469ffffffffff

  1. Ticket change [1cb6bb5f6e] (rid 90657) by lars_h on 2003-12-27 23:11:55:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Throughout most of Tcl8, there has been a bug (or 
      malfeature of the tcl_precision variable) that two float 
      values can have identical string representations but 
      still behave differently when operated on. I hope that 
      TIP 132 will soon correct this.
      
      Although floats have been slightly magical, one has 
      however always been able to rely on integers to not hide 
      any information from the string representation. Sadly, 
      that isn't true anymore. Behold:
      
      % set l [expr 65536]
      65536
      % set w [expr {wide($l)}]
      65536
      % string equal $l $w
      1
      % expr {$l * 65536}
      0
      % expr {$w * 65536}
      4294967296
      
      In short, the bug is that [expr] lets its result depend 
      on details of the internal representation that are not 
      recorded in the string representation.
      
      
      In a larger perspective, I think this is a symptom of a 
      failure to clearly decide what an integer should be in 
      Tcl, but sortinh that out requires a TIP. (IMHO the only 
      approach that has a chance of being consistent is to 
      allow arbitrarily long decimal strings as integers, as 
      now use efficient internal representations for integers 
      up to 32 or 64 bits, and rely on some callback similar 
      to [unknown] for all operations on larger numbers.)
      
      
    4. foundin initialized to: "obsolete: 8.4.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "lars_h"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "Integers aren't strings anymore"
    11. type initialized to: "RFE"
  2. Ticket change [efe596b193] (rid 109080) by dgp on 2003-12-31 22:50:08:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Note this is assigned to Donal Fellows,
      who is only intermittently available 
      during the holiday season.
      
      People interested in this report might
      want to have a look at TIP 72, and
      the compromises made to get 64-bit
      integer support into Tcl while limiting
      the incompatibilities introduced.
      
      http://purl.org/tcl/tip/72.html
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [f57f363cd1] (rid 130117) by dkf on 2004-01-01 23:54:44:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Yuck.
      
      The problem is balancing between the real need for 64-bit
      values and the (unknown) quantity of code out there that
      assumes that int values are 32-bits wide.  If it hadn't been
      for that (and the speed implications on 32-bit platforms),
      I'd have preferred to make all integers 64-bits wide on all
      platforms.
      Trying to do something with magic representation shimmering
      is unlikely to work well, since it is hard to make the
      processor math ops give some kind of trap when they lose
      information during the processing of ints.  Getting a cheap
      way to perform the type guards is the critical part, that
      and defining a non-surprising way to deal with the situation
      (which currently escapes me.)
      
      If you want to try your hand at fixing math ops, their
      semantics are defined entirely within tclExecute.c; the
      math-related ops start at INST_EQ and are mostly
      self-explanatory (if long.)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "1 Zero"
    5. subsystem changed to: "47. Bytecode Compiler"
    6. username: "dkf"
  4. Ticket change [5566730b5a] (rid 94125) by lars_h on 2004-01-03 04:02:10:

    1. icomment:
      Logged In: YES 
      user_id=938835
      
      The quickest way of fixing this bug is probably to keep the 
      behaviour of the bytecode instructions, but change the string 
      representation of wides so that this behaviour becomes 
      proper. Such a string representation could be as that 
      generated by the [format] specifier
      
         wide(%d)
      
      since this has the merit of surviving an unbraced [expr]. 
      From this would then follow that anything matching the RE
      
         wide\(-?(0|[1-9][0-9]*|0[0-7]*|0x[0-9a-f])\)
      
      ought to be a valid integer. The main side-effect should be 
      that output of wides which is not [format]ed may look a 
      little strange, and that is probably acceptable.
      
      
      
      
      
    2. login: "lars_h"
    3. mimetype: "text/plain"
    4. username: "lars_h"
  5. Ticket change [16c0e4670b] (rid 124763) by nobody on 2004-01-20 16:02:37:

    1. icomment:
      Logged In: NO 
      
      Question.
       Would making all Tcl integers 64 bit quantities
       actually make a *noticeable* difference to speed
       even on 32bit machines?
      
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  6. Ticket change [2fd8e5ca9a] (rid 93138) by dkf on 2004-01-20 16:59:35:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      In speed terms, I don't think it would make much odds.  Any
      string operations about will dominate for sure. :)
      
      The problem is the semantic difference; nobody's sure how
      much code exists out there that depends on 32-bit widths of
      values.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [d02edc0fad] (rid 113123) by dkf on 2004-09-19 00:22:23:

    1. assignee changed to: "nobody"
    2. foundin changed to: "None"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      Doing anything about this "bug" requires a TIP and a great
      deal of head-scratching. Transferring to the FRQ track...
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. subsystem changed to: "None"
    7. username: "dkf"
  8. Ticket change [e33b7835b8] (rid 87756) by dkf on 2004-09-19 00:24:09:

    1. assignee changed to: "dkf"
    2. subsystem changed to: "10. Objects"
  9. Ticket change [8b3d71d34c] (rid 127528) by dkf on 2005-04-27 04:31:13:

    1. assignee changed to: "kennykb"
    2. priority changed to: "5 Medium"
  10. Ticket change [fe73fa0633] (rid 108592) by kennykb on 2005-05-11 02:12:55:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      TIP #132 doesn't fix this, but TIP #237 should.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  11. Ticket change [a67c436f8c] (rid 98609) by dgp on 2005-10-22 09:35:37:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2005-10-22T02:35:37"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      This ought to be fixed now.
      
      Comment here if not.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Accepted"
    8. status changed to: "Pending"
    9. username: "dgp"
  12. Ticket change [8d2165ca06] (rid 127875) by sf-robot on 2005-11-05 10:20:18:

    1. closedate changed to: "2005-11-05T03:20:18"
    2. closer changed to: "sf-robot"
    3. icomment:
      Logged In: YES 
      user_id=1312539
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"