Qore Programming Language Reference Manual  0.8.12.8
Math Functions

Functions

int Qore::abs (int i)
 Returns the absolute value of the argument passed. More...
 
number Qore::abs (number n)
 Returns the absolute value of the argument passed. More...
 
float Qore::abs (softfloat f)
 Returns the absolute value of the argument passed. More...
 
float Qore::abs ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::acos (number n)
 Returns the value in radians of the arc cosine of the given value. More...
 
float Qore::acos (softfloat f)
 Returns the value in radians of the arc cosine of the given value. More...
 
number Qore::asin (number n)
 Returns the value in radians of the arc sine of the given value. More...
 
float Qore::asin (softfloat f)
 Returns the value in radians of the arc sine of the given value. More...
 
float Qore::asin ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::atan (number n)
 Returns the value in radians of the arc tangent of the given value. More...
 
float Qore::atan (softfloat f)
 Returns the value in radians of the arc tangent of the given value. More...
 
float Qore::atan ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::atan2 (number y, number x)
 Returns the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result. More...
 
float Qore::atan2 (softfloat y, softfloat x)
 Returns the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result. More...
 
float Qore::atan2 ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::cbrt (number n)
 Returns the cube root of the number passed. More...
 
float Qore::cbrt (softfloat f)
 Returns the cube root of the number passed. More...
 
float Qore::cbrt ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::ceil (number n)
 Returns a number equal to the smallest integral value greater than or equal to the argument passed. More...
 
float Qore::ceil (softfloat f)
 Returns a floating-point number equal to the smallest integral value greater than or equal to the argument passed. More...
 
float Qore::ceil ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::cos (number n)
 Returns the cosine of the number in radians passed. More...
 
float Qore::cos (float f)
 Returns the cosine of the number in radians passed. More...
 
float Qore::cos ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::cosh (number n)
 Returns the hyperbolic cosine of the given value. More...
 
float Qore::cosh (softfloat f)
 Returns the hyperbolic cosine of the given value. More...
 
float Qore::cosh ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::exp (number n)
 Returns the value of e (the base of natural logarithms) raised to the power of the given number. More...
 
float Qore::exp (softfloat f)
 Returns the value of e (the base of natural logarithms) raised to the power of the given number. More...
 
float Qore::exp ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::exp2 (number n)
 Returns the value of 2 raised to the power of the given number. More...
 
float Qore::exp2 (softfloat f)
 Returns the value of 2 raised to the power of the given number. More...
 
float Qore::exp2 ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::expm1 (number n)
 Returns the value of e (the base of natural logarithms) raised to the power of the given number - 1. More...
 
float Qore::expm1 (softfloat f)
 Returns the value of e (the base of natural logarithms) raised to the power of the given number - 1. More...
 
float Qore::expm1 ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::floor (softnumber n)
 Returns a number equal to the largest integral value less than or equal to the argument passed. More...
 
float Qore::floor (softfloat f)
 Returns a floating-point number equal to the largest integral value less than or equal to the argument passed. More...
 
float Qore::floor ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::hypot (number x, number y)
 Returns the length of the hypotenuse of a right-angle triangle with sides given as the two arguments. More...
 
float Qore::hypot (softfloat x, softfloat y)
 Returns the length of the hypotenuse of a right-angle triangle with sides given as the two arguments. More...
 
float Qore::hypot ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::log10 (number n)
 Returns the base 10 logarithm of the given number. More...
 
float Qore::log10 (softfloat f)
 Returns the base 10 logarithm of the given number. More...
 
float Qore::log10 ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::log1p (number n)
 Returns the natural logarithm of 1 + the given number. More...
 
float Qore::log1p (softfloat f)
 Returns the natural logarithm of 1 + the given number. More...
 
float Qore::log1p ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
float Qore::logb (softfloat f)
 Returns the exponent of the given number. More...
 
float Qore::logb ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::nlog (number n)
 Returns the natural logarithm of the given value. More...
 
float Qore::nlog (softfloat f)
 Returns the natural logarithm of the given value. More...
 
float Qore::nlog ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::pow (number x, number y)
 Returns a number raised to the power of another number. More...
 
float Qore::pow (softfloat x=0.0, softfloat y=0.0)
 Returns a number raised to the power of another number. More...
 
number Qore::round (number n)
 Returns a number equal to the closest integer to the argument passed; numbers halfway between two integers are rounded away from zero. More...
 
float Qore::round (softfloat f)
 Returns a floating-point number equal to the closest integer to the argument passed; numbers halfway between two integers are rounded away from zero. More...
 
float Qore::round ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::sin (number n)
 Returns the sine of the number in radians passed. More...
 
float Qore::sin (softfloat f)
 Returns the sine of the number in radians passed. More...
 
float Qore::sin ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::sinh (number n)
 Returns the hyperbolic sine of the given value. More...
 
float Qore::sinh (softfloat f)
 Returns the hyperbolic sine of the given value. More...
 
float Qore::sinh ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::sqrt (number n)
 Returns the square root of the number passed. More...
 
float Qore::sqrt (softfloat f)
 Returns the square root of the number passed. More...
 
float Qore::sqrt ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::tan (number n)
 Returns the tangent of the number in radians passed. More...
 
float Qore::tan (softfloat f)
 Returns the tangent of the number in radians passed. More...
 
float Qore::tan ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 
number Qore::tanh (number n)
 Returns the hyperbolic tangent of the given value. More...
 
float Qore::tanh (softfloat f)
 Returns the hyperbolic tangent of the given value. More...
 
float Qore::tanh ()
 This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments. More...
 

Detailed Description

Math functions

Function Documentation

◆ abs() [1/4]

int Qore::abs ( int  i)

Returns the absolute value of the argument passed.

Code Flags:
CONSTANT
Parameters
ithe value to process
Returns
the absolute value of the argument passed
Example:
int i = abs(-20); # returns 20
Note
equivalent to <int>::abs()

◆ abs() [2/4]

number Qore::abs ( number  n)

Returns the absolute value of the argument passed.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the absolute value of the argument passed
Example:
number n = abs(-20n); # returns 20n
Note
equivalent to <number>::abs()

◆ abs() [3/4]

float Qore::abs ( softfloat  f)

Returns the absolute value of the argument passed.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the absolute value of the argument passed
Example:
float f = abs(-20.2); # returns 20.2
Note
equivalent to <float>::abs()

◆ abs() [4/4]

float Qore::abs ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ acos() [1/2]

number Qore::acos ( number  n)

Returns the value in radians of the arc cosine of the given value.

Code Flags:
CONSTANT
Parameters
nthe cosine value to process
Returns
the value in radians of the arc cosine of the given value
Example:
number x = acos(y);

◆ acos() [2/2]

float Qore::acos ( softfloat  f)

Returns the value in radians of the arc cosine of the given value.

Code Flags:
CONSTANT
Parameters
fthe cosine value to process
Returns
the value in radians of the arc cosine of the given value
Example:
float x = acos(y);

◆ asin() [1/3]

number Qore::asin ( number  n)

Returns the value in radians of the arc sine of the given value.

Code Flags:
CONSTANT
Parameters
nthe sine value to process
Returns
the value in radians of the arc sine of the given value
Example:
number x = asin(y);

◆ asin() [2/3]

float Qore::asin ( softfloat  f)

Returns the value in radians of the arc sine of the given value.

Code Flags:
CONSTANT
Parameters
fthe sine value to process
Returns
the value in radians of the arc sine of the given value
Example:
float x = asin(y);

◆ asin() [3/3]

float Qore::asin ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ atan() [1/3]

number Qore::atan ( number  n)

Returns the value in radians of the arc tangent of the given value.

Code Flags:
CONSTANT
Parameters
nthe tangent value to process
Returns
the value in radians of the arc tangent of the given value
Example:
number x = atan(y);

◆ atan() [2/3]

float Qore::atan ( softfloat  f)

Returns the value in radians of the arc tangent of the given value.

Code Flags:
CONSTANT
Parameters
fthe tangent value to process
Returns
the value in radians of the arc tangent of the given value
Example:
float x = atan(y);

◆ atan() [3/3]

float Qore::atan ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ atan2() [1/3]

number Qore::atan2 ( number  y,
number  x 
)

Returns the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result.

Code Flags:
CONSTANT
Parameters
ythe y value for the function
xthe x value for the function
Returns
the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result
Example:
number f = atan2(y, x);

◆ atan2() [2/3]

float Qore::atan2 ( softfloat  y,
softfloat  x 
)

Returns the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result.

Code Flags:
CONSTANT
Parameters
ythe y value for the function
xthe x value for the function
Returns
the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result
Example:
float f = atan2(y, x);

◆ atan2() [3/3]

float Qore::atan2 ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ cbrt() [1/3]

number Qore::cbrt ( number  n)

Returns the cube root of the number passed.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the cube root of the number passed
Example:
number x = cbrt(y);

◆ cbrt() [2/3]

float Qore::cbrt ( softfloat  f)

Returns the cube root of the number passed.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the cube root of the number passed
Example:
float x = cbrt(y);

◆ cbrt() [3/3]

float Qore::cbrt ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ ceil() [1/3]

number Qore::ceil ( number  n)

Returns a number equal to the smallest integral value greater than or equal to the argument passed.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
a number equal to the smallest integral value greater than or equal to the argument passed
Example:
number x = ceil(3.2n); # returns 4.0n
See also
floor(number)

◆ ceil() [2/3]

float Qore::ceil ( softfloat  f)

Returns a floating-point number equal to the smallest integral value greater than or equal to the argument passed.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
a floating-point number equal to the smallest integral value greater than or equal to the argument passed
Example:
float x = ceil(3.2); # returns 4.0
See also
floor(softfloat)

◆ ceil() [3/3]

float Qore::ceil ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ cos() [1/3]

number Qore::cos ( number  n)

Returns the cosine of the number in radians passed.

Code Flags:
CONSTANT
Parameters
nthe angle in radians
Returns
the cosine of the number in radians passed
Example:
number x = cos(y);

◆ cos() [2/3]

float Qore::cos ( float  f)

Returns the cosine of the number in radians passed.

Code Flags:
CONSTANT
Parameters
fthe angle in radians
Returns
the cosine of the number in radians passed
Example:
float x = cos(y);

◆ cos() [3/3]

float Qore::cos ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ cosh() [1/3]

number Qore::cosh ( number  n)

Returns the hyperbolic cosine of the given value.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the hyperbolic cosine of the given value
Example:
number x = cosh(y);

◆ cosh() [2/3]

float Qore::cosh ( softfloat  f)

Returns the hyperbolic cosine of the given value.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the hyperbolic cosine of the given value
Example:
float x = cosh(y);

◆ cosh() [3/3]

float Qore::cosh ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ exp() [1/3]

number Qore::exp ( number  n)

Returns the value of e (the base of natural logarithms) raised to the power of the given number.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the value of e (the base of natural logarithms) raised to the power of the given number
Example:
number x = exp(y);

◆ exp() [2/3]

float Qore::exp ( softfloat  f)

Returns the value of e (the base of natural logarithms) raised to the power of the given number.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the value of e (the base of natural logarithms) raised to the power of the given number
Example:
float x = exp(y);

◆ exp() [3/3]

float Qore::exp ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ exp2() [1/3]

number Qore::exp2 ( number  n)

Returns the value of 2 raised to the power of the given number.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the value of 2 raised to the power of the given number
Example:
number x = exp2(y);

◆ exp2() [2/3]

float Qore::exp2 ( softfloat  f)

Returns the value of 2 raised to the power of the given number.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the value of 2 raised to the power of the given number
Example:
float x = exp2(y);

◆ exp2() [3/3]

float Qore::exp2 ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ expm1() [1/3]

number Qore::expm1 ( number  n)

Returns the value of e (the base of natural logarithms) raised to the power of the given number - 1.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the value of e (the base of natural logarithms) raised to the power of the given number - 1
Example:
number x = exp1m(y);

◆ expm1() [2/3]

float Qore::expm1 ( softfloat  f)

Returns the value of e (the base of natural logarithms) raised to the power of the given number - 1.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the value of e (the base of natural logarithms) raised to the power of the given number - 1
Example:
float x = exp1m(y);

◆ expm1() [3/3]

float Qore::expm1 ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ floor() [1/3]

number Qore::floor ( softnumber  n)

Returns a number equal to the largest integral value less than or equal to the argument passed.

Code Flags:
CONSTANT
Parameters
nthe value to process
Example:
number x = floor(3.9n); # returns 3.0n
See also
ceil(number)

◆ floor() [2/3]

float Qore::floor ( softfloat  f)

Returns a floating-point number equal to the largest integral value less than or equal to the argument passed.

Code Flags:
CONSTANT
Parameters
fthe value to process
Example:
float x = floor(3.9); # returns 3.0
See also
ceil(softfloat)

◆ floor() [3/3]

float Qore::floor ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ hypot() [1/3]

number Qore::hypot ( number  x,
number  y 
)

Returns the length of the hypotenuse of a right-angle triangle with sides given as the two arguments.

Code Flags:
CONSTANT
Parameters
xthe length of side x of the right-angle triangle
ythe length of side y of the right-angle triangle
Returns
the length of the hypotenuse of a right-angle triangle with sides given as the two arguments
Example:
number z = hypot(x, y);

◆ hypot() [2/3]

float Qore::hypot ( softfloat  x,
softfloat  y 
)

Returns the length of the hypotenuse of a right-angle triangle with sides given as the two arguments.

Code Flags:
CONSTANT
Parameters
xthe length of side x of the right-angle triangle
ythe length of side y of the right-angle triangle
Returns
the length of the hypotenuse of a right-angle triangle with sides given as the two arguments
Example:
float z = hypot(x, y);

◆ hypot() [3/3]

float Qore::hypot ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ log10() [1/3]

number Qore::log10 ( number  n)

Returns the base 10 logarithm of the given number.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the base 10 logarithm of the given value
Example:
number x = log10(y);

◆ log10() [2/3]

float Qore::log10 ( softfloat  f)

Returns the base 10 logarithm of the given number.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the base 10 logarithm of the given value
Example:
float x = log10(y);

◆ log10() [3/3]

float Qore::log10 ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ log1p() [1/3]

number Qore::log1p ( number  n)

Returns the natural logarithm of 1 + the given number.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the natural logarithm of 1 + the given number
Example:
number x = log1p(y);

◆ log1p() [2/3]

float Qore::log1p ( softfloat  f)

Returns the natural logarithm of 1 + the given number.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the natural logarithm of 1 + the given number
Example:
float x = log1p(y);

◆ log1p() [3/3]

float Qore::log1p ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ logb() [1/2]

float Qore::logb ( softfloat  f)

Returns the exponent of the given number.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the exponent of the given number
Example:
float x = logb(y);

◆ logb() [2/2]

float Qore::logb ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ nlog() [1/3]

number Qore::nlog ( number  n)

Returns the natural logarithm of the given value.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the natural logarithm of the given value
Example:
float x = nlog(y);

◆ nlog() [2/3]

float Qore::nlog ( softfloat  f)

Returns the natural logarithm of the given value.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the natural logarithm of the given value
Example:
float x = nlog(y);

◆ nlog() [3/3]

float Qore::nlog ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ pow() [1/2]

number Qore::pow ( number  x,
number  y 
)

Returns a number raised to the power of another number.

Code Flags:
RET_VALUE_ONLY
Parameters
xthe number to raise to the power of y
ythe power to raise x to
Returns
a number raised to the power of another number
Example:
number z = pow(x, y);
Exceptions
DIVISION-BY-ZEROin pow(x, y), if x = 0 then y must be a non-negative value

◆ pow() [2/2]

float Qore::pow ( softfloat  x = 0.0,
softfloat  y = 0.0 
)

Returns a number raised to the power of another number.

Code Flags:
RET_VALUE_ONLY
Parameters
xthe number to raise to the power of y
ythe power to raise x to
Returns
a number raised to the power of another number
Example:
float z = pow(x, y);
Exceptions
DIVISION-BY-ZEROin pow(x, y), if x = 0 then y must be a non-negative value
INVALID-POW-ARGUMENTSin pow(x, y), x cannot be negative when y is not an integer value

◆ round() [1/3]

number Qore::round ( number  n)

Returns a number equal to the closest integer to the argument passed; numbers halfway between two integers are rounded away from zero.

Code Flags:
CONSTANT
Parameters
na number to round
Returns
a number equal to the closest integer to the argument passed; numbers halfway between two integers are rounded away from zero
Example:
number n = round(num);

◆ round() [2/3]

float Qore::round ( softfloat  f)

Returns a floating-point number equal to the closest integer to the argument passed; numbers halfway between two integers are rounded away from zero.

Platform Availability
Qore::Option::HAVE_ROUND
Code Flags:
CONSTANT
Parameters
fa number to round
Returns
a floating-point number equal to the closest integer to the argument passed; numbers halfway between two integers are rounded away from zero
Example:
float n = round(num);

◆ round() [3/3]

float Qore::round ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ sin() [1/3]

number Qore::sin ( number  n)

Returns the sine of the number in radians passed.

Code Flags:
CONSTANT
Parameters
nthe angle in radians
Returns
the sine of the number in radians passed
Example:
number x = sin(y);

◆ sin() [2/3]

float Qore::sin ( softfloat  f)

Returns the sine of the number in radians passed.

Code Flags:
CONSTANT
Parameters
fthe angle in radians
Returns
the sine of the number in radians passed
Example:
float x = sin(y);

◆ sin() [3/3]

float Qore::sin ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ sinh() [1/3]

number Qore::sinh ( number  n)

Returns the hyperbolic sine of the given value.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the hyperbolic sine of the given value
Example:
number x = sinh(y);

◆ sinh() [2/3]

float Qore::sinh ( softfloat  f)

Returns the hyperbolic sine of the given value.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the hyperbolic sine of the given value
Example:
float x = sinh(y);

◆ sinh() [3/3]

float Qore::sinh ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ sqrt() [1/3]

number Qore::sqrt ( number  n)

Returns the square root of the number passed.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the square root of the number passed
Example:
number x = sqrt(y);

◆ sqrt() [2/3]

float Qore::sqrt ( softfloat  f)

Returns the square root of the number passed.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the square root of the number passed
Example:
float x = sqrt(y);

◆ sqrt() [3/3]

float Qore::sqrt ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ tan() [1/3]

number Qore::tan ( number  n)

Returns the tangent of the number in radians passed.

Code Flags:
CONSTANT
Parameters
nthe angle in radians
Returns
the tangent of the number in radians passed
Example:
number x = tan(y);

◆ tan() [2/3]

float Qore::tan ( softfloat  f)

Returns the tangent of the number in radians passed.

Code Flags:
CONSTANT
Parameters
fthe angle in radians
Returns
the tangent of the number in radians passed
Example:
float x = tan(y);

◆ tan() [3/3]

float Qore::tan ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP

◆ tanh() [1/3]

number Qore::tanh ( number  n)

Returns the hyperbolic tangent of the given value.

Code Flags:
CONSTANT
Parameters
nthe value to process
Returns
the hyperbolic tangent of the given value
Example:
number x = tanh(y);

◆ tanh() [2/3]

float Qore::tanh ( softfloat  f)

Returns the hyperbolic tangent of the given value.

Code Flags:
CONSTANT
Parameters
fthe value to process
Returns
the hyperbolic tangent of the given value
Example:
float x = tanh(y);

◆ tanh() [3/3]

float Qore::tanh ( )

This function variant does nothing at all; it is only included for backwards-compatibility with qore prior to version 0.8.0 for functions that would ignore type errors in arguments.

Code Flags:
RUNTIME_NOOP