In these general numeric functions, the arguments are expressions where x should be interpreted as a real valued number. All functions can be used in both load scripts and chart expressions.
BitCount() finds how many bits in the binary equivalent of a number are set to 1. That is, the function returns the number of set bits in integer_number, where integer_number is interpreted as a signed 32-bit integer.
Div() returns the integer part of the arithmetic division of the first argument by the second argument. Both parameters are interpreted as real numbers, that is, they do not have to be integers.
Frac() returns the fraction to the right of the decimal point of x, where x is a real number.
Sign() returns 1, 0 or -1 depending on whether x is a positive number, 0, or a negative number.
Combination and permutation functions
Combin() returns the number of combinations of q elements that can be picked from a set of p items. As represented by the formula: Combin(p,q) = p! / q!(p-q)! The order in which the items are selected is insignificant.
Permut() returns the number of permutations of q elements that can be selected from a set of p items. As represented by the formula: Permut(p,q) = (p)! / (p - q)! The order in which the items are selected is significant.
fmod() is a modulo function that returns the remainder part of the division of the first argument (the dividend) by the second argument (the divisor). The result is a real number. Both arguments are interpreted as real numbers, that is, they do not have to be integers.
Mod() is a modulo function that returns the non-negative remainder of an integer division. The first argument is the dividend, the second argument is the divisor, Both arguments must be integer values.
Ceil() rounds x up to the nearest multiple of step [+ offset]. The default value of offset is 0.
ceil(x[, step[, offset]])
Floor() rounds x down to the nearest multiple of step [+ offset]. The default value of offset is 0.
floor(x[, step[, offset]])