Oracle 5.0 Reference Manual page 928

Table of Contents

Advertisement

Name
[914]
TRUNCATE()
All mathematical functions return
[908]
ABS(X)
Returns the absolute value of X.
mysql>
SELECT ABS(2);
-> 2
mysql>
SELECT ABS(-32);
-> 32
This function is safe to use with
[908]
ACOS(X)
Returns the arc cosine of X, that is, the value whose cosine is X. Returns
to 1.
-1
mysql>
SELECT ACOS(1);
-> 0
mysql>
SELECT ACOS(1.0001);
-> NULL
mysql>
SELECT ACOS(0);
-> 1.5707963267949
[908]
ASIN(X)
Returns the arc sine of X, that is, the value whose sine is X. Returns
to 1.
mysql>
SELECT ASIN(0.2);
-> 0.20135792079033
mysql>
SELECT ASIN('foo');
+-------------+
| ASIN('foo') |
+-------------+
|
0 |
+-------------+
1 row in set, 1 warning (0.00 sec)
mysql>
SHOW WARNINGS;
+---------+------+-----------------------------------------+
| Level
| Code | Message
+---------+------+-----------------------------------------+
| Warning | 1292 | Truncated incorrect DOUBLE value: 'foo' |
+---------+------+-----------------------------------------+
[908]
ATAN(X)
Returns the arc tangent of X, that is, the value whose tangent is X.
mysql>
SELECT ATAN(2);
-> 1.1071487177941
mysql>
SELECT ATAN(-2);
-> -1.1071487177941
[908],
ATAN(Y,X)
ATAN2(Y,X)
Returns the arc tangent of the two variables
X, except that the signs of both arguments are used to determine the quadrant of the result.
mysql>
SELECT ATAN(-2,2);
-> -0.78539816339745
mysql>
SELECT ATAN2(PI(),0);
Mathematical Functions
Description
Truncate to specified number of decimal places
in the event of an error.
NULL
values.
BIGINT
[908]
and Y. It is similar to calculating the arc tangent of
X
908
if
is not in the range
NULL
X
if
is not in the range
NULL
X
|
-1
Y /

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents