Top | ![]() |
![]() |
![]() |
![]() |
double | gwy_math_fallback_pow10 () |
double | gwy_math_fallback_cbrt () |
double | gwy_math_fallback_hypot () |
double | gwy_math_fallback_acosh () |
double | gwy_math_fallback_asinh () |
double | gwy_math_fallback_atanh () |
int | gwy_math_fallback_isinf () |
int | gwy_math_fallback_isnan () |
Fallback functions
gwy_math_fallback_
are
defined for mathematical functions
foo
that might not be
implemented on all platforms and are commonly used in Gwyddion. These
functions are always defined (as foo
static inline
), however,
you should not use them as they can be less efficient or precise than the
standard functions.
For each unavailable function (and only for those), this header file defines
a replacement macro expanding to the name of the fallback function.
Therefore after including it, you can use for instance
cbrt
regardless if the platform provides it or not.
Note this header has to be included explicitly to avoid possible inadvertent
clashes with other definitions of cbrt
.
Since all replacement macros expand to names of functions, it is possible to take the address of any of them.
double
gwy_math_fallback_pow10 (double x
);
Fallback for the standard mathematical function
pow10
.
Since: 2.9
double
gwy_math_fallback_cbrt (double x
);
Fallback for the standard mathematical function
cbrt
.
Since: 2.9
double gwy_math_fallback_hypot (double x
,double y
);
Fallback for the standard mathematical function
hypot
.
Since: 2.9
double
gwy_math_fallback_acosh (double x
);
Fallback for the standard mathematical function
acosh
.
Since: 2.9
double
gwy_math_fallback_asinh (double x
);
Fallback for the standard mathematical function
asinh
.
Since: 2.9
double
gwy_math_fallback_atanh (double x
);
Fallback for the standard mathematical function
atanh
.
Since: 2.9
int
gwy_math_fallback_isinf (double x
);
Fallback for the standard mathematical function
isinf
.
Since: 2.22
#define pow10 exp10
Macro defined to gwy_math_fallback_pow10()
if the platform does not provide
pow10
.
#define cbrt gwy_math_fallback_cbrt
Macro defined to gwy_math_fallback_cbrt()
if the platform does not provide
cbrt
.
#define hypot gwy_math_fallback_hypot
Macro defined to gwy_math_fallback_hypot()
if the platform does not provide
hypot
.
#define acosh gwy_math_fallback_acosh
Macro defined to gwy_math_fallback_acosh()
if the platform does not provide
acosh
.
#define asinh gwy_math_fallback_asinh
Macro defined to gwy_math_fallback_asinh()
if the platform does not provide
asinh
.
#define atanh gwy_math_fallback_atanh
Macro defined to gwy_math_fallback_atanh()
if the platform does not provide
atanh
.
#define gwy_isinf isinf
Macro defined to working isinf()
implementation, either a system one or
gwy_math_fallback_isinf()
.
Since: 2.22
#define gwy_isnan isnan
Macro defined to working isnan()
implementation, either a system one or
gwy_math_fallback_isnan()
.
Since: 2.22