Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimenextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : modf

doublemodf(double x,double * iptr) ;

Return Type : double

Double-precision floating point (±1.7E±308, ~15 decimal digits)
Read about return values of modf function .

1st Parameter Type : double

Double-precision floating point (±1.7E±308, ~15 decimal digits)

1st Parameter

The input floating-point value to be split into its integer and fractional parts.

2nd Parameter Type : double *

Type double * parameters

2nd Parameter

Pointer to a `double` where the integer part of `x` will be stored.

Read more about parameters of modf in parameters section
The modffunction in C language Breaks a floating-point number into integer and fractional parts.
The modf function breaks down the floating-point number x into integer and fractional parts. It stores the integer part in the object pointed to by intpart, and returns the fractional part. Both parts have the same sign as x.
The modffunction takes 2 parameters:
  • double `x`: The input floating-point value to be split into its integer and fractional parts.
  • double * `iptr`: Pointer to a `double` where the integer part of `x` will be stored.
Splits the given floating-point value `x` into its integer and fractional parts. The integer part is stored in the location pointed to by `iptr`, and the fractional part is returned as the function result. Both parts have the same sign as the input value `x`.
The modf function return value :
  • Returns the fractional part of x as a double

Output

This example demonstrates how modf breaks down a floating-point number into its integer and fractional parts.