Lasso Soft Inc. > Home

[ decimal->frexp ]

Method

[decimal->frexp] breaks a floating-point number into a normalized fraction and an integral power of 2. Returns a pair, where the normalized fraction is the first element and the integral power of 2 is the second element in the pair. The normalized fraction is expressed as a decimal in the interval [½, 1) or 0.

  • Syntax
Decimal Object->frexp
Examples
  • Beginner

To break a floating-point number into a normalized fraction and a power of 2:

Use the [decimal->frexp] method. The following example breaks a floating-point number into a normalized fraction and a power of 2, expressed as a pair.

Code

1024.0->frexp

Result

(0.500000 = 11)
Resources
  • Articles

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft