⎕JSON Comparaison Tolerance
3 posts
• Page 1 of 1
⎕JSON Comparaison Tolerance
When I do the following:
I would expect to get a 8.04 and 9.04 in the JSON character representation.
I am using v16. Is this normal ?
- Code: Select all
⎕JSON 0.04+⍳10
[1.04,2.04,3.04,4.04,5.04,6.04,7.04,8.039999999999999,9.039999999999999,10.04]
I would expect to get a 8.04 and 9.04 in the JSON character representation.
I am using v16. Is this normal ?
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: ⎕JSON Comparaison Tolerance
Hmm.... In 17.1, it works as expected...
- Code: Select all
⍝ Dyalog APL/S-64 Version 17.1.36845 (ALSO Dyalog APL/S-64 Version 17.0.36563)
⎕JSON 0.04+⍳10
[0.04,1.04,2.04,3.04,4.04,5.04,6.04,7.04,8.04,9.04]
- petermsiegel
- Posts: 146
- Joined: Thu Nov 11, 2010 11:04 pm
Re: ⎕JSON Comparaison Tolerance
In 16.0 the code for ⎕xml (and indeed ⎕csv) used the standard c library functions for formatting. In 17.0 and later we changed them so that they now call the same formatting functions as used elsewhere in the interpreter. So yes, it is what I'd expect in 16.0.
-
AndyS|Dyalog - Posts: 257
- Joined: Tue May 12, 2009 6:06 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group