Difference between revisions of "FPSpreadsheet: List of formulas"

From Lazarus wiki
Jump to navigationJump to search
m
(Complete skeleton of table)
Line 5: Line 5:
 
! scope="col" | Meaning
 
! scope="col" | Meaning
 
! scope="col" | Argument types
 
! scope="col" | Argument types
! scope="col" | Argument count
+
! scope="col" | Arguments
 
! scope="col" | Result type
 
! scope="col" | Result type
 
|-
 
|-
| <b>Mathematical functions</b>
+
| colspan="5" | <b>Mathematical functions</b>
 
|-  
 
|-  
| <code>ABS(number)</code> || returns the absolute value of a number || float or cell reference || 1 || float
+
| <code>ABS(num)</code> || returns the absolute value of a number || float or cell reference || align="center" |1 || align="center" | float
 
|-
 
|-
| <code>ACOS(number)</code> || returns the arccosine (in radians) of a number || float or cell reference (>= -1 and <= +1)|| 1 || float
+
| <code>ACOS(num)</code> || returns the arccosine (in radians) of a number || float or cell reference (>= -1 and <= +1)|| align="center" |1 || align="center" |float
 
|-
 
|-
| <code>ACOSH(number)</code> || returns the inverse hyperbolic cosine of a number || float or cell reference (>=1) || 1 || float
+
| <code>ACOSH(num)</code> || returns the inverse hyperbolic cosine of a number || float or cell reference (>=1) || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>ASIN(number)</code> ||  returns the arcsine (in radians) of a number || float or cell reference (>= -1 and <=+1) || 1 || float
+
| <code>ASIN(num)</code> ||  returns the arcsine (in radians) of a number || float or cell reference (>= -1 and <=+1) || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>ASINH(number)</code> ||  returns the inverse hyperbolic sine of a number || float or cell reference || 1 || float
+
| <code>ASINH(num)</code> ||  returns the inverse hyperbolic sine of a number || float or cell reference || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>ATAN(number)</code> ||  returns the arctangent (in radians) of a number || float or cell reference || 1 || float
+
| <code>ATAN(num)</code> ||  returns the arctangent (in radians) of a number || float or cell reference || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>ATANH(number)</code> ||  returns the inverse hyperbolic tangent of a number || float or cell reference (> -1 and < +1) || 1 || float
+
| <code>ATANH(num)</code> ||  returns the inverse hyperbolic tangent of a number || float or cell reference (> -1 and < +1) || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>COS(number)</code> || returns the cosine of an angle (in radians) || float or cell reference || 1 || float
+
| <code>COS(num)</code> || returns the cosine of an angle (in radians) || float or cell reference || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>COSH(number)</code> || returns the hyperbolic cosine of a number || float or cell reference || 1 || float
+
| <code>COSH(num)</code> || returns the hyperbolic cosine of a number || float or cell reference || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>DEGREES(number)</code> || converts an angle from radians to degrees || float or cell reference || 1 || float
+
| <code>DEGREES(num)</code> || converts an angle from radians to degrees || float or cell reference || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>EXP(number)</code> || calculates the exponential function of a number || float or cell reference || 1 || float
+
| <code>EXP(num)</code> || calculates the exponential function of a number || float or cell reference || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>INT(number)</code> || returns the integer portion of a number (like "floor()") || float or cell reference || 1 || integer
+
| <code>INT(num)</code> || returns the integer portion of a number (like "floor()") || float or cell reference || align="center" |1 || align="center" |integer
 
|-
 
|-
| <code>LN(number)</code> || calculates the natural logarithm of a number || float or cell reference (> 0) || 1 || float
+
| <code>LN(num)</code> || calculates the natural logarithm of a number || float or cell reference (> 0) || align="center" |1 || align="center" |float
 
|-
 
|-
| <code>LOG(number [, base])</code> || calculates the logarithm of a number to a specified base.<br> <code>base</code>, if omitted, is 10. || float or cell reference (> 0) || 1 or 2 || float
+
| <code>LOG(num [, base])</code> || calculates the logarithm of a number to a specified base.<br> <code>base</code>, if omitted, is 10. || float or cell reference (> 0) || align="center" |1 or 2 || align="center" |float
 
|-
 
|-
| <code>LOG10(number)</code> || calculates the base-10 logarithm of a number || float or cell reference (> 0) || 1 || float
+
| <code>LOG10(num)</code> || calculates the base-10 logarithm of a number || float or cell reference (> 0) || align="center"|1 || align="center"|float
 
|-
 
|-
| <code>PI()</code> || returns the mathematical constant &pi; (3.14159265358979) || none || 0 || float
+
| <code>PI()</code> || returns the mathematical constant &pi; (3.14159265358979) || none || align="center"|0 || align="center"|float
 
|-
 
|-
| <code>POWER(number, exponent)</code> ||  returns the result of a number raised to a given power || float or cell reference || 2 || float
+
| <code>POWER(num, exponent)</code> ||  returns the result of a number raised to a given power || float or cell reference || align="center"|2 || align="center"|float
 
|-
 
|-
| <code>RADIANS(number)</code> || converts an angle from degrees to radians || float or cell reference  || 1 or 2 || float
+
| <code>RADIANS(num)</code> || converts an angle from degrees to radians || float or cell reference  || align="center"|1 or 2 || align="center"|float
 
|-
 
|-
| <code>RAND()</code> || returns a random number between 0 and 1 || none || 0 || float
+
| <code>RAND()</code> || returns a random number between 0 and 1 || none || align="center"|0 || align="center"|float
 
|-
 
|-
| <code>ROUND(number, digits)</code> ||  returns a number rounded to a specified number of digits || float or cell reference || 2 || float
+
| <code>ROUND(num, digits)</code> ||  returns a number rounded to a specified number of digits || float or cell reference || align="center"|2 || align="center"|float
 
|-
 
|-
| <code>SIGN(number)</code> || returns the sign of a number || float or cell reference || 1 || integer
+
| <code>SIGN(num)</code> || returns the sign of a number || float or cell reference || align="center"|1 || align="center"|integer
 
|-
 
|-
| <code>SIN(number)</code> || returns the sine of an angle (in radians) || float or cell reference || 1 || float
+
| <code>SIN(num)</code> || returns the sine of an angle (in radians) || float or cell reference || align="center"|1 || align="center"|float
 
|-
 
|-
| <code>SINH(number)</code> || returns the hyperbolic sine of a number || float or cell reference || 1 || float
+
| <code>SINH(num)</code> || returns the hyperbolic sine of a number || float or cell reference || align="center"|1 || align="center"|float
 
|-
 
|-
| <code>TAN(number)</code> || returns the tangent of an angle (in radians) || float or cell reference ( <> k*&pi;/2) || 1 || float
+
| <code>TAN(num)</code> || returns the tangent of an angle (in radians) || float or cell reference ( <> k*&pi;/2) || align="center"|1 || align="center"|float
 
|-
 
|-
| <code>TANH(number)</code> || returns the hyperbolic tangent of a number || float or cell reference || 1 || float
+
| <code>TANH(num)</code> || returns the hyperbolic tangent of a number || float or cell reference || align="center"|1 || align="center"|float
 
|-
 
|-
|}
+
 
 +
 
 +
| colspan="5" | <b>Statistical functions</b>
 +
|-
 +
| <code>AVEDEV(num1 [, num2, ... num_n] )</code> || Average value of absolute deviations of data from their mean. || float or cell reference || align="center" |any || align="center" | float
 +
|-
 +
 
 +
 
 +
| colspan="5" | <b>Date/time functions</b>
 +
|-
 +
| <code>DATE(year,month, day)</code> || Calculates a serial date number from year, month and day || integer or cell reference || align="center" |3 || align="center" | date/time
 +
|-
 +
 
 +
 
 +
| colspan="5" | <b>String functions</b>
 +
|-
 +
| <code>CHAR(ascii_value)</code> || Returns the character based on its ASCII value  || integer || align="center" |1 || align="center" | string
 +
|-
 +
 
 +
 
 +
| colspan="5" | <b>Logical functions</b>
 +
|-
 +
| <code>AND(condition1 [, condition2, ...])</code> || Calculates the logical AND of several boolean values  || boolean || align="center" |any || align="center" | boolean
 +
|-
 +
| <code>OR(condition1 [, condition2, ...])</code> || Calculates the logical OR of several boolean values  || boolean || align="center" |any || align="center" | boolean
 +
|-
 +
 
 +
 
 +
| colspan="5" | <b>Info functions</b>
 +
|-
 +
| <code>ISBLANK(value)</code> || Checks for blank or null values.  || any || align="center"|boolean || align="center" | boolean
 +
 
 +
|-|}

Revision as of 01:13, 31 August 2014

This is a list of the formulas supported by FPSpreadsheet:

Calling prototye Meaning Argument types Arguments Result type
Mathematical functions
ABS(num) returns the absolute value of a number float or cell reference 1 float
ACOS(num) returns the arccosine (in radians) of a number float or cell reference (>= -1 and <= +1) 1 float
ACOSH(num) returns the inverse hyperbolic cosine of a number float or cell reference (>=1) 1 float
ASIN(num) returns the arcsine (in radians) of a number float or cell reference (>= -1 and <=+1) 1 float
ASINH(num) returns the inverse hyperbolic sine of a number float or cell reference 1 float
ATAN(num) returns the arctangent (in radians) of a number float or cell reference 1 float
ATANH(num) returns the inverse hyperbolic tangent of a number float or cell reference (> -1 and < +1) 1 float
COS(num) returns the cosine of an angle (in radians) float or cell reference 1 float
COSH(num) returns the hyperbolic cosine of a number float or cell reference 1 float
DEGREES(num) converts an angle from radians to degrees float or cell reference 1 float
EXP(num) calculates the exponential function of a number float or cell reference 1 float
INT(num) returns the integer portion of a number (like "floor()") float or cell reference 1 integer
LN(num) calculates the natural logarithm of a number float or cell reference (> 0) 1 float
LOG(num [, base]) calculates the logarithm of a number to a specified base.
base, if omitted, is 10.
float or cell reference (> 0) 1 or 2 float
LOG10(num) calculates the base-10 logarithm of a number float or cell reference (> 0) 1 float
PI() returns the mathematical constant π (3.14159265358979) none 0 float
POWER(num, exponent) returns the result of a number raised to a given power float or cell reference 2 float
RADIANS(num) converts an angle from degrees to radians float or cell reference 1 or 2 float
RAND() returns a random number between 0 and 1 none 0 float
ROUND(num, digits) returns a number rounded to a specified number of digits float or cell reference 2 float
SIGN(num) returns the sign of a number float or cell reference 1 integer
SIN(num) returns the sine of an angle (in radians) float or cell reference 1 float
SINH(num) returns the hyperbolic sine of a number float or cell reference 1 float
TAN(num) returns the tangent of an angle (in radians) float or cell reference ( <> k*π/2) 1 float
TANH(num) returns the hyperbolic tangent of a number float or cell reference 1 float
Statistical functions
AVEDEV(num1 [, num2, ... num_n] ) Average value of absolute deviations of data from their mean. float or cell reference any float
Date/time functions
DATE(year,month, day) Calculates a serial date number from year, month and day integer or cell reference 3 date/time
String functions
CHAR(ascii_value) Returns the character based on its ASCII value integer 1 string
Logical functions
AND(condition1 [, condition2, ...]) Calculates the logical AND of several boolean values boolean any boolean
OR(condition1 [, condition2, ...]) Calculates the logical OR of several boolean values boolean any boolean
Info functions
ISBLANK(value) Checks for blank or null values. any boolean boolean