Tcl 8.5 and special numbers
- From: Arjen Markus <arjen.markus@xxxxxxxxxx>
- Date: Sat, 30 Aug 2008 00:25:16 -0700 (PDT)
Hello,
with version 8.5 Tcl supports the special IEEE numbers: Not-a-number,
+ and - Infinity,
(perhaps + and - 0?). Fine so far, but I see in a library I use and
help maintain
(PLplot - http://plplot.sourceforge.net) that certain special numbers
(I think NaNs) are
formatted as "-1.#IND".
The problem is a bit convoluted as up to now the Tcl interface to
PLplot is based on the
string-interface (I intend to change that soon ;)): The special
numbers get printed on the C side
as "-1.#IND" (using printf()) and are passed on as such a string. I
see the same string via Tcl's
puts, but that is probably because they were not interpreted as
numbers inbetween.
I would like to know if Tcl 8.5 regards the underlying bit pattern as
NaN or as something
else entirely. Is this one of the nasty platform-dependencies that we
need to watch out
for? I am used to such representations of NaNs as "1.#QNAN" and
various others ...
(My platform: Windows XP, MSVC/C++ 6.0)
Regards,
Arjen
.
- Prev by Date: binary scan and signed characters
- Next by Date: Re: binary scan and signed characters
- Previous by thread: binary scan and signed characters
- Next by thread: Converting a (big) canvas to an image
- Index(es):
Relevant Pages
|