Static Public Member Functions | List of all members
BeNumerical Struct Reference

Numerical utilities. More...

#include <BeNumerical.h>

Static Public Member Functions

static double BeNextafter (double x, double y)
 
static int BeIsnan (double v)
 
static int BeFinite (double v)
 
static UInt32 ResetFloatingPointExceptions (UInt32 newFpuMask)
 A platform-specific function that clears any pending floating point exceptions. More...
 
static double NextafterDelta (double sv)
 Get the smallest value that, when added to fabs(sv), yields a number that is not equal to fabs(sv). More...
 
static double ComputeComparisonTolerance (double sv1, double sv2)
 Compute the tolerance that should be used to check if these two numbers are not equal. More...
 
static int Compare (double sv1, double sv2)
 Compare two values to the closest tolerance possible. More...
 

Detailed Description

Numerical utilities.

Member Function Documentation

static int BeFinite ( double  v)
static
static int BeIsnan ( double  v)
static
static double BeNextafter ( double  x,
double  y 
)
static
static int Compare ( double  sv1,
double  sv2 
)
static

Compare two values to the closest tolerance possible.

Parameters
[in]sv1a value
[in]sv2another value
Returns
0 if equal within the closest possible tolerance, -1 if sv1 is less than sv2, and 1 if sv1 is greater than sv2
static double ComputeComparisonTolerance ( double  sv1,
double  sv2 
)
static

Compute the tolerance that should be used to check if these two numbers are not equal.

Remarks
Do not use the difference between the numbers as a basis for computing the comparison tolerance!
Parameters
[in]sv1a value
[in]sv2another value
static double NextafterDelta ( double  sv)
static

Get the smallest value that, when added to fabs(sv), yields a number that is not equal to fabs(sv).

This can be used to compute a comparison tolerance between numbers that are about as large as sv.

static UInt32 ResetFloatingPointExceptions ( UInt32  newFpuMask)
static

A platform-specific function that clears any pending floating point exceptions.


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

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.