Skip to content
Tcl Source Code History Of Ticket e5f06285de
Login

History Of Ticket e5f06285de

Artifacts Associated With Ticket e5f06285de

  1. Ticket change [e98a8eabcb] (rid 206322) by anonymous on 2022-11-01 19:13:24:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      using a non-integer increment, [lseq] rounding seems to be not consistent:
      % lseq 4 40 0.1
      4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.300000000000001 6.4 6.5 6.6 6.7 6.800000000000001 6.9 7.0 7.1 7.2 7.300000000000001 7.4 etc
      Using a different starting point:
      % lseq 6 40 0.1
      6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 9.0 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 10.0 10.100000000000001 10.2 10.3 etc
      
    5. foundin initialized to: "9.0a4"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "70616f66b56ae2faa132e7498fb25b678eec09e9"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to: "lseq : inconsistent rounding"
    16. type initialized to: "Bug"
  2. Ticket change [4178750a5b] (rid 213732) by griffin on 2023-04-24 00:04:15:

    1. assignee changed to: "griffin"
    2. login: "griffin"
    3. mimetype: "text/plain"
  3. Ticket change [2f01ab645c] (rid 213854) by oehhar on 2023-04-25 09:35:27:

    1. icomment:
      Thanks for the comment.
      Thanks to Brian to take it and work on it: check-in: [62eaef043c] , branch: [bug-fa00fbbbabe].
      
      Here are my perhaps unrelated comments:
      
      Displaying of a double in decimal is difficult and may have the effects seen here. This might be intentional, as it might be more exact on the double level.
      
      So, lets try manually with TCL 8.6.13:
      
      % expr {4 + 22 * 0.1}
      6.2
      % expr {4 + 23 * 0.1}
      6.300000000000001
      % expr {4 + 24 * 0.1}
      6.4
      
      So, the calculation is ok. Only the displayed numbers are "ugly" or "surprising", but this is due to the display as decimal of the double data type.
      
      I would at least think twice, if changing this on the display side is an improvement. 6.3 is not equal to 6.300000000000001
      
      So, the result of expr {4 + 23 * 0.1} will not be any more equal to the lseq element.
      
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  4. Ticket change [7381bc428e] (rid 213876) by griffin on 2023-04-26 05:40:02:

    1. icomment:
      Hi Harald!
      I appreciate your concerns.  
      In this case, the long numbers are the result inherent error in converting IEEE floating point representation to decimal, basically, trying to represent a binary number in decimal.  
      If you work out the math by hand, these extract tiny fractions do not appear.  
      With careful rounding, the "correct" result can be achieved.
      
    2. login: "griffin"
    3. mimetype: "text/x-markdown"
  5. Ticket change [dc3c49327a] (rid 213917) by griffin on 2023-04-26 16:26:55:

    1. closedate changed to: "2460061.18537029"
    2. closer changed to: "griffin"
    3. icomment: "Fix with check-in [a610e50b2faa8c52]"
    4. login: "griffin"
    5. mimetype: "text/x-fossil-plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  6. Ticket change [9ca2d166f9] (rid 213941) by oehhar on 2023-04-27 06:36:58:

    1. closedate changed to: "2460061.77567483"
    2. closer changed to: "oehhar"
    3. icomment:
      Wow, great !
      
      Then, also
      <verbatim>
      % expr {4 + 23 * 0.1} 6.300000000000001
      </verbatim>
      
      will also be corrected? Or is corrected in TCl 9.0?
      
      Great !
      Harald
      
    4. login: "oehhar"
    5. mimetype: "text/x-fossil-wiki"
    6. username: "oehhar"
  7. Ticket change [d18d68130d] (rid 213970) by anonymous on 2023-04-27 19:36:12:

    1. closedate changed to: "2460062.31680811"
    2. closer changed to: "anonymous"
    3. icomment:
      Thanks for this fix (and the initial implementation), Brian.
      Looking forward to start using [lseq].
      Harm Olthof
      
    4. login: "anonymous"
    5. mimetype: "text/plain"
  8. Ticket change [6a2b0035f9] (rid 215903) by chrstphrchvz on 2023-06-25 19:47:16:

    1. closedate changed to: "2460121.32449935"
    2. closer changed to: "chrstphrchvz"
    3. icomment:
      Will this issue be addressed in 8.7, where it is also present?
      
    4. login: "chrstphrchvz"
    5. mimetype: "text/x-fossil-wiki"