mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 11:58:21 +00:00
84f0960b04
When encoding/textpb marshals out float32 values, it was previously formatting it as float64 bitsize since both float types are stored as float64 and internal/encoding/text only has one Float type. A consequence of this is that the output may display a different value than expected, e.g. 1.02 becomes 1.0199999809265137. This CL splits Float type into Float32 and Float64 to keep track of which bitsize to use when formatting. Values of both types are still stored as float64 to keep the logic simple. Decoding will always use Float64, but users can ask for a float32 value from it. Change-Id: Iea5b14b283fec2236a0c3946fac34d4d79b95274 Reviewed-on: https://go-review.googlesource.com/c/158497 Reviewed-by: Damien Neil <dneil@google.com> |
||
---|---|---|
.. | ||
cmd | ||
detrand | ||
encoding | ||
errors | ||
flags | ||
impl | ||
legacy | ||
pragma | ||
protogen/goldentest | ||
scalar | ||
set | ||
testprotos | ||
typefmt | ||
value |