1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198 |
- <?xml version="1.0" encoding="ISO8859-1"?>
- <fpdoc-descriptions>
- <!--
- $Id$
- This file is part of the FPC documentation.
- Copyright (C) 1997, by Michael Van Canneyt
-
- The FPC documentation is free text; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The FPC Documentation is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the FPC documentation; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
- -->
- <package name="rtl">
- <module name="math">
- <short>Additional mathematical routines.</short>
- <!-- \FPCexampledir{mathex} -->
- <descr>
- <p>
- This document describes the <file>math</file> unit. The <var>math</var> unit
- was initially written by Florian Klaempfl. It provides mathematical
- functions which aren't covered by the system unit.
- </p>
- <p>
- This chapter starts out with a definition of all types and constants
- that are defined, after which an overview is presented of the available
- functions, grouped by category, and the last part contains a
- complete explanation of each function.
- </p>
- <p>
- The following things must be taken into account when using this unit:
- </p>
- <ol>
- <li>This unit is compiled in Object Pascal mode so all <var>integers</var> are 32 bit.</li>
- <li> Some overloaded functions exist for data arrays of integers and
- floats. When using the address operator (<var>@</var>) to pass an array of
- data to such a function, make sure the address is typecasted to the
- right type, or turn on the 'typed address operator' feature. failing to
- do so, will cause the compiler not be able to decide which function you
- want to call.
- </li>
- </ol>
- </descr>
- <topic name="MinMaxRoutines">
- <short>Min/max determination</short>
- <descr>
- <p>
- Functions to determine the minimum or maximum of numbers:
- </p>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="max"/></td><td>Maximum of 2 values</td></tr>
- <tr><td><link id="maxIntValue"/></td><td>Maximum of an array of integer values</td></tr>
- <tr><td><link id="maxvalue"/></td><td>Maximum of an array of values</td></tr>
- <tr><td><link id="min"/></td><td>Minimum of 2 values</td></tr>
- <tr><td><link id="minIntValue"/></td><td>Minimum of an array of integer values</td></tr>
- <tr><td><link id="minvalue"/></td><td>Minimum of an array of values</td></tr>
- </table>
- </descr>
- </topic>
- <topic name="AngleConversionRoutines">
- <short>Angle unit conversion</short>
- <descr>
- <p>
- Routines to convert angles between different angle units.
- </p>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="cycletorad"/></td><td>convert cycles to radians</td></tr>
- <tr><td><link id="degtograd"/></td><td>convert degrees to grads</td></tr>
- <tr><td><link id="degtorad"/></td><td>convert degrees to radians</td></tr>
- <tr><td><link id="gradtodeg"/></td><td>convert grads to degrees</td></tr>
- <tr><td><link id="gradtorad"/></td><td>convert grads to radians</td></tr>
- <tr><td><link id="radtocycle"/></td><td>convert radians to cycles</td></tr>
- <tr><td><link id="radtodeg"/></td><td>convert radians to degrees</td></tr>
- <tr><td><link id="radtograd"/></td><td>convert radians to grads</td></tr>
- </table>
- </descr>
- </topic>
- <topic name="TrigoniometricRoutines">
- <short>Trigoniometric functions</short>
- <descr>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="arccos"/></td><td>calculate reverse cosine</td></tr>
- <tr><td><link id="arcsin"/></td><td>calculate reverse sine</td></tr>
- <tr><td><link id="arctan2"/></td><td>calculate reverse tangent</td></tr>
- <tr><td><link id="cotan"/></td><td>calculate cotangent</td></tr>
- <tr><td><link id="sincos"/></td><td>calculate sine and cosine</td></tr>
- <tr><td><link id="tan"/></td><td>calculate tangent</td></tr>
- </table>
- </descr>
- </topic>
- <topic name="HyperbolicRoutines">
- <short>Hyperbolic functions</short>
- <descr>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="arcosh"/></td><td>caculate reverse hyperbolic cosine</td></tr>
- <tr><td><link id="arsinh"/></td><td>caculate reverse hyperbolic sine</td></tr>
- <tr><td><link id="artanh"/></td><td>caculate reverse hyperbolic tangent</td></tr>
- <tr><td><link id="cosh"/></td><td>calculate hyperbolic cosine</td></tr>
- <tr><td><link id="sinh"/></td><td>calculate hyperbolic sine</td></tr>
- <tr><td><link id="tanh"/></td><td>calculate hyperbolic tangent</td></tr>
- </table>
- </descr>
- </topic>
- <topic name="ExpLogRoutines">
- <short>Exponential and logarithmic functions</short>
- <descr>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="intpower"/></td><td>Raise float to integer power</td></tr>
- <tr><td><link id="ldexp"/></td><td>Calculate $2^p x$</td></tr>
- <tr><td><link id="lnxp1"/></td><td>calculate <var>log(x+1)</var></td></tr>
- <tr><td><link id="log10"/></td><td>calculate 10-base log</td></tr>
- <tr><td><link id="log2"/></td><td>calculate 2-base log</td></tr>
- <tr><td><link id="logn"/></td><td>calculate N-base log</td></tr>
- <tr><td><link id="power"/></td><td>raise float to arbitrary power</td></tr>
- </table>
- </descr>
- </topic>
- <topic name="NumberConversionRoutines">
- <short>Number converting</short>
- <descr>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="ceil"/></td><td>Round to infinity</td></tr>
- <tr><td><link id="floor"/></td><td>Round to minus infinity</td></tr>
- <tr><td><link id="frexp"/></td><td>Return mantissa and exponent</td></tr>
- </table>
- </descr>
- </topic>
- <topic name="StatisticalRoutines">
- <short>Statistical functions</short>
- <descr>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="mean"/></td><td>Mean of values</td></tr>
- <tr><td><link id="meanandstddev"/></td><td>Mean and standard deviation of values</td></tr>
- <tr><td><link id="momentskewkurtosis"/></td><td>Moments, skew and kurtosis</td></tr>
- <tr><td><link id="popnstddev"/></td><td>Population standarddeviation </td></tr>
- <tr><td><link id="popnvariance"/></td><td>Population variance</td></tr>
- <tr><td><link id="randg"/></td><td>Gaussian distributed randum value</td></tr>
- <tr><td><link id="stddev"/></td><td>Standard deviation</td></tr>
- <tr><td><link id="sum"/></td><td>Sum of values</td></tr>
- <tr><td><link id="sumofsquares"/></td><td>Sum of squared values</td></tr>
- <tr><td><link id="sumsandsquares"/></td><td>Sum of values and squared values</td></tr>
- <tr><td><link id="totalvariance"/></td><td>Total variance of values</td></tr>
- <tr><td><link id="variance"/></td><td>variance of values</td></tr>
- </table>
- </descr>
- </topic>
- <topic name="GeometricalRoutines">
- <short>Geometrical functions</short>
- <descr>
- <table>
- <th><td>Name</td><td>Description</td></th>
- <tr><td><link id="hypot"/></td><td>Hypotenuse of triangle</td></tr>
- <tr><td><link id="norm"/></td><td>Euclidian norm</td></tr>
- </table>
- </descr>
- </topic>
- <element name="Float">
- <short>Float type used in all calls</short>
- <descr>
- All calculations are done with the Float type. This allows to
- recompile the unit with a different float type to obtain a
- desired precision. The pointer type <link id="PFloat"/>
- is used in functions that accept an array of values of arbitrary length.
- </descr>
- </element>
- <element name="PFloat">
- <short>Pointer to <link id="Float"/> type.</short>
- </element>
- <element name="TPaymentTime">
- <short>Type used in financial (interest) calculations.</short>
- </element>
- <element name="TPaymentTime.PTEndOfPeriod">
- <short>End of period.</short>
- </element>
- <element name="TPaymentTime.PTStartOfPeriod">
- <short>Start of period.</short>
- </element>
- <element name="EInvalidArgument">
- <short>Exception raised when invalid arguments are passed to a function.</short>
- </element>
- <element name="arccos">
- <short></short>
- <descr>
- <var>Arccos</var> returns the inverse cosine of its argument <var>x</var>. The
- argument <var>x</var> should lie between -1 and 1 (borders included).
- </descr>
- <errors>
- If the argument <var>x</var> is not in the allowed range, an
- <var>EInvalidArgument</var> exception is raised.
- </errors>
- <seealso>
- <link id="arcsin"/>
- <link id="arcosh"/>
- <link id="arsinh"/>
- <link id="artanh"/>
- </seealso>
- <example file="mathex/ex1"/>
- </element>
- <element name="arcosh">
- <short></short>
- <descr>
- <var>Arcosh</var> returns the inverse hyperbolic cosine of its argument <var>x</var>.
- The argument <var>x</var> should be larger than 1.
- The <var>arccosh</var> variant of this function is supplied for Delphi
- compatibility.
- </descr>
- <errors>
- If the argument <var>x</var> is not in the allowed range, an <var>EInvalidArgument</var>
- exception is raised.
- </errors>
- <seealso>
- <link id="cosh"/>
- <link id="sinh"/>
- <link id="arcsin"/>
- <link id="arsinh"/>
- <link id="artanh"/>,
- <link id="tanh"/>
- </seealso>
- <example file="mathex/ex3"/>
- </element>
- <element name="arcsin">
- <short></short>
- <descr>
- <var>Arcsin</var> returns the inverse sine of its argument <var>x</var>. The
- argument <var>x</var> should lie between -1 and 1.
- </descr>
- <errors>
- If the argument <var>x</var> is not in the allowed range, an <var>EInvalidArgument</var>
- exception is raised.
- </errors>
- <seealso>
- <link id="arccos"/>
- <link id="arcosh"/>
- <link id="arsinh"/>
- <link id="artanh"/>
- </seealso>
- <example file="mathex/ex2"/>
- </element>
- <element name="arctan2">
- <short></short>
- <descr>
- <var>arctan2</var> calculates <var>arctan(y/x)</var>, and returns an angle in the
- correct quadrant. The returned angle will be in the range $-\pi$ to
- $\pi$ radians.
- The values of <var>x</var> and <var>y</var> must be between -2\^{}64 and 2\^{}64,
- moreover <var>x</var> should be different from zero.
- On Intel systems this function is implemented with the native intel
- <var>fpatan</var> instruction.
- </descr>
- <errors>
- If <var>x</var> is zero, an overflow error will occur.
- </errors>
- <seealso>
- <link id="arccos"/>
- <link id="arcosh"/>
- <link id="arsinh"/>
- <link id="artanh"/>
- </seealso>
- <example file="mathex/ex6"/>
- </element>
- <element name="arsinh">
- <short></short>
- <descr>
- <var>arsinh</var> returns the inverse hyperbolic sine of its argument <var>x</var>.
- The <var>arscsinh</var> variant of this function is supplied for Delphi
- compatibility.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="arcosh"/>
- <link id="arccos"/>
- <link id="arcsin"/>
- <link id="artanh"/>
- </seealso>
- <example file="mathex/ex4"/>
- </element>
- <element name="artanh">
- <short></short>
- <descr>
- <var>artanh</var> returns the inverse hyperbolic tangent of its argument <var>x</var>,
- where <var>x</var> should lie in the interval [-1,1], borders included.
- The <var>arctanh</var> variant of this function is supplied for Delphi compatibility.
- </descr>
- <errors>
- In case <var>x</var> is not in the interval [-1,1], an <var>EInvalidArgument</var>
- exception is raised.
- </errors>
- <seealso>
- <link id="arcosh"/>
- <link id="arccos"/>
- <link id="arcsin"/>
- <link id="artanh"/>
- </seealso>
- <example file="mathex/ex5"/>
- </element>
- <element name="ceil">
- <short></short>
- <descr>
- <var>Ceil</var> returns the lowest integer number greater than or equal to <var>x</var>.
- The absolute value of <var>x</var> should be less than <var>maxint</var>.
- </descr>
- <errors>
- If the asolute value of <var>x</var> is larger than maxint, an overflow error will
- occur.
- </errors>
- <seealso>
- <link id="floor"/>
- </seealso>
- <example file="mathex/ex7"/>
- </element>
- <element name="cosh">
- <short></short>
- <descr>
- <var>Cosh</var> returns the hyperbolic cosine of it's argument {x}.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="arcosh"/>
- <link id="sinh"/>
- <link id="arsinh"/>
- </seealso>
- <example file="mathex/ex8"/>
- </element>
- <element name="cotan">
- <short></short>
- <descr>
- <var>Cotan</var> returns the cotangent of it's argument <var>x</var>. <var>x</var> should
- be different from zero.
- </descr>
- <errors>
- If <var>x</var> is zero then a overflow error will occur.
- </errors>
- <seealso>
- <link id="tanh"/>
- </seealso>
- <example file="mathex/ex9"/>
- </element>
- <element name="cycletorad">
- <short></short>
- <descr>
- <var>Cycletorad</var> transforms it's argument <var>cycle</var>
- (an angle expressed in cycles) to radians.
- (1 cycle is $2 \pi$ radians).
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="degtograd"/>
- <link id="degtorad"/>
- <link id="radtodeg"/>,
- <link id="radtograd"/>
- <link id="radtocycle"/>
- </seealso>
- <example file="mathex/ex10"/>
- </element>
- <element name="degtograd">
- <short></short>
- <descr>
- <var>Degtograd</var> transforms it's argument <var>deg</var> (an angle in degrees)
- to grads.
- (90 degrees is 100 grad.)
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="cycletorad"/>
- <link id="degtorad"/>
- <link id="radtodeg"/>,
- <link id="radtograd"/>
- <link id="radtocycle"/>
- </seealso>
- <example file="mathex/ex11"/>
- </element>
- <element name="degtorad">
- <short></short>
- <descr>
- <var>Degtorad</var> converts it's argument <var>deg</var> (an angle in degrees) to
- radians.
- (pi radians is 180 degrees)
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="cycletorad"/>
- <link id="degtograd"/>
- <link id="radtodeg"/>,
- <link id="radtograd"/>
- <link id="radtocycle"/>
- </seealso>
- <example file="mathex/ex12"/>
- </element>
- <element name="floor">
- <short></short>
- <descr>
- <var>Floor</var> returns the largest integer smaller than or equal to <var>x</var>.
- The absolute value of <var>x</var> should be less than <var>maxint</var>.
- </descr>
- <errors>
- If <var>x</var> is larger than <var>maxint</var>, an overflow will occur.
- </errors>
- <seealso>
- <link id="ceil"/>
- </seealso>
- <example file="mathex/ex13"/>
- </element>
- <element name="frexp">
- <short></short>
- <descr>
- <var>Frexp</var> returns the mantissa and exponent of it's argument
- <var>x</var> in <var>mantissa</var> and <var>exponent</var>.
- </descr>
- <errors>
- None
- </errors>
- <seealso>
- </seealso>
- <example file="mathex/ex14"/>
- </element>
- <element name="gradtodeg">
- <short></short>
- <descr>
- <var>Gradtodeg</var> converts its argument <var>grad</var> (an angle in grads)
- to degrees.
- (100 grad is 90 degrees)
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="cycletorad"/>
- <link id="degtograd"/>
- <link id="radtodeg"/>,
- <link id="radtograd"/>
- <link id="radtocycle"/>
- <link id="gradtorad"/>
- </seealso>
- <example file="mathex/ex15"/>
- </element>
- <element name="gradtorad">
- <short></short>
- <descr>
- <var>Gradtorad</var> converts its argument <var>grad</var> (an angle in grads)
- to radians.
- (200 grad is pi degrees).
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="cycletorad"/>
- <link id="degtograd"/>
- <link id="radtodeg"/>,
- <link id="radtograd"/>
- <link id="radtocycle"/>
- <link id="gradtodeg"/>
- </seealso>
- <example file="mathex/ex16"/>
- </element>
- <element name="hypot">
- <short></short>
- <descr>
- <var>Hypot</var> returns the hypotenuse of the triangle where the sides
- adjacent to the square angle have lengths <var>x</var> and <var>y</var>.
- The function uses Pythagoras' rule for this.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- </seealso>
- <example file="mathex/ex17"/>
- </element>
- <element name="intpower">
- <short></short>
- <descr>
- <var>Intpower</var> returns <var>base</var> to the power <var>exponent</var>,
- where exponent is an integer value.
- </descr>
- <errors>
- If <var>base</var> is zero and the exponent is negative, then an
- overflow error will occur.
- </errors>
- <seealso>
- <link id="power"/>
- </seealso>
- <example file="mathex/ex18"/>
- </element>
- <element name="ldexp">
- <short></short>
- <descr>
- <var>Ldexp</var> returns $2^p x$.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="lnxp1"/>
- <link id="log10"/>
- <link id="log2"/>
- <link id="logn"/>
- </seealso>
- <example file="mathex/ex19"/>
- </element>
- <element name="lnxp1">
- <short></short>
- <descr>
- <var>Lnxp1</var> returns the natural logarithm of <var>1+X</var>. The result
- is more precise for small values of <var>x</var>. <var>x</var> should be larger
- than -1.
- </descr>
- <errors>
- If $x\leq -1$ then an <var>EInvalidArgument</var> exception will be raised.
- </errors>
- <seealso>
- <link id="ldexp"/>
- <link id="log10"/>
- <link id="log2"/>
- <link id="logn"/>
- </seealso>
- <example file="mathex/ex20"/>
- </element>
- <element name="log10">
- <short></short>
- <descr>
- <var>Log10</var> returns the 10-base logarithm of <var>X</var>.
- </descr>
- <errors>
- If <var>x</var> is less than or equal to 0 an 'invalid fpu operation' error
- will occur.
- </errors>
- <seealso>
- <link id="ldexp"/>
- <link id="lnxp1"/>
- <link id="log2"/>
- <link id="logn"/>
- </seealso>
- <example file="mathex/ex21"/>
- </element>
- <element name="log2">
- <short></short>
- <descr>
- <var>Log2</var> returns the 2-base logarithm of <var>X</var>.
- </descr>
- <errors>
- If <var>x</var> is less than or equal to 0 an 'invalid fpu operation' error
- will occur.
- </errors>
- <seealso>
- <link id="ldexp"/>
- <link id="lnxp1"/>
- <link id="log10"/>
- <link id="logn"/>
- </seealso>
- <example file="mathex/ex22"/>
- </element>
- <element name="logn">
- <short></short>
- <descr>
- <var>Logn</var> returns the n-base logarithm of <var>X</var>.
- </descr>
- <errors>
- If <var>x</var> is less than or equal to 0 an 'invalid fpu operation' error
- will occur.
- </errors>
- <seealso>
- <link id="ldexp"/>
- <link id="lnxp1"/>
- <link id="log10"/>
- <link id="log2"/>
- </seealso>
- <example file="mathex/ex23"/>
- </element>
- <element name="max">
- <short></short>
- <descr>
- <var>Max</var> returns the maximum of <var>Int1</var> and <var>Int2</var>.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="min"/>
- <link id="maxIntValue"/>
- <link id="maxvalue"/>
- </seealso>
- <example file="mathex/ex24"/>
- </element>
- <element name="maxIntValue">
- <short></short>
- <descr>
- <var>MaxIntValue</var> returns the largest integer out of the <var>Data</var>
- array.
- This function is provided for Delphi compatibility, use the <link id="maxvalue"/>
- function instead.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="maxvalue"/>
- <link id="minvalue"/>
- <link id="minIntValue"/>
- </seealso>
- <example file="mathex/ex25"/>
- </element>
- <element name="maxvalue">
- <short></short>
- <descr>
- <var>Maxvalue</var> returns the largest value in the <var>data</var>
- array with integer or float values. The return value has
- the same type as the elements of the array.
- The third and fourth forms accept a pointer to an array of <var>N</var>
- integer or float values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="maxIntValue"/>
- <link id="minvalue"/>
- <link id="minIntValue"/>
- </seealso>
- <example file="mathex/ex26"/>
- </element>
- <element name="mean">
- <short></short>
- <descr>
- <var>Mean</var> returns the average value of <var>data</var>.
- The second form accepts a pointer to an array of <var>N</var> values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="meanandstddev"/>
- <link id="momentskewkurtosis"/>
- <link id="sum"/>
- </seealso>
- <example file="mathex/ex27"/>
- </element>
- <element name="meanandstddev">
- <short></short>
- <descr>
- <var>meanandstddev</var> calculates the mean and standard deviation of <var>data</var>
- and returns the result in <var>mean</var> and <var>stddev</var>, respectively.
- Stddev is zero if there is only one value.
- The second form accepts a pointer to an array of <var>N</var> values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="mean"/>
- <link id="sum"/>
- <link id="sumofsquares"/>
- <link id="momentskewkurtosis"/>
- </seealso>
- <example file="mathex/ex28"/>
- </element>
- <element name="min">
- <short></short>
- <descr>
- <var>min</var> returns the smallest value of <var>Int1</var> and <var>Int2</var>;
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="max"/>
- </seealso>
- <example file="mathex/ex29"/>
- </element>
- <element name="minIntValue">
- <short></short>
- <descr>
- <var>MinIntvalue</var> returns the smallest value in the <var>Data</var> array.
- This function is provided for Delphi compatibility, use <var>minvalue</var>
- instead.
- </descr>
- <errors>
- None
- </errors>
- <seealso>
- <link id="minvalue"/>
- <link id="maxIntValue"/>
- <link id="maxvalue"/>
- </seealso>
- <example file="mathex/ex30"/>
- </element>
- <element name="minvalue">
- <short></short>
- <descr>
- <var>Minvalue</var> returns the smallest value in the <var>data</var>
- array with integer or float values. The return value has
- the same type as the elements of the array.
- The third and fourth forms accept a pointer to an array of <var>N</var>
- integer or float values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="maxIntValue"/>
- <link id="maxvalue"/>
- <link id="minIntValue"/>
- </seealso>
- <example file="mathex/ex31"/>
- </element>
- <element name="momentskewkurtosis">
- <short></short>
- <descr>
- <var>momentskewkurtosis</var> calculates the 4 first moments of the distribution
- of valuesin <var>data</var> and returns them in <var>m1</var>,<var>m2</var>,<var>m3</var> and
- <var>m4</var>, as well as the <var>skew</var> and <var>kurtosis</var>.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="mean"/>
- <link id="meanandstddev"/>
- </seealso>
- <example file="mathex/ex32"/>
- </element>
- <element name="norm">
- <short></short>
- <descr>
- <var>Norm</var> calculates the Euclidian norm of the array of data.
- This equals <var>sqrt(sumofsquares(data))</var>.
- The second form accepts a pointer to an array of <var>N</var> values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="sumofsquares"/>
- </seealso>
- <example file="mathex/ex33"/>
- </element>
- <element name="popnstddev">
- <short></short>
- <descr>
- <var>Popnstddev</var> returns the square root of the population variance of
- the values in the <var>Data</var> array. It returns zero if there is only one value.
- The second form of this function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="popnvariance"/>
- <link id="mean"/>
- <link id="meanandstddev"/>
- <link id="stddev"/>,
- <link id="momentskewkurtosis"/>
- </seealso>
- <example file="mathex/ex35"/>
- </element>
- <element name="popnvariance">
- <short></short>
- <descr>
- <var>Popnvariance</var> returns the square root of the population variance of
- the values in the <var>Data</var> array. It returns zero if there is only one value.
- The second form of this function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="popnstddev"/>
- <link id="mean"/>
- <link id="meanandstddev"/>
- <link id="stddev"/>,
- <link id="momentskewkurtosis"/>
- </seealso>
- <example file="mathex/ex36"/>
- </element>
- <element name="power">
- <short></short>
- <descr>
- <var>power</var> raises <var>base</var> to the power <var>power</var>. This is equivalent
- to <var>exp(power*ln(base))</var>. Therefore <var>base</var> should be non-negative.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="intpower"/>
- </seealso>
- <example file="mathex/ex34"/>
- </element>
- <element name="radtocycle">
- <short></short>
- <descr>
- <var>Radtocycle</var> converts its argument <var>rad</var> (an angle expressed in
- radians) to an angle in cycles.
- (1 cycle equals 2 pi radians)
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="degtograd"/>
- <link id="degtorad"/>
- <link id="radtodeg"/>,
- <link id="radtograd"/>
- <link id="cycletorad"/>
- </seealso>
- <example file="mathex/ex37"/>
- </element>
- <element name="radtodeg">
- <short></short>
- <descr>
- <var>Radtodeg</var> converts its argument <var>rad</var> (an angle expressed in
- radians) to an angle in degrees.
- (180 degrees equals pi radians)
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="degtograd"/>
- <link id="degtorad"/>
- <link id="radtocycle"/>,
- <link id="radtograd"/>
- <link id="cycletorad"/>
- </seealso>
- <example file="mathex/ex38"/>
- </element>
- <element name="radtograd">
- <short></short>
- <descr>
- <var>Radtodeg</var> converts its argument <var>rad</var> (an angle expressed in
- radians) to an angle in grads.
- (200 grads equals pi radians)
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="degtograd"/>
- <link id="degtorad"/>
- <link id="radtocycle"/>,
- <link id="radtodeg"/>
- <link id="cycletorad"/>
- </seealso>
- <example file="mathex/ex39"/>
- </element>
- <element name="randg">
- <short></short>
- <descr>
- <var>randg</var> returns a random number which - when produced in large
- quantities - has a Gaussian distribution with mean <var>mean</var> and
- standarddeviation <var>stddev</var>.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="mean"/>
- <link id="stddev"/>
- <link id="meanandstddev"/>
- </seealso>
- <example file="mathex/ex40"/>
- </element>
- <element name="sincos">
- <short></short>
- <descr>
- <var>Sincos</var> calculates the sine and cosine of the angle <var>theta</var>,
- and returns the result in <var>sinus</var> and <var>cosinus</var>.
- On Intel hardware, This calculation will be faster than making 2 calls
- to clculatet he sine and cosine separately.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="arcsin"/>
- <link id="arccos"/>.
- </seealso>
- <example file="mathex/ex41"/>
- </element>
- <element name="sinh">
- <short></short>
- <descr>
- <var>Sinh</var> returns the hyperbolic sine of its argument <var>x</var>.
- </descr>
- <errors>
- </errors>
- <seealso>
- <link id="cosh"/>
- <link id="arsinh"/>
- <link id="tanh"/>
- <link id="artanh"/>
- </seealso>
- <example file="mathex/ex42"/>
- </element>
- <element name="stddev">
- <short></short>
- <descr>
- <var>Stddev</var> returns the standard deviation of the values in <var>Data</var>.
- It returns zero if there is only one value.
- The second form of the function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="mean"/>
- <link id="meanandstddev"/>
- <link id="variance"/>
- <link id="totalvariance"/>
- </seealso>
- <example file="mathex/ex43"/>
- </element>
- <element name="sum">
- <short></short>
- <descr>
- <var>Sum</var> returns the sum of the values in the <var>data</var> array.
- The second form of the function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="sumofsquares"/>
- <link id="sumsandsquares"/>
- <link id="totalvariance"/>
- , <link id="variance"/>
- </seealso>
- <example file="mathex/ex44"/>
- </element>
- <element name="sumofsquares">
- <short></short>
- <descr>
- <var>Sumofsquares</var> returns the sum of the squares of the values in the <var>data</var>
- array.
- The second form of the function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="sum"/>
- <link id="sumsandsquares"/>
- <link id="totalvariance"/>
- , <link id="variance"/>
- </seealso>
- <example file="mathex/ex45"/>
- </element>
- <element name="sumsandsquares">
- <short></short>
- <descr>
- <var>sumsandsquares</var> calculates the sum of the values and the sum of
- the squares of the values in the <var>data</var> array and returns the
- results in <var>sum</var> and <var>sumofsquares</var>.
- The second form of the function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="sum"/>
- <link id="sumofsquares"/>
- <link id="totalvariance"/>
- , <link id="variance"/>
- </seealso>
- <example file="mathex/ex46"/>
- </element>
- <element name="tan">
- <short></short>
- <descr>
- <var>Tan</var> returns the tangent of <var>x</var>.
- </descr>
- <errors>
- If <var>x</var> (normalized) is pi/2 or 3pi/2 then an overflow will occur.
- </errors>
- <seealso>
- <link id="tanh"/>
- <link id="arcsin"/>
- <link id="sincos"/>
- <link id="arccos"/>
- </seealso>
- <example file="mathex/ex47"/>
- </element>
- <element name="tanh">
- <short></short>
- <descr>
- <var>Tanh</var> returns the hyperbolic tangent of <var>x</var>.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="arcsin"/>
- <link id="sincos"/>
- <link id="arccos"/>
- </seealso>
- <example file="mathex/ex48"/>
- </element>
- <element name="totalvariance">
- <short></short>
- <descr>
- <var>TotalVariance</var> returns the total variance of the values in the
- <var>data</var> array. It returns zero if there is only one value.
- The second form of the function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="variance"/>
- <link id="stddev"/>
- <link id="mean"/>
- </seealso>
- <example file="mathex/ex49"/>
- </element>
- <element name="variance">
- <short></short>
- <descr>
- <var>Variance</var> returns the variance of the values in the
- <var>data</var> array. It returns zero if there is only one value.
- The second form of the function accepts a pointer to an array of <var>N</var>
- values.
- </descr>
- <errors>
- None.
- </errors>
- <seealso>
- <link id="totalvariance"/>
- <link id="stddev"/>
- <link id="mean"/>
- </seealso>
- <example file="mathex/ex50"/>
- </element>
- </module>
- </package>
- </fpdoc-descriptions>
|