From 4a00aae2c0e6f42e203b13033c2bd8a6b84baee9 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 25 Sep 2020 10:37:35 -0400 Subject: Handle numeric literal base decoding with a compound scan, not Group --- src/c.bqn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/c.bqn b/src/c.bqn index 4d8230dd..27ca7297 100644 --- a/src/c.bqn +++ b/src/c.bqn @@ -72,13 +72,14 @@ ReadNums←{ "Portion of a number is empty" ! ¬∨´(»¬m)∧s "Ill-formed decimal or exponent use" ! ∧´(0⊸=∨»⊸<)s/𝕩 "π and ∞ must occur alone" ! ∧´(p∨i)≤1(»∧(p∧«e)∨«)z∨n - l←(π‿∞∾˜↕10)⊏˜m/𝕩-⊑bD⋄b←(m/»c)∨nl←m/»n - v←(1‿¯1⊏˜b/nl)×+⟜(10⊸×)´∘⌽¨(1-˜+`b)⊔l + l←(¯1∾π‿1∾˜↕10)⊏˜(¬d)/m×𝕩-1-˜⊑bD + v←(>⟜«0≤l)/(0⊸≤××⟜10⊸+)`»«l + v×↩1‿¯1⊏˜(r←>⟜»d∨m)/»n vm←c/z ld←(⌈`⊢×1+↕∘≠)d∾0 dp←vm/(»⊸<×-)⟜(⊏⟜ld)(≠«/)c - t←10⋆|ee←dp-˜(0⊸∾/0∾˜0⍟⊣¨⟜v)vm - t÷˜⌾((0>ee)⊸/)t×⌾((0ee)⊸/)t×⌾((0