daily update on 20230713 by nitload youmu, linkedlistbug fixed
This commit is contained in:
@@ -39,6 +39,10 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* define z = n * 2 ^ m
|
||||
* n is between 0 and 0.5
|
||||
*/
|
||||
uint zBit = *(uint*)&z;
|
||||
uint zBitAbs = zBit & 0b_0111_1111_1111_1111_1111_1111_1111_1111;
|
||||
uint uintm = (zBitAbs >> 23);
|
||||
|
||||
@@ -34,15 +34,15 @@ namespace StgSharp.Math
|
||||
}
|
||||
uint input = *(uint*)&x;
|
||||
|
||||
uint f = input;
|
||||
int f = (int)input;
|
||||
f >>= 23;
|
||||
f -= 127;
|
||||
input <<= 9;
|
||||
input >>= 9;
|
||||
input += 0b_0011_1111_1000_0000_0000_0000_0000_0000;
|
||||
float result = *(float*)&input;
|
||||
int order = (int)(result * 100) - 100;
|
||||
|
||||
uint order = (uint)(result * 100) - 100;
|
||||
|
||||
float cache = (result) / (1f + 0.01f * order) - 1;
|
||||
result = cache * -0.25f + 0.3333333333333f;
|
||||
result = result * cache - 0.5f;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
}
|
||||
if (x == 1 && y == 0)
|
||||
{
|
||||
return 1.0f / 0;
|
||||
return float.PositiveInfinity;
|
||||
}
|
||||
z = Calc.Log(x) * y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user