aboutsummaryrefslogtreecommitdiff
path: root/c.bqn
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-07 10:06:23 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-07 10:06:23 -0400
commit60d59965f6df613a8cc95aa8bd18823945734d69 (patch)
treebb60118cb600bd538783175472f9647c67ca7c57 /c.bqn
parent7c5a852ea5abd733100125eea1899846547952d4 (diff)
Support all the primitives with dedicted instructions
Diffstat (limited to 'c.bqn')
-rwxr-xr-xc.bqn6
1 files changed, 3 insertions, 3 deletions
diff --git a/c.bqn b/c.bqn
index dc691210..3e818899 100755
--- a/c.bqn
+++ b/c.bqn
@@ -21,9 +21,9 @@ GenFn←{
l←2(⌊⋆⁼)n
(D"44")∾2⊥˘⌽8‿8(⊣⥊×´⊸↑)∾⟨⥊0,(11⥊2)⊤1023+l,(2⥊˜0⌈l)⊤n⟩
}‿{
- ⟨⥊D"9A"⟩⊑˜"-"⊐<𝕩
+ (⥊¨(D"99")+((↕4)∾6))⊑˜"|-⌈⌊√"⊐<𝕩
}‿{
- (⥊∘D¨"A0"‿"A1"‿"A2"‿"A3")⊑˜"+-×÷"⊐<𝕩
+ (⥊¨(D"A0")+↕6)⊑˜"+-×÷⌊⌈"⊐<𝕩
}
(D"0B")∾˜∾na⊑⟜fns⊸{𝕎𝕩}¨x
}
@@ -48,4 +48,4 @@ Compile←{
body←GenFn Parse 𝕩
(1↓∾)(","∾⥊∘⍕)¨ Gen ⟨⟨0‿1⟩/¨¨127-3 ⋄ ⥊<"fn" ⋄ ⥊<body⟩
}
-•←Compile "(5-3)×-2+(1÷-(-2)×3)+(1÷3)+1÷2"
+•←Compile "((-3)+√(3×3)-4×2×1)÷2×2"