 Math

Functions for math. More...

## Files

file  math.h
Architecture-specific math function calls.

## Macros

#define ARCH_MIN_FLOAT_EPS_SQR   0.000244141F
This is the smallest value e such that 1+e^2 == 1, using floats. More...

## Functions

long ArchSign (long val)
Three-valued sign. Return 1 if val > 0, 0 if val == 0, or -1 if val < 0. More...

uint32_t ArchFloatToBitPattern (float v)
Returns The IEEE-754 bit pattern of the specified single precision value as a 32-bit unsigned integer. More...

float ArchBitPatternToFloat (uint32_t v)
Returns The single precision floating point value corresponding to the given IEEE-754 bit pattern. More...

uint64_t ArchDoubleToBitPattern (double v)
Returns The IEEE-754 bit pattern of the specified double precision value as a 64-bit unsigned integer. More...

double ArchBitPatternToDouble (uint64_t v)
Returns The double precision floating point value corresponding to the given IEEE-754 bit pattern. More...

void ArchSinCosf (float v, float *s, float *c)
Computes the sine and cosine of the specified value as a float. More...

void ArchSinCos (double v, double *s, double *c)
Computes the sine and cosine of the specified value as a double. More...

## Detailed Description

Functions for math.

## Macro Definition Documentation

 #define ARCH_MIN_FLOAT_EPS_SQR   0.000244141F

This is the smallest value e such that 1+e^2 == 1, using floats.

True for all IEEE754 chipsets.

Definition at line 49 of file math.h.

## Function Documentation

 double ArchBitPatternToDouble ( uint64_t v )
inline

Returns The double precision floating point value corresponding to the given IEEE-754 bit pattern.

Definition at line 91 of file math.h.

 float ArchBitPatternToFloat ( uint32_t v )
inline

Returns The single precision floating point value corresponding to the given IEEE-754 bit pattern.

Definition at line 69 of file math.h.

 uint64_t ArchDoubleToBitPattern ( double v )
inline

Returns The IEEE-754 bit pattern of the specified double precision value as a 64-bit unsigned integer.

Definition at line 80 of file math.h.

 uint32_t ArchFloatToBitPattern ( float v )
inline

Returns The IEEE-754 bit pattern of the specified single precision value as a 32-bit unsigned integer.

Definition at line 58 of file math.h.

 long ArchSign ( long val )
inline

Three-valued sign. Return 1 if val > 0, 0 if val == 0, or -1 if val < 0.

Definition at line 52 of file math.h.

 void ArchSinCos ( double v, double * s, double * c )
inline

Computes the sine and cosine of the specified value as a double.

Definition at line 110 of file math.h.

 void ArchSinCosf ( float v, float * s, float * c )
inline

Computes the sine and cosine of the specified value as a float.

Definition at line 107 of file math.h.