nextafter(3) Library Functions Manual nextafter(3) nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl - LIBRARY Math library (libm, -lm) #include double nextafter(double x, double y); float nextafterf(float x, float y); long double nextafterl(long double x, long double y); double nexttoward(double x, long double y); float nexttowardf(float x, long double y); long double nexttowardl(long double x, long double y); glibc (. feature_test_macros(7)): nextafter(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 500 || /* glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE nextafterf(), nextafterl(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE nexttoward(), nexttowardf(), nexttowardl(): _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L nextafter(), nextafterf() nextafterl() x y. y x, , x. x = y, y. nexttoward(), nexttowardf() nexttowardl() , nextafter(), , long double. x y. x = y, y ( x). x y NaN, NaN. x , , HUGE_VAL, HUGE_VALF HUGE_VALL, , . x y, , , , ( ) 0,0. math_error(7), , . : : errno ERANGE. (FE_OVERFLOW). : errno ERANGE. (FE_UNDERFLOW). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |nextafter(), nextafterf(), | | MT-Safe | |nextafterl(), nexttoward(), | | | |nexttowardf(), | | | |nexttowardl() | | | +----------------------------+----------------------------------------------------------+--------------------------+ C11, POSIX.1-2008. This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854). C99, POSIX.1-2001. In glibc 2.5 and earlier, these functions do not raise an underflow floating-point (FE_UNDERFLOW) exception when an underflow occurs. Before glibc 2.23 these functions did not set errno. . nearbyint(3) Alex Nik , Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . nextafter(3)