Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
vfloat.h File Reference
#include <cfloat>
#include <cmath>
#include "wcpplib/util/inlinec.h"

Go to the source code of this file.

Namespaces

namespace  Heed
 

Macros

#define max_vfloat   DBL_MAX
 

Typedefs

typedef double vfloat
 

Functions

vfloat abslt (vfloat f)
 
int apeq (vfloat f1, vfloat f2, vfloat prec=vprecision)
 
int not_apeq (vfloat f1, vfloat f2, vfloat prec=vprecision)
 
int Heed::apeq (vfloat f1, vfloat f2, vfloat prec=vprecision)
 
int Heed::not_apeq (vfloat f1, vfloat f2, vfloat prec=vprecision)
 

Variables

const vfloat max_safe_vfloat = 0.5 * sqrt(DBL_MAX)
 
const vfloat vprecision = 1.0E-12
 

Macro Definition Documentation

◆ max_vfloat

#define max_vfloat   DBL_MAX

Definition at line 14 of file vfloat.h.

Typedef Documentation

◆ vfloat

typedef double vfloat

Definition at line 15 of file vfloat.h.

Function Documentation

◆ abslt()

vfloat abslt ( vfloat  f)
inline

◆ apeq()

int apeq ( vfloat  f1,
vfloat  f2,
vfloat  prec = vprecision 
)
inline

Definition at line 21 of file vfloat.h.

21 {
22 if (abslt(f1 - f2) <= prec)
23 return 1;
24 else
25 return 0;
26}
vfloat abslt(vfloat f)
Definition: vfloat.h:19

◆ not_apeq()

int not_apeq ( vfloat  f1,
vfloat  f2,
vfloat  prec = vprecision 
)
inline

Definition at line 27 of file vfloat.h.

27 {
28 if (abslt(f1 - f2) <= prec)
29 return 0;
30 else
31 return 1;
32}

Referenced by basis::basis().

Variable Documentation

◆ max_safe_vfloat

const vfloat max_safe_vfloat = 0.5 * sqrt(DBL_MAX)

Definition at line 16 of file vfloat.h.

◆ vprecision

const vfloat vprecision = 1.0E-12

Definition at line 17 of file vfloat.h.

Referenced by basis::basis(), Heed::splane::check_point_inside(), and Heed::box::init_prec().