diff options
author | Eduardo Julian | 2018-05-23 02:05:12 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-23 02:05:12 -0400 |
commit | 0f32fc8e73681d860d12a5560952ed6640f034f1 (patch) | |
tree | 701a1cf8dfcddf2f13add6758c2954ca27b51ea1 /stdlib/source/lux.lux | |
parent | 72950a540be3dc49a107700c77c0195db16a4f58 (diff) |
- Minor improvements.
Diffstat (limited to '')
-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 |