You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could start with a mininal version of such library and then we could extend it with other functions. Some of the most important ones could be the following:
Rounding
ceil(x: Num): Num - rounds up to the nearest integer
floor(x: Num): Num - rounds down to the nearest
round(x: Num): Num - rounds to the nearest integer
Absolute and sign
abs(x: Num): Num - absolute value
sign(x: Num): Num - sign function, returns -1, 0, or 1 depending on the sign of x
Min / Max
min(a: Num, b: Num): Num
max(a: Num, b: Num): Num
Optional: Power, root, exponential, logarithms and trigonometric
These can be easily evaluated using bc with flag -l
pow(base: Num, exponent: Num): Num - power function
sqrt(x: Num): Num - square root
exp(x: Num): Num - exponential function
log(x: Num): Num - natural logarithm
log10(x: Num): Num - base-10 logarithm
sin(x: Num): Num - sine
cos(x: Num): Num - cosine
tan(x: Num): Num - tangent
The text was updated successfully, but these errors were encountered:
Ph0enixKM
changed the title
Proposal for Comprehensive Mathematical Module in Amber
✨ Proposal for Comprehensive Mathematical Module in Amber
Jun 16, 2024
We could start with a mininal version of such library and then we could extend it with other functions. Some of the most important ones could be the following:
Rounding
ceil(x: Num): Num
- rounds up to the nearest integerfloor(x: Num): Num
- rounds down to the nearestround(x: Num): Num
- rounds to the nearest integerAbsolute and sign
abs(x: Num): Num
- absolute valuesign(x: Num): Num
- sign function, returns -1, 0, or 1 depending on the sign of xMin / Max
min(a: Num, b: Num): Num
max(a: Num, b: Num): Num
Optional: Power, root, exponential, logarithms and trigonometric
pow(base: Num, exponent: Num): Num
- power functionsqrt(x: Num): Num
- square rootexp(x: Num): Num
- exponential functionlog(x: Num): Num
- natural logarithmlog10(x: Num): Num
- base-10 logarithmsin(x: Num): Num
- sinecos(x: Num): Num
- cosinetan(x: Num): Num
- tangentThe text was updated successfully, but these errors were encountered: