2021-11-15 15:13:44 +03:00
|
|
|
module strconv
|
|
|
|
|
|
|
|
// pow of ten table used by n_digit reduction
|
|
|
|
const (
|
|
|
|
ten_pow_table_64 = [
|
|
|
|
u64(1),
|
|
|
|
u64(10),
|
|
|
|
u64(100),
|
|
|
|
u64(1000),
|
|
|
|
u64(10000),
|
|
|
|
u64(100000),
|
|
|
|
u64(1000000),
|
|
|
|
u64(10000000),
|
|
|
|
u64(100000000),
|
|
|
|
u64(1000000000),
|
|
|
|
u64(10000000000),
|
|
|
|
u64(100000000000),
|
|
|
|
u64(1000000000000),
|
|
|
|
u64(10000000000000),
|
|
|
|
u64(100000000000000),
|
|
|
|
u64(1000000000000000),
|
|
|
|
u64(10000000000000000),
|
|
|
|
u64(100000000000000000),
|
|
|
|
u64(1000000000000000000),
|
|
|
|
u64(10000000000000000000),
|
2023-07-19 13:06:41 +03:00
|
|
|
]!
|
2021-11-15 15:13:44 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
// Conversion Functions
|
|
|
|
//=============================================================================
|
|
|
|
const (
|
|
|
|
mantbits64 = u32(52)
|
|
|
|
expbits64 = u32(11)
|
|
|
|
bias64 = 1023 // f64 exponent bias
|
|
|
|
maxexp64 = 2047
|
|
|
|
)
|