fix ⟨1,2⋆62⟩/2⥊<⋈0

This commit is contained in:
dzaima 2024-04-20 21:23:28 +03:00
parent de529e483b
commit 5600bb189a
2 changed files with 6 additions and 2 deletions

View File

@ -673,8 +673,10 @@ B slash_c2(B t, B w, B x) {
usz csz = arr_csz(x);
MAKE_MUT_INIT(r0, s*csz, TI(x,elType)); MUTG_INIT(r0);
SGetU(w)
if (csz!=1) { usz ri=0; for (ux i=0; i<wia; i++) { usz c=o2s(GetU(w, i)); for(ux j=0;j<c;j++) { mut_copyG(r0, ri, x, i*csz, csz); ri+= csz; } } }
else { SGetU(x) usz ri=0; for (ux i=0; i<wia; i++) { usz c=o2s(GetU(w, i)); if (c) { mut_fillG(r0, ri, GetU(x, i), c); ri+= c; } } }
B wc; usz ri=0;
if (csz!=1) { for (ux i=0; i<wia; i++) { if (!q_usz(wc=GetU(w,i))) goto pfree; usz c=o2sG(wc); for(ux j=0;j<c;j++) { mut_copyG(r0, ri, x, i*csz, csz); ri+= csz; } } }
else { SGetU(x) for (ux i=0; i<wia; i++) { if (!q_usz(wc=GetU(w,i))) goto pfree; usz c=o2sG(wc); if (c) { mut_fillG(r0, ri, GetU(x, i), c); ri+= c; } } }
if (0) { pfree: mut_pfree(r0, ri); expI_B(wc); }
Arr* ra = mut_fp(r0);
if (xr == 1) {
arr_shVec(ra);

View File

@ -84,6 +84,8 @@
!"𝕨/𝕩: Compound 𝕨 must have rank at most 1" % (12<4) / 4
!"𝕨/𝕩: 𝕨 must consist of natural numbers" % 4, 123.54 / 4416
!"𝕨/𝕩: 𝕨 must consist of natural numbers" % 4, 3.5 / 4416
!"Integer out of range: 4.611686018427388e18" % 1,262 / 22<0
!"Integer out of range: 4.611686018427388e18" % 1,262 / 2<0
4, 0, 5 / 445@ %% 6010@
4, 40, 5 / 445@ %% 6010@
102 / ¨ ["ab","cd","ef"] %% ¨ ["ab","ef","ef"]