Available
amalgame-math
sqrt / sin / cos / pow / log, constants, IsPrime.
Overview
Classic math functions over floats: trigonometry, exponential/logarithm, powers. Constants: π, e, φ. Integer utilities (GCD, LCM, IsPrime). Thin layer over libm.
Features
- ✓Trig:
sin,cos,tan,asin,acos,atan,atan2 - ✓Exponentiation:
exp,log,log2,log10,pow - ✓Constants:
PI,E,PHI,SQRT2 - ✓Integers:
Gcd,Lcm,IsPrime,NextPrime - ✓Minimal wrapper over
libm
Example
Minimal usage example — copy-paste runnable after install.
amc package add math
let h = Math.Sqrt(Math.Pow(3.0, 2.0) + Math.Pow(4.0, 2.0)) // 5.0
if Math.IsPrime(97) {
Console.WriteLine("yes, prime")
}
At a glance
- License: Apache-2.0
- Install:
amc package add math - Source: amalgame-lang/amalgame-math
- Official index: amalgame-lang/packages-index