24#include "MdcRecoUtil/ComPackSignedExpFloat.h"
36 _packer(nbits-1,maxexponent,invert?maxval:0.0,
37 invert?0.0:maxval, center),
38 _signbit(1<<nbits-1),_signmask(~(1<<nbits-1))
50 _packer.
pack(fabs(value),packdata);
53 packdata &= _signmask;
63 _packer.
unpack(packdata,value);
66 else if(packdata&_signbit)
73 os <<
"Signed exponential packer using exponential packer as follows:"<<endl;
virtual StatusCode unpack(const d_ULong, double &) const
virtual StatusCode pack(const double, d_ULong &) const
void print(std::ostream &os) const
virtual StatusCode unpack(const d_ULong, double &) const
ComPackSignedExpFloat(unsigned nbits, unsigned maxexponent, double maxval, bool invert=false, bool center=false)
void print(std::ostream &s=std::cout) const
virtual ~ComPackSignedExpFloat()
virtual StatusCode pack(const double, d_ULong &) const