Artifacts Associated With Ticket 664775ffffffffff
Ticket change [7341c1a79e] (rid 105014) by dgp on 2003-01-09 00:19:05:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
==== execute-7.30 Wide int handling in function call FAILED ==== Contents of test case: set x 0x12345687123456 incr x expr {sin($x) == sin(double($x))} ---- Result was: floating-point value too small to represent ---- Result should have been (exact matching): 1 ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ==== execute-7.30 FAILED There are several problems here. First note that sin(x) == sin (x + 2*pi), so in order to compute the sin() of a value you need to know its precision at a scale considerably less than 2*pi. For large numbers, differences of 2*pi can get lost in the low order bits of the floating point rep, or not represented at all. Taking the sin() of such imprecise numbers is essentially meaningless. For this reason, on the SGI platform, for any x > 2^50, sin(x) returns 0, and errno is set to ERANGE. In the test above, x > 2^50. If all that is needed for this test is a wide int argument, then replacing x with some value less than 2^50, but greater than 2^31 (thus wide) should fix the test. It is unfortunate that the SGI sin() function raises ERANGE in this circumstance, I think it would make more sense to raise EDOM. Anyhow, the combination of ERANGE and value == 0 gets interpreted by Tcl in TclExprFloatError() as a floating point underflow ("floating-point value too small to represent"), but that's not accurate in this case. Would be nice to get a better error message for this. - foundin initialized to: "obsolete: 8.4.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "47. Bytecode Compiler"
- title initialized to: "execute-7.30 fails on SGI"
- type initialized to: "Bug"
Ticket change [350bcc7b8a] (rid 106853) by dkf on 2003-02-19 21:11:19:
- icomment:
Logged In: YES user_id=79902 Really, for the purposes of what the test is testing, we could (and, so it seems, should) use log() instead of sin(). The actual value returned doesn't matter in this case since it is just checking explicit vs. implicit wide-to-double conversions.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [b51bdccec0] (rid 125185) by msofer on 2003-02-19 21:42:42:
- closedate changed to: "2003-02-19T14:42:42"
- closer changed to: "msofer"
- resolution changed to: "Fixed"
- status changed to: "Closed"