On 3 Nov 2018, at 13:26, Antoniotti Marco <antoniotti.marco@disco.unimib.it> wrote:



On Nov 3, 2018, at 24:54 , Bob Cassels <bobcassels@netscape.net> wrote:

Of course they are represented internally the same way other floating point values are.

Are you asking how to print those values? (Print -0.0 like that. Print + and - infinity some way they can be read by the reader. Preferably some way that's not otherwise a legal token. Probably print NaNs using the #unreadable syntax. I don't remember how that works. I don't remember what we did at Symbolics, even though I'm probably the one who did it. I can ask around, if you care.) Or something else?

Thank you.

I do not really care about printing and reading NaNs and it looks like most implementations do read and write IEEE infinities.

Th problem is that ANSI does not talk about infinities and NaNs, so the issue I have is what to do with them in a “portable” library (YMMV).

I was toying with the idea of using symbolic constants for infinities, but it looks like using IEEE infinities directly is a better - and simpler - way to follow.

Note that there are a big number of NANs.  If you want to print them readably, you definitely need a syntax able to deal with all of them, not just a couple of infinities.


-- 
__Pascal J. Bourguignon__