http server
This commit is contained in:
12
std/num.zr
12
std/num.zr
@@ -1,4 +1,4 @@
|
||||
include "std/core.zr"
|
||||
include "std/io.zr"
|
||||
|
||||
func i64.abs[n: i64] : i64
|
||||
if n == -9223372036854775808
|
||||
@@ -97,6 +97,16 @@ func i64.to_hex_str_buf[n: i64, buf: ptr] : void
|
||||
|
||||
buf[len] = 0
|
||||
|
||||
func i64.to_str[n: i64] : str
|
||||
out := mem.alloc(21)
|
||||
n->to_str_buf(out)
|
||||
return out as str
|
||||
|
||||
func i64.to_hex_str[n: i64] : str
|
||||
out := mem.alloc(17)
|
||||
n->to_hex_str_buf(out)
|
||||
return out as str
|
||||
|
||||
func f64.to_str_buf[x: i64, buf: ptr] : void
|
||||
bits := x
|
||||
sign := (bits >> 63) & 1
|
||||
|
||||
Reference in New Issue
Block a user