Latest web development tutorials

Python atan function ()

figure Python figure Python


descrizione

atan () restituisce l'arcotangente di x in radianti.


grammatica

Quanto segue è il metodo sintassi atan ():

import math

math.atan(x)

Nota: atan () non è direttamente accessibile, è necessario importare il modulo per la matematica, e quindi chiamare il metodo con oggetti statici matematica.


parametri

  • x - un valore.

Valore di ritorno

Restituisce l'arcotangente di x in radianti.


Esempi

Quanto segue mostra un esempio dell'uso di atan () Metodo:

#!/usr/bin/python
import math

print "atan(0.64) : ",  math.atan(0.64)
print "atan(0) : ",  math.atan(0)
print "atan(10) : ",  math.atan(10)
print "atan(-1) : ",  math.atan(-1)
print "atan(1) : ",  math.atan(1)

Dopo aver eseguito l'output sopra esempio è:

atan(0.64) :  0.569313191101
atan(0) :  0.0
atan(10) :  1.4711276743
atan(-1) :  -0.785398163397
atan(1) :  0.785398163397

figure Python figure Python