Loon currently has abs, min, max, sum, and integer truncation
via [int x], but no other standard math.
Proposal
Add to the builtin set (or a Math module):
sqrt, pow (or **)
floor, ceil, round
sin, cos, tan, asin, acos, atan, atan2
log, log10, exp
- Constants
pi and e (or Math.pi / Math.e)
Acceptance criteria
- Available in the VM and documented in
ref/builtins.loon.
- Tests covering basic values and edge cases (
sqrt 0, pow 2 10,
floor -1.5).
Found while completing the hyperpolyglot ml column.
Loon currently has
abs,min,max,sum, and integer truncationvia
[int x], but no other standard math.Proposal
Add to the builtin set (or a
Mathmodule):sqrt,pow(or**)floor,ceil,roundsin,cos,tan,asin,acos,atan,atan2log,log10,exppiande(orMath.pi/Math.e)Acceptance criteria
ref/builtins.loon.sqrt 0,pow 2 10,floor -1.5).Found while completing the hyperpolyglot ml column.