"Sputnik" help |

Sputnik
Help

Description

Extracts the exponent and significand components from a double value.

Parameters

<value> | The double value from which to extract the components. |

<exp> | (Output) The extracted exponent component. |

<sig> | (Output) The extracted significand component. |

Return Value

Success: | Returns true. |

Failure: | Returns false. |

Remarks

The **ExtractDouble** function takes a double value **<value>
**and extracts its exponent and significand components. The extracted
values are returned through the output parameters **<exp>**
and **<sig>**.

The function handles different cases based on the value of **<value>**.
If the value is **NaN** (Not-a-Number), the exponent and significand
will also be **NaN**. If the value is positive or negative infinity,
the exponent will be positive infinity, and the significand will be 1 or -1,
respectively. For all other finite values, the function extracts the raw bits
of the value, calculates the exponent and significand based on the bit representation,
and adjusts them accordingly.

The extracted exponent and significand components can be useful for further analysis or manipulation of double values.

Related

AssembleDoubleExample

Example of usage:

my$a=AssembleDouble(1.0,1.4);say $a;ExtractDouble($a,$b,$c);say $b;say $c;// PRINTS// 2.8// 1// 1.4

Contact

Cheryl (uberfox@hotmail.com)

Homepage

http://ubersoft.org