Andrew Ross wrote:

On Wed, Sep 03, 2008 at 08:48:13PM +0100, Andrew Ross wrote:
Just to confirm - I get this same error having installed tcl 8.5 on my
Ubuntu system. This is tcl 8.5.0 and tk 8.5.0. The itcl / itk version is
3.2.1.
Some quick debugging messages suggest the problem is due to the max
function being called with a NaN. I will investigate further...

Andrew

Following up my own response - it looks like the code to detect NaNs
does not work on linux. The relevant string to test for is "nan".
Updating the example to do this works for me and gives identical results
to the C version of the example.
Hi Andrew,

the problem is caused by the string-based bindings: to transfer any numeric value, currently the bindings write the number into a string. The MS Visual C/C++ runtime uses the idiosyncratic string "-1.#IND" as I found out (and corrected for), but most other runtime libraries use "nan" and similar strings (the distinction between "indeterminate" and "not-a-number" is entirely syntactic sugar! The arithmetic is the same - see for instance http://groups.google.com/group/comp.lang.tcl/browse_frm/thread/04d63456a058a7bc)

The thing is, the Tcl interpreter gets passed a string and only in a numeric context (if {} for instance) does it get converted - if possible - to the "number" NaN. Strings representing NaNs that do not fall in the format supported by Tcl are not recognised as a (special) number.

Hm, this does give me an idea of how to solve this for Tcl 8.4 and earlier.

Regards,

Arjen
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to