diff options
Diffstat (limited to 'stdlib/source/lux.lux')
-rw-r--r-- | stdlib/source/lux.lux | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 5fbbf44b5..d6a399463 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -2395,6 +2395,16 @@ quotient ("lux i64 +" +1 quotient))))) +(def:''' #export (n//% param subject) + (list [(tag$ ["lux" "doc"]) + (text$ "Nat(ural) [division remainder].")]) + (-> Nat Nat (#Product Nat Nat)) + (let' [div (n// param subject) + flat ("lux int *" + ("lux coerce" Int div) + ("lux coerce" Int param))] + [div ("lux i64 -" flat subject)])) + (def:''' #export (n/% param subject) (list [(tag$ ["lux" "doc"]) (text$ "Nat(ural) remainder.")]) @@ -6292,8 +6302,9 @@ [(</> param subject) (<%> param subject)])] - [Nat n//% n// n/%] - [Int i//% i// i/%] + [Int i//% i// i/%] + [Deg d//% d// d/%] + [Frac f//% f// f/%] ) (def: to-significand |