|
|
| version 1.2, 2023/11/16 22:32:37 | version 1.3, 2026/01/07 18:47:31 |
|---|---|
| Line 1 | Line 1 |
| @main[] | @main[] |
| Parser3 with ^if($math:int_max > 0x100000000){wide int (int53)}{32-bit int} | |
| ^show(2000000000) | ^show(2000000000) |
| ^show(4000000000) | ^show(4000000000) |
| ^show(5000000000) | ^show(5000000000) |
| Line 6 | Line 9 |
| ^show(-4000000000) | ^show(-4000000000) |
| ^show(-5000000000) | ^show(-5000000000) |
| $n(100000000000) | ^show(-1) |
| ^show(-2) | |
| ^show($math:int_max-1) | |
| ^show($math:int_max) | |
| ^show($math:int_max+1) | |
| ^show($math:int_min-1) | |
| ^show($math:int_min) | |
| ^show($math:int_min+1) | |
| $n(10000000000000000) | |
| n:$n (clipped 0x^n.format[%x]) | n:$n (clipped 0x^n.format[%x]) |
| Line 22 n:$n (clipped 0x^n.format[%x]) | Line 36 n:$n (clipped 0x^n.format[%x]) |
| 6. % ^eval(1 % 0.3) | 6. % ^eval(1 % 0.3) |
| 7. mod ^n.mod($n-0.5) $n | 7. mod ^n.mod($n-10) $n - out of double precision, but works |
| 8. $i(10) $i(^i.int[]) | 8. $i(10) $i(^i.int[]) |
| mod ^i.mod(4.8) $i | mod ^i.mod(4.8) $i |
| Line 30 n:$n (clipped 0x^n.format[%x]) | Line 44 n:$n (clipped 0x^n.format[%x]) |
| 9. $n(10) | 9. $n(10) |
| mod ^n.mod(4.8) $n | mod ^n.mod(4.8) $n |
| $d[^date::now[]] | |
| 10. wide int.as_int overflow, exception : ^try-catch{ $d.year($math:int_max) } | |
| 11. double.as_int overflow, no exception : ^try-catch{ $d.year($math:int_max+1) } | |
| @show[n] | @show[n] |
| ${n}: ^n.format[%d] ^n.format[%u] ^n.format[%x] | ${n}: ^n.format[%d] ^n.format[%u] ^n.format[%x] |