Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : nextafterl

long doublenextafterl(long double x,long double y) ;

Return Type : long double

A floating-point type with extended precision, typically larger than `double` and used for high-precision arithmetic. The size and precision depend on the platform but are often 80 or 128 bits.
Read about return values of nextafterl function .

1st Parameter Type : long double

A floating-point type with extended precision, typically larger than `double` and used for high-precision arithmetic. The size and precision depend on the platform but are often 80 or 128 bits.

1st Parameter

The starting long double value.

2nd Parameter Type : long double

A floating-point type with extended precision, typically larger than `double` and used for high-precision arithmetic. The size and precision depend on the platform but are often 80 or 128 bits.

2nd Parameter

The target long double value towards which `x` will be incremented or decremented.

Read more about parameters of nextafterl in parameters section
The nextafterlfunction in C language Returns the next representable long double value of the first argument in the direction of the second argument.
The nextafterl function returns the next representable long double floating-point value following x in the direction of y. If x equals y, the function returns y. If either x or y is NaN, NaN is returned. This function is similar to nextafter but operates on long double precision numbers.
The nextafterlfunction takes 2 parameters:
  • long double `x`: The starting long double value.
  • long double `y`: The target long double value towards which `x` will be incremented or decremented.
Returns the next representable long double value after `x` in the direction of `y`. If `x` equals `y`, the function returns `y`. Handles subnormal values and overflows, returning ±infinity in the latter case. Useful for precise floating-point arithmetic and rounding in extended precision.
The nextafterl function return value :
  • Returns the next representable long double value after x in the direction of y

Output

This example demonstrates how nextafterl finds the next representable long double value in both positive and negative directions from zero.