Incorporer des graphes interactifs dans une page web

Les principales fonctions mathématiques en javascript

Voici une liste non exhaustive des fonctions mathématiques utilisables en javascript et leur écriture.

Fonction mathématique

Ecriture en javascript

sin(x)

Math.sin(x)

cos(x)

Math.cos(x)

tan(x)

Math.tan(x)

Math.pow(x,a)

nombre aléatoire

Math.random()

valeur absolue de x

Math.abs(x)

arrondi le plus proche de x

Math.round(x)

Math.exp(x)

Math.sqrt(x)

ln(x)

Math.ln(x)

log(x)

Math.log(x)

min(x,y)

Math.min(x,y)

max(x,y)

Math.max(x,y)

PrécédentPrécédentSuivantSuivant
AccueilAccueilImprimerImprimerRéalisé avec Scenari (nouvelle fenêtre)