PL and SQL Number numeric type function

  • 2020-05-30 21:13:39
  • OfStack

The ABS(x) function, which returns the absolute value of a number.
ACOS(x), returns the arccosine of X. X ranges from 1 to -1, with input values from 0 to PI in radians.
ASIN(x) function, which returns the arcsine of X. X ranges from 1 to -1, with input values ranging from -PI /2 to PI/2 in radians.
ATAN(x) function, which returns the inverse tangent of X. The input values range from -PI /2 to PI/2 in radians.
BITAND(x,y) function, which returns the sum of X and Y. X and Y must be non-negative integers. Note that there is no BITOR function, but a bit operator for the RAW value is available in the UTL_RAW package.
The CEIL(x) function, which returns the smallest integer greater than or equal to X.
COS(x) function, which returns the cosine of x. x is in radians.
The COSH(x) function returns the hyperbolic cosine of X.
The EXP(x) function, similar to the power(x,y) function, returns E to the X power without specifying the cardinality. E = 2.71828183...
The FLOOR(x) function, which returns the maximum integer less than or equal to X.
LN(x) function, which returns the natural log of x. x has to be greater than 0.
LOG(x,y) function, which returns the logarithm of Y base X. The base must be a positive number that is not 0 and 1, Y is any positive number.
MOD(dividend, divisor) returns the dividend if the divisor is 0.
POWER(x,y) function, which returns the Y power of X. Neither base X nor index Y need to be positive integers, but if X is negative, Y must be integer.
ROUND(x[,y]) function, which returns the X value rounded to the Y bit to the right of the decimal point. Y defaults to 0, which rounds X to the nearest integer. If Y is a negative number, then rounded to the corresponding bit to the left of the decimal point, Y must be an integer.
SIGN(x), this function is used to return a positive or negative value of a number. If it is a positive value, it returns 1, and if it is a negative value, it returns -1.
If it's zero, it still returns zero, kind of like digitizing the analog.
SIN(x) function, returns the sine of X. x is in radians.
SINH(x) function, which returns the hyperbolic sine of x.
SQRT(x) function, which returns the square root of x. x cannot be negative.
TAN(x) function, which returns the tangent of x. x is in radians.
TANH(x) function, which returns the hyperbolic tangent of x.
TRUNC(x[,y]) intercepts the value function, Y is 0 by default, so X is truncated to an integer. If Y is negative, intercept to the right of the decimal point
WIDTH_BUCKET (x min, max num_buckets) can only be used SQL statement.
You can use WIDTH_BUCKET to create equal length segments based on the input parameters. The range MIN to MAX is divided into num_buckets sections, each of which has the same size. Return to section 1 where X is located. If X is less than MIN, 0 is returned, and if X is greater than or equal to MAX, num_buckets+ 1.MIN and MAX are returned
Neither can be NULL, num_buckets must be a positive integer. If X is NULL, NULL is returned.

Related articles: