Go Standard Library Cookbook
上QQ阅读APP看书,第一时间看更新

How it works...

The big package provides support for the arithmetic of floating-point numbers with high precision. The previous example illustrates the basic operations over the numbers. Note that the code compares the operation with the float64 type and the big.Float type.

By working with numbers with a high precision, it is crucial to use the big.Float type. When big.Float is converted back to the built-in float64 type, high precision is lost.