HISKP-LQCD / sLapH-projection-NG

2 stars 0 forks source link

Numeric projection has insufficient digits #27

Closed martin-ueding closed 4 years ago

martin-ueding commented 4 years ago

The numeric projection serializes its output as JSON and the floating point numbers are serialized with only 6 significant digits. This will lead to large fluctuations in the effective masses and need to be fixed.

martin-ueding commented 4 years ago

So be default one seemingly gets a %g format specifier:

> jsonlite::toJSON(1/3)
[0.3333] 

But one can easily get as many digits as one needs to represent it:

> jsonlite::toJSON(1/3, digits = NA)
[0.333333333333333]

This is included in the code, therefore this is fixed.