Octave Programming Tutorial/General mathematical functions

< Octave Programming Tutorial

General Mathematical Functions

Constants

e without arguments returns the scalar e.
e(N) returns a square matrix of e of size N.
e(N, M, ...) where the arguments are dimensions of some matrix of e.
e(..., CLASS) where CLASS is an optional argument that specifies the return type, double or single.
eps returns the value of eps(1.0).
eps(X) returns the spacing between X and the next value.
eps with more than one argument is treated like e with the matrix value being eps(1.0).
pi is the ratio of the circumference to the diameter of any circle.
I is the imaginary unit defined so I^2 = -1.
Inf is used for values that overflow the standard IEEE floating point range or the result of division by zero.
NaN is used for various results that are not well defined or undefined. Note that NaN never equals other NaN values. Use the function isnan to check for NaN.
realmax is the largest floating point value representable.
realmin is the smallest floating point value representable.

Arithmetic Functions

Ordinary Trigonometry

Hyperbolic Trigonometry

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.