This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Tuesday, 2 August 2016
RADIANS: Convert degrees to radians
RADIANS(number)
RADIANSfunction
takes a number in degrees and converts it to radians.
mysql> SELECT RADIANS(360); +-------------------+ | RADIANS(360) | +-------------------+ | 6.283185307179586 | +-------------------+ 1 row in set (0.00 sec) mysql> mysql> SELECT RADIANS(180); +-------------------+ | RADIANS(180) | +-------------------+ | 3.141592653589793 | +-------------------+ 1 row in set (0.00 sec)
LEAST: Get leastelement from list of elements
mysql> SELECT LEAST('apples', 'applis', 'applas'); +-------------------------------------+ | LEAST('apples', 'applis', 'applas') | +-------------------------------------+ | applas | +-------------------------------------+ 1 row in set (0.00 sec) mysql> SELECT LEAST(2, 4, 32, 54, 321, 87, 98); +----------------------------------+ | LEAST(2, 4, 32, 54, 321, 87, 98) | +----------------------------------+ | 2 | +----------------------------------+ 1 row in set (0.00 sec)
GREATEST: Get greatest element from list of elements
mysql> SELECT GREATEST(2, 4, 32, 54, 321, 87, 98); +-------------------------------------+ | GREATEST(2, 4, 32, 54, 321, 87, 98) | +-------------------------------------+ | 321 | +-------------------------------------+ 1 row in set (0.01 sec) mysql> SELECT GREATEST('apples', 'applis', 'applas'); +----------------------------------------+ | GREATEST('apples', 'applis', 'applas') | +----------------------------------------+ | applis | +----------------------------------------+ 1 row in set (0.01 sec)
LOG, LOG10: Get logarithm of a number
LOG(number) : Natural
logarithm of a number
LOG10(number) : Log base 10
of a number
mysql> SELECT LOG(10); +-------------------+ | LOG(10) | +-------------------+ | 2.302585092994046 | +-------------------+ 1 row in set (0.01 sec) mysql> SELECT LOG10(10); +-----------+ | LOG10(10) | +-----------+ | 1 | +-----------+ 1 row in set (0.00 sec)
EXP: Get Exponent of a number
EXP function takes a number and return exponent to that number.
mysql> SELECT EXP(5); +-------------------+ | EXP(5) | +-------------------+ | 148.4131591025766 | +-------------------+ 1 row in set (0.00 sec) mysql> SELECT EXP(5.1); +-------------------+ | EXP(5.1) | +-------------------+ | 164.0219072999017 | +-------------------+ 1 row in set (0.00 sec)
Subscribe to:
Posts (Atom)