--- layout: stdlib-reference --- # ldexp ## Description Construct float from mantissa and exponent. ## Signature
T ldexp<T>(
    T x,
    T exp)
    where T : __BuiltinFloatingPointType;

vector<T, N> ldexp<T, int N>(
    vector<T, N> x,
    vector<T, N> exp)
    where T : __BuiltinFloatingPointType;

matrix<T, N, M> ldexp<T, int N, int M>(
    matrix<T, N, M> x,
    matrix<T, N, M> exp)
    where T : __BuiltinFloatingPointType;

T ldexp<T, E>(
    T x,
    E exp)
    where T : __BuiltinFloatingPointType
    where E : __BuiltinIntegerType;

vector<T, N> ldexp<T, E, int N>(
    vector<T, N> x,
    vector<E, N> exp)
    where T : __BuiltinFloatingPointType
    where E : __BuiltinIntegerType;

## Generic Parameters #### T: [\_\_BuiltinFloatingPointType](../interfaces/0_builtinfloatingpointtype-029hm/index.html) #### N : int #### M : int #### E: [\_\_BuiltinIntegerType](../interfaces/0_builtinintegertype-029g/index.html) ## Parameters #### x : [T](ldexp.html#typeparam-T) The significand. #### exp : [T](ldexp.html#typeparam-T) The exponent. #### x : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> The significand. #### exp : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> The exponent. #### x : [matrix](../types/matrix/index.html)\<[T](../types/matrix/t-0.html), [N](../types/matrix/index.html#decl-N), [M](../types/matrix/index.html#decl-M)\> The significand. #### exp : [matrix](../types/matrix/index.html)\<[T](../types/matrix/t-0.html), [N](../types/matrix/index.html#decl-N), [M](../types/matrix/index.html#decl-M)\> The exponent. #### exp : [E](ldexp.html#typeparam-E) The exponent. #### exp : [vector](../types/vector/index.html)\ The exponent. ## Return value The floating-point number constructed from x and exp. ## Availability and Requirements Defined for the following targets: #### hlsl Available in all stages. #### glsl Available in all stages. #### cpp Available in all stages. #### cuda Available in all stages. #### metal Available in all stages. #### wgsl Available in all stages. #### spirv Available in all stages.