fix 3 ∨ "abc"

This commit is contained in:
dzaima 2023-11-23 18:11:19 +02:00
parent b07a32d0da
commit f02c92ee6a
2 changed files with 21 additions and 21 deletions

View File

@ -288,12 +288,14 @@ static NOINLINE B or_SA(B t, B w, B x) {
return bit_sel(x, m_f64(bqn_or(wf, 0)), m_f64(bqn_or(wf, 1)));
}
x = num_squeezeChk(x);
if (TI(x,elType)==el_bit) goto bitsel;
u8 xe = TI(x,elType);
if (xe==el_bit) goto bitsel;
if (!elNum(xe)) return arith_recd(or_c2, w, x);
x = toF64Any(x);
f64* rp;
B r = m_f64arrc(&rp, x);
usz ia = a(x)->ia;
x = toF64Any(x);
orSAc_f64_f64_f64(rp, w.u, tyany_ptr(x), ia);
decG(x);
return r;

View File

@ -35,28 +35,26 @@
(<1)+<1 %% <2
@-@ %% 0
!"-: Invalid character" % @-1
!"+: Unexpected argument types" % @+@
!"×: Unexpected argument types" % @×@
!"÷: Unexpected argument types" % @÷@
!"⋆: Unexpected argument types" % @@
!"√: Unexpected argument types" % @@
!"⌊: Unexpected argument types" % @@
!"⌈: Unexpected argument types" % @@
!"|: Unexpected argument types" % @|@
!"∧: Unexpected argument types" % @@
!": Unexpected argument types" % @@
{r•Repr𝕩 (!´) (r": Unexpected argument types") @ 0𝕏{𝕊: •CurrentError@} @}¨ +, ×, ÷, , , , , |, , , ÷
{r•Repr𝕩 (!´) (r": Unexpected argument types") 0 0𝕏{𝕊: •CurrentError@} @}¨ -, ×, ÷, , , , , |, , , ÷
{r•Repr𝕩 (!´) (r": Unexpected argument types") @ 0𝕏{𝕊: •CurrentError@} 0}¨ ×, ÷, , , , , |, , , ÷
%USE var a4@ (LV a) {r•Repr𝕩 (!´) (r": Unexpected argument types") @ 0𝕏{𝕊: •CurrentError@} 𝕨 V a} +, ×, ÷, , , , , |, , , ÷
%USE var a4@ (LV a) {r•Repr𝕩 (!´) (r": Unexpected argument types") 0 0𝕏{𝕊: •CurrentError@} 𝕨 V a} -, ×, ÷, , , , , |, , , ÷
%USE var a40 (LV a) {r•Repr𝕩 (!´) (r": Unexpected argument types") @ 0𝕏{𝕊: •CurrentError@} 𝕨 V a} ×, ÷, , , , , |, , , ÷
%USE var a4@ (LV a) {r•Repr𝕩 (!´) (r": Unexpected argument types") (𝕨 V a) 0𝕏{𝕊: •CurrentError@} @} +, ×, ÷, , , , , |, , , ÷
%USE var a40 (LV a) {r•Repr𝕩 (!´) (r": Unexpected argument types") (𝕨 V a) 0𝕏{𝕊: •CurrentError@} @} -, ×, ÷, , , , , |, , , ÷
%USE var a4@ (LV a) {r•Repr𝕩 (!´) (r": Unexpected argument types") (𝕨 V a) 0𝕏{𝕊: •CurrentError@} 0} ×, ÷, , , , , |, , , ÷
%USE var a4@ b4@ {r•Repr f𝕩 {(!´) (r": Unexpected argument types") (𝕨 V a) 0F{𝕊: •CurrentError@} 𝕩 V b}LV´ ab} +, ×, ÷, , , , , |, , , ÷
%USE var a40 b4@ {r•Repr f𝕩 {(!´) (r": Unexpected argument types") (𝕨 V a) 0F{𝕊: •CurrentError@} 𝕩 V b}LV´ ab} -, ×, ÷, , , , , |, , , ÷
%USE var a4@ b40 {r•Repr f𝕩 {(!´) (r": Unexpected argument types") (𝕨 V a) 0F{𝕊: •CurrentError@} 𝕩 V b}LV´ ab} ×, ÷, , , , , |, , , ÷
!"-: Unexpected argument types" % 0-@
!"÷: Unexpected argument types" % 0÷@
!"+: Argument must consist of numbers" % +@
!"-: Argument contained non-number" % -@
!"×: Argument contained non-number" % ×@
!"÷: Argument contained non-number" % ÷@
!"⋆: Argument contained non-number" % @
!"√: Argument contained non-number" % @
!"⌊: Argument contained non-number" % @
!"⌈: Argument contained non-number" % @
!"|: Argument contained non-number" % |@
!"¬: Argument contained non-number" % ¬@
@, "abc", 1,2,+, {} {(!´) (": Argument contained non-number"˜•Repr 𝕩) 0𝕏{𝕊: •CurrentError@} 𝕨} -×÷|¬
!"This function can't be called monadically" % @
!"This function can't be called monadically" % @