141:16b833862ae2 | 142:574e0baea136 |
---|---|
1 local m, e = math.frexp(1); | |
2 assert(m == 0.5 and e == 1, "frexp(1)"); | |
3 | |
4 local m, e = math.frexp(0); | |
5 assert(m == 0 and e == 0, "frexp(0)"); | |
6 | |
7 local m, e = math.frexp(3); | |
8 assert(m == 0.75 and e == 2, "frexp(3)"); | |
9 | |
10 local m, e = math.frexp(-1); | |
11 assert(m == -0.5 and e == 1, "frexp(1)"); |