var intPool … var maxInt64 … func init() { … } // scaledValue scales given unscaled value from scale to new Scale and returns // an int64. It ALWAYS rounds up the result when scale down. The final result might // overflow. // // scale, newScale represents the scale of the unscaled decimal. // The mathematical value of the decimal is unscaled * 10**(-scale). func scaledValue(unscaled *big.Int, scale, newScale int) int64 { … }