expm1(3) Library Functions Manual expm1(3) expm1, expm1f, expm1l - 1 LIBRARY Math library (libm, -lm) #include double expm1(double x); float expm1f(float x); long double expm1l(long double x); glibc (. feature_test_macros(7)): expm1(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 500 || /* glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE expm1f(), expm1l(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE exp(x) - 1 The result is computed in a way that is accurate even if the value of x is near zero--a case where exp(x) - 1 would be inaccurate due to subtraction of two numbers that are nearly equal. exp(x) - 1. x NaN, NaN. x +0 (-0), +0 (-0). x , . x , -1. , -HUGE_VAL, -HUGE_VALF -HUGE_VALL, . math_error(7), , . : , errno ERANGE ( . ). (FE_OVERFLOW). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |expm1(), expm1f(), expm1l() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ C11, POSIX.1-2008. C99, POSIX.1-2001. BSD. Before glibc 2.17, on certain architectures (e.g., x86, but not x86_64) expm1() raised a bogus underflow floating-point exception for some large negative x values (where the function result approaches -1). Before approximately glibc 2.11, expm1() raised a bogus invalid floating-point exception in addition to the expected overflow exception, and returned a NaN instead of positive infinity, for some large positive x values. Before glibc 2.11, the glibc implementation did not set errno to ERANGE when a range error occurred. . exp(3), log(3), log1p(3) Azamat Hackimov , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . expm1(3)