ACOS()

Description

The ACOS() function returns the arccosine(given in radians) of the input number.

Syntax

  1. > ACOS(number)

Arguments

ArgumentsDescription
numberRequired. Any numeric data type supported now.

Examples

  1. drop table if exists t1;
  2. create table t1(a float,b int);
  3. insert into t1 values(0.5,1);
  4. insert into t1 values(-0.5,-1);
  5. mysql> select acos(a),acos(b) from t1;
  6. +--------------------+-------------------+
  7. | acos(a) | acos(b) |
  8. +--------------------+-------------------+
  9. | 1.0471975511965976 | 0 |
  10. | 2.0943951023931957 | 3.141592653589793 |
  11. +--------------------+-------------------+
  12. 2 rows in set (0.01 sec)