Duke's Big Numbers 1.0
C++ and Blueprint libraries for performing math, analysis, and formatting with really large numbers (>10e308).
Loading...
Searching...
No Matches
Duke::FIeeeHelper Struct Reference

#include "IeeeHelper.h"

Static Public Member Functions

static double MakeFloat (int32 sign, int32 exponent, uint32 mantissa)
 
static double MakeDouble (int32 sign, int32 exponent, uint64 mantissa)
 
static void BreakDouble (double number, int32 &sign, int32 &exponent, uint64 &mantissa)
 
static void BreakFloat (float number, int32 &sign, int32 &exponent, uint32 &mantissa)
 
static int32 GetExponent (float number)
 
static int32 GetExponent (double number)
 

Detailed Description

Provides helper methods for building/extracting float/double types to/from their components

Member Function Documentation

◆ BreakDouble()

DBN_FORCEINLINE void FIeeeHelper::BreakDouble ( double  number,
int32 &  sign,
int32 &  exponent,
uint64 &  mantissa 
)
staticFlavor:Static

Gets a component sign, exponent, and mantissa parts from a double.

Parameters
numberThe number to get component parts from
signOn return, contains the sign of the number (0 positive, -1 negative)
exponentOn return, contains the base 2 exponent of the number
mantissaOn return, contains the base 2 mantissa of the number
Implements Opcode:
Flavor:Static 0 ← brkf8 F8 I4& I4& U8&

◆ BreakFloat()

DBN_FORCEINLINE void FIeeeHelper::BreakFloat ( float  number,
int32 &  sign,
int32 &  exponent,
uint32 &  mantissa 
)
staticFlavor:Static

Gets a component sign, exponent, and mantissa parts from a float

Parameters
numberThe number to get component parts from
signOn return, contains the sign of the number (0 positive, -1 negative)
exponentOn return, contains the base 2 exponent of the number
mantissaOn return, contains the base 2 mantissa of the number
Implements Opcode:
Flavor:Static 0 ← brkf4 F4 I4& I4& U4&

◆ GetExponent() [1/2]

DBN_FORCEINLINE int32 FIeeeHelper::GetExponent ( double  number)
staticFlavor:Static

Gets the exponent part from a number

Parameters
numberThe number to get component parts from
Returns
The base 2 exponent of the number
Implements Opcode:
Flavor:Static I4 ← fexp F8

◆ GetExponent() [2/2]

DBN_FORCEINLINE int32 FIeeeHelper::GetExponent ( float  number)
staticFlavor:Static

Gets the exponent part from a number

Parameters
numberThe number to get component parts from
Returns
The base 2 exponent of the number
Implements Opcode:
Flavor:Static I4 ← fexp F4

◆ MakeDouble()

static double Duke::FIeeeHelper::MakeDouble ( int32  sign,
int32  exponent,
uint64  mantissa 
)
staticFlavor:Static

Builds a double from component sign, exponent, and mantissa parts.

Parameters
signThe sign of the number (>=0 positive, <0 negative)
exponentThe base 2 exponent of the number
mantissaThe base 2 mantissa of the number
Returns
The constructed double
Implements Opcode:
Flavor:Static F8 ← makef8 I4 I4 U8

◆ MakeFloat()

static double Duke::FIeeeHelper::MakeFloat ( int32  sign,
int32  exponent,
uint32  mantissa 
)
staticFlavor:Static

Builds a float from component sign, exponent, and mantissa parts.

Parameters
signThe sign of the number (>=0 positive, <0 negative)
exponentThe base 2 exponent of the number
mantissaThe base 2 mantissa of the number
Returns
The constructed float
Implements Opcode:
Flavor:Static F4 ← makef4 I4 I4 U4

The documentation for this struct was generated from the following files: