make the Windows build green again
This commit is contained in:
parent
3d69c1bd0b
commit
7ee825a6e5
1 changed files with 3 additions and 2 deletions
|
|
@ -338,9 +338,10 @@ proc add*(result: var string; x: float) =
|
||||||
buf[n] = '.'
|
buf[n] = '.'
|
||||||
buf[n+1] = '0'
|
buf[n+1] = '0'
|
||||||
buf[n+2] = '\0'
|
buf[n+2] = '\0'
|
||||||
# On Windows nice numbers like '1.#INF', '-1.#INF' or '1.#NAN' are produced.
|
# On Windows nice numbers like '1.#INF', '-1.#INF' or '1.#NAN'
|
||||||
|
# of '-1.#IND' are produced.
|
||||||
# We want to get rid of these here:
|
# We want to get rid of these here:
|
||||||
if buf[n-1] in {'n', 'N'}:
|
if buf[n-1] in {'n', 'N', 'D', 'd'}:
|
||||||
result.add "nan"
|
result.add "nan"
|
||||||
elif buf[n-1] == 'F':
|
elif buf[n-1] == 'F':
|
||||||
if buf[0] == '-':
|
if buf[0] == '-':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue