Misc Stuff 5 (#63)

* name item 31 to 34

* name item 25 to 29

* decompile PassengerManager (95%)

* started cargo manager

* local attribute

* passenger/cargo manager ov001 functions

* name item manager functions

* fix build issues & more docs on 027e0cd8

* format
This commit is contained in:
Yanis
2026-05-11 17:27:59 +02:00
committed by GitHub
parent 645ed65b76
commit 0f74fd4201
82 changed files with 1838 additions and 878 deletions
+8 -8
View File
@@ -71,13 +71,13 @@ static double
ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */
two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
static double zero = 0.0;
@@ -105,7 +105,7 @@ double x;
return (x - x) / zero;
} /* log(-#) = NaN */
k -= 54;
x *= two54; /* subnormal number, scale up x */
x *= two54; /* subnormal number, scale up x */
hx = __HI(x); /* high word of x */
}
if (hx >= 0x7ff00000) {
+1 -1
View File
@@ -83,7 +83,7 @@ double x;
return (x - x) / zero;
} /* log(-#) = NaN */
k -= 54;
x *= two54; /* subnormal number, scale up x */
x *= two54; /* subnormal number, scale up x */
hx = __HI(x); /* high word of x */
}
if (hx >= 0x7ff00000) {
+24 -24
View File
@@ -75,31 +75,31 @@ static double
{
0.0,
1.35003920212974897128e-08,
}, /* 0x3E4CFDEB, 0x43CFD006 */
}, /* 0x3E4CFDEB, 0x43CFD006 */
zero = 0.0, one = 1.0, two = 2.0, two53 = 9007199254740992.0, /* 0x43400000, 0x00000000 */
big = 1.0e300, tiny = 1.0e-300,
/* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
L1 = 5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */
L2 = 4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */
L3 = 3.33333329818377432918e-01, /* 0x3FD55555, 0x518F264D */
L4 = 2.72728123808534006489e-01, /* 0x3FD17460, 0xA91D4101 */
L5 = 2.30660745775561754067e-01, /* 0x3FCD864A, 0x93C9DB65 */
L6 = 2.06975017800338417784e-01, /* 0x3FCA7E28, 0x4A454EEF */
P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */
L1 = 5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */
L2 = 4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */
L3 = 3.33333329818377432918e-01, /* 0x3FD55555, 0x518F264D */
L4 = 2.72728123808534006489e-01, /* 0x3FD17460, 0xA91D4101 */
L5 = 2.30660745775561754067e-01, /* 0x3FCD864A, 0x93C9DB65 */
L6 = 2.06975017800338417784e-01, /* 0x3FCA7E28, 0x4A454EEF */
P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */
P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */
P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
P5 = 4.13813679705723846039e-08, /* 0x3E663769, 0x72BEA4D0 */
lg2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
lg2_h = 6.93147182464599609375e-01, /* 0x3FE62E43, 0x00000000 */
P5 = 4.13813679705723846039e-08, /* 0x3E663769, 0x72BEA4D0 */
lg2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
lg2_h = 6.93147182464599609375e-01, /* 0x3FE62E43, 0x00000000 */
lg2_l = -1.90465429995776804525e-09, /* 0xBE205C61, 0x0CA86C39 */
ovt = 8.0085662595372944372e-0017, /* -(1024-log2(ovfl+.5ulp)) */
cp = 9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */
cp_h = 9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */
cp = 9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */
cp_h = 9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */
cp_l = -7.02846165095275826516e-09, /* 0xBE3E2FE0, 0x145B01F5 =tail of cp_h*/
ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */
ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */
ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
#ifdef __STDC__
double __ieee754_pow(double x, double y)
@@ -165,7 +165,7 @@ double x, y;
/* y is +-inf */
if (((ix - 0x3ff00000) | lx) == 0) {
return y - y; /* inf**+-1 is NaN */
return y - y; /* inf**+-1 is NaN */
} else if (ix >= 0x3ff00000) { /* (|x|>1)**+-inf = inf,0 */
return (hy >= 0) ? y : zero;
} else { /* (|x|<1)**-,+inf = inf,0 */
@@ -184,7 +184,7 @@ double x, y;
return x * x; /* y is 2 */
}
if (hy == 0x3fe00000) { /* y is 0.5 */
if (hx >= 0) { /* x >= +0 */
if (hx >= 0) { /* x >= +0 */
return sqrt(x);
}
}
@@ -218,7 +218,7 @@ double x, y;
}
/* |y| is big */
if (iy > 0x41e00000) { /* if |y| > 2**31 */
if (iy > 0x41e00000) { /* if |y| > 2**31 */
if (iy > 0x43f00000) { /* if |y| > 2**64, must o/uflow */
if (ix <= 0x3fefffff) {
return (hy < 0) ? big * big : tiny * tiny;
@@ -315,17 +315,17 @@ double x, y;
z = p_l + p_h;
j = __HI(z);
i = __LO(z);
if (j >= 0x40900000) { /* z >= 1024 */
if (j >= 0x40900000) { /* z >= 1024 */
if (((j - 0x40900000) | i) != 0) { /* if z > 1024 */
return s * big * big; /* overflow */
return s * big * big; /* overflow */
} else {
if (p_l + ovt > z - p_h) {
return s * big * big; /* overflow */
}
}
} else if ((j & 0x7fffffff) >= 0x4090cc00) { /* z <= -1075 */
if (((j - 0xc090cc00) | i) != 0) { /* z < -1075 */
return s * tiny * tiny; /* underflow */
if (((j - 0xc090cc00) | i) != 0) { /* z < -1075 */
return s * tiny * tiny; /* underflow */
} else {
if (p_l <= z - p_h) {
return s * tiny * tiny; /* underflow */
+1 -1
View File
@@ -41,7 +41,7 @@ double x;
i1 = __LO(x);
j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
if (j0 < 20) {
if (j0 < 0) { /* raise inexact if x != 0 */
if (j0 < 0) { /* raise inexact if x != 0 */
if (huge + x > 0.0) { /* return 0*sign(x) if |x|<1 */
if (i0 < 0) {
i0 = 0x80000000;
+2 -2
View File
@@ -27,7 +27,7 @@ double ldexp(double x, int n) {
hx = __HI(x);
lx = __LO(x);
k = (hx & 0x7ff00000) >> 20; /* extract exponent */
if (k == 0) { /* 0 or subnormal x */
if (k == 0) { /* 0 or subnormal x */
if ((lx | (hx & 0x7fffffff)) == 0) {
return x; /* +-0 */
}
@@ -51,7 +51,7 @@ double ldexp(double x, int n) {
return x;
}
if (k <= -54) {
if (n > 50000) { /* in case integer overflow in n+k */
if (n > 50000) { /* in case integer overflow in n+k */
return big * copysign(big, x); /*overflow*/
} else {
return tiny * copysign(tiny, x); /*underflow*/