Data Structures | Typedefs | Functions
amp Namespace Reference

Data Structures

class  ampf
 
class  campf
 
class  divisionByZero
 
class  domainError
 
class  exception
 
class  incorrectPrecision
 
class  internalError
 
class  invalidConversion
 
class  invalidString
 
struct  mpfr_record
 
class  mpfr_reference
 
class  mpfr_storage
 
class  overflow
 
class  sqrtOfNegativeNumber
 

Typedefs

typedef unsigned long unsigned32
 
typedef signed long signed32
 
typedef mpfr_recordmpfr_record_ptr
 

Functions

template<unsigned int Precision>
const bool operator== (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const bool operator!= (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const bool operator< (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const bool operator> (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const bool operator<= (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const bool operator>= (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const ampf< Precision > operator+ (const ampf< Precision > &op1)
 
template<unsigned int Precision>
const ampf< Precision > operator- (const ampf< Precision > &op1)
 
template<unsigned int Precision>
const ampf< Precision > operator+ (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const ampf< Precision > operator- (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const ampf< Precision > operator* (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const ampf< Precision > operator/ (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
const ampf< Precision > sqr (const ampf< Precision > &x)
 
template<unsigned int Precision>
const int sign (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > abs (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > maximum (const ampf< Precision > &x, const ampf< Precision > &y)
 
template<unsigned int Precision>
const ampf< Precision > minimum (const ampf< Precision > &x, const ampf< Precision > &y)
 
template<unsigned int Precision>
const ampf< Precision > sqrt (const ampf< Precision > &x)
 
template<unsigned int Precision>
const signed long trunc (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > frac (const ampf< Precision > &x)
 
template<unsigned int Precision>
const signed long floor (const ampf< Precision > &x)
 
template<unsigned int Precision>
const signed long ceil (const ampf< Precision > &x)
 
template<unsigned int Precision>
const signed long round (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > frexp2 (const ampf< Precision > &x, mp_exp_t *exponent)
 
template<unsigned int Precision>
const ampf< Precision > ldexp2 (const ampf< Precision > &x, mp_exp_t exponent)
 
 __AMP_BINARY_OPI (char) __AMP_BINARY_OPI(short) __AMP_BINARY_OPI(long) __AMP_BINARY_OPI(int) __AMP_BINARY_OPF(float) __AMP_BINARY_OPF(double) __AMP_BINARY_OPF(long double) template< unsigned int Precision > const ampf< Precision > pi()
 
template<unsigned int Precision>
const ampf< Precision > halfpi ()
 
template<unsigned int Precision>
const ampf< Precision > twopi ()
 
template<unsigned int Precision>
const ampf< Precision > sin (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > cos (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > tan (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > asin (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > acos (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > atan (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > atan2 (const ampf< Precision > &y, const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > log (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > log2 (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > log10 (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > exp (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > sinh (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > cosh (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > tanh (const ampf< Precision > &x)
 
template<unsigned int Precision>
const ampf< Precision > pow (const ampf< Precision > &x, const ampf< Precision > &y)
 
template<unsigned int Precision>
const bool operator== (const campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const bool operator!= (const campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const campf< Precision > operator+ (const campf< Precision > &lhs)
 
template<unsigned int Precision>
campf< Precision > & operator+= (campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const campf< Precision > operator+ (const campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const campf< Precision > operator- (const campf< Precision > &lhs)
 
template<unsigned int Precision>
campf< Precision > & operator-= (campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const campf< Precision > operator- (const campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
campf< Precision > & operator*= (campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const campf< Precision > operator* (const campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const campf< Precision > operator/ (const campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
campf< Precision > & operator/= (campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
const ampf< Precision > abscomplex (const campf< Precision > &z)
 
template<unsigned int Precision>
const campf< Precision > conj (const campf< Precision > &z)
 
template<unsigned int Precision>
const campf< Precision > csqr (const campf< Precision > &z)
 
template<unsigned int Precision>
void vMove (ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc)
 
template<unsigned int Precision>
void vMoveNeg (ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc)
 
template<unsigned int Precision, class T2 >
void vMove (ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc, T2 alpha)
 
template<unsigned int Precision>
void vAdd (ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc)
 
template<unsigned int Precision, class T2 >
void vAdd (ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc, T2 alpha)
 
template<unsigned int Precision>
void vSub (ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc)
 
template<unsigned int Precision, class T2 >
void vSub (ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc, T2 alpha)
 
template<unsigned int Precision, class T2 >
void vMul (ap::raw_vector< ampf< Precision > > vDst, T2 alpha)
 
template<unsigned int Precision>
bool operator== (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
bool operator!= (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
bool operator< (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
bool operator> (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
bool operator<= (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
bool operator>= (const ampf< Precision > &op1, const ampf< Precision > &op2)
 
template<unsigned int Precision>
int sign (const ampf< Precision > &x)
 
template<unsigned int Precision>
signed long trunc (const ampf< Precision > &x)
 
template<unsigned int Precision>
signed long floor (const ampf< Precision > &x)
 
template<unsigned int Precision>
signed long ceil (const ampf< Precision > &x)
 
template<unsigned int Precision>
signed long round (const ampf< Precision > &x)
 
template<unsigned int Precision>
bool operator== (const campf< Precision > &lhs, const campf< Precision > &rhs)
 
template<unsigned int Precision>
bool operator!= (const campf< Precision > &lhs, const campf< Precision > &rhs)
 

Data Structure Documentation

◆ amp::mpfr_record

struct amp::mpfr_record

Definition at line 34 of file amp.h.

Data Fields
mpfr_record * next
unsigned int Precision
unsigned int refCount
mpfr_t value

Typedef Documentation

◆ mpfr_record_ptr

Definition at line 42 of file amp.h.

◆ signed32

typedef signed long amp::signed32

Definition at line 32 of file amp.h.

◆ unsigned32

typedef unsigned long amp::unsigned32

Definition at line 31 of file amp.h.

Function Documentation

◆ __AMP_BINARY_OPI()

amp::__AMP_BINARY_OPI ( char  ) const

Definition at line 890 of file amp.h.

896  { return ampf<Precision>(op1)+op2; } \
897  template<unsigned int Precision> const ampf<Precision> operator+(const ampf<Precision>& op1, const type& op2) { return op1+ampf<Precision>(op2); } \
898  template<unsigned int Precision> const ampf<Precision> operator-(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)-op2; } \
899  template<unsigned int Precision> const ampf<Precision> operator-(const ampf<Precision>& op1, const type& op2) { return op1-ampf<Precision>(op2); } \
900  template<unsigned int Precision> const ampf<Precision> operator*(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)*op2; } \
901  template<unsigned int Precision> const ampf<Precision> operator*(const ampf<Precision>& op1, const type& op2) { return op1*ampf<Precision>(op2); } \
902  template<unsigned int Precision> const ampf<Precision> operator/(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)/op2; } \
903  template<unsigned int Precision> const ampf<Precision> operator/(const ampf<Precision>& op1, const type& op2) { return op1/ampf<Precision>(op2); } \
904  template<unsigned int Precision> bool operator==(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)==op2; } \
905  template<unsigned int Precision> bool operator==(const ampf<Precision>& op1, const type& op2) { return op1==ampf<Precision>(op2); } \
906  template<unsigned int Precision> bool operator!=(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)!=op2; } \
907  template<unsigned int Precision> bool operator!=(const ampf<Precision>& op1, const type& op2) { return op1!=ampf<Precision>(op2); } \
908  template<unsigned int Precision> bool operator<=(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<=op2; } \
909  template<unsigned int Precision> bool operator<=(const ampf<Precision>& op1, const type& op2) { return op1<=ampf<Precision>(op2); } \
910  template<unsigned int Precision> bool operator>=(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>=op2; } \
911  template<unsigned int Precision> bool operator>=(const ampf<Precision>& op1, const type& op2) { return op1>=ampf<Precision>(op2); } \
912  template<unsigned int Precision> bool operator<(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<op2; } \
913  template<unsigned int Precision> bool operator<(const ampf<Precision>& op1, const type& op2) { return op1<ampf<Precision>(op2); } \
914  template<unsigned int Precision> bool operator>(const type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>op2; } \
915  template<unsigned int Precision> bool operator>(const ampf<Precision>& op1, const type& op2) { return op1>ampf<Precision>(op2); }
916  __AMP_BINARY_OPF(float)
917  __AMP_BINARY_OPF(double)
918  __AMP_BINARY_OPF(long double)
919  #undef __AMP_BINARY_OPF
920 
921  //
922  // transcendent functions
923  //
924  template<unsigned int Precision>
925  const ampf<Precision> pi()
926  {
927  mpfr_record *v = mpfr_storage::newMpfr(Precision);
928  mpfr_const_pi(v->value, GMP_RNDN);
929  return v;
930  }
const campf< Precision > operator/(const campf< Precision > &lhs, const campf< Precision > &rhs)
Definition: amp.h:1178
const campf< Precision > operator*(const campf< Precision > &lhs, const campf< Precision > &rhs)
Definition: amp.h:1174
const bool operator==(const campf< Precision > &lhs, const campf< Precision > &rhs)
Definition: amp.h:1133
const campf< Precision > operator-(const campf< Precision > &lhs, const campf< Precision > &rhs)
Definition: amp.h:1161
const bool operator>=(const ampf< Precision > &op1, const ampf< Precision > &op2)
Definition: amp.h:635
const bool operator>(const ampf< Precision > &op1, const ampf< Precision > &op2)
Definition: amp.h:623
#define pi
Definition: libparse.cc:1143
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define __AMP_BINARY_OPF(type)
const campf< Precision > operator+(const campf< Precision > &lhs, const campf< Precision > &rhs)
Definition: amp.h:1149
const bool operator!=(const campf< Precision > &lhs, const campf< Precision > &rhs)
Definition: amp.h:1137

◆ abs()

template<unsigned int Precision>
const ampf< Precision > amp::abs ( const ampf< Precision > &  x)

Definition at line 714 of file amp.h.

715  {
716  // TODO: optimize temporary for return value
717  ampf<Precision> res;
718  mpfr_abs(res.getWritePtr(), x.getReadPtr(), GMP_RNDN);
719  return res;
720  }
CanonicalForm res
Definition: facAbsFact.cc:64
Variable x
Definition: cfModGcd.cc:4023

◆ abscomplex()

template<unsigned int Precision>
const ampf< Precision > amp::abscomplex ( const campf< Precision > &  z)

Definition at line 1208 of file amp.h.

1209  {
1210  ampf<Precision> w, xabs, yabs, v;
1211 
1212  xabs = abs(z.x);
1213  yabs = abs(z.y);
1214  w = xabs>yabs ? xabs : yabs;
1215  v = xabs<yabs ? xabs : yabs;
1216  if( v==0 )
1217  return w;
1218  else
1219  {
1220  ampf<Precision> t = v/w;
1221  return w*sqrt(1+sqr(t));
1222  }
1223  }
const ampf< Precision > sqrt(const ampf< Precision > &x)
Definition: amp.h:741
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
const CanonicalForm & w
Definition: facAbsFact.cc:55
const ampf< Precision > sqr(const ampf< Precision > &x)
Definition: amp.h:694
const ampf< Precision > abs(const ampf< Precision > &x)
Definition: amp.h:714

◆ acos()

template<unsigned int Precision>
const ampf< Precision > amp::acos ( const ampf< Precision > &  x)

Definition at line 983 of file amp.h.

984  {
985  mpfr_record *v = mpfr_storage::newMpfr(Precision);
986  mpfr_acos(v->value, x.getReadPtr(), GMP_RNDN);
987  return v;
988  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ asin()

template<unsigned int Precision>
const ampf< Precision > amp::asin ( const ampf< Precision > &  x)

Definition at line 975 of file amp.h.

976  {
977  mpfr_record *v = mpfr_storage::newMpfr(Precision);
978  mpfr_asin(v->value, x.getReadPtr(), GMP_RNDN);
979  return v;
980  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ atan()

template<unsigned int Precision>
const ampf< Precision > amp::atan ( const ampf< Precision > &  x)

Definition at line 991 of file amp.h.

992  {
993  mpfr_record *v = mpfr_storage::newMpfr(Precision);
994  mpfr_atan(v->value, x.getReadPtr(), GMP_RNDN);
995  return v;
996  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ atan2()

template<unsigned int Precision>
const ampf< Precision > amp::atan2 ( const ampf< Precision > &  y,
const ampf< Precision > &  x 
)

Definition at line 999 of file amp.h.

1000  {
1001  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1002  mpfr_atan2(v->value, y.getReadPtr(), x.getReadPtr(), GMP_RNDN);
1003  return v;
1004  }
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ ceil() [1/2]

template<unsigned int Precision>
const signed long amp::ceil ( const ampf< Precision > &  x)

Definition at line 789 of file amp.h.

790  {
791  ampf<Precision> tmp;
792  signed long r;
793  mpfr_ceil(tmp.getWritePtr(), x.getReadPtr());
794  if( mpfr_integer_p(tmp.getReadPtr())==0 )
795  throw invalidConversion();
796  mpfr_clear_erangeflag();
797  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
798  if( mpfr_erangeflag_p()!=0 )
799  throw invalidConversion();
800  return r;
801  }
Variable x
Definition: cfModGcd.cc:4023

◆ ceil() [2/2]

template<unsigned int Precision>
signed long amp::ceil ( const ampf< Precision > &  x)

Definition at line 1804 of file svd_si.h.

1805  {
1806  ampf<Precision> tmp;
1807  signed long r;
1808  mpfr_ceil(tmp.getWritePtr(), x.getReadPtr());
1809  if( mpfr_integer_p(tmp.getReadPtr())==0 )
1810  //throw invalidConversion();
1811  WerrorS("internalError");
1812  mpfr_clear_erangeflag();
1813  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
1814  if( mpfr_erangeflag_p()!=0 )
1815  //throw invalidConversion();
1816  WerrorS("internalError");
1817  return r;
1818  }
void WerrorS(const char *s)
Definition: feFopen.cc:24
Variable x
Definition: cfModGcd.cc:4023

◆ conj()

template<unsigned int Precision>
const campf< Precision > amp::conj ( const campf< Precision > &  z)

Definition at line 1226 of file amp.h.

1227  {
1228  return campf<Precision>(z.x, -z.y);
1229  }

◆ cos()

template<unsigned int Precision>
const ampf< Precision > amp::cos ( const ampf< Precision > &  x)

Definition at line 959 of file amp.h.

960  {
961  mpfr_record *v = mpfr_storage::newMpfr(Precision);
962  mpfr_cos(v->value, x.getReadPtr(), GMP_RNDN);
963  return v;
964  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ cosh()

template<unsigned int Precision>
const ampf< Precision > amp::cosh ( const ampf< Precision > &  x)

Definition at line 1047 of file amp.h.

1048  {
1049  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1050  mpfr_cosh(v->value, x.getReadPtr(), GMP_RNDN);
1051  return v;
1052  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ csqr()

template<unsigned int Precision>
const campf< Precision > amp::csqr ( const campf< Precision > &  z)

Definition at line 1232 of file amp.h.

1233  {
1234  ampf<Precision> t = z.x*z.y;
1235  return campf<Precision>(sqr(z.x)-sqr(z.y), t+t);
1236  }
const ampf< Precision > sqr(const ampf< Precision > &x)
Definition: amp.h:694

◆ exp()

template<unsigned int Precision>
const ampf< Precision > amp::exp ( const ampf< Precision > &  x)

Definition at line 1031 of file amp.h.

1032  {
1033  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1034  mpfr_exp(v->value, x.getReadPtr(), GMP_RNDN);
1035  return v;
1036  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ floor() [1/2]

template<unsigned int Precision>
const signed long amp::floor ( const ampf< Precision > &  x)

Definition at line 774 of file amp.h.

775  {
776  ampf<Precision> tmp;
777  signed long r;
778  mpfr_floor(tmp.getWritePtr(), x.getReadPtr());
779  if( mpfr_integer_p(tmp.getReadPtr())==0 )
780  throw invalidConversion();
781  mpfr_clear_erangeflag();
782  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
783  if( mpfr_erangeflag_p()!=0 )
784  throw invalidConversion();
785  return r;
786  }
Variable x
Definition: cfModGcd.cc:4023

◆ floor() [2/2]

template<unsigned int Precision>
signed long amp::floor ( const ampf< Precision > &  x)

Definition at line 1787 of file svd_si.h.

1788  {
1789  ampf<Precision> tmp;
1790  signed long r;
1791  mpfr_floor(tmp.getWritePtr(), x.getReadPtr());
1792  if( mpfr_integer_p(tmp.getReadPtr())==0 )
1793  //throw invalidConversion();
1794  WerrorS("internalError");
1795  mpfr_clear_erangeflag();
1796  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
1797  if( mpfr_erangeflag_p()!=0 )
1798  //throw invalidConversion();
1799  WerrorS("internalError");
1800  return r;
1801  }
void WerrorS(const char *s)
Definition: feFopen.cc:24
Variable x
Definition: cfModGcd.cc:4023

◆ frac()

template<unsigned int Precision>
const ampf< Precision > amp::frac ( const ampf< Precision > &  x)

Definition at line 765 of file amp.h.

766  {
767  // TODO: optimize temporary for return value
768  ampf<Precision> r;
769  mpfr_frac(r.getWritePtr(), x.getReadPtr(), GMP_RNDN);
770  return r;
771  }
Variable x
Definition: cfModGcd.cc:4023

◆ frexp2()

template<unsigned int Precision>
const ampf< Precision > amp::frexp2 ( const ampf< Precision > &  x,
mp_exp_t *  exponent 
)

Definition at line 819 of file amp.h.

820  {
821  // TODO: optimize temporary for return value
822  ampf<Precision> r;
823  if( !x.isFiniteNumber() )
824  throw invalidConversion();
825  if( x.isZero() )
826  {
827  *exponent = 0;
828  r = 0;
829  return r;
830  }
831  r = x;
832  *exponent = mpfr_get_exp(r.getReadPtr());
833  mpfr_set_exp(r.getWritePtr(),0);
834  return r;
835  }
Variable x
Definition: cfModGcd.cc:4023
int exponent(const CanonicalForm &f, int q)
int exponent ( const CanonicalForm & f, int q )

◆ halfpi()

template<unsigned int Precision>
const ampf< Precision > amp::halfpi ( )

Definition at line 933 of file amp.h.

934  {
935  mpfr_record *v = mpfr_storage::newMpfr(Precision);
936  mpfr_const_pi(v->value, GMP_RNDN);
937  mpfr_mul_2si(v->value, v->value, -1, GMP_RNDN);
938  return v;
939  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37

◆ ldexp2()

template<unsigned int Precision>
const ampf< Precision > amp::ldexp2 ( const ampf< Precision > &  x,
mp_exp_t  exponent 
)

Definition at line 838 of file amp.h.

839  {
840  // TODO: optimize temporary for return value
841  ampf<Precision> r;
842  mpfr_mul_2si(r.getWritePtr(), x.getReadPtr(), exponent, GMP_RNDN);
843  return r;
844  }
Variable x
Definition: cfModGcd.cc:4023
int exponent(const CanonicalForm &f, int q)
int exponent ( const CanonicalForm & f, int q )

◆ log()

template<unsigned int Precision>
const ampf< Precision > amp::log ( const ampf< Precision > &  x)

Definition at line 1007 of file amp.h.

1008  {
1009  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1010  mpfr_log(v->value, x.getReadPtr(), GMP_RNDN);
1011  return v;
1012  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ log10()

template<unsigned int Precision>
const ampf< Precision > amp::log10 ( const ampf< Precision > &  x)

Definition at line 1023 of file amp.h.

1024  {
1025  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1026  mpfr_log10(v->value, x.getReadPtr(), GMP_RNDN);
1027  return v;
1028  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ log2()

template<unsigned int Precision>
const ampf< Precision > amp::log2 ( const ampf< Precision > &  x)

Definition at line 1015 of file amp.h.

1016  {
1017  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1018  mpfr_log2(v->value, x.getReadPtr(), GMP_RNDN);
1019  return v;
1020  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ maximum()

template<unsigned int Precision>
const ampf< Precision > amp::maximum ( const ampf< Precision > &  x,
const ampf< Precision > &  y 
)

Definition at line 723 of file amp.h.

724  {
725  // TODO: optimize temporary for return value
726  ampf<Precision> res;
727  mpfr_max(res.getWritePtr(), x.getReadPtr(), y.getReadPtr(), GMP_RNDN);
728  return res;
729  }
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
CanonicalForm res
Definition: facAbsFact.cc:64
Variable x
Definition: cfModGcd.cc:4023

◆ minimum()

template<unsigned int Precision>
const ampf< Precision > amp::minimum ( const ampf< Precision > &  x,
const ampf< Precision > &  y 
)

Definition at line 732 of file amp.h.

733  {
734  // TODO: optimize temporary for return value
735  ampf<Precision> res;
736  mpfr_min(res.getWritePtr(), x.getReadPtr(), y.getReadPtr(), GMP_RNDN);
737  return res;
738  }
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
CanonicalForm res
Definition: facAbsFact.cc:64
Variable x
Definition: cfModGcd.cc:4023

◆ operator!=() [1/4]

template<unsigned int Precision>
const bool amp::operator!= ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 611 of file amp.h.

612  {
613  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())!=0;
614  }

◆ operator!=() [2/4]

template<unsigned int Precision>
const bool amp::operator!= ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1137 of file amp.h.

1138  { return lhs.x!=rhs.x || lhs.y!=rhs.y; }

◆ operator!=() [3/4]

template<unsigned int Precision>
bool amp::operator!= ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 1622 of file svd_si.h.

1623  {
1624  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())!=0;
1625  }

◆ operator!=() [4/4]

template<unsigned int Precision>
bool amp::operator!= ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 2157 of file svd_si.h.

2158  { return lhs.x!=rhs.x || lhs.y!=rhs.y; }

◆ operator*() [1/2]

template<unsigned int Precision>
const ampf< Precision > amp::operator* ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 675 of file amp.h.

676  {
677  mpfr_record *v = mpfr_storage::newMpfr(Precision);
678  mpfr_mul(v->value, op1.getReadPtr(), op2.getReadPtr(), GMP_RNDN);
679  return v;
680  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37

◆ operator*() [2/2]

template<unsigned int Precision>
const campf< Precision > amp::operator* ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1174 of file amp.h.

1175  { campf<Precision> r = lhs; r *= rhs; return r; }

◆ operator*=()

template<unsigned int Precision>
campf< Precision > & amp::operator*= ( campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1165 of file amp.h.

1166  {
1167  ampf<Precision> xx(lhs.x*rhs.x), yy(lhs.y*rhs.y), mm((lhs.x+lhs.y)*(rhs.x+rhs.y));
1168  lhs.x = xx-yy;
1169  lhs.y = mm-xx-yy;
1170  return lhs;
1171  }

◆ operator+() [1/4]

template<unsigned int Precision>
const ampf< Precision > amp::operator+ ( const ampf< Precision > &  op1)

Definition at line 644 of file amp.h.

645  {
646  return op1;
647  }

◆ operator+() [2/4]

template<unsigned int Precision>
const ampf< Precision > amp::operator+ ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 658 of file amp.h.

659  {
660  mpfr_record *v = mpfr_storage::newMpfr(Precision);
661  mpfr_add(v->value, op1.getReadPtr(), op2.getReadPtr(), GMP_RNDN);
662  return v;
663  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37

◆ operator+() [3/4]

template<unsigned int Precision>
const campf< Precision > amp::operator+ ( const campf< Precision > &  lhs)

Definition at line 1141 of file amp.h.

1142  { return lhs; }

◆ operator+() [4/4]

template<unsigned int Precision>
const campf< Precision > amp::operator+ ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1149 of file amp.h.

1150  { campf<Precision> r = lhs; r += rhs; return r; }

◆ operator+=()

template<unsigned int Precision>
campf< Precision > & amp::operator+= ( campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1145 of file amp.h.

1146  { lhs.x += rhs.x; lhs.y += rhs.y; return lhs; }

◆ operator-() [1/4]

template<unsigned int Precision>
const ampf< Precision > amp::operator- ( const ampf< Precision > &  op1)

Definition at line 650 of file amp.h.

651  {
652  mpfr_record *v = mpfr_storage::newMpfr(Precision);
653  mpfr_neg(v->value, op1.getReadPtr(), GMP_RNDN);
654  return v;
655  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37

◆ operator-() [2/4]

template<unsigned int Precision>
const ampf< Precision > amp::operator- ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 666 of file amp.h.

667  {
668  mpfr_record *v = mpfr_storage::newMpfr(Precision);
669  mpfr_sub(v->value, op1.getReadPtr(), op2.getReadPtr(), GMP_RNDN);
670  return v;
671  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37

◆ operator-() [3/4]

template<unsigned int Precision>
const campf< Precision > amp::operator- ( const campf< Precision > &  lhs)

Definition at line 1153 of file amp.h.

1154  { return campf<Precision>(-lhs.x, -lhs.y); }

◆ operator-() [4/4]

template<unsigned int Precision>
const campf< Precision > amp::operator- ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1161 of file amp.h.

1162  { campf<Precision> r = lhs; r -= rhs; return r; }

◆ operator-=()

template<unsigned int Precision>
campf< Precision > & amp::operator-= ( campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1157 of file amp.h.

1158  { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; }

◆ operator/() [1/2]

template<unsigned int Precision>
const ampf< Precision > amp::operator/ ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 683 of file amp.h.

684  {
685  mpfr_record *v = mpfr_storage::newMpfr(Precision);
686  mpfr_div(v->value, op1.getReadPtr(), op2.getReadPtr(), GMP_RNDN);
687  return v;
688  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37

◆ operator/() [2/2]

template<unsigned int Precision>
const campf< Precision > amp::operator/ ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1178 of file amp.h.

1179  {
1180  campf<Precision> result;
1181  ampf<Precision> e;
1182  ampf<Precision> f;
1183  if( abs(rhs.y)<abs(rhs.x) )
1184  {
1185  e = rhs.y/rhs.x;
1186  f = rhs.x+rhs.y*e;
1187  result.x = (lhs.x+lhs.y*e)/f;
1188  result.y = (lhs.y-lhs.x*e)/f;
1189  }
1190  else
1191  {
1192  e = rhs.x/rhs.y;
1193  f = rhs.y+rhs.x*e;
1194  result.x = (lhs.y+lhs.x*e)/f;
1195  result.y = (-lhs.x+lhs.y*e)/f;
1196  }
1197  return result;
1198  }
FILE * f
Definition: checklibs.c:9
return result
Definition: facAbsBiFact.cc:76
const ampf< Precision > abs(const ampf< Precision > &x)
Definition: amp.h:714

◆ operator/=()

template<unsigned int Precision>
campf< Precision > & amp::operator/= ( campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1201 of file amp.h.

1202  {
1203  lhs = lhs/rhs;
1204  return lhs;
1205  }

◆ operator<() [1/2]

template<unsigned int Precision>
const bool amp::operator< ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 617 of file amp.h.

618  {
619  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<0;
620  }

◆ operator<() [2/2]

template<unsigned int Precision>
bool amp::operator< ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 1628 of file svd_si.h.

1629  {
1630  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<0;
1631  }

◆ operator<=() [1/2]

template<unsigned int Precision>
const bool amp::operator<= ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 629 of file amp.h.

630  {
631  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<=0;
632  }

◆ operator<=() [2/2]

template<unsigned int Precision>
bool amp::operator<= ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 1640 of file svd_si.h.

1641  {
1642  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<=0;
1643  }

◆ operator==() [1/4]

template<unsigned int Precision>
const bool amp::operator== ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 605 of file amp.h.

606  {
607  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())==0;
608  }

◆ operator==() [2/4]

template<unsigned int Precision>
const bool amp::operator== ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 1133 of file amp.h.

1134  { return lhs.x==rhs.x && lhs.y==rhs.y; }

◆ operator==() [3/4]

template<unsigned int Precision>
bool amp::operator== ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 1616 of file svd_si.h.

1617  {
1618  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())==0;
1619  }

◆ operator==() [4/4]

template<unsigned int Precision>
bool amp::operator== ( const campf< Precision > &  lhs,
const campf< Precision > &  rhs 
)

Definition at line 2153 of file svd_si.h.

2154  { return lhs.x==rhs.x && lhs.y==rhs.y; }

◆ operator>() [1/2]

template<unsigned int Precision>
const bool amp::operator> ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 623 of file amp.h.

624  {
625  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>0;
626  }

◆ operator>() [2/2]

template<unsigned int Precision>
bool amp::operator> ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 1634 of file svd_si.h.

1635  {
1636  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>0;
1637  }

◆ operator>=() [1/2]

template<unsigned int Precision>
const bool amp::operator>= ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 635 of file amp.h.

636  {
637  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>=0;
638  }

◆ operator>=() [2/2]

template<unsigned int Precision>
bool amp::operator>= ( const ampf< Precision > &  op1,
const ampf< Precision > &  op2 
)

Definition at line 1646 of file svd_si.h.

1647  {
1648  return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>=0;
1649  }

◆ pow()

template<unsigned int Precision>
const ampf< Precision > amp::pow ( const ampf< Precision > &  x,
const ampf< Precision > &  y 
)

Definition at line 1063 of file amp.h.

1064  {
1065  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1066  mpfr_pow(v->value, x.getReadPtr(), y.getReadPtr(), GMP_RNDN);
1067  return v;
1068  }
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ round() [1/2]

template<unsigned int Precision>
const signed long amp::round ( const ampf< Precision > &  x)

Definition at line 804 of file amp.h.

805  {
806  ampf<Precision> tmp;
807  signed long r;
808  mpfr_round(tmp.getWritePtr(), x.getReadPtr());
809  if( mpfr_integer_p(tmp.getReadPtr())==0 )
810  throw invalidConversion();
811  mpfr_clear_erangeflag();
812  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
813  if( mpfr_erangeflag_p()!=0 )
814  throw invalidConversion();
815  return r;
816  }
Variable x
Definition: cfModGcd.cc:4023

◆ round() [2/2]

template<unsigned int Precision>
signed long amp::round ( const ampf< Precision > &  x)

Definition at line 1821 of file svd_si.h.

1822  {
1823  ampf<Precision> tmp;
1824  signed long r;
1825  mpfr_round(tmp.getWritePtr(), x.getReadPtr());
1826  if( mpfr_integer_p(tmp.getReadPtr())==0 )
1827  //throw invalidConversion();
1828  WerrorS("internalError");
1829  mpfr_clear_erangeflag();
1830  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
1831  if( mpfr_erangeflag_p()!=0 )
1832  //throw invalidConversion();
1833  WerrorS("internalError");
1834  return r;
1835  }
void WerrorS(const char *s)
Definition: feFopen.cc:24
Variable x
Definition: cfModGcd.cc:4023

◆ sign() [1/2]

template<unsigned int Precision>
const int amp::sign ( const ampf< Precision > &  x)

Definition at line 703 of file amp.h.

704  {
705  int s = mpfr_sgn(x.getReadPtr());
706  if( s>0 )
707  return +1;
708  if( s<0 )
709  return -1;
710  return 0;
711  }
const CanonicalForm int s
Definition: facAbsFact.cc:55
Variable x
Definition: cfModGcd.cc:4023

◆ sign() [2/2]

template<unsigned int Precision>
int amp::sign ( const ampf< Precision > &  x)

Definition at line 1714 of file svd_si.h.

1715  {
1716  int s = mpfr_sgn(x.getReadPtr());
1717  if( s>0 )
1718  return +1;
1719  if( s<0 )
1720  return -1;
1721  return 0;
1722  }
const CanonicalForm int s
Definition: facAbsFact.cc:55
Variable x
Definition: cfModGcd.cc:4023

◆ sin()

template<unsigned int Precision>
const ampf< Precision > amp::sin ( const ampf< Precision > &  x)

Definition at line 951 of file amp.h.

952  {
953  mpfr_record *v = mpfr_storage::newMpfr(Precision);
954  mpfr_sin(v->value, x.getReadPtr(), GMP_RNDN);
955  return v;
956  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ sinh()

template<unsigned int Precision>
const ampf< Precision > amp::sinh ( const ampf< Precision > &  x)

Definition at line 1039 of file amp.h.

1040  {
1041  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1042  mpfr_sinh(v->value, x.getReadPtr(), GMP_RNDN);
1043  return v;
1044  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ sqr()

template<unsigned int Precision>
const ampf< Precision > amp::sqr ( const ampf< Precision > &  x)

Definition at line 694 of file amp.h.

695  {
696  // TODO: optimize temporary for return value
697  ampf<Precision> res;
698  mpfr_sqr(res.getWritePtr(), x.getReadPtr(), GMP_RNDN);
699  return res;
700  }
CanonicalForm res
Definition: facAbsFact.cc:64
Variable x
Definition: cfModGcd.cc:4023

◆ sqrt()

template<unsigned int Precision>
const ampf< Precision > amp::sqrt ( const ampf< Precision > &  x)

Definition at line 741 of file amp.h.

742  {
743  // TODO: optimize temporary for return value
744  ampf<Precision> res;
745  mpfr_sqrt(res.getWritePtr(), x.getReadPtr(), GMP_RNDN);
746  return res;
747  }
CanonicalForm res
Definition: facAbsFact.cc:64
Variable x
Definition: cfModGcd.cc:4023

◆ tan()

template<unsigned int Precision>
const ampf< Precision > amp::tan ( const ampf< Precision > &  x)

Definition at line 967 of file amp.h.

968  {
969  mpfr_record *v = mpfr_storage::newMpfr(Precision);
970  mpfr_tan(v->value, x.getReadPtr(), GMP_RNDN);
971  return v;
972  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ tanh()

template<unsigned int Precision>
const ampf< Precision > amp::tanh ( const ampf< Precision > &  x)

Definition at line 1055 of file amp.h.

1056  {
1057  mpfr_record *v = mpfr_storage::newMpfr(Precision);
1058  mpfr_tanh(v->value, x.getReadPtr(), GMP_RNDN);
1059  return v;
1060  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
Variable x
Definition: cfModGcd.cc:4023

◆ trunc() [1/2]

template<unsigned int Precision>
const signed long amp::trunc ( const ampf< Precision > &  x)

Definition at line 750 of file amp.h.

751  {
752  ampf<Precision> tmp;
753  signed long r;
754  mpfr_trunc(tmp.getWritePtr(), x.getReadPtr());
755  if( mpfr_integer_p(tmp.getReadPtr())==0 )
756  throw invalidConversion();
757  mpfr_clear_erangeflag();
758  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
759  if( mpfr_erangeflag_p()!=0 )
760  throw invalidConversion();
761  return r;
762  }
Variable x
Definition: cfModGcd.cc:4023

◆ trunc() [2/2]

template<unsigned int Precision>
signed long amp::trunc ( const ampf< Precision > &  x)

Definition at line 1761 of file svd_si.h.

1762  {
1763  ampf<Precision> tmp;
1764  signed long r;
1765  mpfr_trunc(tmp.getWritePtr(), x.getReadPtr());
1766  if( mpfr_integer_p(tmp.getReadPtr())==0 )
1767  //throw invalidConversion();
1768  WerrorS("internalError");
1769  mpfr_clear_erangeflag();
1770  r = mpfr_get_si(tmp.getReadPtr(), GMP_RNDN);
1771  if( mpfr_erangeflag_p()!=0 )
1772  //throw invalidConversion();
1773  WerrorS("internalError");
1774  return r;
1775  }
void WerrorS(const char *s)
Definition: feFopen.cc:24
Variable x
Definition: cfModGcd.cc:4023

◆ twopi()

template<unsigned int Precision>
const ampf< Precision > amp::twopi ( )

Definition at line 942 of file amp.h.

943  {
944  mpfr_record *v = mpfr_storage::newMpfr(Precision);
945  mpfr_const_pi(v->value, GMP_RNDN);
946  mpfr_mul_2si(v->value, v->value, +1, GMP_RNDN);
947  return v;
948  }
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37

◆ vAdd() [1/2]

template<unsigned int Precision>
void amp::vAdd ( ap::raw_vector< ampf< Precision > >  vDst,
ap::const_raw_vector< ampf< Precision > >  vSrc 
)

Definition at line 1380 of file amp.h.

1381  {
1383  int i, cnt = vDst.GetLength();
1384  ampf<Precision> *pDst = vDst.GetData();
1385  const ampf<Precision> *pSrc = vSrc.GetData();
1386  for(i=0; i<cnt; i++)
1387  {
1388  mpfr_ptr v = pDst->getWritePtr();
1389  mpfr_srcptr vs = pSrc->getReadPtr();
1390  mpfr_add(v, v, vs, GMP_RNDN);
1391  pDst += vDst.GetStep();
1392  pSrc += vSrc.GetStep();
1393  }
1394  }
int GetLength() const
Definition: ap.h:145
static void make_assertion(bool bClause)
Definition: ap.h:49
T * GetData()
Definition: ap.h:172
const T * GetData() const
Definition: ap.h:142
int i
Definition: cfEzgcd.cc:125
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int GetStep() const
Definition: ap.h:148

◆ vAdd() [2/2]

template<unsigned int Precision, class T2 >
void amp::vAdd ( ap::raw_vector< ampf< Precision > >  vDst,
ap::const_raw_vector< ampf< Precision > >  vSrc,
T2  alpha 
)

Definition at line 1397 of file amp.h.

1398  {
1400  int i, cnt = vDst.GetLength();
1401  ampf<Precision> *pDst = vDst.GetData();
1402  const ampf<Precision> *pSrc = vSrc.GetData();
1403  ampf<Precision> a(alpha), tmp;
1404  for(i=0; i<cnt; i++)
1405  {
1406  mpfr_ptr v = pDst->getWritePtr();
1407  mpfr_srcptr vs = pSrc->getReadPtr();
1408  mpfr_mul(tmp.getWritePtr(), a.getReadPtr(), vs, GMP_RNDN);
1409  mpfr_add(v, v, tmp.getWritePtr(), GMP_RNDN);
1410  pDst += vDst.GetStep();
1411  pSrc += vSrc.GetStep();
1412  }
1413  }
int GetLength() const
Definition: ap.h:145
Variable alpha
Definition: facAbsBiFact.cc:52
static void make_assertion(bool bClause)
Definition: ap.h:49
T * GetData()
Definition: ap.h:172
const T * GetData() const
Definition: ap.h:142
int i
Definition: cfEzgcd.cc:125
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int GetStep() const
Definition: ap.h:148

◆ vMove() [1/2]

template<unsigned int Precision>
void amp::vMove ( ap::raw_vector< ampf< Precision > >  vDst,
ap::const_raw_vector< ampf< Precision > >  vSrc 
)

Definition at line 1328 of file amp.h.

1329  {
1331  int i, cnt = vDst.GetLength();
1332  ampf<Precision> *pDst = vDst.GetData();
1333  const ampf<Precision> *pSrc = vSrc.GetData();
1334  if( pDst==pSrc )
1335  return;
1336  for(i=0; i<cnt; i++)
1337  {
1338  *pDst = *pSrc;
1339  pDst += vDst.GetStep();
1340  pSrc += vSrc.GetStep();
1341  }
1342  }
int GetLength() const
Definition: ap.h:145
static void make_assertion(bool bClause)
Definition: ap.h:49
T * GetData()
Definition: ap.h:172
const T * GetData() const
Definition: ap.h:142
int i
Definition: cfEzgcd.cc:125
int GetStep() const
Definition: ap.h:148

◆ vMove() [2/2]

template<unsigned int Precision, class T2 >
void amp::vMove ( ap::raw_vector< ampf< Precision > >  vDst,
ap::const_raw_vector< ampf< Precision > >  vSrc,
T2  alpha 
)

Definition at line 1362 of file amp.h.

1363  {
1365  int i, cnt = vDst.GetLength();
1366  ampf<Precision> *pDst = vDst.GetData();
1367  const ampf<Precision> *pSrc = vSrc.GetData();
1368  ampf<Precision> a(alpha);
1369  for(i=0; i<cnt; i++)
1370  {
1371  *pDst = *pSrc;
1372  mpfr_ptr v = pDst->getWritePtr();
1373  mpfr_mul(v, v, a.getReadPtr(), GMP_RNDN);
1374  pDst += vDst.GetStep();
1375  pSrc += vSrc.GetStep();
1376  }
1377  }
int GetLength() const
Definition: ap.h:145
Variable alpha
Definition: facAbsBiFact.cc:52
static void make_assertion(bool bClause)
Definition: ap.h:49
T * GetData()
Definition: ap.h:172
const T * GetData() const
Definition: ap.h:142
int i
Definition: cfEzgcd.cc:125
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int GetStep() const
Definition: ap.h:148

◆ vMoveNeg()

template<unsigned int Precision>
void amp::vMoveNeg ( ap::raw_vector< ampf< Precision > >  vDst,
ap::const_raw_vector< ampf< Precision > >  vSrc 
)

Definition at line 1345 of file amp.h.

1346  {
1348  int i, cnt = vDst.GetLength();
1349  ampf<Precision> *pDst = vDst.GetData();
1350  const ampf<Precision> *pSrc = vSrc.GetData();
1351  for(i=0; i<cnt; i++)
1352  {
1353  *pDst = *pSrc;
1354  mpfr_ptr v = pDst->getWritePtr();
1355  mpfr_neg(v, v, GMP_RNDN);
1356  pDst += vDst.GetStep();
1357  pSrc += vSrc.GetStep();
1358  }
1359  }
int GetLength() const
Definition: ap.h:145
static void make_assertion(bool bClause)
Definition: ap.h:49
T * GetData()
Definition: ap.h:172
const T * GetData() const
Definition: ap.h:142
int i
Definition: cfEzgcd.cc:125
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int GetStep() const
Definition: ap.h:148

◆ vMul()

template<unsigned int Precision, class T2 >
void amp::vMul ( ap::raw_vector< ampf< Precision > >  vDst,
T2  alpha 
)

Definition at line 1439 of file amp.h.

1440  {
1441  int i, cnt = vDst.GetLength();
1442  ampf<Precision> *pDst = vDst.GetData();
1443  ampf<Precision> a(alpha);
1444  for(i=0; i<cnt; i++)
1445  {
1446  mpfr_ptr v = pDst->getWritePtr();
1447  mpfr_mul(v, a.getReadPtr(), v, GMP_RNDN);
1448  pDst += vDst.GetStep();
1449  }
1450  }
int GetLength() const
Definition: ap.h:145
Variable alpha
Definition: facAbsBiFact.cc:52
T * GetData()
Definition: ap.h:172
int i
Definition: cfEzgcd.cc:125
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int GetStep() const
Definition: ap.h:148

◆ vSub() [1/2]

template<unsigned int Precision>
void amp::vSub ( ap::raw_vector< ampf< Precision > >  vDst,
ap::const_raw_vector< ampf< Precision > >  vSrc 
)

Definition at line 1416 of file amp.h.

1417  {
1419  int i, cnt = vDst.GetLength();
1420  ampf<Precision> *pDst = vDst.GetData();
1421  const ampf<Precision> *pSrc = vSrc.GetData();
1422  for(i=0; i<cnt; i++)
1423  {
1424  mpfr_ptr v = pDst->getWritePtr();
1425  mpfr_srcptr vs = pSrc->getReadPtr();
1426  mpfr_sub(v, v, vs, GMP_RNDN);
1427  pDst += vDst.GetStep();
1428  pSrc += vSrc.GetStep();
1429  }
1430  }
int GetLength() const
Definition: ap.h:145
static void make_assertion(bool bClause)
Definition: ap.h:49
T * GetData()
Definition: ap.h:172
const T * GetData() const
Definition: ap.h:142
int i
Definition: cfEzgcd.cc:125
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int GetStep() const
Definition: ap.h:148

◆ vSub() [2/2]

template<unsigned int Precision, class T2 >
void amp::vSub ( ap::raw_vector< ampf< Precision > >  vDst,
ap::const_raw_vector< ampf< Precision > >  vSrc,
T2  alpha 
)

Definition at line 1433 of file amp.h.

1434  {
1435  vAdd(vDst, vSrc, -alpha);
1436  }
Variable alpha
Definition: facAbsBiFact.cc:52
void vAdd(ap::raw_vector< ampf< Precision > > vDst, ap::const_raw_vector< ampf< Precision > > vSrc, T2 alpha)
Definition: amp.h:1397