ORACLE numeric Functions

Source: Internet
Author: User
Tags acos asin natural logarithm truncated

1 2 3 4 5 6 7 ABS (x) [function] returns the absolute value of x [parameter] x, numeric expression [Return] Number [Example] select abs (100), abs (-100) from dual;

?

1 Sign (x) [function] returns the positive and negative values of x. [parameter] x. numeric expression: [Return] number. If it is positive, 1 is returned, negative value-100 return 0 [Example] select sign (100), sign (-), sign (0) from dual;

?

1 Power (x, y) [function] returns the y power of x. [parameter] x, y numeric expression. [Return] number. [Example] select power (2.5, 2 ), power (1.5, 0), power (20,-1) from dual; returns: 6.25, 1, 0.05 [close] exp (y) returns the power y of e. (E is a mathematical constant)

?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 Exp (y) [function] returns the y Power of e (e is a mathematical constant) [parameter] y, numeric expression [Return] Number [Example] select exp (3 ), exp (0), exp (-3) from dual; returns: 20.0855369, 1, 0.049787068 [close] power (x, y) returns the power y of e. [Opposite] ln (y) returns the Base natural logarithm of e.

?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Log (x, y) [function] returns the base-x logarithm of y. [parameter] x, y, numeric expression, [condition] x, y must be greater than 0 [Return] Number [Example] select power (0.25), log (), 1/log () from dual; Return: 16, 2 select power (6.5, 3), log (274.625, 3), 1/log (power (6.5, 3), 6.5) from dual; Return: 274.625, 0.195642521, 3 [close] ln (y) returns the base y logarithm of e. (E is a mathematical constant) [relational] z = power (x, y), then y = 1/log (z, x) (condition z, x> 0)

?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 Ln (y) [function] returns the logarithm of y Based on e (e is a mathematical constant) [parameter] y, numeric expression (condition y> 0) return number [Example] select exp (3), exp (-3), ln (20.0855369), ln (0.049787068) from dual; Return: 20.0855369, 0.049787068, 3, -3 [close] log (x, y) returns the logarithm of y based on x. [opposite] exp (y) returns the y Power of e.

?

1 2 3 4 5 6 7 8 9 10 Mod (x, y) [function] returns the remainder of x divided by y [parameter] x, y, numeric expression [Return] Number [Example] select mod ), mod (24, 8) from dual; returns: 7, 0 [relationship] z = power (x, y), then y = 1/log (z, x) (condition z, x> 0)

?

1 Round (x [, y]) [function] returns the rounded value [parameter] x, y, numeric expression. If y is not an integer, the integer y is truncated, if y> 0, rounding is y decimal places. If y is less than 0, rounding is to y decimal places on the left. Return number [Example] select round (5555.6666, 2.1), round (5555.6666,-2.6), round (5555.6666) from dual; Return: 5555.67, 5600,555 6 [close] trunc (x [, y]) returns the truncated value, which is used in the same way as round (x [, y]), but is not rounded down.

?

1 Sqrt (x) [function] returns the square root of x [parameter] x numeric expression [Return] Number [Example] select sqrt (64), sqrt (10) from dual; return: 8, 3.16227766

?

1 SIN (x) [function] returns the sine of a number. [Example] select sin (1.57079) from dual; Return: 1 SIGH (x) [function] returns the hyperbolic sine value. [Example] select sin (20), sinh (20) from dual; Return: 0.91294525, 242582598 COS (x) [function] returns the cosine of a given number. [Example] select cos (-3.1415927) from dual; Return:-1 COSH (x) [function] returns a digital arccosine value. [Example] select cosh (20) from dual; Return: 242582598 TAN [function returns the tangent of a number. [Example] select tan (20 ), tan (10) from dual; Return: 2.2371609, 0.64836083 TANH [function returns the hyperbolic tangent value of number n [Example] select tanh (20), tan (20) from dual; return: 1, 2.2371609 ASIN (x) [function] returns the arc sine value. [Example] select asin (0.5) from dual; Return: 0.52359878 ACOS (x) [function] returns the arc cosine value. [Example] select acos (-1) from dual; Return: 3.1415927 ATAN (x) [function] returns the arc tangent of a number. [Example] select atan (1) from dual; Return: 0.78539816

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.