pow2

Base 2 exponentiation and scaling of floating-point numbers.

Syntax

  • Y = pow2(E)

  • Y = pow2(X, E)

Input argument

  • E - Exponent values

  • X - Significand values

Output argument

  • Y - result of pow2.

Description

Y = pow2(E) computes 2 to the power of E.

Y = pow2(X, E) computes X times 2 to the power of E.

Example

R = pow2([1, 2, 3; 4, 5, 6], [6, 5, 4; 3, 2, 1])

See also

log2.

History

Author

Allan CORNET

Last updated