Skip to content

Commit 718f3d0

Browse files
committed
Reach fr
1 parent 992e271 commit 718f3d0

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

lib.ua

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# Extract real
55
R ↚ ◌°ℂ
66

7-
# Reach
8-
H! ← ^⊙◌
97
# Flip
108
F ← ˜∘
119

@@ -39,11 +37,11 @@ GaussEliminate‼ ↚ ∧(
3937
)°⊏
4038

4139
# Matrix Determinant
42-
MDet ← ◌⍣GaussEliminate‼(⍥¯H!H!/≠)H!H!× ⊙0⊙1
40+
MDet ← ◌⍣GaussEliminate‼(⍥¯∪∪/≠)∪∪× ⊙0⊙1
4341

4442
# Perform Gauss-Jordan elimination
45-
Mgje ← ⊏⍏˜⨂1>1e-12⊸⌵ ⍥(
46-
↻₁⍣(⍜⊙⊢÷⟜(-⊞×⊙⊸⊢⊂0÷)°⊂⊸≡⊏⊢)◌⊚>1e-12⌵⊸⊢
43+
Mgje ← ⊏⍏˜⨂1>1e¯12⊸⌵ ⍥(
44+
↻₁⍣(⍜⊙⊢÷⟜(-⊞×⊙⊸⊢⊂0÷)°⊂⊸≡⊏⊢)◌⊚>1e¯12⌵⊸⊢
4745
)⊸⧻
4846
# Mgje ← ⍣GaussEliminate‼(|)(⍤"Elimination cannot be completed"0)
4947

@@ -196,10 +194,10 @@ Gamma ← (
196194
154.53815050252774
197195
¯6.253671612368916
198196
0.034642762454736804
199-
¯7.477617197444297e-7
200-
6.304125382185226e-8
201-
¯2.7405717035683877e-8
202-
4.048694881756761e-9
197+
¯7.477617197444297e¯7
198+
6.304125382185226e¯8
199+
¯2.7405717035683877e¯8
200+
4.048694881756761e¯9
203201
]
204202
/+÷⍜⊢⋅1≡+⊙˜¤
205203
)
@@ -311,8 +309,8 @@ Erf ← (
311309
⍤⤙≍ 0 Erf 0
312310
⍤⤙≍ 1 Erf 1000
313311
⍤⤙≍ ¯1 Erf ¯1000
314-
⍤⤙(<1e-6⌵-) 0.5204998778130465 Erf 0.5
315-
⍤⤙(<1e-6⌵-) ¯0.5204998778130465 Erf ¯0.5
312+
⍤⤙(<1e¯6⌵-) 0.5204998778130465 Erf 0.5
313+
⍤⤙(<1e¯6⌵-) ¯0.5204998778130465 Erf ¯0.5
316314
└─╴
317315

318316
# Seeded random indices from a distribution array

0 commit comments

Comments
 (0)