Macaulay2 Engine
Loading...
Searching...
No Matches

◆ sum()

const mpreal mpfr::sum ( const mpreal tab[],
const unsigned long int n,
int & status,
mp_rnd_t mode = mpreal::get_default_rnd() )
inline

Definition at line 2600 of file mpreal.h.

2601{
2602 mpfr_srcptr *p = new mpfr_srcptr[n];
2603
2604 for (unsigned long int i = 0; i < n; i++)
2605 p[i] = tab[i].mpfr_srcptr();
2606
2607 mpreal x;
2608 status = mpfr_sum(x.mpfr_ptr(), (mpfr_ptr*)p, n, mode);
2609
2610 delete [] p;
2611 return x;
2612}
int p
volatile int x