MentDB, The digital brain.  About us Home
Back / All functions / Math

Like all languages, you have a few data manipulation functions.

math absmath acosmath asinmath atanmath atan2math avgmath bit_andmath bit_ormath bit_xormath cbrtmath ceilmath ceilingmath cosmath coshmath cotmath decimal_formatmath deg_to_radmath emath expmath expm1math floormath hypotmath logmath log10math log1pmath maxmath minmath modmath pimath powmath powermath rad_to_degmath randommath rintmath roundmath signmath signummath sinmath sinhmath sqrtmath tanmath tanhmath ulp

math abs <number>

Description

    get the absolute value of a number

Parameters

    number:   A number - Number - required
admin
math abs -56
mentdb
56

math acos <number>

Description

    get the arc cosine of a number

Parameters

    number:   A number - Number - required
admin
math acos 42
mentdb
NaN

math asin <number>

Description

    get the arc sine of a number

Parameters

    number:   A number - Number - required
admin
math asin 0.5
mentdb
0.5235987755982989

math atan <number>

Description

    get the arc tangent of a number

Parameters

    number:   A number - Number - required
admin
math atan 42
mentdb
1.5469913006098266

math atan2 <number1> <number2>

Description

    get the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta)

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math atan2 4 2
mentdb
1.1071487177940904

math avg <json_array>

Description

    get the avg of a json array of vales

Parameters

    json_array:   A json array (of double values) - String - required
admin
math avg "[10 20]"
mentdb
15.0

math bit_and <number1> <number2>

Description

    the bitwise and operation

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math bit_and 4456 234
mentdb
104

math bit_or <number1> <number2>

Description

    the bitwise or operation

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math bit_or 4456 234
mentdb
4586

math bit_xor <number1> <number2>

Description

    the bitwise xor operation

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math bit_xor 4456 234
mentdb
4482

math cbrt <number>

Description

    returns the cube root of a double value

Parameters

    number:   A number - Number - required
admin
math cbrt 42
mentdb
3.4760266448864496

math ceil <number>

Description

    get the smallest integer value not less than the number specified as an argument

Parameters

    number:   A number - Number - required
admin
math ceil 1.2
mentdb
2

math ceiling <number>

Description

    get the smallest integer value not less than the number specified as an argument

Parameters

    number:   A number - Number - required
admin
math ceiling 1.2
mentdb
2

math cos <number>

Description

    get the cosine of a number

Parameters

    number:   A number - Number - required
admin
math cos 42
mentdb
-0.39998531498835127

math cosh <number>

Description

    get the hyperbolic cosine of a number

Parameters

    number:   A number - Number - required
admin
math cosh 42
mentdb
8.696374707602505E17

math cot <number>

Description

    get the cotangent of a number

Parameters

    number:   A number - Number - required
admin
math cot 42
mentdb
0.4364167060752729

math decimal_format <number> <pattern> <decimalSeparator> <groupingSeparator>

Description

    convert a number to another formated decimal number

Parameters

    number:   A number - Number - required
    pattern:   The pattern - String - required
    decimalSeparator:   The decimal separator - String - required
    groupingSeparator:   The grouping separator - String - required
admin
math decimal_format 42.456 "##.##" "." " "
mentdb
42.46

math deg_to_rad <number>

Description

    converts an angle measured in degrees to an approximately equivalent angle measured in radians

Parameters

    number:   A number - Number - required
admin
math deg_to_rad 42
mentdb
0.7330382858376184

math e

Description

    get e value

admin
math e
mentdb
2.718281828459045

math exp <number>

Description

    returns euler's number e raised to the power of a double value

Parameters

    number:   A number - Number - required
admin
math exp 42
mentdb
1.73927494152050099E18

math expm1 <number>

Description

    returns e^x -1

Parameters

    number:   A number - Number - required
admin
math expm1 42
mentdb
1.73927494152050099E18

math floor <number>

Description

    get the largest integer value not greater than a number specified as argument

Parameters

    number:   A number - Number - required
admin
math floor 1.2
mentdb
1

math hypot <number1> <number2>

Description

    returns sqrt(x^2 +y^2) without intermediate overflow or underflow

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math hypot 4456 234
mentdb
4462.139845410496

math log <number>

Description

    get the natural logarithm of the argument

Parameters

    number:   A number - Number - required
admin
math log 42
mentdb
3.7376696182833684

math log10 <number>

Description

    get the base 10 logarithm of the argument

Parameters

    number:   A number - Number - required
admin
math log10 42
mentdb
1.6232492903979006

math log1p <number>

Description

    returns the natural logarithm of the sum of the argument and 1

Parameters

    number:   A number - Number - required
admin
math log1p 42
mentdb
3.7612001156935624

math max <number1> <number2>

Description

    returns the greater

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math max 4456 234
mentdb
4456

math min <number1> <number2>

Description

    returns the smaller of two int values

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math min 4456 234
mentdb
234

math mod <number1> <number2>

Description

    the modulo operation

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math mod 4456 234
mentdb
10

math pi

Description

    get pi value

admin
math pi
mentdb
3.141592653589793

math pow <number1> <number2>

Description

    get the value of a number raised to the power of another number

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math pow 0.5 7
mentdb
0.0078125

math power <number1> <number2>

Description

    get the value of a number raised to the power of another number

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math power 0.5 7
mentdb
0.0078125

math rad_to_deg <number>

Description

    converts an angle measured in radians to an approximately equivalent angle measured in degrees

Parameters

    number:   A number - Number - required
admin
math rad_to_deg 42
mentdb
2406.4227395494577

math random <number>

Description

    get the random number between 0 and the argument

Parameters

    number:   A number - Number - required
admin
math random 42
mentdb
1

math rint <number>

Description

    returns the double value that is closest in value to the argument and is equal to a mathematical integer

Parameters

    number:   A number - Number - required
admin
math rint 42
mentdb
42

math round <number1> <number2>

Description

    rounds a number specified as an argument up to a number specified as another argument

Parameters

    number1:   A number - Number - required
    number2:   A number - Number - required
admin
math round 1.23654 2
mentdb
1.24

math sign <number>

Description

    get the sign of a number

Parameters

    number:   A number - Number - required
admin
math sign 42
mentdb
1

math signum <number>

Description

    get the sign of a number

Parameters

    number:   A number - Number - required
admin
math signum 42
mentdb
1

math sin <number>

Description

    get the sine of a number

Parameters

    number:   A number - Number - required
admin
math sin 42
mentdb
-0.9165215479156338

math sinh <number>

Description

    get the hyperbolic sine of a number

Parameters

    number:   A number - Number - required
admin
math sinh 42
mentdb
8.696374707602505E17

math sqrt <number>

Description

    get the square root of a non-negative number of the argument

Parameters

    number:   A number - Number - required
admin
math sqrt 42
mentdb
6.48074069840786

math tan <number>

Description

    get the tangent of a number

Parameters

    number:   A number - Number - required
admin
math tan 42
mentdb
2.2913879924374863

math tanh <number>

Description

    get the hyperbolic tangent of a number

Parameters

    number:   A number - Number - required
admin
math tanh 42
mentdb
1

math ulp <number>

Description

    returns the size of an ulp of the argument. an ulp of a double value is the positive distance between this floating-point value and the double value next larger in magnitude

Parameters

    number:   A number - Number - required
admin
math ulp 42
mentdb
7.105427357601002E-15




© 2012 - 2018 - Innov-AI.