Commit c25b469e authored by dauncey's avatar dauncey

blah

parent 14af9873
......@@ -36,15 +36,15 @@ public:
d=d>>(19-fBit);
}
assert(d<(1<<fBit));
assert(d<(uint32_t(1)<<fBit));
if(d<(1<<fMan)) {
if(d<(uint32_t(1)<<fMan)) {
fDatum=d;
return;
}
for(unsigned i(1);i<(1<<fExp);i++) {
if(d<(1<<(fMan+1))) {
for(unsigned i(1);i<(uint32_t(1)<<fExp);i++) {
if(d<(uint32_t(1)<<(fMan+1))) {
fDatum=d-(1<<fMan)+(i<<fMan);
return;
}
......@@ -61,9 +61,9 @@ public:
uint32_t unpack() const {
unsigned e(fDatum>>fMan);
assert(e<(1<<fExp));
assert(e<(uint32_t(1)<<fExp));
unsigned m(fDatum-(e<<fMan));
assert(m<(1<<fMan));
assert(m<(uint32_t(1)<<fMan));
if(e==0) return m<<(19-fBit);
m+=(1<<fMan);
......
......@@ -22,7 +22,7 @@ public:
}
void pack(uint32_t d) {
if(d<(1<<fMax)) {
if(d<(uint32_t(1)<<fMax)) {
//if(fMin==0) fDatum=d;
//else fDatum=(d+(1<<(fMin-1)))/(1<<fMin);
fDatum=d>>fMin;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment