Skip to content

Commit ddef743

Browse files
committed
Update backward glyph and quad solver
1 parent d319990 commit ddef743

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lib.ua

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ GaussEliminate‼ ↚ ∧(
3232
⊢⍖⊸⌵⍜⊙↙×0⟜⊡⤚⊸⊙⍉
3333
⍜⊏⇌ ⊃⊙⊙∘^0 ⊟⤙⊙⊙∘ ⊙(⊃⋅⊙∘^1 ⍤.≥ε⊸⌵) ⟜⊡
3434
⊸⍜⊡(÷⊸⊡:),
35-
⍜(°⊂↻|⊙-:⊸⊞×:⊙(⊡⤚𝄈⊙⍉)),
35+
⍜(°⊂↻|⊙-:⊸⊞×:⊙(⊡⤚˜⊙⍉)),
3636
)°⊏
3737

3838
# Matrix Determinant
@@ -322,18 +322,18 @@ BinomCmf ← /+BinomPmf⊓∩¤(⇡+1)
322322
#
323323
# Probability of X failures before the first success of repeated trials with success probability p
324324
# ? p X
325-
GeomPmf ← ×𝄈ⁿ⤚¬
325+
GeomPmf ← טⁿ⤚¬
326326
# Cumulative geometric distribution
327327
#
328328
# Probability of X or fewer failures before the first success of repeated trials with success probability p
329329
# ? p X
330-
GeomCmf ← ⍜¬𝄈ⁿ⊙(+1)
330+
GeomCmf ← ⍜¬˜ⁿ⊙(+1)
331331

332332
# Poisson distribution
333333
#
334334
# Probability of X occurrences of an unlikely event over many trials with expected value λ
335335
# ? λ X
336-
PoissonPmf ← ÷⊙×⊃(⋅Fact|𝄈ⁿ|ⁿ⊙e¯)
336+
PoissonPmf ← ÷⊙×⊃(⋅Fact|˜ⁿ|ⁿ⊙e¯)
337337
# Cumulative Poisson distribution
338338
#
339339
# Probability of X or fewer occurrences of an unlikely event over many trials with expected value λ
@@ -363,7 +363,13 @@ Perms ← ♭₂⍉∧(≡↻⇡⟜↯+1⟜⊂):¤¤°⊂⇡
363363
#
364364
# Outputs complex-typed numbers only if the roots are complex
365365
# ? A B C
366-
Quad ← ⍥R⌵↥0:⊟⊃-+⊙:√⟜±-:°√⤚∘ℂ0¯÷2∩÷⤚∘
366+
Quad ← ⍥R⌵↥0:⊟⊃-+⊙:√⟜±-:⤚°√ℂ0¯÷2∩⌞÷
367+
368+
┌─╴test
369+
⍤⤙≍ [1 2] Quad 1 ¯3 2
370+
⍤⤙≍ [¯i i] Quad 1 0 1
371+
⍤⤙≍ ∩⍆ [ℂ3 ¯1 ℂ¯1 2] ⁅₃ Quad 1 ℂ¯2 ¯1 ℂ7 1
372+
└─╴
367373

368374
# Powerset of a list
369375
PSet ← ⍚▽⋯⇡ⁿ:2⧻⟜¤

0 commit comments

Comments
 (0)