-
-
Save coke/94d976b93b5bd41ea5c52f295654bc86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env raku | |
use Test; | |
use APL::Operators; | |
plan 20; | |
is +2, 2, "conjugate positive"; | |
is +⁻2, ⁻2, "conjugate negative"; | |
is −⁻2, 2, "negate negative"; | |
is ×2, 1, "signum positive"; | |
is ×⁻2, -1, "signum negative"; | |
is ×0, 0, "signum zero"; | |
is ÷10, 0.1, "reciprocal"; | |
is !0, 1, "factorial"; | |
is !4, 24, "factorial"; | |
is ⌈3.14, 4, "ceiling positive"; | |
is ⌈⁻3.14, -3, "ceiling negative"; | |
is ⌊3.14, 3, "floor positive"; | |
is ⌊⁻3.14, ⁻4, "floor negative"; | |
is ~0, 1, "not 0"; | |
is ~1, 0, "not 1"; | |
is *1, 𝑒, "exponential"; | |
is ○1, π, "Pi times 1"; | |
is ○3, π*3, "Pi times 3"; | |
is ⍟𝑒, 1, "natural logarithm"; | |
is ⍟*1, 1, "inverse exp/ln"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment