daily update on 20230713 by nitload youmu, linkedlistbug fixed

This commit is contained in:
Nitload
2023-07-13 06:35:38 +08:00
parent 2a78a60358
commit 01d1b7e7ef
88 changed files with 1388 additions and 1159 deletions
+4
View File
@@ -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);
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -29,7 +29,7 @@
}
if (x == 1 && y == 0)
{
return 1.0f / 0;
return float.PositiveInfinity;
}
z = Calc.Log(x) * y;