Lines Matching full:mantissa
11 // 3) Multiply by 2^precision and round to get mantissa.
154 // readFloat reads a decimal mantissa and exponent from a float
157 func readFloat(s string) (mantissa uint64, exp int, neg, trunc, ok bool) {
197 mantissa *= 10
198 mantissa += uint64(c - '0')
247 if mantissa != 0 {
371 func atof64exact(mantissa uint64, exp int, neg bool) (f float64, ok bool) {
372 if mantissa>>float64info.mantbits != 0 {
375 f = float64(mantissa)
403 // If possible to compute mantissa*10^exp to 32-bit float f exactly,
405 func atof32exact(mantissa uint64, exp int, neg bool) (f float32, ok bool) {
406 if mantissa>>float32info.mantbits != 0 {
409 f = float32(mantissa)
444 // Parse mantissa and exponent.
445 mantissa, exp, neg, trunc, ok := readFloat(s)
449 if f, ok := atof32exact(mantissa, exp, neg); ok {
455 if ok := ext.AssignDecimal(mantissa, exp, neg, trunc, &float32info); ok {
483 // Parse mantissa and exponent.
484 mantissa, exp, neg, trunc, ok := readFloat(s)
488 if f, ok := atof64exact(mantissa, exp, neg); ok {
494 if ok := ext.AssignDecimal(mantissa, exp, neg, trunc, &float64info); ok {