diff options
Diffstat (limited to 'src/environment.c')
| -rw-r--r-- | src/environment.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/environment.c b/src/environment.c index 8bf77733..290ebe12 100644 --- a/src/environment.c +++ b/src/environment.c @@ -102,7 +102,6 @@ env_t *global_env(bool source_mapping) {"clamped", "Int$clamped", "func(x,low,high:Int -> Int)"}, {"divided_by", "Int$divided_by", "func(x,y:Int -> Int)"}, {"factorial", "Int$factorial", "func(x:Int -> Int)"}, - {"format", "Int$format", "func(i:Int, digits=0 -> Text)"}, {"gcd", "Int$gcd", "func(x,y:Int -> Int)"}, {"hex", "Int$hex", "func(i:Int, digits=0, uppercase=yes, prefix=yes -> Text)"}, {"is_between", "Int$is_between", "func(x:Int,low:Int,high:Int -> Bool)"}, @@ -134,7 +133,6 @@ env_t *global_env(bool source_mapping) {"bits", "Int64$bits", "func(x:Int64 -> [Bool])"}, {"clamped", "Int64$clamped", "func(x,low,high:Int64 -> Int64)"}, {"divided_by", "Int64$divided_by", "func(x,y:Int64 -> Int64)"}, - {"format", "Int64$format", "func(i:Int64, digits=0 -> Text)"}, {"gcd", "Int64$gcd", "func(x,y:Int64 -> Int64)"}, {"parse", "Int64$parse", "func(text:Text -> Int64?)"}, {"hex", "Int64$hex", "func(i:Int64, digits=0, uppercase=yes, prefix=yes -> Text)"}, @@ -156,7 +154,6 @@ env_t *global_env(bool source_mapping) {"bits", "Int32$bits", "func(x:Int32 -> [Bool])"}, {"clamped", "Int32$clamped", "func(x,low,high:Int32 -> Int32)"}, {"divided_by", "Int32$divided_by", "func(x,y:Int32 -> Int32)"}, - {"format", "Int32$format", "func(i:Int32, digits=0 -> Text)"}, {"gcd", "Int32$gcd", "func(x,y:Int32 -> Int32)"}, {"parse", "Int32$parse", "func(text:Text -> Int32?)"}, {"hex", "Int32$hex", "func(i:Int32, digits=0, uppercase=yes, prefix=yes -> Text)"}, @@ -178,7 +175,6 @@ env_t *global_env(bool source_mapping) {"bits", "Int16$bits", "func(x:Int16 -> [Bool])"}, {"clamped", "Int16$clamped", "func(x,low,high:Int16 -> Int16)"}, {"divided_by", "Int16$divided_by", "func(x,y:Int16 -> Int16)"}, - {"format", "Int16$format", "func(i:Int16, digits=0 -> Text)"}, {"gcd", "Int16$gcd", "func(x,y:Int16 -> Int16)"}, {"parse", "Int16$parse", "func(text:Text -> Int16?)"}, {"hex", "Int16$hex", "func(i:Int16, digits=0, uppercase=yes, prefix=yes -> Text)"}, @@ -200,7 +196,6 @@ env_t *global_env(bool source_mapping) {"bits", "Int8$bits", "func(x:Int8 -> [Bool])"}, {"clamped", "Int8$clamped", "func(x,low,high:Int8 -> Int8)"}, {"divided_by", "Int8$divided_by", "func(x,y:Int8 -> Int8)"}, - {"format", "Int8$format", "func(i:Int8, digits=0 -> Text)"}, {"gcd", "Int8$gcd", "func(x,y:Int8 -> Int8)"}, {"parse", "Int8$parse", "func(text:Text -> Int8?)"}, {"hex", "Int8$hex", "func(i:Int8, digits=0, uppercase=yes, prefix=yes -> Text)"}, @@ -224,9 +219,8 @@ env_t *global_env(bool source_mapping) {"Num", Type(NumType, .bits=TYPE_NBITS64), "Num_t", "Num$info", TypedList(ns_entry_t, {"near", "Num$near", "func(x,y:Num, ratio=1e-9, min_epsilon=1e-9 -> Bool)"}, {"clamped", "Num$clamped", "func(x,low,high:Num -> Num)"}, - {"format", "Num$format", "func(n:Num, precision=16 -> Text)"}, - {"scientific", "Num$scientific", "func(n:Num,precision=0 -> Text)"}, - {"percent", "Num$percent", "func(n:Num,precision=0 -> Text)"}, + {"percent", "Num$percent", "func(n:Num,precision=0.01 -> Text)"}, + {"with_precision", "Num$with_precision", "func(n:Num,precision:Num -> Num)"}, {"is_between", "Num$is_between", "func(x:Num,low:Num,high:Num -> Bool)"}, {"isinf", "Num$isinf", "func(n:Num -> Bool)"}, {"isfinite", "Num$isfinite", "func(n:Num -> Bool)"}, @@ -257,9 +251,8 @@ env_t *global_env(bool source_mapping) {"Num32", Type(NumType, .bits=TYPE_NBITS32), "Num32_t", "Num32$info", TypedList(ns_entry_t, {"near", "Num32$near", "func(x,y:Num32, ratio=Num32(1e-9), min_epsilon=Num32(1e-9) -> Bool)"}, {"clamped", "Num32$clamped", "func(x,low,high:Num32 -> Num32)"}, - {"format", "Num32$format", "func(n:Num32, precision=8 -> Text)"}, - {"scientific", "Num32$scientific", "func(n:Num32, precision=0 -> Text)"}, - {"percent", "Num32$percent", "func(n:Num32,precision=0 -> Text)"}, + {"percent", "Num32$percent", "func(n:Num32,precision=Num32(.01) -> Text)"}, + {"with_precision", "Num32$with_precision", "func(n:Num32,precision:Num32 -> Num32)"}, {"is_between", "Num32$is_between", "func(x:Num32,low:Num32,high:Num32 -> Bool)"}, {"isinf", "Num32$isinf", "func(n:Num32 -> Bool)"}, {"isfinite", "Num32$isfinite", "func(n:Num32 -> Bool)"}, @@ -280,7 +273,7 @@ env_t *global_env(bool source_mapping) F2(atan2), F2(copysign), F2(fdim), F2(hypot), F2(nextafter), )}, {"CString", Type(CStringType), "char*", "CString$info", TypedList(ns_entry_t, - {"as_text", "CString$as_text_simple", "func(str:CString -> Text)"}, + {"as_text", "Text$from_str", "func(str:CString -> Text)"}, )}, #undef F2 #undef F_opt |
