Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : ldexp

doubleldexp(double x,int exp) ;

Return Type : double

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

1st Parameter Type : double

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

1st Parameter

The floating-point value to be scaled.

2nd Parameter Type : int

Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)

2nd Parameter

The power of 2 by which the value `x` will be scaled.

Read more about parameters of ldexp in parameters section
The ldexpfunction in C language Multiplies a floating-point number by an integral power of 2.
The ldexp function multiplies a floating-point number x by 2 raised to the power of exp. It's equivalent to x * 2^exp, but is often more efficient and accurate. This function is useful in manipulating the exponent part of a floating-point number.
The ldexpfunction takes 2 parameters:
  • double `x`: The floating-point value to be scaled.
  • int `exp`: The power of 2 by which the value `x` will be scaled.
Computes the result of multiplying the floating-point number `x` by 2 raised to the power of `exp` (i.e., x × 2^exp). This function is useful for constructing floating-point numbers from a mantissa and an exponent. Returns the scaled value as a `double`.
The ldexp function return value :
  • Returns x * 2^exp

Output

This example demonstrates basic usage of ldexp function to multiply a number by 2^3.