better float trickery
This commit is contained in:
parent
fc3f4d5cfe
commit
3a2f2d326b
@ -411,14 +411,16 @@ static inline TSU8 ts_radixi(
|
|||||||
k.f = (float)(arr[i].u);
|
k.f = (float)(arr[i].u);
|
||||||
|
|
||||||
/* 8 bit float */
|
/* 8 bit float */
|
||||||
k.u >> 24;
|
/* top bit always zero so ignore it and use 8 useful bits */
|
||||||
|
/* - this is why we shift 23 and not 24 here */
|
||||||
|
k.u >> 23;
|
||||||
|
|
||||||
/* We are fine! */
|
/* We are fine! */
|
||||||
return (TSU8)k.u;
|
return (TSU8)k.u;
|
||||||
}
|
}
|
||||||
if(isfloat) {
|
if(isfloat) {
|
||||||
/* Sign bit can be 1! */
|
/* Sign bit can be 1! */
|
||||||
k.f = (float) (arr[i].f);
|
k.f = arr[i].f;
|
||||||
|
|
||||||
/* 8 bit float */
|
/* 8 bit float */
|
||||||
k.u >> 24;
|
k.u >> 24;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user