Fix float precision

This commit is contained in:
Lou Knauer 2022-03-08 09:32:35 +01:00
parent 2528dc8403
commit 720924a7dd

View File

@ -9,7 +9,7 @@ import (
// This program uses NaN as a signal for missing data. // This program uses NaN as a signal for missing data.
// For the HTTP JSON API to be able to handle NaN values, // For the HTTP JSON API to be able to handle NaN values,
// we have to use our own type which implements encoding/json.Marshaler itself. // we have to use our own type which implements encoding/json.Marshaler itself.
type Float float32 type Float float64
var NaN Float = Float(math.NaN()) var NaN Float = Float(math.NaN())
var nullAsBytes []byte = []byte("null") var nullAsBytes []byte = []byte("null")