HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_Math.h File Reference
#include "SYS_API.h"
#include "SYS_Types.h"
#include <float.h>
#include <limits>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
+ Include dependency graph for SYS_Math.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define srand48(X)   static_assert(0, "Use SYSsrand48() instead")
 
#define drand48(X)   0; { static_assert(0, "Use SYSdrand48() instead"); }
 
#define SYSmax(a, b)   ((a) > (b) ? (a) : (b))
 
#define SYSmin(a, b)   ((a) < (b) ? (a) : (b))
 
#define SYSabs(a)   ((a) < 0 ? (a) : -(a))
 

Functions

SYS_API void SYSsrand48 (long seed)
 
SYS_API double SYSdrand48 ()
 
template<typename F >
constexpr int SYSsignum (const F a) noexcept
 
template<typename F >
constexpr bool SYSisNan (const F f)
 
template<>
bool SYSisNan (const fpreal16 f)
 
SYS_API bool SYSisNan (const char *number)
 SYSisNan() checks whether the string represents a non-finite number. More...
 
SYS_API bool SYSisInt (const char *str)
 
SYS_API bool SYSisFloat (const char *str)
 
SYS_API fpreal32 SYSroundAngle (fpreal32 base, fpreal32 source)
 
SYS_API fpreal64 SYSroundAngle (fpreal64 base, fpreal64 source)
 
SYS_API fpreal64 SYSroundAngle (int32 base, int32 source)
 
SYS_API fpreal64 SYSroundAngle (int64 base, int64 source)
 
SYS_API bool SYSisPrime (uint num)
 
SYS_API bool SYSisPrime (uint64 num)
 
SYS_API uint SYSmakePrime (uint num)
 
SYS_API uint64 SYSmakePrime (uint64 num)
 
bool SYSisFinite (fpreal64 f)
 
bool SYSisFinite (fpreal32 f)
 
bool SYSisFinite (fpreal16 f)
 
constexpr bool SYSisFinite (int32 f)
 
constexpr bool SYSisFinite (int64 f)
 
bool SYSisInf (fpreal64 f)
 
bool SYSisInf (fpreal32 f)
 
bool SYSisInf (fpreal16 f)
 
constexpr bool SYSisInf (int32 f)
 
constexpr bool SYSisInf (int64 f)
 
bool SYSisNormal (fpreal64 f)
 
bool SYSisNormal (fpreal32 f)
 
bool SYSisNormal (fpreal16 f)
 
constexpr bool SYSisNormal (int32 f)
 
constexpr bool SYSisNormal (int64 f)
 

Macro Definition Documentation

#define drand48 (   X)    0; { static_assert(0, "Use SYSdrand48() instead"); }

Definition at line 167 of file SYS_Math.h.

#define srand48 (   X)    static_assert(0, "Use SYSsrand48() instead")

Definition at line 166 of file SYS_Math.h.

#define SYSabs (   a)    ((a) < 0 ? (a) : -(a))
Examples:
CHOP/CHOP_Spring.C, RAY/RAY_DemoStamp.C, and SOP/SOP_BouncyAgent.C.

Definition at line 1572 of file SYS_Math.h.

#define SYSmax (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Function Documentation

SYS_API double SYSdrand48 ( )
bool SYSisFinite ( fpreal64  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 201 of file SYS_Math.h.

bool SYSisFinite ( fpreal32  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 202 of file SYS_Math.h.

bool SYSisFinite ( fpreal16  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 203 of file SYS_Math.h.

constexpr bool SYSisFinite ( int32  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 204 of file SYS_Math.h.

constexpr bool SYSisFinite ( int64  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 205 of file SYS_Math.h.

SYS_API bool SYSisFloat ( const char *  str)
bool SYSisInf ( fpreal64  f)
inline

Check whether a number is an infinity.

Definition at line 210 of file SYS_Math.h.

bool SYSisInf ( fpreal32  f)
inline

Check whether a number is an infinity.

Definition at line 211 of file SYS_Math.h.

bool SYSisInf ( fpreal16  f)
inline

Check whether a number is an infinity.

Definition at line 212 of file SYS_Math.h.

constexpr bool SYSisInf ( int32  f)
inline

Check whether a number is an infinity.

Definition at line 213 of file SYS_Math.h.

constexpr bool SYSisInf ( int64  f)
inline

Check whether a number is an infinity.

Definition at line 214 of file SYS_Math.h.

SYS_API bool SYSisInt ( const char *  str)
template<typename F >
constexpr bool SYSisNan ( const F  f)
inline

Definition at line 184 of file SYS_Math.h.

template<>
bool SYSisNan ( const fpreal16  f)
inline

Definition at line 191 of file SYS_Math.h.

SYS_API bool SYSisNan ( const char *  number)

SYSisNan() checks whether the string represents a non-finite number.

bool SYSisNormal ( fpreal64  f)
inline

SYSisNormal() checks whether the string represents a non-finite number

Definition at line 219 of file SYS_Math.h.

bool SYSisNormal ( fpreal32  f)
inline

SYSisNormal() checks whether the string represents a non-finite number

Definition at line 220 of file SYS_Math.h.

bool SYSisNormal ( fpreal16  f)
inline

SYSisNormal() checks whether the string represents a non-finite number

Definition at line 221 of file SYS_Math.h.

constexpr bool SYSisNormal ( int32  f)
inline

SYSisNormal() checks whether the string represents a non-finite number

Definition at line 222 of file SYS_Math.h.

constexpr bool SYSisNormal ( int64  f)
inline

SYSisNormal() checks whether the string represents a non-finite number

Definition at line 223 of file SYS_Math.h.

SYS_API bool SYSisPrime ( uint  num)
SYS_API bool SYSisPrime ( uint64  num)
SYS_API uint SYSmakePrime ( uint  num)
SYS_API uint64 SYSmakePrime ( uint64  num)
SYS_API fpreal32 SYSroundAngle ( fpreal32  base,
fpreal32  source 
)
SYS_API fpreal64 SYSroundAngle ( fpreal64  base,
fpreal64  source 
)
SYS_API fpreal64 SYSroundAngle ( int32  base,
int32  source 
)
SYS_API fpreal64 SYSroundAngle ( int64  base,
int64  source 
)
template<typename F >
constexpr int SYSsignum ( const F  a)
inlinenoexcept

Definition at line 176 of file SYS_Math.h.

SYS_API void SYSsrand48 ( long  seed)
Examples:
VEX/VEX_Example.C.