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

History Of Ticket 960210ffffffffff

Artifacts Associated With Ticket 960210ffffffffff

  1. Ticket change [a556f8d122] (rid 110357) by nobody on 2004-05-25 15:21:00:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The expr command, when given the literal string "Nan"
      (quotes included), tries to convert Nan to a number and
       yields the error:
      
           domain error: argument not in valid range
      
      Clearly, what's inside quotes is not expr's business,
      it shouldn't open that box !
      
      Also notice that this strange behavior is insensitive
      to whitespace, but it to other characters:
      
         expr {"Nan xyz"}
      
      works correctly.
      
    4. foundin initialized to: "final: 8.3.5"
    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: "45. Parsing and Eval"
    10. title initialized to: "expr {"Nan"}"
    11. type initialized to: "Bug"
  2. Ticket change [7fe12eed2f] (rid 97637) by ferrieux on 2004-05-25 22:34:34:

    1. icomment:
      Logged In: YES 
      user_id=496139
      
      This was me (sorry I hadn't logged in).
      Maybe one useful detail:
      
      The same problem arises if the Nan results from an evaluation:
      
      proc foobar {} {return Nan}
      expr {[foobar]}
      
      So we can reinterpret this as: "expr systematically tries to
      convert its final result to a number". This is at odds with
      Tcl's lazy conversion spirit, and definitely a bug !
      
      -Alex
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  3. Ticket change [807079cc28] (rid 116865) by dgp on 2004-05-26 03:32:49:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      be sure to reconcile any
      changes here with Bug 218000
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [a117de2d74] (rid 109662) by msofer on 2004-05-26 04:46:54:

    1. assignee changed to: "dkf"
  5. Ticket change [f7239f7e90] (rid 91321) by dkf on 2004-05-26 05:31:31:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Tcl's NaN handling is an utter mess.  But [expr] is (IIRC)
      defined to be aggressive about trying to convert its result
      into numeric form.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [0b5bc1b768] (rid 113971) by nobody on 2004-05-28 18:10:18:

    1. icomment:
      Logged In: NO 
      
      sorry, i couldn't logged in
      
      i tried this command but not foumd any error in it as it 
      printing "Nan"
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  7. Ticket change [0bc4da66e7] (rid 114049) by ferrieux on 2004-05-28 18:30:37:

    1. icomment:
      Logged In: YES 
      user_id=496139
      
      Look at the header: I tried this on 8.3.5.
      So please give the [info patchlevel] where you no longer
      have the bug.
      I'd like to know the critical version where this was fixed.
      Any idea, frome those who know expr's changelog by heart ?
      
      -Alex
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  8. Ticket change [a8cade835e] (rid 99050) by dkf on 2004-05-28 20:04:20:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      8.4 had a bit of work in this area, but it turns out that
      many platform libc's aren't good here.  :^(
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [450bd205fe] (rid 116813) by dkf on 2004-05-30 19:34:33:

    1. closedate changed to: "2004-05-30T12:34:33"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      The expr.n manual page states that:
      "If an operand does not have one of the integer formats
      given above, then it is treated as a floating-point number
      if that is possible."
      
      Thus, [expr] is correct to regard "Nan" as a float, and is
      at least not vastly wrong in regarding that as a domain
      error (because that's what generates NaN values normally.) 
      8.4 should be a bit better at handling this.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Out of Date"
    7. status changed to: "Closed"
    8. username: "dkf"