Open kkbblzq opened 4 months ago
code
floatVal := decimal.NewFromFloat(1000) fmt.Println("Exponent: ", floatVal.Exponent()) intVal := decimal.NewFromInt(1000) fmt.Println("Exponent: ", intVal.Exponent())
output
Exponent: 3 Exponent: 0
code
output