make division not care about sign of 𝕩

This commit is contained in:
dzaima 2023-04-14 20:23:39 +03:00
parent 08885fabad
commit 51e34c55d3
2 changed files with 3 additions and 3 deletions

View File

@ -171,7 +171,7 @@ static B modint_AS(B w, B xv) { return modint_AA(w, C2(shape, C1(fne, incG(w))
} \
thrM(SYMB ": Unexpected argument types"); \
}
GC2f("÷", div , w.f/x.f,
GC2f("÷", div , w.f/(x.f+0),
, /*INT_SA*/
, /*INT_AS*/ if(q_i32(x)) { r = divint_AS(w, o2iG(x)); /*decG(w); */ return r; }
, /*INT_AA*/ r = divint_AA(w, x); /*decG(w); decG(x);*/ return r;
@ -425,7 +425,7 @@ B not_c2(B t, B w, B x) {
AR_F_TO_ARR(NAME) \
thrM(CHR ": Unexpected argument types"); \
}
AR_F_SCALAR("÷", div , w.f/x.f)
AR_F_SCALAR("÷", div , w.f/(x.f+0))
AR_F_SCALAR("", pow , pow(w.f, x.f))
AR_F_SCALAR("", root , pow(x.f, 1.0/w.f))
AR_F_SCALAR("|", stile, pfmod(x.f, w.f))

View File

@ -113,7 +113,7 @@ GC1i("¬", not, 1-v, el_bit, bit_negate(x), NOT_BODY)
thrM(MSG); \
}
GC1f( div, 1/xv, "÷: Argument contained non-number")
GC1f( div, 1/(xv+0), "÷: Argument contained non-number")
GC1f(root, sqrt(xv), "√: Argument contained non-number")
#undef GC1i
#undef LOOP_BODY