json-ld/json-ld.org — Issue #81: Data round tripping issue (not enough precision)
Author: lanthaler
Created: 2012-02-27 13:54:24+00:00
State: open
Labels: playground, spec-bug, test-suite

We currently specify in the [API spec](http://json-ld.org/spec/latest/json-ld-api/#data-round-tripping) that doubles should be normalized using the C-equivalent `%1.6e`. That is wrong as it [doesn't result in a number with double precision](http://www.json-ld.org/playground/?json-ld=%7B%22test1%22%3A10000.123%2C%22test2%22%3A100000.123%2C%22test3%22%3A999999.123%2C%22test4%22%3A99999999999999960000%7D&frame=%7B%7D) and wouldn't even be able to represent a number like `100000.123`.

I didn't have the time yet to investigate how this can be solved, but I found at least [one source](http://www.hunlock.com/blogs/The_Complete_Javascript_Number_Reference) that says that in JavaScript all numbers are 64 bits.

We should also add some test cases for these round tripping issues.