Function: ldexp

ldexp is a function defined in floatfns.c.

Signature

(ldexp SGNFCAND EXPONENT)

Documentation

Return SGNFCAND * 2**EXPONENT, as a floating point number.

EXPONENT must be an integer.

Other relevant functions are documented in the number group.

View in manual

Probably introduced at or before Emacs version 24.1.

Shortdoc

;; number
(ldexp 0.7125 3)
    => 5.7

Source Code

// Defined in /usr/src/emacs/src/floatfns.c
{
  CHECK_FIXNUM (exponent);
  int e = min (max (INT_MIN, XFIXNUM (exponent)), INT_MAX);
  return make_float (ldexp (extract_float (sgnfcand), e));
}