#include <nlibc.h>
#include <stdint.h>
#include <limits.h>
#include <float.h>
#include "math_suppl.h"
Include dependency graph for math.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | _INLINE_MATH_ /** copied from /home/apenext/apenext/math.h EL */ |
#define | math_inline inline |
#define | _math_setdouble(U, D) |
#define | INFINITY 0x1.0p32767 |
#define | HUGE_VAL INFINITY |
#define | HUGE_VALF HUGE_VAL |
#define | HUGE_VALL HUGE_VAL |
#define | FP_INFINITE 2 |
#define | FP_NAN 3 |
#define | FP_NORMAL 1 |
#define | FP_SUBNORMAL 1 |
#define | FP_ZERO 4 |
#define | FP_FAST_FMA |
#define | FP_FAST_FMAF FP_FAST_FMA |
#define | FP_FAST_FMAL FP_FAST_FMA |
#define | FP_ILOGB0 -INT_MAX |
#define | FP_ILOGBNAN INT_MAX |
#define | MATH_ERRNO 1 |
#define | MATH_ERREXCEPT 2 |
#define | math_errhandling |
#define | fpclassify(x) _fpclassify(x) |
#define | isfinite(x) _isfinite(x) |
#define | isinf(x) _isinf(x) |
#define | isnan(x) _isnan(x) |
#define | isnormal(x) _isfinite(x) |
#define | signbit(x) _signbit(x) |
#define | llrint(x) lrint(x) |
#define | llround(x) lround(x) |
#define | nexttoward(x, y) nextafter(x,y) |
#define | isgreater(x, y) _isgreater(x,y) |
#define | isgreaterequal(x, y) _isgreaterequal(x,y) |
#define | isless(x, y) _isless(x,y) |
#define | islessequal(x, y) _islessequal(x,y) |
#define | islessgreater(x, y) _islessgreater(x,y) |
#define | isunordered(x, y) _isunordered( x, y) |
Functions | |
math_inline double | sqrt (double a) |
math_inline double | log (double x) |
math_inline double | exp (double x) |
math_inline double | expm1 (double x) |
math_inline double | acos (double x) |
math_inline double | asin (double x) |
math_inline double | atan (double x) |
math_inline double | atan2 (double y, double x) |
math_inline double | cos (double x) |
math_inline double | sin (double x) |
math_inline double | tan (double x) |
math_inline double | acosh (double x) |
math_inline double | asinh (double x) |
math_inline double | atanh (double x) |
math_inline double | cosh (double x) |
math_inline double | sinh (double x) |
math_inline double | tanh (double xxx) |
math_inline double | exp2 (double x) |
math_inline double | frexp (double value, int *eptr) |
math_inline int | ilogb (double x) |
math_inline double | ldexp (double x, int n) |
math_inline double | log10 (double x) |
math_inline double | log1p (double xxx) |
math_inline double | log2 (double x) |
math_inline double | modf (double value, double *dptr) |
math_inline double | cbrt (double x) |
math_inline double | fabs (double x) |
math_inline double | hypot (double x, double y) |
math_inline double | erf (double x) |
math_inline double | erfc (double x) |
math_inline double | lgamma (double x) |
math_inline double | tgamma (double x) |
math_inline double | ceil (double x) |
math_inline double | floor (double x) |
math_inline double | round (double x) |
math_inline long int | lround (double x) |
math_inline double | trunc (double x) |
math_inline double | copysign (double x, double y) |
math_inline double | fmod (double x, double y) |
math_inline double | remainder (double x, double y) |
math_inline double | remquo (double x, double y, int *quo) |
math_inline double | nan (const char *tagp) |
math_inline double | nextafter (double x, double y) |
math_inline double | pow (double x, double y) |
math_inline double | fdim (double x, double y) |
math_inline double | fmax (double x, double y) |
math_inline double | fmin (double x, double y) |
math_inline double | fma (double x, double y, double z) |
C conversion : Norbert Paschedag : 15/02/2002
Edwin Laermann (edwin@physik.uni-bielefeld.de)
Definition in file math.h.
|
copied from /home/apenext/apenext/math.h EL |
|
Value: { \ register union { double d; unsigned i; } u; \ asm("\tatr0h %0 <"#U">" : "=r" (u.i)); D=u.d; \ } macro to set a double from its hex representation NOT C standard
suggestion by noe to initialize also high bank of double |
|
optionally defined. If defined it indicates that the fma() function generally executes as fast as or faster than a multiply and add of double operands. Makes sense if there is a machine instruction
|
|
the same for float and long double |
|
|
|
integer constant expressions whose values are returned by ilogb(x) if x is zero or NaN. Should be either INT_MIN or -INT_MAX for ILOGB0 and either INT_MAX or INT_MIN for ILOGBNAN |
|
|
|
for number classification: FP_NORMAL must be 1 !! all the others are ad lib no subnormals assumed |
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------
|
|
double constant expression not necessarily representable as float |
|
float and long double analogs of HUGE_VAL |
|
|
|
constant expression of type float representing positive or unsigned infinity, if available; else to a positive constant of type float that overflows at translation time |
|
--------------------------------------------------------------------------
|
|
-------------------------------------------------------------------------
|
|
------------------------------------------------------------------------
|
|
------------------------------------------------------------------------------------------------
|
|
---------------------------------------------------------------------
|
|
-----------------------------------------------------------------------
|
|
-----------------------------------------------------------------------------
|
|
------------------------------------------------------------------------------------------------
|
|
---------------------------------------------------------------------------
IMPLEMENTATION for apeNEXT: no subnormals ? |
|
------------------------------------------------------------------------
|
|
----------------------------------------------------------------------
|
|
---------------------------------------------------------------------
|
|
|
|
|
|
see ISO manual p.213 |
|
copied from /home/apenext/apenext/math_next.h EL Definition at line 41 of file math.h. Referenced by acos(), acosh(), asin(), asin_k(), asinh(), atan(), atan2(), atan_k(), atanh(), cbrt(), ceil(), copysign(), cos(), cos_1oct(), cosh(), erf(), erfc(), exp(), exp1m(), exp2(), expm1(), fabs(), fdim(), floor(), fma(), fmax(), fmin(), fmod(), frexp(), hypot(), ilogb(), isqrt(), isqrt2(), ldexp(), lgamma(), log(), log10(), log1p(), log2(), lround(), modf(), nan(), nextafter(), pow(), remainder(), remquo(), round(), sin(), sin_1oct(), sinh(), sqrt(), sqrt2(), tan(), tanh(), tgamma(), and trunc(). |
|
------------------------------------------------------------------------
|
|
------------------------------------------------------------------------------------------------
|
|
--------------------------------------------------------------------
Definition at line 807 of file math.h. References _math_setdouble, asin_k(), math_inline, and sqrt. |
|
----------------------------------------------------------------------
Definition at line 1485 of file math.h. References log, math_inline, and sqrt. |
|
----------------------------------------------------------------------
Definition at line 891 of file math.h. References _math_setdouble, asin_k(), math_inline, and sqrt. |
|
-----------------------------------------------------------------------
Definition at line 1524 of file math.h. References log, math_inline, and sqrt. |
|
-----------------------------------------------------------------
Definition at line 966 of file math.h. References _math_setdouble, atan_k(), and math_inline. |
|
--------------------------------------------------------------------
Definition at line 1035 of file math.h. References _math_setdouble, atan_k(), and math_inline. |
|
---------------------------------------------------------------------------
Definition at line 1566 of file math.h. References log, and math_inline. |
|
-------------------------------------------------------------------
Definition at line 2472 of file math.h. References _math_setdouble, exp, log, and math_inline. |
|
-------------------------------------------------------------------
Definition at line 2776 of file math.h. References _math_setdouble, and math_inline. |
|
---------------------------------------------------------------------
IMPLEMENTATION for apeNEXT: signed NaN in write_double useful
Definition at line 3395 of file math.h. References math_inline, and uint64_t. Referenced by nextafter(), and remquo(). |
|
----------------------------------------------------------------------
Definition at line 1118 of file math.h. References _math_setdouble, cos_1oct(), math_inline, and sin_1oct(). |
|
------------------------------------------------------------------------
Definition at line 1606 of file math.h. References exp, and math_inline. |
|
--------------------------------------------------------------------
Definition at line 2629 of file math.h. References math_inline. |
|
---------------------------------------------------------------------------
Definition at line 2662 of file math.h. References math_inline. |
|
----------------------------------------------------------------------
= 2^(1/log[2) b) = 2^f 2^(1/Log(2) x -f ) = P 2^q' where q' = 1/Log[2] x - f = P Exp(q) and q = x - Log[2] f Since 0 < |q'| < 0.5 we will have 0 < |q| < Log[2]/2 ~ 0.347 Exp[q] = 1 + q + 1/2 q^2 + q^3 P(q) ) ---------------------------------------------------------------
Definition at line 608 of file math.h. References _math_setdouble, and math_inline. |
|
-------------------------------------------------------------------------
Definition at line 1773 of file math.h. References exp, and math_inline. |
|
-----------------------------------------------------------------------
Definition at line 703 of file math.h. References _math_setdouble, and math_inline. Referenced by tanh(). |
|
----------------------------------------------------------------------
Definition at line 2530 of file math.h. References math_inline, and uint64_t. |
|
-----------------------------------------------------------------------
Definition at line 3886 of file math.h. References math_inline. |
|
------------------------------------------------------------------
Definition at line 2846 of file math.h. References _math_setdouble, and math_inline. |
|
----------------------------------------------------------------------------
Definition at line 4012 of file math.h. References math_inline. |
|
--------------------------------------------------------------------
Definition at line 3929 of file math.h. References math_inline. |
|
---------------------------------------------------------------------
Definition at line 3971 of file math.h. References math_inline. |
|
-------------------------------------------------------------------------
Definition at line 3457 of file math.h. References math_inline, and trunc(). Referenced by remainder(), and remquo(). |
|
--------------------------------------------------------------------
Definition at line 1821 of file math.h. References math_inline, and uint64_t. |
|
-----------------------------------------------------------------------
Definition at line 2592 of file math.h. References math_inline, and sqrt. |
|
-------------------------------------------------------------------------
Definition at line 1891 of file math.h. References math_inline, and uint64_t. |
|
-------------------------------------------------------------------
Definition at line 1937 of file math.h. References math_inline. |
|
--------------------------------------------------------------------
Definition at line 2699 of file math.h. References math_inline. |
|
----------------------------------------------------------------------
Definition at line 435 of file math.h. References _math_setdouble, and math_inline. |
|
------------------------------------------------------------------------
Definition at line 1982 of file math.h. References log, and math_inline. |
|
--------------------------------------------------------------------
Definition at line 2025 of file math.h. References _math_setdouble, and math_inline. |
|
--------------------------------------------------------------------------
Definition at line 2182 of file math.h. References _math_setdouble, log, and math_inline. |
|
-----------------------------------------------------------------------
Definition at line 3202 of file math.h. References ceil(), floor(), and math_inline. |
|
---------------------------------------------------------------------
Definition at line 2294 of file math.h. References math_inline, and uint64_t. |
|
-----------------------------------------------------------------------
Definition at line 3612 of file math.h. References math_inline. |
|
---------------------------------------------------------------------
IMPLEMENTATION for apeNEXT: one more digit in write_double useful
Definition at line 3656 of file math.h. References copysign(), and math_inline. |
|
------------------------------------------------------------------------
Definition at line 3764 of file math.h. References exp, log, math_inline, and uint64_t. |
|
-----------------------------------------------------------------------
Definition at line 3504 of file math.h. References fabs, fmod(), math_inline, and round(). Referenced by remquo(). |
|
----------------------------------------------------------------------------
Definition at line 3560 of file math.h. References copysign(), fmod(), math_inline, remainder(), and trunc(). |
|
-------------------------------------------------------------------------
Definition at line 3137 of file math.h. References ceil(), floor(), and math_inline. Referenced by remainder(). |
|
----------------------------------------------------------------------
Definition at line 1207 of file math.h. References _math_setdouble, cos_1oct(), math_inline, and sin_1oct(). |
|
-----------------------------------------------------------------------
Definition at line 1662 of file math.h. References exp, and math_inline. |
|
--------------------------------------------------------------------------
Definition at line 356 of file math.h. References _math_setdouble, and math_inline. |
|
---------------------------------------------------------------
x = k pi/2 + y, k integer and -pi/4 < y < pi/4
and then:
-pi/4 + k pi < x < pi/4 + k pi : Tan(x) = Tan(y)
Tan(y) and CoTan(y) are computed according to:
---------------------------------------------------------
P = Tan(y) = y + y^3 P13(y^2)
Where P22(r) is a degree 13 minimax polynomial approximating
degree = 13
---------------------------------------------------------
Where Q22(t) is a degree 10 minimax polinomial approximating
degree = 10
IMPLEMENTATION for apeNEXT: implem (tan)
Definition at line 1338 of file math.h. References _math_setdouble, and math_inline. |
|
-----------------------------------------------------------------------
Definition at line 1715 of file math.h. References expm1(), and math_inline. |
|
---------------------------------------------------------------------
Definition at line 2735 of file math.h. References math_inline. |
|
---------------------------------------------------------------------
Definition at line 3307 of file math.h. References math_inline, and uint64_t. |