aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-23 19:41:01 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-23 19:41:01 -0400
commitb55bb1c48d83af778694dc40f11c69aaa2667c85 (patch)
tree0a6823c242e0b03a66b1c464a46b72a8a1551a24
parent26c9a45538aafdcdfc5e1eabd0c17e3f746ebf82 (diff)
Some cleanup in (a subset of) 50 functions
-rw-r--r--examples/fifty.bqn12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/fifty.bqn b/examples/fifty.bqn
index ad80a4b2..093fdfc3 100644
--- a/examples/fifty.bqn
+++ b/examples/fifty.bqn
@@ -57,21 +57,21 @@ PascalsTriangle ← {>𝕩↑¨0(∾+∾˜)⍟(↕𝕩)⥊1}
# 9
GoldenRatio ← +⟜÷´¨∘(1↓↑) ⥊⟜1
-! 1e¯5 > | (GoldenRatio 16) - 1‿2‿1.5‿1.66667‿1.6‿1.625‿1.61538‿1.61905‿1.61765‿1.61818‿1.61798‿1.61806‿1.61803‿1.61804‿1.61803‿1.61803
+! 1e¯5 ∧´∘> | (GoldenRatio 16) - 1‿2‿1.5‿1.66667‿1.6‿1.625‿1.61538‿1.61905‿1.61765‿1.61818‿1.61798‿1.61806‿1.61803‿1.61804‿1.61803‿1.61803
# 10
NewtonsMethod ← (2 ÷˜ ⊢ + ÷)´¨∘(1↓↑) ⥊
-! 1e¯5 > | (7 NewtonsMethod 2) - 2‿1.5‿1.41667‿1.41422‿1.41421‿1.41421‿1.41421
+! 1e¯5 ∧´∘> | (7 NewtonsMethod 2) - 2‿1.5‿1.41667‿1.41422‿1.41421‿1.41421‿1.41421
# 11
-InnerProduct ← +˝∘(ר)⎉1‿2
+InnerProduct ← +˝∘×⎉1‿2
! (>⟨2‿3⋄4‿1⟩) ≡ (>⟨1‿0⋄¯1‿1⟩) InnerProduct >⟨2‿3⋄6‿4⟩
# 12
-CayleysTheorem ← {R←∾⊐⊢ ⋄ (R𝕩) ≡ R ⊏˜⌜˜ <˘R𝕩}
+CayleysTheorem ← {R←⥊⊐⊢ ⋄ (R𝕩) ≡ R ⊏˜⌜˜ <˘R𝕩}
! {
t ← 2‿2⊸⥊¨ (⌽2|⌊∘÷⟜2⍟(↕4))¨ 9‿6‿7‿11‿13‿14
- g ← ≠˝∘(∧¨)⎉1‿2⌜˜t
+ g ← ≠˝∘∧⎉1‿2⌜˜t
CayleysTheorem g
}
@@ -89,7 +89,7 @@ SeventeenTwentyNine ← {F:
c ← 3⋆˜1+↕200
t ← (<⌜˜↕200) × +⌜˜c
d ← ⍷⊸⊐⊸⊔ ⥊t
- ⌊´ ⊑¨ (2=≠¨)⊸/ d
+ ⌊´ ⊑¨ (2=≠)⊸/ d
}
# ! 1729 ≡ SeventeenTwentyNine⟨⟩ # slow