Disponible
amalgame-math
sqrt / sin / cos / pow / log, constantes, IsPrime.
Vue d'ensemble
Fonctions mathématiques classiques en flottants : trigonométrie, exponentielle/logarithme, puissances. Constantes : π, e, φ. Utilitaires entiers (GCD, LCM, IsPrime). Couche fine au-dessus de libm.
Caractéristiques
- ✓Trigonométrie :
sin,cos,tan,asin,acos,atan,atan2 - ✓Exponentiation :
exp,log,log2,log10,pow - ✓Constantes :
PI,E,PHI,SQRT2 - ✓Entiers :
Gcd,Lcm,IsPrime,NextPrime - ✓Wrapper minimaliste autour de
libm
Exemple
Exemple minimal d'utilisation — recopiable tel quel après l'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")
}
En bref
- Licence : Apache-2.0
- Installation :
amc package add math - Code source : amalgame-lang/amalgame-math
- Index officiel : amalgame-lang/packages-index