Artifacts Associated With Ticket 3600057
Ticket change [9c22ff357e] (rid 111230) by zoltan3 on 2013-01-09 08:42:24:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I suppose, "0x5" cannot be a valid double, but it is accepted by "string is double". % string is double "0x5" 1 But "lsearch" does not like it: % lsearch -exact -real {0x5 2} 2 expected floating-point number but got "0x5" ("-real" means practically "-double"?) - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "zoltan3"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to: "[string is double "0x5"] bug?"
- type initialized to: "Bug"
Ticket change [f84be9701e] (rid 133505) by dkf on 2013-08-25 01:21:53:
- closer changed to: "nobody"
- comment changed to:
I suppose, "0x5" cannot be a valid double, but it is accepted by "string is double". % string is double "0x5" 1 But "lsearch" does not like it: % lsearch -exact -real {0x5 2} 2 expected floating-point number but got "0x5" ("-real" means practically "-double"?) - login: "dkf"
- mimetype: "text/plain"
- priority changed to: "6"
- severity changed to: "Minor"
Ticket change [b7453cd247] (rid 133679) by dkf on 2013-09-05 08:46:35:
- icomment:
Confirmed on 8.4 through 8.6, and this is definitely “unexpected”.
- login: "dkf"
- mimetype: "text/html"
- priority changed to: "7 High"
- username: "dkf"
- icomment:
Ticket change [0db9937ff6] (rid 133726) by dkf on 2013-09-08 14:09:46:
- icomment:
Ugh, the source contains the dreaded comment: <pre>/* TODO */</pre> The functionality is outright missing.
- login: "dkf"
- mimetype: "text/html"
- priority changed to: "9 Immediate"
- severity changed to: "Severe"
- username: "dkf"
- icomment:
Ticket change [d8158971ca] (rid 133731) by dkf on 2013-09-08 14:50:33:
- closedate changed to: "2456544.11844612"
- closer changed to: "dkf"
- icomment:
That should be all fixed now, assuming that I've not made any silly errors. (I've added a fair few tests.)
- login: "dkf"
- mimetype: "text/html"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"
Ticket change [36694f38ee] (rid 133736) by dgp on 2013-09-08 15:38:59:
- closedate changed to: "2456544.15207917"
- closer changed to: "dgp"
- icomment:
Whoa! Whoa! Whoa! What's this? [string is double] is the script form of Tcl_GetDoubleFromObj(). Why are you narrowing its domain? Without discussion? The /* TODO */ comment is troubling yes, but with no indication what the one writing it thought still needed to be done, I'm not seeing the case for this. (And on the eve of a (patch!) release, coincident with attempts to prep for the conference, it's quite disturbing to me.)
- login: "dgp"
- mimetype: "text/plain"
Ticket change [d881ee2f47] (rid 133740) by dkf on 2013-09-08 23:43:24:
- assignee changed to: "dgp"
- closer changed to: "nobody"
- icomment:
In that case <i>you</i> take responsibility for getting it in. Assigned to you; if you assign back to me, I'll just commit the code to the main branch.<p>The issue is exactly that the code is not the same as <tt>Tcl_GetDoubleFromObj</tt> in that it allows “<tt>0x5</tt>” and “<tt>0o5</tt>” through despite these not being allowed in a real call to that function (which is what <tt>lsearch -real</tt> and <tt>lsort -real</tt> use internally). There is also (pre-patch) no test case that checks whether the domains of what is accepted and what rejected is reasonable in these edge cases.<p>The one downside is that <tt>string is double 0x5</tt> returned <tt>1</tt> in 8.4 too. I'm guessing that that was always an oversight.
- login: "dkf"
- mimetype: "text/html"
- resolution changed to: "None"
- status changed to: "Open"
- username: "dkf"
Ticket change [d42cbfc743] (rid 133747) by dgp on 2013-09-09 12:58:17:
- icomment:
[string is double 0x5] == 1 is intended correct behavior. Tcl_GetDoubleFromObj() should also succeed on "0x5" input. In a brief round of testing that's what I see happening. I have not been able to reproduce the ticket's claim about lsearch -exact -real {0x5 2} 2 raising an error. I'll probe a bit more, but this is looking like an Invalid ticket. If the OP is reading and can add info about the Tcl release or other platform or environment details where we might reproduce the [lsearch] error, that could help. - login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [84cb5293c4] (rid 133748) by dgp on 2013-09-09 13:07:56:
- icomment:
The -real option for [lsearch] arrived in Tcl 8.4: % info patch 8.4.0 % lsearch -exact -real {0x5 2} 2 1 (Combining -exact and -real is strange. but there it is) The ticket claims about [lsearch] just are not correct as far as I can tell. The consistent rule implemented by Tcl is that all integers are doubles. That is, the double "equivalent" can be determined and used. This is in the sense of [string is double] as well as Tcl_GetDoubleFromObj(). ("equivalent" can be rather loosely interpreted. All large enough bignum integers are equivalent to the double value "Inf") - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Pending"
- icomment:
Ticket change [0039c85892] (rid 134339) by dkf on 2013-09-27 10:42:38:
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "8"
Ticket change [3968e0f456] (rid 141104) by dgp on 2015-01-26 20:27:37:
- closedate changed to: "2457049.35251585"
- closer changed to: "dgp"
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"