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:
dzaima 2025-05-21 00:54:52 +03:00
parent 723ca38816
commit 15bf932757
3 changed files with 7 additions and 5 deletions

View File

@ -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;

View File

@ -23,9 +23,11 @@
{•Type}=•Type,•BQN"•Type" %% 11 {•Type}=•Type,•BQN"•Type" %% 11
{•FChars}=•FChars,•BQN"•FChars" %% 10 {•FChars}=•FChars,•BQN"•FChars" %% 10
=˜ +, , , {𝕩}, {𝔽𝕩}, {𝔽𝔾}, •internal.PureKeep, •internal.Keep, •Type, •FChars, •_timed, •_while_, 2+, +-, {} %% 15151150 =˜ +, , , {𝕩}, {𝔽𝕩}, {𝔽𝔾}, •internal.PureKeep, •internal.Keep, •Type, •FChars, •_timed, •_while_, 2+, +-, {} %% 15151150
˜ (0÷0)+, (0÷0)+ %% [10, 01] ˜ (0÷0)+, (0÷0)+ %% [11, 11]
=˜ (0÷0)+, (0÷0)+ %% [10, 01] =˜ (0÷0)+, (0÷0)+ %% [11, 11]
! {𝕩 2/𝕩} (0÷0)+, (0÷0)+ (0÷0)+, 2, 2, 3, (0÷0)+ %% 3
(0÷0)+, 2, 2, 3, (0÷0)+ %% 01120
(0÷0)+, 2, 2, 3, (0÷0)+ %% 00101
# comparison # comparison
w111 x121 {! ("𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)") w 𝕏(•CurrentError@) x}¨ =<> w111 x121 {! ("𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)") w 𝕏(•CurrentError@) x}¨ =<>

View File

@ -253,7 +253,7 @@ n←500 ⋄ a←↕n ⋄ i←(-n)+↕2×n ⋄ r←⌽(2×n)⥊a ⋄ ! (⌽a) ≡
11, 11, 3,0÷0,4 11, 11, 3,0÷0,4
11, 11, {𝕊: ShouldNotBeCalled} 11, 11, {𝕊: ShouldNotBeCalled}
11, 11, ShouldNotBeCalled˙ 11, 11, ShouldNotBeCalled˙
11, 01, {𝕊: ShouldNotBeCalled(0÷0)} 11, 11, {𝕊: ShouldNotBeCalled(0÷0)}
11, 11, ShouldNotBeCalled(0÷0)˙ 11, 11, ShouldNotBeCalled(0÷0)˙
11, 11, 11, 11,