fact(
VALUE
)
The fact( function computes the factorial of a value.
Parameters
This function has one parameter:
value – is a numeric value. The value must be an integer between 1 and 170 (1, 2, 3, … 169, 170).
Description
The fact( function computes the factorial of a value. The value must be an integer. If it is not an integer, it will be truncated to the next lower integer value. A factorial is a value multiplied by the next lower value and the next lower etc. For example 4 factorial (written 4! by mathematicians) is the same as 4*3*2*1. Factorials get big in a hurry as the value increases. Panorama cannot calculate a factorial for a value larger than 170. Larger values cause a floating point overflow because the answer is too large!
fact(3) ☞ 6
fact(4) ☞ 24
fact(5) ☞ 120
fact(6) ☞ 720
fact(170) ☞ 7.2574e+306
See Also
- - -- subtracts the numeric value on the right from the numeric value on the left.
- * -- multiplies the numeric value on the left by the numeric value on the right.
- / -- divides one numeric value by another.
- \ -- performs integer division.
- ^ -- raises a number to a power.
- + -- works differently depending on the type of operands used with it.
If both operands are numeric, it does numerical addition.
If either operand is text the + operator concatenates (joins together) the two operands.
- < -- compares two values to see if the first value is less than the second value.
- <= -- compares two values to see if the first value is less than or equal to the second value.
- <> -- compares two values to see if they are different.
- = -- compares two values to see if they are the same.
- > -- compares two values to see if the first value is greater than the second value.
- >= -- compares two values to see if the first value is greater than or equal to the second value.
- abs( -- calculates the absolute value of a number.
- alphabeticnumber( -- converts a number into letters: A, B, C, etc.
- and -- returns true if both operands are true.
- arccos( -- calculates the inverse cosine of a numeric value.
- arccosh( -- calculates the inverse hyperbolic cosine of a numeric value.
- arcsin( -- calculates the inverse sine of a numeric value.
- arcsinh( -- calculates the inverse hyperbolic sine of a numeric value.
- arctan( -- calculates the inverse tangent of a numeric value.
- arctanh( -- calculates the inverse hyperbolic tangent of a numeric value.
- arraycommonprefix( -- finds the common prefix (if any) of all items in an array.
- between( -- checks to see if a value is between two other values.
- bit( -- converts a bit number (1 to 64) into a number (1, 2, 4, 8, 16, etc.)
- ceil( -- converts a number to an integer, truncating toward positive infinity.
- chart( -- converts a table of data into an HTML page with a chart (bar, line, pie, etc.).
- cos( -- calculates the cosine of an angle.
- cosh( -- calculates the hyperbolic cosine of a numeric value.
- count( -- counts all non-empty instances of a line item field in the current record.
- crosstab( -- converts information in a database into a crosstab table (tab delimited text).
- degrees2radians( -- converts an angle from degrees to radians.
- degreestoradians( -- converts an angle from degrees into radians
- divzero( -- divides two numbers, returns zero if denominator is zero.
- divzeroerror( -- divides two numbers, returns an error if the denominator is zero.
- eulersconstant( -- returns the value of Euler's constant.
- fix( -- converts a number to an integer, truncating toward zero.
- fixed -- converts a floating point number to fixed point.
- float( -- converts a fixed point number to a floating point number.
- fv( -- (short for *future value*) calculates the future value of an investment.
- getbit( -- returns the value of a bit within a number.
- groupseq( -- returns the sequence number within a summary level.
- hexbyte( -- converts a limited range of decimal numbers to a two-digit hexadecimal number expressed as a text string.
- hexlong( -- converts a decimal number to an eight-digit hexadecimal number expressed as a text string
- hexstr( -- converts a number to text formatted as a hexadecimal number.
- hexword( -- converts a decimal number to a four-digit hexadecimal number expressed as a text string.
- info("defaultfloatformat") -- returns the default format for converting floating point numbers to text.
- int( -- converts a number to an integer, truncating toward negative infinity.
- latlongdistance( -- calculates the distance between two points on the earth (or any other sphere).
- length( -- counts the number of characters in a text value (also called a string).
- limit( -- checks to see if a value is between a minimum and maximum value. If it is, the value is returned unchanged. If it is below the minimum, the minimum value is returned. If it is above the maximum the maximum value is returned.
- log( -- computes the natural logarithm (base e ) of a value.
- log10( -- computes the common logarithm (base 10) of a value.
- makeinteger( -- makes a random integer with up to the specified # of digits (may be less).
- max( -- compares a series of values and returns the largest value.
- min( -- compares a series of values and returns the smallest value.
- mod -- computes the remainder (modulo) after integer division.
- monthmath( -- takes a date and computes the date that is one or more months before or after the original date.
- not -- reverses a boolean value.
- not( -- reverses a Boolean value
- notbetween( -- checks to see if a value is *not* between two other values.
- numsandwich( -- is similar to the sandwich function, but for numbers. If the value is zero the result is zero, but if the value is not zero the result is the value plus the extra.
- onescomplement( -- returns the one's complement of a 64 bit number (all bits are reversed)
- or -- returns true if either operand is true, or false if both are false.
- pi( -- returns the value of pi
.
- pmt( -- (short for *payment*) calculates the periodic payment required to pay off a loan.
- pv( -- (short for *present value*) calculates the present value of an income or debit stream of payments.
- radians2degrees( -- converts an angle from radians to degrees.
- radianstodegrees( -- converts an angle from radians to degrees.
- radixstr( -- converts a number into a text item containing the equivalent number in a radix between 2 and 36.
- randominteger( -- generates a random integer between the starting and ending values.
- replacemultiple( -- replaces multiple words and phrases in a text value.
- rnd( -- generates a random number between 0 and 1.
- round( -- rounds a number to a specified increment.
- setbit( -- sets or clears one bit within a number, without disturbing any of the other bits.
- setdefaultfloatformat -- sets the default format for converting floating point values to text (unsupported).
- sin( -- calculates the sine of an angle.
- sinh( -- calculates the hyperbolic sine of a numeric value.
- sqr( -- calculates the square root of a value.
- str( -- converts a number into text, with no formatting.
- sum( -- adds up all instances of a line item field in the current record.
- tagparameterarray( -- extracts the value of multiple tag parameters embedded in some text, where each tag parameter takes the form *name=value*.
- tan( -- calculates the tangent of an angle.
- tanh( -- calculates the hyperbolic tangent of a numeric value.
- val( -- converts text into a number.
- xor -- returns true if one of the two parameters is true, false if neither or both are true.
- zeroblank( -- tells Panorama to treat zeroes as empty space.
History
10.0 | No Change | Carried over from Panorama 6.0 |