blob: 35ade802821cc697e3a041795088966c25ad1341 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
module strconv
// The structure is filled by parser, then given to converter.
pub struct PrepNumber {
pub mut:
negative bool // 0 if positive number, 1 if negative
exponent int // power of 10 exponent
mantissa u64 // integer mantissa
}
// dec32 is a floating decimal type representing m * 10^e.
struct Dec32 {
mut:
m u32
e int
}
// dec64 is a floating decimal type representing m * 10^e.
struct Dec64 {
mut:
m u64
e int
}
struct Uint128 {
mut:
lo u64
hi u64
}
// support union for convert f32 to u32
union Uf32 {
mut:
f f32
u u32
}
// support union for convert f64 to u64
union Uf64 {
mut:
f f64
u u64
}
pub union Float64u {
pub mut:
f f64
u u64
}
pub union Float32u {
pub mut:
f f32
u u32
}
|