YouTip LogoYouTip

Func Number Acos 2

# Python2.x Python acos() Function [![Image 3: Python Numbers](#) Python Numbers](#) * * * ## Description **acos()** returns the arc cosine of x, in radians. * * * ## Syntax Here is the syntax for the acos() method: import math math.acos(x) **Note:** acos() cannot be accessed directly. You need to import the math module and then call this method using the math static object. * * * ## Parameters * x -- A numeric value between -1 and 1. If x is greater than 1, it will produce an error. * * * ## Return Value Returns the arc cosine of x in radians. * * * ## Example The following example shows the usage of the acos() method: #!/usr/bin/pythonimport math print "acos(0.64) : ", math.acos(0.64)print "acos(0) : ", math.acos(0)print "acos(-1) : ", math.acos(-1)print "acos(1) : ", math.acos(1) The output of the above program is: acos(0.64) : 0.876298061168 acos(0) : 1.57079632679 acos(-1) : 3.14159265359 acos(1) : 0.0 [![Image 4: Python Numbers](#) Python Numbers](#)
← Func Number AsinFunc Number Log10 β†’