Extreme Optimization –Mathematical Constants and Basic Functions
Posted
by JoshReuben
on Geeks with Blogs
See other posts from Geeks with Blogs
or by JoshReuben
Published on Fri, 07 Jan 2011 07:57:19 GMT
Indexed on
2011/01/07
8:54 UTC
Read the original article
Hit count: 372
Filed under:
Machine constants
- The MachineConstants class - contains constants for floating-point arithmetic because the CLS System.Single and Double floating-point types do not follow the standard conventions and are useless. machine constants for the Double type:
- machine precision: Epsilon , SqrtEpsilon CubeRootEpsilon
- largest possible value: MaxDouble , SqrtMaxDouble, LogMaxDouble
- smallest Double-precision floating point number that is greater than zero: MinDouble , SqrtMinDouble , LogMinDouble
- A similar set of constants is available for the Single Datatype
Mathematical Constants
- The Constants class contains static fields for many mathematical constants and common expressions involving small integers – if you are doing thousands of iterations, you wouldn't want to calculate OneOverSqrtTwoPi , Sqrt17 or Log17 !!!
- E - The base for the natural logarithm, e (2.718...).
- EulersConstant - (0.577...).
- GoldenRatio - (1.618...).
- Pi - the ratio between the circumference and the diameter of a circle (3.1415...).
Elementary Functions
- The IterativeAlgorithm<T> class in the Extreme.Mathematics namespace defines many elementary functions that are missing from System.Math.
- Hyperbolic Trig Functions: Cosh, Coth, Csch, Sinh, Sech, Tanh
- Inverse Hyperbolic Trig Functions: Acosh, Acoth, Acsch, Asinh, Asech, Atanh
- ExpMinus1 - The exponential function minus one, ex-1.
- Hypot - The hypotenuse of a right-angled triangle with specified sides.
- LambertW - Lambert's W function, the (real) solution W of x=WeW.
- Log1PlusX - The natural logarithm of 1+x.
- Pow - A number raised to an integer power.
© Geeks with Blogs or respective owner