33 bigfloat(
const char *str) { mpf_init_set_str(
x, str, 10); }
35 operator const double (
void)
const {
return (
double)(mpf_get_d(
x)); }
37 unsigned long bprec = (
unsigned long)(3.321928094 * (
double)dprec);
38 mpf_set_default_prec(bprec);
42 unsigned long bprec = (
unsigned long)(3.321928094 * (
double)dprec);
43 mpf_set_prec(
x,bprec);
66 mpf_set_d(
x, toDouble(
y));
71 mpf_set_d(
x, toDouble(
y));
76 mpf_set_d(
x, toDouble(
y));
98 mpf_add_ui(
a.x,
x.x,
y);
104 mpf_sub(
a.x,
x.x,
y.x);
110 mpf_ui_sub(
a.x,
x,
y.x);
116 mpf_sub_ui(
a.x,
x.x,
y);
128 mpf_mul(
a.x,
x.x,
y.x);
134 mpf_mul_ui(
a.x,
x.x,
y);
140 mpf_div(
a.x,
x.x,
y.x);
146 mpf_ui_div(
a.x,
x,
y.x);
152 mpf_div_ui(
a.x,
x.x,
y);
176 mpf_pow_ui(
b.x,
a.x,power);
184 test = mpf_cmp(
x.x,
y.x);
185 if (test > 0)
return 1;
191 test = mpf_cmp(
x.x,
y.x);
192 if (test < 0)
return 1;
Primary include file for CHROMA library code.
friend bigfloat operator/(const bigfloat &x, const bigfloat &y)
friend bigfloat operator-(const bigfloat &x, const bigfloat &y)
friend bigfloat operator/(const unsigned long x, const bigfloat &y)
bigfloat(const char *str)
bigfloat & operator*=(const bigfloat &y)
friend bigfloat operator/(const bigfloat &x, const unsigned long y)
bigfloat & operator=(const signed long y)
bigfloat & operator=(const unsigned long y)
friend int operator>(const bigfloat &x, const bigfloat &y)
bigfloat & operator+=(const bigfloat &y)
friend bigfloat operator+(const bigfloat &x, const unsigned long y)
friend bigfloat pow_bf(const bigfloat &a, long power)
friend bigfloat operator-(const bigfloat &x)
friend bigfloat sqrt_bf(const unsigned long x)
bigfloat(const bigfloat &y)
friend bigfloat operator-(const bigfloat &x, const unsigned long y)
bigfloat & operator=(const bigfloat &y)
static void setDefaultPrecision(unsigned long dprec)
friend bigfloat abs_bf(const bigfloat &x)
friend int sgn(const bigfloat &)
bigfloat & operator-=(const bigfloat &y)
bigfloat & operator=(const double y)
friend bigfloat operator*(const bigfloat &x, const unsigned long y)
bigfloat & operator/=(const bigfloat &y)
friend bigfloat sqrt_bf(const bigfloat &x)
bigfloat(const unsigned long u)
void setPrecision(unsigned long dprec)
friend int operator<(const bigfloat &x, const bigfloat &y)
bigfloat & operator=(const Real64 &y)
bigfloat(const Real64 &d)
bigfloat & operator=(const Real32 &y)
friend bigfloat operator-(const unsigned long x, const bigfloat &y)
unsigned long getPrecision(void) const
friend bigfloat & random(void)
bigfloat(const Real32 &d)
unsigned long getDefaultPrecision(void) const
friend bigfloat operator*(const bigfloat &x, const bigfloat &y)
friend bigfloat operator+(const bigfloat &x, const bigfloat &y)
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u