Difference between revisions of "User:Regina/MyDrafts"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Remarks)
Line 37: Line 37:
 
* This function is expected for OOo3.1
 
* This function is expected for OOo3.1
  
 
== GAMMA ==
 
Returns the values of the Gamma function.
 
 
=== Syntax ===
 
<tt>'''GAMMA(x)'''</tt>
 
 
:<tt>'''x'''</tt> is a number.
 
 
:: Constraint: If x is an integer, then x must be positive.
 
 
=== Semantic ===
 
<tt>'''GAMMA(x)'''</tt> calculates
 
: <math>\Gamma(x) = \int_0^\infty t^{x-1} \mathrm e^{- t} \mathrm d t \,\!</math>.
 
 
 
 
=== Example ===
 
: <tt>'''GAMMA(4) = 6.0'''</tt> exact
 
: <tt>'''GAMMA(34.56)''' &asymp; 6.2336323276E+037</tt>
 
: <tt>'''GAMMA(&minus;4)'''</tt> not defined
 
 
=== Remarks ===
 
For x &lt; 0.5 Eulers reflection formula is used.
 
 
The Gamma function has poles for negative integers and for zero. Near the poles the values are less accurate.
 
 
If x is a positive integer, then
 
: <math>\displaystyle \Gamma(x)=(x-1)\mathrm ! </math>
 
But be aware, that OpenOffice.org has only a precision of 15 digits and results, which would consists of more than 15 significant digits, are rounded.
 
 
=== See also: ===
 
[[Documentation/How_Tos/Calc: GAMMADIST function|'''GAMMALN''']],
 
[[Documentation/How_Tos/Calc: GAMMAINV function|'''GAMMADIST''']],
 
[[Documentation/How_Tos/Calc: GAMMAINV function|'''GAMMAINV''']],
 
[[Documentation/How_Tos/Calc: GAMMAINV function|'''FACT''']]
 
 
[[Documentation/How_Tos/Calc: Mathematical functions|'''Mathematical functions''']]
 
 
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
 
 
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
 
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
 
 
=== Issues: ===
 
This function is expected for OOo3.1.
 
  
 
== Accuracy ==
 
== Accuracy ==

Revision as of 21:43, 22 December 2008

CHISQINV

Calculates the inverse of the CHISQDIST function.

Syntax

CHISQINV(p; k)

k is the degrees of freedom for the χ2-distribution.
Constraint: k must be a positive integer
p is the given probability
Constraint: 0 ≤ p < 1

Semantic

CHISQINV(p; k) returns the value x, such that CHISQDIST(x; k;TRUE()) = p.

Example

CHISQINV(0.5; 9)

returns approximately 8.342832692

.

Remarks

If you need CHISQINV(p;k) for a non interger parameter k, then use GAMMAINV(p;k/2;2) instead.

See also:

CHISQDIST LEGACY.CHIDIST LEGACY.CHIINV

Statistical functions

Functions listed alphabetically, Functions listed by category

Issues:

  • This function is expected for OOo3.1


Accuracy

Precision in Calc

Calc uses for its calculation floating point numbers in double precision as defined in IEEE 754 standard. You get the best representation in a spreadsheet cell using the scientific format with format code 0.00000000000000E+000. But because a binary format is used internally, the numbers in calculation might differ slightly from the shown decimal values. Only integers in the range can be represented exactly in the internal format.

Although you can force Calc to show 15 decimal digits, these might not be all accurate. This article lists some of the problems.

Cancellation

If you subtract two non integer numbers, which have nearly the same value, the result has less significant digits then the initial values.

A B C
1 9.99411764795882E-001 =0.999411764795882
2 9.99411764705882E-001 =1699/1700
3 8.99997854020285E-011 =A1-A2
4 8.99996470588235E-011

Cell A4 shows the correct result of , calculated with a computer algebra system with high precision.

Converting Inaccuracy

Most non integer numbers have infinite decimal places in binary format, which has to be rounded somewhere. Calculating with this rounded values and converting back to decimal format gives different values then calculating manually in decimal format.

A B C
1 0.99999876543210000000 =0.99999876543210000000
2 0.00000123456790002141 =1-A1
3
4

No Symbolic π

From mathematics you know sin(π)= 0 and you know that tan(π/2) is undefined. But you cannot get this in Calc, because the value π is always treated as rounded floating point number. It makes no difference using PI() or RADIANDS(180). Calc cannot evaluate π symbolically as computer algebra systems do. That is no special limitation of Calc, but other often used spreadsheet applications work only numerically too.

A B C
1 1.63317787283838E+016 =TAN(PI()/2)
2 1.22460635382238E-016 =SIN(RADIANS(180))
3
Personal tools