Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-05-11
02:17 • Ticket [693877ffff] FreeBSD, expr, "Infinity" status still Closed ... artifact: 830079b2d7 user: kennykb
02:17 • Closed ticket [693877ffff]. artifact: 1475c45fba user: kennykb
2003-04-02
02:10 • Ticket [693877ffff]: 6 changes artifact: 68c484f7f0 user: hobbs
2003-02-27
23:47 • Ticket [693877ffff]: 4 changes artifact: 43f9999f12 user: dgp
23:47 • Ticket [693877ffff]: 1 change artifact: adf7485f33 user: dgp
16:54 • Ticket [693877ffff]: 7 changes artifact: c2362d22a1 user: dkf
03:31 • Ticket [693877ffff]: 4 changes artifact: d9630ee02b user: mc8
2003-02-26
20:28 • New ticket [693877ffff]. artifact: 58fc19d212 user: nobody

FreeBSD, expr, "Infinity"

Closed / Fixed693877ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 22 years ago
Descriptionplain2003-02-26 20:28:00
From my testing, works on FreeBSD, but not on 
NetBSD.  Tested on 8.3.2, then upgraded to 8.3.5 
(same issue).

-> expr {0?1:"Infinit"}
<- Infinit

-> expr {0?1:"Infinity"}
<- Tcl error: floating-point value too large to represent

It's being messed up by the word 'infinity'?

-----------

OS Platform and Version
 -- FreeBSD 1.6E
 
Problem Behavior
 -- The word 'Infinaty' not liked in expr evaluations?
 
Expected Behavior 
-> expr {0?1:"Infinity"}
<- Infinity

-----------

Carl M. Gregory
http://mc.purehype.net/whois/
mc8plain2003-02-27 03:31:19
Logged In: YES 
user_id=721653

OS Platform and Version 
-- NetBSD 1.6E 

Sorry
dkfplain2003-02-27 16:54:31
Logged In: YES 
user_id=79902

Bet this is yet another native strtod() problem.  :^(
dgp Ticket [693877ffff]: 1 change [History diff]2003-02-27 23:47:36
dgpplain2003-02-27 23:47:37
Logged In: YES 
user_id=80530


Note related change in  Tcl 8.4:

2002-07-22  Donal K. Fellows  <[email protected]>

        * tests/expr.test (expr-22.*): Added tests to help
detect the
        corrected handling.
        * generic/tclExecute.c (IllegalExprOperandType):
Improved error
        message generated when attempting to manipulate Inf
and NaN values.
        * generic/tclParseExpr.c (GetLexeme): Allowed parser
to recognise
        'Inf' as a floating-point number. [Bug 218000]
hobbsplain2003-04-02 02:10:51
Logged In: YES 
user_id=72656

Kevin's playing with this now...
kennykbplain2005-05-11 02:17:21
Logged In: YES 
user_id=99768

Infinity and NaN are now recognized as floating-point "number"s
on all platforms with IEEE-754 arithmetic.  Infinity does
not cause an error to be thrown, and tests larger than any
finite number.  NaN causes an error to be throws whenever
it arrives in Tcl_GetDoubleFromObj.  It is handled silently
in [binary format] and [binary scan].

"Fixed in 8.5"
kennykb Ticket [693877ffff]: 2 changes [History diff]2005-05-11 02:17:22
Log in (anonymous is fine) to add a comment.