mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
fix
This commit is contained in:
parent
1815376ef5
commit
a2176b722d
1 changed files with 2 additions and 2 deletions
|
@ -84,8 +84,8 @@ static inline double decode_half(unsigned short half) {
|
|||
int exp1 = (half >> 10) & 0x1f;
|
||||
int mant = half & 0x3ff;
|
||||
double val;
|
||||
if (exp1 == 0) val = ldexp1(mant, -24);
|
||||
else if (exp1 != 31) val = ldexp1(mant + 1024, exp1 - 25);
|
||||
if (exp1 == 0) val = ldexp(mant, -24);
|
||||
else if (exp1 != 31) val = ldexp(mant + 1024, exp1 - 25);
|
||||
else val = mant == 0 ? INFINITY : NAN;
|
||||
return (half & 0x8000) ? -val : val;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue