mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 06:03:51 +00:00
Don't care about previous values.
This commit is contained in:
parent
1c47e22eca
commit
39c1b20184
@ -155,18 +155,12 @@ static const char* RealToString( double val, bool separator )
|
|||||||
|
|
||||||
tracy_force_inline float log2fast( float x )
|
tracy_force_inline float log2fast( float x )
|
||||||
{
|
{
|
||||||
float y, f;
|
|
||||||
int e;
|
int e;
|
||||||
f = frexpf( fabsf( x ), &e );
|
auto f = frexpf( fabsf( x ), &e );
|
||||||
y = 1.23149591368684f;
|
auto t0 = 1.23149591368684f * f - 4.11852516267426f;
|
||||||
y *= f;
|
auto t1 = t0 * f + 6.02197014179219f;
|
||||||
y += -4.11852516267426f;
|
auto t2 = t1 * f - 3.13396450166353f;
|
||||||
y *= f;
|
return t2 + e;
|
||||||
y += 6.02197014179219f;
|
|
||||||
y *= f;
|
|
||||||
y += -3.13396450166353f;
|
|
||||||
y += e;
|
|
||||||
return y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const float i10 = 1.f / log2f( 10 );
|
static const float i10 = 1.f / log2f( 10 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user