Java report tool FineReport common functions usage Summary (mathematical and trigonometric functions), javafinereport

ABS

ABS (number): returns the absolute value of a specified number. Absolute Value refers to a value without positive or negative signs.

Number: any real Number of the absolute value.

Example:

ABS (-1.5) equals 1.5.

ABS (0) is equal to 0.

ABS (2.5) equals 2.5.

ACOS

ACOS (number): returns the arc cosine of a specified value. Returns an angle in radians.

Number: returns the cosine of the angle.

Note:

The function parameters must be between-1 and 1, including-1 and 1.

The returned angle value is between 0 and Pi.

If you want to represent the returned angle in degrees, use 180/PI () to return the value.

Example:

ACOS (1) is equal to 0 (radians ).

ACOS (0.5) equals 1.047197551 (Pi/3 radian ).

Acoscosh (0.5) * 180/PI () is equal to 60 degrees ).

Acossh

Acossh (number): returns the inverse hyperbolic cosine of a given number.

Number: returns the hyperbolic cosine of a value.

Note:

The value of the parameter number must be greater than or equal to 1.

COSH (number) = number.

Example:

Acossh (1) is equal to 0.

The value of acossh (8) is 2.768659383.

Acossh (5.5) equals 2.389526435

ASIN

ASIN (number): returns the arc sine of a specified value. Returns an angle in radians.

Number: returns the sine of the angle.

Note:

The specified value must be between-1 and 1 (including 1 and-1 ).

The Return angle is between-pi/2 and pi/2 (including-pi/2 and pi/2 ).

When a value is returned in angular form, the return value can be multiplied by 180/PI ().

Example:

ASIN (0.5) equals 0.523598776 (pi/6 radian ).

ASIN (1) equals 1.570796327 (pi/2 radian ).

ASIN (0.5) * 180/PI () is equal to 30 degrees ).

ASINH

ASINH (number): returns the inverse hyperbolic sine of a specified value. The hyperbolic sine of the antihyperbolic sine value is equal to the specified value. That is, ASINH (SINH (number) = number.

Number: any real Number.

Example:

ASINH (-5) is equal to-2.312438341.

ASINH (8) equals 2.776472281.

ASINH (16) equals 3.466711038.

ATAN

ATAN (number): calculates the arc tangent of a specified value. The specified value is the tangent of the Return angle, which is expressed in radians.

Number: returns the tangent of the angle.

Note:

The Return angle is between-pi/2 and pi/2.

If the returned angle is-pi/2 or pi/2, ATAN returns an error message * NUM !.

When a value is returned in the form of an angle, the return value is multiplied by 180/PI ().

Example:

ATAN (-1) equals-0.785398163 (-pi/4 radian ).

ATAN (0) is equal to 0 (radians ).

ATAN (2) * 180/PI () is equal to 63.43494882 degrees ).

ATAN2

ATAN2 (x_num, y_num): returns the arc tangent of x and y coordinates. Returns the angle from which the X axis, x (x_num, y_num), and x (0, 0) coordinates are formed. This angle is displayed in radians.

X_num: x coordinate of the specified point.

Y_num: Specifies the y coordinate of the vertex.

Note:

A positive value indicates the angle obtained in the clockwise direction from the X axis. A negative value indicates the angle obtained in the clockwise direction from the X axis.

ATAN2 (a, B) = ATAN (B/a), except when a is 0.

When x_num and y_num are both 0, ATAN2 returns the error message * DIV/0 !.

When the returned value is displayed in angular format, the return value is multiplied by 180/PI ().

The return value is expressed in radians (the return value is greater than-pi and less than or equal to pi ).

Example:

ATAN2 (-2.356194490) equals (3 * pi/4 in radians ).

ATAN2 (2, 2) is equal to 0.785398163 (radian pi/4 ).

ATAN2 (-180) * 135/PI () is equal to (angle ).

AVERAGE

AVERAGE (number1, number2 ,...) : Returns the average value of the specified data.

Number1, number2... : The parameter used to calculate the average value.

Note:

The parameter must be a number or contain a number name, array, or reference.

If an array or referenced parameter contains text, logical values, or blank cells, these values are ignored. However, zero values in cells are involved in the calculation.

Example:

If A1: A6 is named "ages", which is equal to 10, 23, 33, and 25 respectively, then:

AVERAGE (A1: A6) equals 21.5.

AVERAGE (ages) equals 21.5.

If there is another age of 18, the AVERAGE value of all ages is: AVERAGE (A1: A6, 18) equal to 21.

BITNOT

BITNOT (int): returns a decimal integer in binary form.

Int: the decimal number to be converted.

Example:

BITNOT (3) is equal to-4.

BITNOT (12) is equal to-13.

BITOPERATION

BITOPERATIOIN (int, int, op) bitwise operation returns the bitwise operation results of two integers Based on op.

Int: a decimal integer.

Op: bitwise operation operator. It supports "&" (and), "|" (OR), "^" (exclusive or), "<" (left shift ), ">" (right shift ).

Example:

BITOPERATION (, "&") indicates that 4 and 2 perform "and" operations, and the result is equal to 0.

BITOPERATION (, "|") indicates that 4 and 2 perform "or" operations, and the result is 6.

BITOPERATION (, "^") indicates that 4 and 2 perform the "XOR" operation and the result is 6.

BITOPERATION (, "<") indicates that 4 shifts two places left by bit and the result is 16.

BITOPERATION (, ">") indicates that 4 shifts two places to the right, and the result is equal to 1.

BITOPERATION (4,1, "^ ~ ") Indicates that 4 and 2 perform the" same or "operation and the result is-7.

CEILING

CEILING (number, significance): rounds the number parameter to the smallest multiple of the Base Value in the direction of increasing the absolute value.

Number: the value to be rounded.

Significance: base number.

Note:

When either number or significance is non-numeric, CEILING returns an error message * VALUE ?.

When the number and significance symbols are different, CEILING returns an error message * VALUE ?.

All numeric symbols are rounded away from zero. If the number is already a multiple of significance, No rounding is performed.

Example:

CEILING (2.5,-1) is equal to * VALUE ?.

CEILING (-2.5,-1) is equal to-3.

CEILING (0.5, 2) equals 2.

COMBIN

COMBIN (number, number_chosen): returns the number of combinations of several specified objects. This function has the same function as the mathematical expression Cnk.

Number or "n" in a mathematical expression indicates the total Number of objects.

Number_chosen or "k" in a mathematical expression refers to the number of combinations in the total number of objects.

Note:

Number and number_chosen must be non-negative integers and Number> = number_chosen. Otherwise, * VALUE? is returned ?.

An object combination is a subset of the object population. Unlike the arrangement, the combination does not involve the internal sorting of objects.

Suppose number = n, number_chosen = k, then: COMBIN (n, k) = Cnk = n! /(K! (N-k )!).

Example:

COMBIN (5, 2) is equal to 10.

COS

COS (number): returns the cosine of an angle.

Number: Angle in radians that requires cosine.

Note:

To convert an angle to a radian value, multiply the angle by PI ()/180.

COS (n * 2 * PI () + number) = COS (number) (where n is an integer and number ranges from-pi to pi ).

Example:

COS (0.5) equals 0.877582562.

COS (30 * PI ()/180) equals 0.866025404.

COSH

COSH (number): returns the hyperbolic cosine of a value.

Number: a real Number that requires the hyperbolic cosine value.

Note:

The hyperbolic cosine value is calculated as follows: e is the base of the natural logarithm, and e = 2.71828182845904.

Example:

COSH (3) equals 10.06766200.

COSH (5) equals 74.20994852.

COSH (6) equals 201.7156361.

COUNT

COUNT (value1, value2 ,...) : Calculates the number of numeric items contained in an array or data area.

Value1, value2 ,... : It can contain parameters of any type of data, but this function only includes numeric data.

Note:

Numeric, date, or numeric parameter represented by text will be included, but the incorrect value or text value parameter that cannot be converted to a number will be ignored.

If the array or reference parameter contains the resolvable text value, logical value, zero value, or blank cell, these values are calculated, and unresolvable text values are ignored.

DEGREES

DEGREES (angle): converts radians to DEGREES.

Angle: The radian Angle to be converted.

Example:

DEGREES (PI ()/2) is 90.

DEGREES (3.1415926) equals 179.9999969.

EVEN

EVEN (number): returns the number nearest to the integer in the direction of increasing the absolute value. This function can be used to process paired objects.

Number: the value to be rounded up.

Note:

Regardless of the plus or minus sign, the value is rounded away from 0. If the number happens to be an even number, no rounding is required.

Example:

EVEN (1.5) equals 2

EVEN (3) equals 4

EVEN (2) equals 2

EVEN (-1) equals-2

EXP

EXP (number): returns the n power of e. Constant e is the base number of the natural logarithm, equal to 2.71828182845904.

Number: any real Number, used as the index of the constant e.

Note:

If you want to return other constants as the power of the base number, you can use the exponential operator (^ ). For example, in 4 ^ 2, 4 is the base number, and 2 is the index.

EXP and LN functions are inverse functions.

Example:

EXP (0) is equal to 1.

EXP (3) is equal to 20.085536 in 2

EXP (LN (2) is equal to 2.

FACT

FACT (number): returns the factorial of a number. The factorial of a number is equal to 0! * 1*2*3 *... * number (0! = 1 ).

Number: the non-negative number of the factorial to be calculated. If the number entered is not an integer, the end is rounded up.

Example:

FACT (1) equals 1

FACT (1.9) equals FACT (1) equals 1

FACT (0) equals 1

FACT (5) equals 0! * 1*2*3*4*5 equals 120

FLOOR

FLOOR (number, significance): rounds the parameter number to the end in the direction of decreasing the absolute value so that it is equal to a multiple of the nearest base.

Number: the value to be rounded.

Significance: base number.

Note:

When number and significance are any non-numeric parameters, function FLOOR returns an error message * VALUE ?.

When the number and significance symbols are different, function FLOOR returns an error message * VALUE ?.

No matter what the number symbol is, the absolute value of the parameter will be reduced. If the number is exactly a specified multiple, No rounding is required.

Significance cannot be zero.

Example:

FLOOR (2.5,-1) is equal to * VALUE ?.

FLOOR (-2.5,-1) is equal to-2.

FLOOR (2.5, 2) is equal to 2.

FLOOR (0.143, 0.03) equals 0.12.

INT

INT (number): returns the nearest integer after the number is deprecated (the direction in which the value is reduced.

Number: the real Number that needs to be included as an integer.

Example:

INT (4.8) equals 4.

INT (-4.8) is equal to-5.

INT (4.3) equals 4.

INT (-4.3) is equal to-5.

The formula INT (A1) returns the integer part of a positive number in cell A1.

LESS

LESS (value1, value2 ,..., Value): calculates the number of data items in the array or data area that are smaller than the last data item.

Value1, value2 ,... : It can contain parameters of any type of data, but this function only includes numeric data.

Note:

Numeric, date, or numeric parameter represented by text will be included, but the incorrect value or text value parameter that cannot be converted to a number will be ignored.

If the array or reference parameter contains the resolvable text value, logical value, zero value, or blank cell, these values are calculated, and unresolvable text values are ignored.

Generally, value is a numeric parameter. If it is not numeric, "0" is returned ".

Example:

LESS (10, 2, 20) = 2

LESS (12, 2, 10, 20) = 3

Suppose A1 is 30, A2 is 800, A3 is 30 LESS (A1: A3, 200,200,400) = 4

LESS (20) = 0

LN

LN (number): returns the natural logarithm of a number. Naturally, the constant e (2.71828182845904) is the base.

Number: a positive number used to calculate its natural logarithm.

Example:

LN (86) equals 4.45437

LN (2.7182818) equals 1

LN (EXP (3) equals 3

LOG

LOG (number, base): returns the logarithm of a value based on the specified base number.

Number: the positive Number of the logarithm.

Base: Base number of the logarithm. The default value is 10.

Example:

LOG () equals 4.

LOG (10) is equal to 1.

LOG (24, 3) equals 2.892789261.

LOG10

LOG10 (number): returns the base-10 logarithm.

Number: the positive number used for common logarithm calculation.

Example:

LOG10 (86) equals 1.934498451

LOG10 (10) is equal to an integer of a positive number in cell A1.

MAX

MAX (number1, number2 ,...) : Returns the maximum value in the parameter list.

Number1, number2 ,... : 1 to 30 parameters to find the maximum value.

Note:

A parameter can be a text expression of a number, blank cell, logical value, or number.

If the array or reference parameter contains resolved text values, logical values, zero values, or blank cells, these values are calculated, and unresolvable text values are ignored.

If no number exists in the parameter, MAX returns 0.

Example:

MAX (0.1, 0, 1.2) equals 1.2.

MAXLESSVALUE

MAXLESSVALUE (number, dictionary): returns the maximum number smaller than the number in the data dictionary.

Example:

Data Dictionary: customDictionary

Key Value

11

22

33

44

MAXLESSVALUE (2.4, "customDictionary") is equal to 2.

MIN

MIN (number1, number2 ,...) : Returns the minimum value in the parameter list.

Number1, number2 ,... : 1 to 30 parameters that require minimum values.

Note:

If no number exists in the parameter, function MIN returns 0.

The parameter must be a number, a blank cell, a logical value, or a text string that represents a value. If the parameter is an error value, MIN returns an error message.

If the array or reference parameter contains resolved text values, logical values, zero values, or blank cells, these values are calculated, and unresolvable text values are ignored.

Example:

If B1: B4 contains 3, 6, 9, 12, then:

MIN (B1: B4) is equal to 3.

MIN (B1: B4, 0) is equal to 0.

MINBIGVALUE

MINBIGVALUE (number, dictionary): returns the smallest number in a dictionary that is greater than a number.

Example:

Data Dictionary: customDictionary

Key Value

11

22

33

44

MINBIGVALUE (2.4, "customDictionary") is 3.

MOD

MOD (number, divisor): returns the remainder of the division of two numbers. The positive and negative numbers of the result are the same as the divisor.

Number: divisor.

Divisor: divisor.

Example:

MOD (3, 2) equals 1

MOD (-3, 2) equals 1

MOD (3,-2) equals-1

MOD (-3,-2) equals-1

MORE

MORE (value1, value2 ,..., Value): calculates the number of numeric items in the array or data area that are greater than the last data item.

Value1, value2 ,... : It can contain parameters of any type of data, but this function only includes numeric data.

Note:

Numeric, date, or numeric parameter represented by text will be included, but the incorrect value or text value parameter that cannot be converted to a number will be ignored.

If the array or reference parameter contains the resolvable text value, logical value, zero value, or blank cell, these values are calculated, and unresolvable text values are ignored.

Generally, the value type is Numeric. Otherwise, the returned result is zero.

Example:

MORE (100,200, 20) = 2

MORE (100,200,200, 20) = 3

Suppose A1 is 30, A2 is 10, A3 is 30 MORE (A1: A3, 200,200, 20 omDictionary ") is equal to 3.

ODD

ODD (number): returns the ODD number after rounding a specified value.

Number: the value to be rounded to the odd value.

Regardless of the plus or minus sign, the value is rounded away from 0. If number happens to be an odd number, no rounding is required.

Example:

ODD (1.5) equals 3

ODD (3) equals 3

ODD (2) equals 3

ODD (-1) equals-1

PI

PI: A mathematical constant. The return value of the function is 3.141592653589793 precise to 15 digits.

Example:

SIN (PI ()/2) is equal to 1.

Formula for Calculating the area of the circle: S = PI () * (r ^ 2), where S is the area of the circle, and R is the radius of the circle.

POWER

POWER (number, power): returns the POWER of a specified number.

Number: base Number, which can be any real Number.

Power: exponential. The number of parameters is multiplied by the power of this index.

Note:

You can use the symbol "^" to replace POWER. For example, POWER (5, 2) equals 5 ^ 2.

Example:

POWER (6, 2) equals 36.

POWER (537824) equals.

POWER (4, 2/3) equals 2.519842100.

POWER (3,-2.3) equals 0.079913677.

PRODUCT

PRODUCT (number1, number2,...): multiply all the numbers given in the form of parameters and return the PRODUCT value.

Number1, number2,...: 1 to n numeric parameters to be multiplied. (The maximum number of parameters is 30)

Example:

PRODUCT (3, 4) equals 12

PRODUCT (3, 4, 5) is equal to 60

PROMOTION

PROMOTION (value1, value2): returns the increase ratio of value2 on value1.

Example:

PROMOTION (0.166666666) equals 16.6666666%, that is, increased.

PROMOTION (-2.166666666) is equal to 216.6666666%, that is, increased.

RADIANS

RADIANS (angle): converts degrees to RADIANS.

Angle: Angle to be converted to radians.

Example:

RADIANS (90) equals 1.570796327 (Pi/2 radian ).

RAND

RAND (): returns a random number. The value is located in Area 1 [0, 1]. Each time a worksheet is calculated, the function returns a new random value.

Note:

To generate a random number between a and B, use the following formula: C = RAND () * (B-a) +.

If you want to make a random value not change with the cell recalculation, you can enter = RAND () in the edit box and press F9, change the formula permanently to a random number.

Example:

To generate a random number greater than or equal to 0 and less than 60, use the formula: = RAND () * 60.

To generate a random number greater than or equal to 0 and less than 19, use the formula: = RAND () * 19.

To generate a random number greater than or equal to 0 and less than 50, use the formula: = RAND () * 50.

RANDBETWEEN

RANDBETWEEN (value1, value2): returns a random integer between value1 and value2.

Example:

RANDBETWEEN (12.333, 13.233) returns only 13.

RANDBETWEEN (11.2, 13.3) may return 12 or 13.

RANK

RANK (number, ref, order): returns the RANK of a number in an array. (If this array is sorted, the rank of the number is its serial number in the array .)

Number. (It Can Be Boolean, true = 1, false = 0)

Ref can be an array, reference, or a series of numbers. Values of non-real numbers are ignored (Boolean type, true = 1, false = 0 ).

Order indicates the rank parameter. If the value is not zero, the value is in ascending Order and the value is in descending Order.

Note:

RANK returns the same RANK for the number of duplicates, but the number of duplicates affects the RANK of the subsequent number. For example, if 5 appears twice in a group of ascending integers, and the rank is 3, then the rank of 6 is 5 (the rank of no number is 4 ).

In the previous example, if you want to get the rank of 5 to 3.5, you can add a correction factor based on the returned rank. This correction factor is suitable for both ascending and descending order.

The correction factor is [COUNT (ref) + 1-RANK (number, ref, 0)-RANK (number, ref, 1)]/2.

In the following example, RANK (A2, A1: A5, 1) = 3. Correction Factor: (5 + 1-2-3)/2 = 0.5 the corrected rank is 3 + 0.5 = 3.5. If number appears only once in ref, the correction factor is equal to 0, and the rank does not change.

Example:

A1: A5 = 6, 4.5, 4.5, 2, 4

RANK (A1, A1: A5, 1) indicates that the RANK of 6 is 5.

RANK (13.3, 2, "go", 3,) may return 12 or 13.

ROUND

ROUND (number, num_digits): returns the number rounded up by the specified number.

Number: number to be rounded.

Num_digits: the specified number of digits, which are rounded up.

If num_digits is greater than 0, it is rounded to the specified decimal place.

If num_digits is equal to 0, it is rounded to the nearest integer.

If num_digits is less than 0, it is rounded to the left of the decimal point.

Example:

ROUND (2.15, 1) equals 2.2

ROUND (2.149, 1) equals 2.1

ROUND (-1.475, 2) equals-1.48

ROUND (21.5,-1) equals 20

ROUNDDOWN

ROUNDDOWN (number, num_digits): rounds down (the direction in which the absolute value decreases) to zero.

Number: any real number to be rounded down.

Num_digits: the number of digits after rounding.

Note:

The function ROUNDDOWN is similar to the function ROUND. The difference is that the function ROUNDDOWN always rounds down the number.

Example:

ROUNDDOWN (3.2, 0) equals 3

ROUNDDOWN (76.9, 0) equals 76

ROUNDDOWN (3.14159, 3) equals 3.141

ROUNDDOWN (-3.14159, 1) equals-3.1

ROUNDDOWN (31415.92654,-2) equals 31,400

ROUNDUP

ROUNDUP (number, num_digits): rounds up (the direction of the absolute value increase) away from the zero value.

Number: any real number to be rounded up.

Num_digits: the number of digits after rounding.

Note:

The ROUNDUP function is similar to the ROUND function. The difference is that the ROUNDUP function always rounds up a number.

Example:

ROUNDUP (3.2, 0) equals 4

ROUNDUP (76.9, 0) equals 77

ROUNDUP (3.14159, 3) equals 3.142

ROUNDUP (-3.14159, 1) equals-3.2

ROUNDUP (31415.92654,-2) equals 31,500

SIGN

SIGN (number): returns the symbol of a number. If the number is positive, 1 is returned. If the number is zero, 0 is returned. If the number is negative,-1 is returned.

Number: any real Number.

Example:

SIGN (10) equals 1

SIGN (4-4) equals 0

SIGN (-0.00001) equals-1

SIN

SIN (number): returns the sine of a given angle.

Number: the angle of the sine value in radians.

Note:

If the unit of the parameter is degrees, multiply it by PI ()/180 to convert it to radians.

Example:

SIN (10) is equal to-0.544021111.

SIN (45 * PI ()/180) equals 0.707106781.

SINH

SINH (number): returns the hyperbolic sine of a number.

Number: any real number.

Example:

SINH (1) equals 1.175201194

SINH (-1) is equal to-1.175201194.

SQRT

SQRT (number): returns the square root of a positive number.

Number: the Number that requires the square root.

Note:

Number must be a positive Number; otherwise, the function returns the error message NAN.

Example:

SQRT (64) is equal to 8.

SQRT (-64) returns NAN.

SUM

SUM (number1, number2 ,...) : Calculates the sum of all numbers in a specified cell area.

Number1, number2 ,... : 1 to 30 parameters or all numbers in the specified cell area.

Note:

The function is calculated by directly inputting the value, logical value, and text expression in the parameter.

If the parameter is an array or reference, only the values in the array or cell reference are calculated.

Example:

SUM (150) equals.

SUM ("70", 80, TRUE) equals 151, and the logical value "TRUE" is calculated as 1; "FALSE" is calculated as 0; and the text "70" is calculated as 0.

SUM (A1: A5) sums the values in the lattice between A1 and A5.

SUM (A1: A5, 50) calculates the SUM of the value and value 50 in the lattice between A1 and A5.

SUMSQ

SUMSQ (number1, number2,...): returns the sum of squares of all parameters.

Number1, number2 ,...: n parameters that require the sum of squares (the upper limit of n is 30). You can also use arrays or references to arrays to replace the comma-separated parameters.

Example:

SUMSQ (3, 4) equals 25

TAN

TAN (number): returns the tangent of the specified angle.

Number: angle of the value to be adjusted, expressed in radians. If the parameter is in degrees, multiply by Pi ()/180 and convert it to radians.

Example:

TAN (0.8) equals 1.029638557.

TAN (45 * Pi ()/180) is equal to 1.

TANH

TANH (number): returns the hyperbolic tangent of a number.

Number: any real number.

Example:

TANH (-2) equals-0.96403

TANH (0) equals 0

TANH (0.5) equals 0.462117

TOBINARY

TOBINARY (int): converts a decimal integer to a binary string.

Int: the decimal integer to be converted.

Example:

TOBINARY (10) is equal to "1010 ".

TOBINARY (20) is equal to "10100 ".

TOHEX

TOHEX (int): converts a decimal integer to a hexadecimal string.

Int: the decimal integer to be converted.

Example:

TOHEX (15) equals to "f ".

TOHEX (20) equals to "14 ".

TOOCTAL

TOOCTAL (int): converts a decimal integer to an octal string.

Int: the decimal integer to be converted.

Example:

TOOCTAL (10) is equal to "12 ".

TOOCTAL (20) is equal to "24 ".

TRUNC

TRUNC (number, num_digits): returns an integer. Truncates the fractional part of a number and returns an integer.

Number: the number to be rounded up.

Num_digits: number used to specify the integer precision.

Example:

TRUNC (8.9) equals 8

TRUNC (-8.9) equals-8

TRUNC (PI () is equal to 3.

UUID

UUID (): returns the number of random machines.

Note:

The default value is 36.

Example:

UUID () returns the number of 36 random machines.

UUID (32) returns the number of 32-bit random machines.