diff options
Diffstat (limited to 'src/c.bqn')
| -rw-r--r-- | src/c.bqn | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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×⌾((0<ee)⊸/)vm/v + t←10⋆|ee←dp-˜vm/«v׬vm + t÷˜⌾((0>ee)⊸/)t×⌾((0<ee)⊸/)vm/v×(r/i)⊏1‿∞ } |
