SMathStudio.0 85.NumericFunctions - Article.Eng PDF
SMathStudio.0 85.NumericFunctions - Article.Eng PDF
Functions for real numbers - The following functions are available for application to real numbers:
These functions are available, unclassified, by using the Insert > Function menu and then selecting the
All category of functions:
Since trigonometric and hyperbolic functions apply also to real numbers, we provide a list of those
functions available under the Function – Insert form (see above) under the headings Trigonometric and
Hyperbolic:
Trigonometric:
• sin sine • asin inverse sine
• cos cosine • acos inverse cosine
• tan tangent • atan inverse tangent
• cot cotangent • acot inverse cotanget
• sec secant • arcsec inverse secant
• csc cosecant • arccosec inverse cosecant
Hyperbolic:
Function numdem, shown below, separates a fraction into a numerator and a denominator:
Notice that, in its numerical evaluation, the last example shows both numerator and denominator
multiplied by 1015. These two factors obviously cancel when the fraction is put together again, but it
serves to emphasize that SMath Studio calculates values with 15 decimals.
The function abs, when applied to a complex number, produces the modulo (length) of the complex
number. Function abs is not included in the listing of Complex Numbers functions in the Insert –
Function form. However, abs, and many other functions that we applied to real numbers above, can be
applied to complex numbers as illustrated next:
SMath Studio provides functions xy2pol to convert from rectangular (x,y) into polar (r,θ) coordinates,
and pol2xy to convert from polar (r,θ) to rectangular (x,y) coordinates. Thus, with these functions one
can go easily go from rectangular to polar representations of a complex number, and vice versa.
In the following example we convert from rectangular to polar representations of a complex number:
The following example shows a conversion from polar to rectangular representations of a complex
number:
All other operations follow the rules of algebra with the caveat that i2 = -1,
etc. Other powers of the unit imaginary number are shown in the vector to
the left.
The Gamma function is related to the factorial operator as follows: x 1= x ! , if x is an integer.
Note: the Gamma function currently defined in SMath Studio 0.85 cannot handle negative arguments,
or complex arguments whose real part is negative. For many applications this definition will be fine,
but the full definition of the Gamma function should be able to handle negative arguments. Based on
the paper “A note on the computation of the convergent Lanczos complex Gamma approximation” by
Paul Godfrey (2001), found in http://home.att.net/~numericana/answer/info/godfrey.htm#lanczoscoeffs , I
redefined the Gamma function to include negative arguments, as follows:
http://en.wikipedia.org/wiki/Gamma_function