JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.math.Binary16 Class Reference
Collaboration diagram for com.jogamp.math.Binary16:

Static Public Member Functions

static char exampleNaN ()
 One possible not-a-number value. More...
 
static boolean isInfinite (final char k)
 Return true if the given packed binary16 value is infinite. More...
 
static boolean isNaN (final char k)
 Return true if the given packed binary16 value is not a number (NaN). More...
 
static char packDouble (final double k)
 
static char packFloat (final float k)
 
static char packSetExponentUnbiasedUnchecked (final int e)
 
static char packSetSignificandUnchecked (final int s)
 
static char packSetSignUnchecked (final int s)
 
static String toRawBinaryString (final char k)
 Show the given raw packed binary16 value as a string of binary digits. More...
 
static double unpackDouble (final char k)
 
static float unpackFloat (final char k)
 
static int unpackGetExponentUnbiased (final char k)
 
static int unpackGetSign (final char k)
 Retrieve the sign bit of the given packed binary16 value, as an integer in the range [0, 1]. More...
 
static int unpackGetSignificand (final char k)
 

Static Public Attributes

static final char NEGATIVE_INFINITY
 The encoded form of negative infinity -∞. More...
 
static final char POSITIVE_INFINITY
 The encoded form of positive infinity . More...
 
static final char POSITIVE_ZERO
 The encoded form of positive zero 0. More...
 
static final char NEGATIVE_ZERO
 The encoded form of negative zero -0. More...
 
static final int BIAS
 The bias value used to offset the encoded exponent. More...
 

Detailed Description

Functions to convert values to/from the binary16 format specified in IEEE 754 2008.

Definition at line 38 of file Binary16.java.

Member Function Documentation

◆ exampleNaN()

static char com.jogamp.math.Binary16.exampleNaN ( )
static

One possible not-a-number value.

Definition at line 93 of file Binary16.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInfinite()

static boolean com.jogamp.math.Binary16.isInfinite ( final char  k)
static

Return true if the given packed binary16 value is infinite.

Definition at line 107 of file Binary16.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNaN()

static boolean com.jogamp.math.Binary16.isNaN ( final char  k)
static

Return true if the given packed binary16 value is not a number (NaN).

Definition at line 123 of file Binary16.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ packDouble()

static char com.jogamp.math.Binary16.packDouble ( final double  k)
static

Convert a double precision floating point value to a packed binary16 value.

For the following specific cases, the function returns:

Otherwise, the binary16 value that most closely represents k is returned. This may obviously be an infinite value as the interval of double precision values is far larger than that of the binary16 type.

See also
unpackDouble(char)

Definition at line 158 of file Binary16.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ packFloat()

static char com.jogamp.math.Binary16.packFloat ( final float  k)
static

Convert a single precision floating point value to a packed binary16 value.

For the following specific cases, the function returns:

Otherwise, the binary16 value that most closely represents k is returned. This may obviously be an infinite value as the interval of single precision values is far larger than that of the binary16 type.

See also
unpackFloat(char)

Definition at line 231 of file Binary16.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ packSetExponentUnbiasedUnchecked()

static char com.jogamp.math.Binary16.packSetExponentUnbiasedUnchecked ( final int  e)
static

Encode the unbiased exponent e. Values should be in the range [-15, 16] - values outside of this range will be truncated.

See also
unpackGetExponentUnbiased(char)

Definition at line 287 of file Binary16.java.

Here is the caller graph for this function:

◆ packSetSignificandUnchecked()

static char com.jogamp.math.Binary16.packSetSignificandUnchecked ( final int  s)
static

Encode the significand s. Values should be in the range [0, 1023]. Values outside of this range will be truncated.

See also
unpackGetSignificand(char)

Definition at line 305 of file Binary16.java.

Here is the caller graph for this function:

◆ packSetSignUnchecked()

static char com.jogamp.math.Binary16.packSetSignUnchecked ( final int  s)
static

Encode the sign bit s. Values should be in the range [0, 1], with 0 ironically denoting a positive value. Values outside of this range will be truncated.

See also
unpackGetSign(char)

Definition at line 322 of file Binary16.java.

Here is the caller graph for this function:

◆ toRawBinaryString()

static String com.jogamp.math.Binary16.toRawBinaryString ( final char  k)
static

Show the given raw packed binary16 value as a string of binary digits.

Definition at line 335 of file Binary16.java.

Here is the caller graph for this function:

◆ unpackDouble()

static double com.jogamp.math.Binary16.unpackDouble ( final char  k)
static

Convert a packed binary16 value k to a double-precision floating point value.

The function returns:

See also
packDouble(double)

Definition at line 376 of file Binary16.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpackFloat()

static float com.jogamp.math.Binary16.unpackFloat ( final char  k)
static

Convert a packed binary16 value k to a single-precision floating point value.

The function returns:

See also
packFloat(float)

Definition at line 450 of file Binary16.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpackGetExponentUnbiased()

static int com.jogamp.math.Binary16.unpackGetExponentUnbiased ( final char  k)
static

Extract and unbias the exponent of the given packed binary16 value.

The exponent is encoded biased as a number in the range [0, 31], with 0 indicating that the number is subnormal and [1, 30] denoting the actual exponent plus BIAS. Infinite and NaN values always have an exponent of 31.

This function will therefore return:

See also
packSetExponentUnbiasedUnchecked(int)

Definition at line 529 of file Binary16.java.

Here is the caller graph for this function:

◆ unpackGetSign()

static int com.jogamp.math.Binary16.unpackGetSign ( final char  k)
static

Retrieve the sign bit of the given packed binary16 value, as an integer in the range [0, 1].

See also
Binary16::packSetSignUnchecked(int)

Definition at line 544 of file Binary16.java.

Here is the caller graph for this function:

◆ unpackGetSignificand()

static int com.jogamp.math.Binary16.unpackGetSignificand ( final char  k)
static

Return the significand of the given packed binary16 value as an integer in the range [0, 1023].

See also
Binary16::packSetSignificandUnchecked(int)

Definition at line 559 of file Binary16.java.

Here is the caller graph for this function:

Member Data Documentation

◆ BIAS

final int com.jogamp.math.Binary16.BIAS
static

The bias value used to offset the encoded exponent.

A given exponent e is encoded as BIAS + e.

Definition at line 69 of file Binary16.java.

◆ NEGATIVE_INFINITY

final char com.jogamp.math.Binary16.NEGATIVE_INFINITY
static

The encoded form of negative infinity -∞.

Definition at line 44 of file Binary16.java.

◆ NEGATIVE_ZERO

final char com.jogamp.math.Binary16.NEGATIVE_ZERO
static

The encoded form of negative zero -0.

Definition at line 62 of file Binary16.java.

◆ POSITIVE_INFINITY

final char com.jogamp.math.Binary16.POSITIVE_INFINITY
static

The encoded form of positive infinity .

Definition at line 50 of file Binary16.java.

◆ POSITIVE_ZERO

final char com.jogamp.math.Binary16.POSITIVE_ZERO
static

The encoded form of positive zero 0.

Definition at line 56 of file Binary16.java.


The documentation for this class was generated from the following file: