i::i::}3s=?!@-'|A5:}=?!@+=@
Try it online!
Outputs 0
(exactly one zero) for false and any other output (literally whatever is left on the stack) for true.
New interpreter build, updated answer, saved 3 bytes (previous revision miscounted and said 4).
Explanation:
i::i:: Read two inputs, duplicating each twice.
} Rotate stack right
3s Rotate the top 3 items to the right
=? @ Compare equal, if so, dump stack
! If not, skip next instruction
-'|A Subtract, absolute value, (j)
5:} Push two 5s, rotate one to the bottom
=? @ Compare 5 with (j), if equal, dump stack
! += If not, add the two inputs, compare with remaining 5
@ Dump stack (will be 1 for true and 0 for false)
Essentially it reads both inputs 3 times and arranges the stack so that each operation works on a copy of each input (or a literal 5
). As the only way to dump a 0
is if all three comparisons are false, simply dumping the rest of the stack avoids having to do anything other than vomiting the entire stack to output and terminating, all posibilities of which are valid truthy values.