3 ms·
Maybe I’m missing something, but at the bottom there are these two statements: 7×3 ⍝ Dyadic × is multiplication ׯ7 ⍝ Monadic × is 'direction', or signum (
by tigershark 5y ago
Maybe I’m missing something, but at the bottom there are these two statements:
7×3 ⍝ Dyadic × is multiplication
ׯ7 ⍝ Monadic × is 'direction', or signum (the sign, in our case). Thanks.
And looking at the output I can see:
21
¯1
Is it a typo or really -7 is becoming -1 for some esoteric reason that escapes my comprehension?
- leprechaun1066 5y agoIt's the sign of the number. -7 is negative so you get -1. 7 gives you 1 and 0 gives 0. ×-7 ¯1 ×7 1 ×0 0
- yiyus 5y agoIt's not a typo. Monadic × will return 1 if the right argument is positive, ¯1 (minus one) if it is negative, and zero if it is zero.