Dissect floating-point numbers into base 2 exponent and mantissa (original) (raw)

Scilab 5.3.3

Please note that the recommended version of Scilab is 2026.0.1. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab help >> Elementary Functions > Floating point > frexp

frexp

dissect floating-point numbers into base 2 exponent and mantissa

Calling Sequence

Arguments

x

real vector or matrix

f

array of real values, usually in the range 0.5 <= abs(f) < 1.

e

array of integers that satisfy the equation: x = f.*2.^e

Description

This function corresponds to the ANSI C function frexp(). Any zeros in x produce f=0 ande=0.

Examples

[f,e]=frexp([1,%pi,-3,%eps])

See Also