12#ifndef ARCANE_DATATYPE_NUMERIC_H 
   13#define ARCANE_DATATYPE_NUMERIC_H 
   17#include "arcane/utils/Limits.h" 
   18#include "arcane/utils/Math.h" 
   52  constexpr ARCCORE_HOST_DEVICE 
static bool isNearlyZero (
const T& a)
 
 
   62  constexpr ARCCORE_HOST_DEVICE 
static bool isZero (
const T& a)
 
 
   72  constexpr ARCCORE_HOST_DEVICE 
static bool isNearlyEqual(
const T& a,
const T& b)
 
 
   92  constexpr ARCCORE_HOST_DEVICE 
static bool isEqual(
const T& a,
const T& b)
 
 
 
  113  constexpr ARCCORE_HOST_DEVICE 
static bool isNearlyZero(T a)
 
  115    return ( (a<0.) ? a>-nepsilon() : a<nepsilon() );
 
  128    return ( (a<0.) ? a>-epsilon : a<epsilon );
 
 
  135    return ( (a<0.) ? a>-(b*nepsilon()) : a<(b*nepsilon()) );
 
 
  138  constexpr ARCCORE_HOST_DEVICE 
static bool isTrueZero(T a) { 
return (a==
FloatInfo<T>::zero()); }
 
  139  constexpr ARCCORE_HOST_DEVICE 
static bool isZero(T a) { 
return (a==FloatInfo<T>::zero()); }
 
  140  constexpr ARCCORE_HOST_DEVICE 
static bool isNearlyEqual(T a,T b)
 
  142    T s = math::abs(a) + math::abs(b);
 
  144    return (d==FloatInfo<T>::zero()) ? true : isNearlyZero(d/s);
 
  146  constexpr ARCCORE_HOST_DEVICE 
static bool isNearlyEqualWithEpsilon(T a,T b,T epsilon)
 
  148    T s = math::abs(a) + math::abs(b);
 
  152  constexpr ARCCORE_HOST_DEVICE 
static bool isEqual(T a,T b)
 
 
  184#ifdef ARCANE_REAL_NOT_BUILTIN 
  211template<
class _Type> 
constexpr ARCCORE_HOST_DEVICE 
inline bool 
  218constexpr ARCCORE_HOST_DEVICE 
inline bool 
  234template<
class _Type> 
constexpr ARCCORE_HOST_DEVICE 
inline bool 
  241ARCCORE_HOST_DEVICE 
constexpr inline bool 
  252template<
class _Type> 
constexpr ARCCORE_HOST_DEVICE 
inline bool 
  259ARCCORE_HOST_DEVICE 
constexpr inline bool 
  275template<
class _Type> 
constexpr ARCCORE_HOST_DEVICE 
inline bool 
  288template<
class _Type> 
constexpr ARCCORE_HOST_DEVICE 
inline bool 
  289isNearlyZero(
const _Type& a)
 
 
  299template<
class _Type> 
constexpr ARCCORE_HOST_DEVICE 
inline bool 
constexpr __host__ static __device__ bool isNearlyZeroWithEpsilon(T a, T epsilon)
Compare a à zéro à epsilon près.
__host__ static __device__ bool isNearlyZero(T a, T b)
Compare avec b*epsilon.
Informations sur le type flottant.
constexpr __host__ static __device__ bool isNearlyZero(const T &a)
Compare a à zéro.
constexpr __host__ static __device__ bool isZero(const T &a)
Compare a à zéro.
constexpr __host__ static __device__ bool isEqual(const T &a, const T &b)
Compare a à b.
constexpr __host__ static __device__ bool isNearlyEqual(const T &a, const T &b)
Compare a à b.
constexpr __host__ static __device__ bool isNearlyEqualWithEpsilon(const T &a, const T &b, const T &)
Compare a à b.
constexpr __host__ __device__ bool isNearlyZeroWithEpsilon(const _Type &a, const _Type &epsilon)
Teste si une valeur est à peu près égale à zéro à un epsilon près.
constexpr __host__ __device__ bool isNearlyEqualWithEpsilon(const _Type &a, const _Type &b, const _Type &epsilon)
Teste si deux valeurs sont à un peu près égales. Pour les types entiers, cette fonction est équivalen...
constexpr __host__ __device__ bool isNearlyEqual(const _Type &a, const _Type &b)
Teste si deux valeurs sont à un peu près égales. Pour les types entiers, cette fonction est équivalen...
bool isZero(const BuiltInProxy< _Type > &a)
Teste si une valeur est exactement égale à zéro.
constexpr __host__ __device__ bool isEqual(const _Type &a, const _Type &b)
Teste l'égalité bit à bit entre deux valeurs.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
double Real
Type représentant un réel.