CoCoALib-0.9905 date: 23 May 2007


CoCoA::SmallFpLogImpl Class Reference

#include <SmallFpLogImpl.H>

Collaboration diagram for CoCoA::SmallFpLogImpl:

Collaboration graph
[legend]
List of all members.

Public Types

typedef SmallFpLogElem_t value_t

Public Member Functions

 SmallFpLogImpl (unsigned long p)
 SmallFpLogImpl (const ZZ &P)
void myAssignZero (value_t &lhs) const
 lhs = 0
void myAssign (value_t &lhs, value_t x) const
 lhs = x
void myAssign (value_t &lhs, long n) const
 lhs = n
void myAssign (value_t &lhs, const ZZ &N) const
 lhs = N
void myNegate (value_t &lhs, value_t x) const
 lhs = -x
void myAdd (value_t &lhs, value_t x, value_t y) const
 lhs = x+y
void mySub (value_t &lhs, value_t x, value_t y) const
 lhs = x-y
void myMul (value_t &lhs, value_t x, value_t y) const
 lhs = x*y
void myDiv (value_t &lhs, value_t x, value_t y) const
 lhs = x/y
bool myIsDivisible (value_t &lhs, value_t x, value_t y) const
 lhs = x/y, if y is non-zero
void myPower (value_t &lhs, value_t x, unsigned long n) const
 lhs = x^n
void myOutput (std::ostream &out, value_t x) const
 out << x
void myOutput (OpenMathOutput &OMOut, value_t x) const
 OMOut << x.
bool myIsPrintAtom (value_t x) const
bool myIsPrintedWithMinus (value_t x) const
bool myIsZero (value_t x) const
 x == 0
bool myIsOne (value_t x) const
 x == 1
bool myIsMinusOne (value_t x) const
 x == -1
bool myIsInteger (ZZ &N, value_t x) const
 copy value of x into n, result is always true
bool myIsZeroAddMul (value_t &lhs, value_t y, value_t z) const
bool myIsEqual (value_t x, value_t y) const

Static Public Attributes

static const std::size_t DatumSize = sizeof(value_t)

Private Types

typedef unsigned short FpTableElem

Private Member Functions

 SmallFpLogImpl (const SmallFpLogImpl &)
SmallFpLogImploperator= (const SmallFpLogImpl &)
value_t myReduceMod (value_t n) const
void myCtorBody ()

Static Private Member Functions

static value_t CheckCtorArg (unsigned long p)
static value_t CheckCtorArg (const ZZ &P)
static value_t CalcDrop (value_t p)
static value_t CalcIterLimit (value_t p)

Private Attributes

const value_t myModulus
const value_t myDrop
const value_t myIterLimit
const value_t myRoot
std::vector< FpTableElemmyLog
std::vector< FpTableElemmyExp

Detailed Description

Definition at line 43 of file SmallFpLogImpl.H.


Member Typedef Documentation

typedef SmallFpLogElem_t CoCoA::SmallFpLogImpl::value_t
 

Definition at line 53 of file SmallFpLogImpl.H.

typedef unsigned short CoCoA::SmallFpLogImpl::FpTableElem [private]
 

Definition at line 84 of file SmallFpLogImpl.H.


Constructor & Destructor Documentation

CoCoA::SmallFpLogImpl::SmallFpLogImpl unsigned long  p  ) 
 

CoCoA::SmallFpLogImpl::SmallFpLogImpl const ZZ P  ) 
 

CoCoA::SmallFpLogImpl::SmallFpLogImpl const SmallFpLogImpl  )  [private]
 


Member Function Documentation

SmallFpLogImpl& CoCoA::SmallFpLogImpl::operator= const SmallFpLogImpl  )  [private]
 

void CoCoA::SmallFpLogImpl::myAssignZero value_t lhs  )  const [inline]
 

lhs = 0

Definition at line 114 of file SmallFpLogImpl.H.

void CoCoA::SmallFpLogImpl::myAssign value_t lhs,
value_t  x
const [inline]
 

lhs = x

Definition at line 120 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

void CoCoA::SmallFpLogImpl::myAssign value_t lhs,
long  n
const [inline]
 

lhs = n

Definition at line 127 of file SmallFpLogImpl.H.

References myModulus.

void CoCoA::SmallFpLogImpl::myAssign value_t lhs,
const ZZ N
const [inline]
 

lhs = N

Definition at line 135 of file SmallFpLogImpl.H.

References CoCoA::mpzref(), and myModulus.

void CoCoA::SmallFpLogImpl::myNegate value_t lhs,
value_t  x
const [inline]
 

lhs = -x

Definition at line 141 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

void CoCoA::SmallFpLogImpl::myAdd value_t lhs,
value_t  x,
value_t  y
const [inline]
 

lhs = x+y

Definition at line 149 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

void CoCoA::SmallFpLogImpl::mySub value_t lhs,
value_t  x,
value_t  y
const [inline]
 

lhs = x-y

Definition at line 158 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

void CoCoA::SmallFpLogImpl::myMul value_t lhs,
value_t  x,
value_t  y
const [inline]
 

lhs = x*y

Definition at line 167 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, myExp, myLog, and myModulus.

void CoCoA::SmallFpLogImpl::myDiv value_t lhs,
value_t  x,
value_t  y
const [inline]
 

lhs = x/y

Definition at line 176 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, myExp, myIsZero(), myLog, and myModulus.

Referenced by myIsDivisible().

bool CoCoA::SmallFpLogImpl::myIsDivisible value_t lhs,
value_t  x,
value_t  y
const [inline]
 

lhs = x/y, if y is non-zero

Definition at line 186 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, myDiv(), and myModulus.

void CoCoA::SmallFpLogImpl::myPower value_t lhs,
value_t  x,
unsigned long  n
const
 

lhs = x^n

void CoCoA::SmallFpLogImpl::myOutput std::ostream &  out,
value_t  x
const
 

out << x

void CoCoA::SmallFpLogImpl::myOutput OpenMathOutput OMOut,
value_t  x
const
 

OMOut << x.

bool CoCoA::SmallFpLogImpl::myIsPrintAtom value_t  x  )  const [inline]
 

Definition at line 196 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

bool CoCoA::SmallFpLogImpl::myIsPrintedWithMinus value_t  x  )  const [inline]
 

Definition at line 203 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

bool CoCoA::SmallFpLogImpl::myIsZero value_t  x  )  const [inline]
 

x == 0

Definition at line 210 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

Referenced by myDiv(), and myIsZeroAddMul().

bool CoCoA::SmallFpLogImpl::myIsOne value_t  x  )  const [inline]
 

x == 1

Definition at line 217 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

bool CoCoA::SmallFpLogImpl::myIsMinusOne value_t  x  )  const [inline]
 

x == -1

Definition at line 224 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

bool CoCoA::SmallFpLogImpl::myIsInteger ZZ N,
value_t  x
const [inline]
 

copy value of x into n, result is always true

Definition at line 231 of file SmallFpLogImpl.H.

bool CoCoA::SmallFpLogImpl::myIsZeroAddMul value_t lhs,
value_t  y,
value_t  z
const [inline]
 

Definition at line 238 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, myIsZero(), myModulus, and myReduceMod().

bool CoCoA::SmallFpLogImpl::myIsEqual value_t  x,
value_t  y
const [inline]
 

Definition at line 248 of file SmallFpLogImpl.H.

References CoCoA_ASSERT, and myModulus.

SmallFpLogImpl::value_t CoCoA::SmallFpLogImpl::myReduceMod value_t  n  )  const [inline, private]
 

Definition at line 108 of file SmallFpLogImpl.H.

References myModulus.

Referenced by myIsZeroAddMul().

static value_t CoCoA::SmallFpLogImpl::CheckCtorArg unsigned long  p  )  [static, private]
 

static value_t CoCoA::SmallFpLogImpl::CheckCtorArg const ZZ P  )  [static, private]
 

static value_t CoCoA::SmallFpLogImpl::CalcDrop value_t  p  )  [static, private]
 

static value_t CoCoA::SmallFpLogImpl::CalcIterLimit value_t  p  )  [static, private]
 

void CoCoA::SmallFpLogImpl::myCtorBody  )  [private]
 


Member Data Documentation

const std::size_t CoCoA::SmallFpLogImpl::DatumSize = sizeof(value_t) [static]
 

Definition at line 54 of file SmallFpLogImpl.H.

const value_t CoCoA::SmallFpLogImpl::myModulus [private]
 

Definition at line 80 of file SmallFpLogImpl.H.

Referenced by myAdd(), myAssign(), myDiv(), myIsDivisible(), myIsEqual(), myIsMinusOne(), myIsOne(), myIsPrintAtom(), myIsPrintedWithMinus(), myIsZero(), myIsZeroAddMul(), myMul(), myNegate(), myReduceMod(), and mySub().

const value_t CoCoA::SmallFpLogImpl::myDrop [private]
 

Definition at line 81 of file SmallFpLogImpl.H.

const value_t CoCoA::SmallFpLogImpl::myIterLimit [private]
 

Definition at line 82 of file SmallFpLogImpl.H.

const value_t CoCoA::SmallFpLogImpl::myRoot [private]
 

Definition at line 83 of file SmallFpLogImpl.H.

std::vector<FpTableElem> CoCoA::SmallFpLogImpl::myLog [private]
 

Definition at line 85 of file SmallFpLogImpl.H.

Referenced by myDiv(), and myMul().

std::vector<FpTableElem> CoCoA::SmallFpLogImpl::myExp [private]
 

Definition at line 86 of file SmallFpLogImpl.H.

Referenced by myDiv(), and myMul().


The documentation for this class was generated from the following file:
Generated on Wed May 23 13:44:51 2007 for CoCoALib by  doxygen 1.4.6