Calculate extension for vscode
- Support underscores in numbers
10_000_000
- Support bignumber, use decimal.js
- Support Mathematics functions
- Input calculate expression
sin(PI / 2) =
Precedence is from highest to lowest.
Operator | Example |
---|---|
exponentiation ** |
4 ** 3 ** 2 equivalent to 4 ** (3 ** 2) |
unary + - |
-2 +2 |
multiply / divide / remainder * / % |
4 % 3 4 * 3 |
addition / subtraction | .2 - .1 .1 + .2 |
E
PI
abs, acos, acosh, add, asin,
asinh, atan, atanh, atan2, cbrt
ceil, cos, cosh, div, exp,
floor, hypot, ln, log, log2,
log10, max, min, mod, mul,
pow, random, round, sign, sin,
sinh, sqrt, sub, tan, tanh, trunc
Details: http://mikemcl.github.io/decimal.js/#methods
MIT