Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::NumTraits< double > Struct Reference

Numeric traits for the built-in double type. More...

#include <num_traits.hpp>

Public Types

using Real = double
 The real companion type.
using Complex = complex_dbl
 The complex companion type.

Static Public Member Functions

static unsigned NumDigits ()
 The number of significant digits (16 for double).
static unsigned NumFuzzyDigits ()
 The number of digits to trust for fuzzy comparisons.
static unsigned TolToDigits (NumErrorT tol)
 Convert a tracking tolerance to a number of significant digits.
static double FromString (std::string const &s)
 Parse a double from a string.
static double FromRational (mpq_rational const &n, unsigned)
 Convert an exact rational to a double (precision ignored).

Detailed Description

Numeric traits for the built-in double type.

Member Typedef Documentation

◆ Complex

using bertini::NumTraits< double >::Complex = complex_dbl

The complex companion type.

◆ Real

using bertini::NumTraits< double >::Real = double

The real companion type.

Member Function Documentation

◆ FromRational()

double bertini::NumTraits< double >::FromRational ( mpq_rational const & n,
unsigned  )
inlinestatic

Convert an exact rational to a double (precision ignored).

◆ FromString()

double bertini::NumTraits< double >::FromString ( std::string const & s)
inlinestatic

Parse a double from a string.

◆ NumDigits()

unsigned bertini::NumTraits< double >::NumDigits ( )
inlinestatic

The number of significant digits (16 for double).

◆ NumFuzzyDigits()

unsigned bertini::NumTraits< double >::NumFuzzyDigits ( )
inlinestatic

The number of digits to trust for fuzzy comparisons.

◆ TolToDigits()

unsigned bertini::NumTraits< double >::TolToDigits ( NumErrorT tol)
inlinestatic

Convert a tracking tolerance to a number of significant digits.