go-jsonnet/testdata/tolerance.libsonnet
Stanisław Barzowski 5976644a3b Introduce tolerance in tests of numeric functions.
There are slight differences across CPU architectures which we cannot
avoid. These should have no practical consequences for the users.
2020-02-02 17:51:42 +01:00

8 lines
265 B
Plaintext

{
// Formats a floating point number to get 15 digits
// after the decimal point. It is used for some tests
// of numeric functions, where a range of values is
// acceptable, due to differences in cpu architecture.
tolerance(x):: "%.15f" % x
}