-
Notifications
You must be signed in to change notification settings - Fork 14
Numeric
Sherlock9 edited this page Dec 3, 2017
·
2 revisions
This is a list of commands that accept numerics as input
in the order that they appear in the code page. This structure is subject to change
a and b are any two numeric inputs. z is a complex number. [a] is a list.
Symbol | Inputs | Function |
---|---|---|
▲ |
a,b | LCM(a,b). |
▼ |
a,b | Push b//gcd(a,b),a//gcd(a,b). |
! |
a | Factorial(a). |
% |
a,b | Modulus. |
& |
a,b | Bitwise AND. |
* |
a,b | Multiply. |
+ |
a,b | Add. |
- |
a,b | Subtract. |
/ |
a,b | Float division. |
< |
a,b | Less-than. |
= |
a,b | Equality. |
> |
a,b | Greater-than. |
A |
a | Absolute value. |
B |
a,b | A random integer in [a,b); randrange(a,b). |
C |
a | Cosine; cos(a). |
D |
a | Decrement. |
E |
a | Error function. |
F |
a | a-th number in the Fibonacci sequence. |
G |
a | A random float in the range [0,1); random(). |
J |
a | A random integer in [0,a); randrange(a). |
K |
a | Ceiling function. |
L |
a | Floor function. |
P |
a | The a-th prime (zero-indexed). |
R |
a | Range; [1,2,...,a]. |
S |
a | Sine; sin(a). |
T |
a | Tangent; tan(a). |
V |
a,b | A random float between a and b; uniform(a,b). |
\ |
a,b | Integer division. |
^ |
a,b | Bitwise XOR. |
_ |
a | Natural logarithm; ln(a). |
d |
a,b | Divmod. |
e |
a | Exponential function. |
f |
a | Fibonacci index of a if a is a Fibonacci number, else -1. |
g |
a,b | GCD(a,b). |
h |
a,b | Euclidean norm, sqrt(aa+bb). |
m |
a | modf(a); push int(a), frac(a). |
o |
a | Full prime factorization of |
p |
a | Check if a number is prime. |
r |
a | Lowered range; [0,1,...,a-1]. |
s |
a | Sign function. |
u |
a | Increment. |
v |
a | Seed the RNG with a; random.seed(a). |
w |
a | Prime factorization of |
x |
a | Range [a,b); [a,a+1,...,b-1]. |
y |
a | Prime factors of |
` | ` | a,b |
~ |
a | Bitwise negate. |
Ç |
a,b | Push the complex number a+bi. |
â |
a | Inverse sine; asin(a). |
ä |
a | Inverse cosine; acos(a). |
à |
a | Inverse tangent; atan(a). |
å |
a,b | atan2(a,b). |
ç |
a | Inverse hyperbolic sine; asinh(a). |
ê |
a | Inverse hyperbolic cosine; acosh(a). |
ë |
a | Inverse hyperbolic tangent; atanh(a). |
î |
a | 0+ai. |
ì |
a | Inverse; 1/a. |
Ä |
a | Hyperbolic sine; sinh(a). |
Å |
a | Hyperbolic cosine; cosh(a). |
É |
a | Hyperbolic tangent; tanh(a). |
¢ |
a,b | abs(a)*sgn(b). |
₧ |
z | Phase of a complex number. |
á |
z | Complex conjugate. |
º |
a | Convert a to degrees. |
¿ |
[a],b | Interpret [a] as a base-b integer. |
⌐ |
a | a+2 |
¬ |
a | a-2 |
½ |
a | a/2 (float division) |
¼ |
a | a/4 (float division) |
¡ |
a,b | Convert a to base b, pushes a string, only works up to base 36. |
▒ |
a | Totient function. |
▓ |
a | Prime-counting function. |
┤ |
a,b | Check if a and b are coprime. |
╣ |
a | The a-th row of Pascal's triangle. |
├ |
a | bin(a). |
─ |
a | hex(a). |
╤ |
a | 10**a. |
╥ |
a | Logarithm base 10. |
╙ |
a | 2**a. |
╘ |
a | Logarithm base 2. |
╫ |
a | Real and imaginary parts of a; Re(a), Im(a). |
█ |
a,b | Combination function; C(a,b). |
▄ |
a,b | Permutation function; P(a,b). |
▀ |
a | Digits in base a. |
Γ |
a | Gamma function. |
τ |
a | Double; 2*a. |
± |
a | Unary negate; -a. |
≥ |
a | Greater than or equal to. |
≤ |
a | Less than or equal to. |
÷ |
a | All positive divisors of a. |
≈ |
a | Convert a to an integer. |
° |
a | Convert a to radians. |
√ |
a | Square root; sqrt(a). |
ⁿ |
a,b | a to the power of b; pow(a,b). |
² |
a | Square. |