parser should parse +inf,-inf,+nan,-nan as floating point numbers

write should write inf as +inf and nan as +nan


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@92 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2001-06-19 16:31:59 +00:00
parent 54e9dc271d
commit 7d50fd267d
2 changed files with 33 additions and 0 deletions

View File

@@ -126,6 +126,8 @@ wrputf(Float f) /* writes a float */
sprintf(s, "%.6g", f);
while (*pt == ' ')
pt++;
if (*pt == 'i' || *pt == 'n') /* inf or nan */
wrputc('+');
wrputs(pt);
if (*pt == '-') pt++;
while ((ch = *pt) != '\0') {