Math: FRExpMBS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

FRExpMBS(inputx as Double, byref expValue as Integer) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Math MBS Util Plugin 5.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Breaks floating-point number into normalized fraction and power of 2.
Example
dim x as Double = 123.456

dim y as Integer
dim r as Double = FRExpMBS(x, y)

MsgBox str(X)+": "+str(y)+" "+str(r)

This functions break the floating-point number value into a normalized fraction and an integral power of 2. They store the integer in the int object pointed to by exp.

The functions return a number x such that x has a magnitude in the interval [1/2, 1) or 0, and value = x*(2^exp).

frexp(+-0, exp) returns +-0, and stores 0 in the object pointed to by exp.

frexp(+-infinity, exp) returns +-infinity, and stores an unspecified value in the object pointed to by exp.

frexp(Nan, exp) returns a Nan, and stores an unspecified value in the object pointed to by exp.

The items on this page are in the following plugins: MBS Util Plugin.


💬 Ask a question or report a problem