some more ˝ tests, use COPY_TO

not much of a difference, but prettier
This commit is contained in:
dzaima 2025-03-11 00:15:44 +02:00
parent f1972fc408
commit bcf32838f4
2 changed files with 12 additions and 4 deletions

View File

@ -390,17 +390,18 @@ static B insert_scal(B f, FC2 fc2, B x, bool has_w, B fxw, usz xia, ur rr) {
usz* rsh = arr_shAlloc((Arr*)r.c, rr);
if (rr>1) shcpy(rsh, SH(x)+1, rr);
usz xi = xia - csz;
SGet(x)
B rf;
if (has_w) {
rf = getFillR(fxw);
SGet(fxw) // (⊢˝𝕩)𝔽𝕨 so errors have been caught
for (usz i=0; i<csz; i++) r.a[i] = Get(fxw, i);
COPY_TO(r.a, el_B, 0, fxw, 0, csz); // (⊢˝𝕩)𝔽𝕨 so errors have been caught
decG(fxw);
} else {
rf = getFillR(x);
for (usz i=0; i<csz; i++) r.a[i] = Get(x, xi+i);
COPY_TO(r.a, el_B, 0, x, xi, csz);
}
SGet(x)
while (xi) {
xi -= csz;
for (usz i=0; i<csz; i++) r.a[i] = fc2(f, Get(x, xi+i), r.a[i]);

View File

@ -515,6 +515,13 @@ a←↕2 ⋄ ! "e" ≡ (↕10){b←a‿a‿a‿a‿a‿a‿a‿a‿a‿a ⋄
# ˝
!"𝔽˝𝕩: 𝕩 must have rank at least 1" % ˝0
!"𝔽˝𝕩: Identity not found" % •internal.Keep˝
(4)+˝7 %% 21222324
(224)+˝72228 %% 228492100108
(224)+˝2228 %% 222367
+˝ 104 %% 45 ¨ 10×4
( 4) +˝ 104 %% (4) + 45 ¨ 10×4
(<¨ 4) +˝ 104 %% (4) + 45 ¨ 10×4
(05+¨4) +˝ 104 %% ((4) + 45) ¨ 5 + 11×4
# ⌜
!"𝕨𝔽⌜𝕩: Result rank too large (200≡=𝕨, 200≡=𝕩)" % +˜(2001)1