better float trickery

This commit is contained in:
Richard Thier 2023-04-18 18:45:56 +02:00
parent fc3f4d5cfe
commit 3a2f2d326b

View File

@ -411,14 +411,16 @@ static inline TSU8 ts_radixi(
k.f = (float)(arr[i].u);
/* 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! */
return (TSU8)k.u;
}
if(isfloat) {
/* Sign bit can be 1! */
k.f = (float) (arr[i].f);
k.f = arr[i].f;
/* 8 bit float */
k.u >> 24;