make atom decomposition equality check use eequal
gets rid of compound functions having observable identity if they have NaN as a component
This commit is contained in:
parent
723ca38816
commit
15bf932757
@ -64,7 +64,7 @@ NOINLINE bool atomEqualF(B w, B x) {
|
|||||||
usz wia = IA(wd);
|
usz wia = IA(wd);
|
||||||
if (wia != IA(xd)) goto dec_ne;
|
if (wia != IA(xd)) goto dec_ne;
|
||||||
for (ux i = 0; i < wia; i++) {
|
for (ux i = 0; i < wia; i++) {
|
||||||
if(!equal(wdp[i], xdp[i])) goto dec_ne;
|
if(!eequal(wdp[i], xdp[i])) goto dec_ne;
|
||||||
}
|
}
|
||||||
decG(wd); decG(xd);
|
decG(wd); decG(xd);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -23,9 +23,11 @@
|
|||||||
{•Type}=⟨•Type,•BQN"•Type"⟩ %% 1‿1
|
{•Type}=⟨•Type,•BQN"•Type"⟩ %% 1‿1
|
||||||
{•FChars}=⟨•FChars,•BQN"•FChars"⟩ %% 1‿0
|
{•FChars}=⟨•FChars,•BQN"•FChars"⟩ %% 1‿0
|
||||||
=⌜˜ ⟨+, ⁼, ⌾, {𝕩}, {𝔽𝕩}, {𝔽𝔾}, •internal.PureKeep, •internal.Keep, •Type, •FChars, •_timed, •_while_, 2⊸+, +-, {⇐}⟩ %% 15‿15⥊1∾15⥊0
|
=⌜˜ ⟨+, ⁼, ⌾, {𝕩}, {𝔽𝕩}, {𝔽𝔾}, •internal.PureKeep, •internal.Keep, •Type, •FChars, •_timed, •_while_, 2⊸+, +-, {⇐}⟩ %% 15‿15⥊1∾15⥊0
|
||||||
≡⌜˜ ⟨(0÷0)⊸+, (0÷0)⊸+⟩ %% [1‿0, 0‿1]
|
≡⌜˜ ⟨(0÷0)⊸+, (0÷0)⊸+⟩ %% [1‿1, 1‿1]
|
||||||
=⌜˜ ⟨(0÷0)⊸+, (0÷0)⊸+⟩ %% [1‿0, 0‿1]
|
=⌜˜ ⟨(0÷0)⊸+, (0÷0)⊸+⟩ %% [1‿1, 1‿1]
|
||||||
! {𝕩 ≡ ⍷2/𝕩} ⟨(0÷0)⊸+, (0÷0)⊸+⟩
|
≠⍷ ⟨(0÷0)⊸+, 2, 2, 3, (0÷0)⊸+⟩ %% 3
|
||||||
|
⊐ ⟨(0÷0)⊸+, 2, 2, 3, (0÷0)⊸+⟩ %% 0‿1‿1‿2‿0
|
||||||
|
⊒ ⟨(0÷0)⊸+, 2, 2, 3, (0÷0)⊸+⟩ %% 0‿0‿1‿0‿1
|
||||||
|
|
||||||
# comparison
|
# comparison
|
||||||
w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ {! (∾⟨"𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥
|
w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ {! (∾⟨"𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥
|
||||||
|
|||||||
@ -253,7 +253,7 @@ n←500 ⋄ a←↕n ⋄ i←(-n)+↕2×n ⋄ r←⌽(2×n)⥊a ⋄ ! (⌽a) ≡
|
|||||||
⟨1‿1, 1‿1, ⟨3,0÷0,4⟩⟩
|
⟨1‿1, 1‿1, ⟨3,0÷0,4⟩⟩
|
||||||
⟨1‿1, 1‿1, {𝕊: ShouldNotBeCalled}⟩
|
⟨1‿1, 1‿1, {𝕊: ShouldNotBeCalled}⟩
|
||||||
⟨1‿1, 1‿1, ShouldNotBeCalled˙⟩
|
⟨1‿1, 1‿1, ShouldNotBeCalled˙⟩
|
||||||
⟨1‿1, 0‿1, {𝕊: ShouldNotBeCalled⟜(0÷0)}⟩
|
⟨1‿1, 1‿1, {𝕊: ShouldNotBeCalled⟜(0÷0)}⟩
|
||||||
⟨1‿1, 1‿1, ShouldNotBeCalled⟜(0÷0)˙⟩
|
⟨1‿1, 1‿1, ShouldNotBeCalled⟜(0÷0)˙⟩
|
||||||
⟨1‿1, 1‿1, ∞⟩
|
⟨1‿1, 1‿1, ∞⟩
|
||||||
⟩
|
⟩
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user