diff --git a/.gitignore b/.gitignore index dfdfe21..bc29a73 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ lib/musl-gcc.specs .vscode .DS_Store +.c2go.* # Output of the go coverage tool, specifically when used with LiteIDE *.out diff --git a/acos.c.i.go b/acos.c.i.go new file mode 100644 index 0000000..e59162a --- /dev/null +++ b/acos.c.i.go @@ -0,0 +1,93 @@ +package libc + +import unsafe "unsafe" + +var pio2_hi_cgo18_acos float64 = 1.5707963267948966 +var pio2_lo_cgo19_acos float64 = 6.123233995736766e-17 +var pS0_cgo20_acos float64 = 0.16666666666666666 +var pS1_cgo21_acos float64 = -0.32556581862240092 +var pS2_cgo22_acos float64 = 0.20121253213486293 +var pS3_cgo23_acos float64 = -0.040055534500679411 +var pS4_cgo24_acos float64 = 7.9153499428981453e-4 +var pS5_cgo25_acos float64 = 3.4793310759602117e-5 +var qS1_cgo26_acos float64 = -2.4033949117344142 +var qS2_cgo27_acos float64 = 2.0209457602335057 +var qS3_cgo28_acos float64 = -0.68828397160545329 +var qS4_cgo29_acos float64 = 0.077038150555901935 + +func R_cgo30_acos(z float64) float64 { + var p float64 + var q float64 + p = z * (pS0_cgo20_acos + z*(pS1_cgo21_acos+z*(pS2_cgo22_acos+z*(pS3_cgo23_acos+z*(pS4_cgo24_acos+z*pS5_cgo25_acos))))) + q = 1 + z*(qS1_cgo26_acos+z*(qS2_cgo27_acos+z*(qS3_cgo28_acos+z*qS4_cgo29_acos))) + return p / q +} +func Acos(x float64) float64 { + var z float64 + var w float64 + var s float64 + var c float64 + var df float64 + var hx uint32 + var ix uint32 + for { + hx = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_31_acos{x})) >> int32(32)) + if true { + break + } + } + ix = hx & uint32(2147483647) + if ix >= uint32(1072693248) { + var lx uint32 + for { + lx = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_32_acos{x}))) + if true { + break + } + } + if ix-uint32(1072693248)|lx == uint32(0) { + if hx>>int32(31) != 0 { + return float64(int32(2))*pio2_hi_cgo18_acos + float64(7.52316385e-37) + } + return float64(int32(0)) + } + return float64(int32(0)) / (x - x) + } + if ix < uint32(1071644672) { + if ix <= uint32(1012924416) { + return pio2_hi_cgo18_acos + float64(7.52316385e-37) + } + return pio2_hi_cgo18_acos - (x - (pio2_lo_cgo19_acos - x*R_cgo30_acos(x*x))) + } + if hx>>int32(31) != 0 { + z = (1 + x) * 0.5 + s = Sqrt(z) + w = R_cgo30_acos(z)*s - pio2_lo_cgo19_acos + return float64(int32(2)) * (pio2_hi_cgo18_acos - (s + w)) + } + z = (1 - x) * 0.5 + s = Sqrt(z) + df = s + for { + df = *(*float64)(unsafe.Pointer(&_cgoz_33_acos{uint64(*(*uint64)(unsafe.Pointer(&_cgoz_34_acos{df}))>>int32(32))<= uint32(1065353216) { + if ix == uint32(1065353216) { + if hx>>int32(31) != 0 { + return float32(int32(2))*pio2_hi_cgo18_acosf + 7.52316385e-37 + } + return float32(int32(0)) + } + return float32(int32(0)) / (x - x) + } + if ix < uint32(1056964608) { + if ix <= uint32(847249408) { + return pio2_hi_cgo18_acosf + 7.52316385e-37 + } + return pio2_hi_cgo18_acosf - (x - (pio2_lo_cgo19_acosf - x*R_cgo24_acosf(x*x))) + } + if hx>>int32(31) != 0 { + z = (float32(int32(1)) + x) * 0.5 + s = Sqrtf(z) + w = R_cgo24_acosf(z)*s - pio2_lo_cgo19_acosf + return float32(int32(2)) * (pio2_hi_cgo18_acosf - (s + w)) + } + z = (float32(int32(1)) - x) * 0.5 + s = Sqrtf(z) + for { + hx = *(*uint32)(unsafe.Pointer(&_cgoz_26_acosf{s})) + if true { + break + } + } + for { + df = *(*float32)(unsafe.Pointer(&_cgoz_27_acosf{hx & uint32(4294963200)})) + if true { + break + } + } + c = (z - df*df) / (s + df) + w = R_cgo24_acosf(z)*s + c + return float32(int32(2)) * (df + w) +} + +type _cgoz_25_acosf struct { + _f float32 +} +type _cgoz_26_acosf struct { + _f float32 +} +type _cgoz_27_acosf struct { + _i uint32 +} diff --git a/acosh.c.i.go b/acosh.c.i.go new file mode 100644 index 0000000..c7d840c --- /dev/null +++ b/acosh.c.i.go @@ -0,0 +1,19 @@ +package libc + +import unsafe "unsafe" + +func Acosh(x float64) float64 { + type _cgoa_18_acosh struct { + f float64 + } + var u _cgoa_18_acosh + u.f = x + var e uint32 = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + if e < uint32(1024) { + return Log1p(x - float64(int32(1)) + Sqrt((x-float64(int32(1)))*(x-float64(int32(1)))+float64(int32(2))*(x-float64(int32(1))))) + } + if e < uint32(1049) { + return Log(float64(int32(2))*x - float64(int32(1))/(x+Sqrt(x*x-float64(int32(1))))) + } + return Log(x) + 0.69314718055994529 +} diff --git a/acoshf.c.i.go b/acoshf.c.i.go new file mode 100644 index 0000000..5096856 --- /dev/null +++ b/acoshf.c.i.go @@ -0,0 +1,19 @@ +package libc + +import unsafe "unsafe" + +func Acoshf(x float32) float32 { + type _cgoa_18_acoshf struct { + f float32 + } + var u _cgoa_18_acoshf + u.f = x + var a uint32 = *(*uint32)(unsafe.Pointer(&u)) & uint32(2147483647) + if a < uint32(1073741824) { + return Log1pf(x - float32(int32(1)) + Sqrtf((x-float32(int32(1)))*(x-float32(int32(1)))+float32(int32(2))*(x-float32(int32(1))))) + } + if a < uint32(1166016512) { + return Logf(float32(int32(2))*x - float32(int32(1))/(x+Sqrtf(x*x-float32(int32(1))))) + } + return Logf(x) + 0.693147182 +} diff --git a/acoshl.c.i.go b/acoshl.c.i.go new file mode 100644 index 0000000..1898a2c --- /dev/null +++ b/acoshl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Acoshl(x float64) float64 { + return float64(Acosh(float64(x))) +} diff --git a/acosl.c.i.go b/acosl.c.i.go new file mode 100644 index 0000000..f211829 --- /dev/null +++ b/acosl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Acosl(x float64) float64 { + return float64(Acos(float64(x))) +} diff --git a/asin.c.i.go b/asin.c.i.go new file mode 100644 index 0000000..7c8ba26 --- /dev/null +++ b/asin.c.i.go @@ -0,0 +1,92 @@ +package libc + +import unsafe "unsafe" + +var pio2_hi_cgo18_asin float64 = 1.5707963267948966 +var pio2_lo_cgo19_asin float64 = 6.123233995736766e-17 +var pS0_cgo20_asin float64 = 0.16666666666666666 +var pS1_cgo21_asin float64 = -0.32556581862240092 +var pS2_cgo22_asin float64 = 0.20121253213486293 +var pS3_cgo23_asin float64 = -0.040055534500679411 +var pS4_cgo24_asin float64 = 7.9153499428981453e-4 +var pS5_cgo25_asin float64 = 3.4793310759602117e-5 +var qS1_cgo26_asin float64 = -2.4033949117344142 +var qS2_cgo27_asin float64 = 2.0209457602335057 +var qS3_cgo28_asin float64 = -0.68828397160545329 +var qS4_cgo29_asin float64 = 0.077038150555901935 + +func R_cgo30_asin(z float64) float64 { + var p float64 + var q float64 + p = z * (pS0_cgo20_asin + z*(pS1_cgo21_asin+z*(pS2_cgo22_asin+z*(pS3_cgo23_asin+z*(pS4_cgo24_asin+z*pS5_cgo25_asin))))) + q = 1 + z*(qS1_cgo26_asin+z*(qS2_cgo27_asin+z*(qS3_cgo28_asin+z*qS4_cgo29_asin))) + return p / q +} +func Asin(x float64) float64 { + var z float64 + var r float64 + var s float64 + var hx uint32 + var ix uint32 + for { + hx = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_31_asin{x})) >> int32(32)) + if true { + break + } + } + ix = hx & uint32(2147483647) + if ix >= uint32(1072693248) { + var lx uint32 + for { + lx = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_32_asin{x}))) + if true { + break + } + } + if ix-uint32(1072693248)|lx == uint32(0) { + return x*pio2_hi_cgo18_asin + float64(7.52316385e-37) + } + return float64(int32(0)) / (x - x) + } + if ix < uint32(1071644672) { + if ix < uint32(1045430272) && ix >= uint32(1048576) { + return x + } + return x + x*R_cgo30_asin(x*x) + } + z = (float64(int32(1)) - Fabs(x)) * 0.5 + s = Sqrt(z) + r = R_cgo30_asin(z) + if ix >= uint32(1072640819) { + x = pio2_hi_cgo18_asin - (float64(int32(2))*(s+s*r) - pio2_lo_cgo19_asin) + } else { + var f float64 + var c float64 + f = s + for { + f = *(*float64)(unsafe.Pointer(&_cgoz_33_asin{uint64(*(*uint64)(unsafe.Pointer(&_cgoz_34_asin{f}))>>int32(32))<>int32(31) != 0 { + return -x + } + return x +} + +type _cgoz_31_asin struct { + _f float64 +} +type _cgoz_32_asin struct { + _f float64 +} +type _cgoz_33_asin struct { + _i uint64 +} +type _cgoz_34_asin struct { + _f float64 +} diff --git a/asinf.c.i.go b/asinf.c.i.go new file mode 100644 index 0000000..aa61382 --- /dev/null +++ b/asinf.c.i.go @@ -0,0 +1,53 @@ +package libc + +import unsafe "unsafe" + +var pio2_cgo18_asinf float64 = 1.5707963267948966 +var pS0_cgo19_asinf float32 = float32(0.16666586696999999) +var pS1_cgo20_asinf float32 = float32(-0.042743422091000002) +var pS2_cgo21_asinf float32 = float32(-0.0086563630029999998) +var qS1_cgo22_asinf float32 = float32(-0.7066296339) + +func R_cgo23_asinf(z float32) float32 { + var p float32 + var q float32 + p = z * (pS0_cgo19_asinf + z*(pS1_cgo20_asinf+z*pS2_cgo21_asinf)) + q = 1 + z*qS1_cgo22_asinf + return p / q +} +func Asinf(x float32) float32 { + var s float64 + var z float32 + var hx uint32 + var ix uint32 + for { + hx = *(*uint32)(unsafe.Pointer(&_cgoz_24_asinf{x})) + if true { + break + } + } + ix = hx & uint32(2147483647) + if ix >= uint32(1065353216) { + if ix == uint32(1065353216) { + return float32(float64(x)*pio2_cgo18_asinf + float64(7.52316385e-37)) + } + return float32(int32(0)) / (x - x) + } + if ix < uint32(1056964608) { + if ix < uint32(964689920) && ix >= uint32(8388608) { + return x + } + return x + x*R_cgo23_asinf(x*x) + } + z = (float32(int32(1)) - Fabsf(x)) * 0.5 + s = Sqrt(float64(z)) + x = float32(pio2_cgo18_asinf - float64(int32(2))*(s+s*float64(R_cgo23_asinf(z)))) + if hx>>int32(31) != 0 { + return -x + } + return x +} + +type _cgoz_24_asinf struct { + _f float32 +} diff --git a/asinh.c.i.go b/asinh.c.i.go new file mode 100644 index 0000000..7d921c9 --- /dev/null +++ b/asinh.c.i.go @@ -0,0 +1,42 @@ +package libc + +import unsafe "unsafe" + +func Asinh(x float64) float64 { + type _cgoa_18_asinh struct { + f float64 + } + var u _cgoa_18_asinh + u.f = x + var e uint32 = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + var s uint32 = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(63)) + *(*uint64)(unsafe.Pointer(&u)) &= 9223372036854775807 + x = u.f + if e >= uint32(1049) { + x = Log(x) + 0.69314718055994529 + } else if e >= uint32(1024) { + x = Log(float64(int32(2))*x + float64(int32(1))/(Sqrt(x*x+float64(int32(1)))+x)) + } else if e >= uint32(997) { + x = Log1p(x + x*x/(Sqrt(x*x+float64(int32(1)))+float64(int32(1)))) + } else { + for { + if 8 == 4 { + fp_force_evalf(float32(x + float64(1.329228e+36))) + } else if 8 == 8 { + fp_force_eval(x + float64(1.329228e+36)) + } else { + fp_force_evall(float64(x + float64(1.329228e+36))) + } + if true { + break + } + } + } + return func() float64 { + if s != 0 { + return -x + } else { + return x + } + }() +} diff --git a/asinhf.c.i.go b/asinhf.c.i.go new file mode 100644 index 0000000..fd583b5 --- /dev/null +++ b/asinhf.c.i.go @@ -0,0 +1,42 @@ +package libc + +import unsafe "unsafe" + +func Asinhf(x float32) float32 { + type _cgoa_18_asinhf struct { + f float32 + } + var u _cgoa_18_asinhf + u.f = x + var i uint32 = *(*uint32)(unsafe.Pointer(&u)) & uint32(2147483647) + var s uint32 = *(*uint32)(unsafe.Pointer(&u)) >> int32(31) + *(*uint32)(unsafe.Pointer(&u)) = i + x = u.f + if i >= uint32(1166016512) { + x = Logf(x) + 0.693147182 + } else if i >= uint32(1073741824) { + x = Logf(float32(int32(2))*x + float32(int32(1))/(Sqrtf(x*x+float32(int32(1)))+x)) + } else if i >= uint32(964689920) { + x = Log1pf(x + x*x/(Sqrtf(x*x+float32(int32(1)))+float32(int32(1)))) + } else { + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + } + return func() float32 { + if s != 0 { + return -x + } else { + return x + } + }() +} diff --git a/asinhl.c.i.go b/asinhl.c.i.go new file mode 100644 index 0000000..1f6e787 --- /dev/null +++ b/asinhl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Asinhl(x float64) float64 { + return float64(Asinh(float64(x))) +} diff --git a/asinl.c.i.go b/asinl.c.i.go new file mode 100644 index 0000000..aef9986 --- /dev/null +++ b/asinl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Asinl(x float64) float64 { + return float64(Asin(float64(x))) +} diff --git a/atan.c.i.go b/atan.c.i.go new file mode 100644 index 0000000..42a50d1 --- /dev/null +++ b/atan.c.i.go @@ -0,0 +1,124 @@ +package libc + +import unsafe "unsafe" + +var atanhi_cgo18_atan [4]float64 = [4]float64{0.46364760900080609, 0.78539816339744828, 0.98279372324732905, 1.5707963267948966} +var atanlo_cgo19_atan [4]float64 = [4]float64{2.2698777452961687e-17, 3.061616997868383e-17, 1.3903311031230998e-17, 6.123233995736766e-17} +var aT_cgo20_atan [11]float64 = [11]float64{0.33333333333332932, -0.19999999999876483, 0.14285714272503466, -0.11111110405462356, 0.090908871334365065, -0.0769187620504483, 0.066610731373875312, -0.058335701337905735, 0.049768779946159324, -0.036531572744216916, 0.016285820115365782} + +func Atan(x float64) float64 { + var w float64 + var s1 float64 + var s2 float64 + var z float64 + var ix uint32 + var sign uint32 + var id int32 + for { + ix = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_21_atan{x})) >> int32(32)) + if true { + break + } + } + sign = ix >> int32(31) + ix &= uint32(2147483647) + if ix >= uint32(1141899264) { + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + z = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&atanhi_cgo18_atan)))) + uintptr(int32(3))*8)) + float64(7.52316385e-37) + return func() float64 { + if sign != 0 { + return -z + } else { + return z + } + }() + } + if ix < uint32(1071382528) { + if ix < uint32(1044381696) { + if ix < uint32(1048576) { + for { + if 4 == 4 { + fp_force_evalf(float32(x)) + } else if 4 == 8 { + fp_force_eval(float64(float32(x))) + } else { + fp_force_evall(float64(float32(x))) + } + if true { + break + } + } + } + return x + } + id = -1 + } else { + x = Fabs(x) + if ix < uint32(1072889856) { + if ix < uint32(1072037888) { + id = int32(0) + x = (2*x - 1) / (2 + x) + } else { + id = int32(1) + x = (x - 1) / (x + 1) + } + } else if ix < uint32(1073971200) { + id = int32(2) + x = (x - 1.5) / (1 + 1.5*x) + } else { + id = int32(3) + x = -1 / x + } + } + z = x * x + w = z * z + s1 = z * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(0))*8)) + w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(2))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(4))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(6))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(8))*8))+w**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(10))*8))))))) + s2 = w * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(1))*8)) + w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(3))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(5))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(7))*8))+w**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&aT_cgo20_atan)))) + uintptr(int32(9))*8)))))) + if id < int32(0) { + return x - x*(s1+s2) + } + z = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&atanhi_cgo18_atan)))) + uintptr(id)*8)) - (x*(s1+s2) - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&atanlo_cgo19_atan)))) + uintptr(id)*8)) - x) + return func() float64 { + if sign != 0 { + return -z + } else { + return z + } + }() +} + +type _cgoz_21_atan struct { + _f float64 +} diff --git a/atan2.c.i.go b/atan2.c.i.go new file mode 100644 index 0000000..21fc0e7 --- /dev/null +++ b/atan2.c.i.go @@ -0,0 +1,178 @@ +package libc + +import unsafe "unsafe" + +var pi_cgo18_atan2 float64 = 3.1415926535897931 +var pi_lo_cgo19_atan2 float64 = 1.2246467991473532e-16 + +func Atan2(y float64, x float64) float64 { + var z float64 + var m uint32 + var lx uint32 + var ly uint32 + var ix uint32 + var iy uint32 + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(y))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(y)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + y + } + for { + var __u uint64 = *(*uint64)(unsafe.Pointer(&_cgoz_20_atan2{x})) + ix = uint32(__u >> int32(32)) + lx = uint32(__u) + if true { + break + } + } + for { + var __u uint64 = *(*uint64)(unsafe.Pointer(&_cgoz_21_atan2{y})) + iy = uint32(__u >> int32(32)) + ly = uint32(__u) + if true { + break + } + } + if ix-uint32(1072693248)|lx == uint32(0) { + return Atan(y) + } + m = iy>>int32(31)&uint32(1) | ix>>int32(30)&uint32(2) + ix = ix & uint32(2147483647) + iy = iy & uint32(2147483647) + if iy|ly == uint32(0) { + switch m { + case uint32(0): + fallthrough + case uint32(1): + return y + case uint32(2): + return pi_cgo18_atan2 + case uint32(3): + return -pi_cgo18_atan2 + } + } + if ix|lx == uint32(0) { + return func() float64 { + if m&uint32(1) != 0 { + return -pi_cgo18_atan2 / float64(int32(2)) + } else { + return pi_cgo18_atan2 / float64(int32(2)) + } + }() + } + if ix == uint32(2146435072) { + if iy == uint32(2146435072) { + switch m { + case uint32(0): + return pi_cgo18_atan2 / float64(int32(4)) + case uint32(1): + return -pi_cgo18_atan2 / float64(int32(4)) + case uint32(2): + return float64(int32(3)) * pi_cgo18_atan2 / float64(int32(4)) + case uint32(3): + return float64(-3) * pi_cgo18_atan2 / float64(int32(4)) + } + } else { + switch m { + case uint32(0): + return float64(0) + case uint32(1): + return float64(-0) + case uint32(2): + return pi_cgo18_atan2 + case uint32(3): + return -pi_cgo18_atan2 + } + } + } + if ix+uint32(67108864) < iy || iy == uint32(2146435072) { + return func() float64 { + if m&uint32(1) != 0 { + return -pi_cgo18_atan2 / float64(int32(2)) + } else { + return pi_cgo18_atan2 / float64(int32(2)) + } + }() + } + if m&uint32(2) != 0 && iy+uint32(67108864) < ix { + z = float64(int32(0)) + } else { + z = Atan(Fabs(y / x)) + } + switch m { + case uint32(0): + return z + case uint32(1): + return -z + case uint32(2): + return pi_cgo18_atan2 - (z - pi_lo_cgo19_atan2) + default: + return z - pi_lo_cgo19_atan2 - pi_cgo18_atan2 + } + return 0 +} + +type _cgoz_20_atan2 struct { + _f float64 +} +type _cgoz_21_atan2 struct { + _f float64 +} diff --git a/atan2f.c.i.go b/atan2f.c.i.go new file mode 100644 index 0000000..1297b7e --- /dev/null +++ b/atan2f.c.i.go @@ -0,0 +1,172 @@ +package libc + +import unsafe "unsafe" + +var pi_cgo18_atan2f float32 = float32(3.1415927410000002) +var pi_lo_cgo19_atan2f float32 = float32(-8.7422776572999997e-8) + +func Atan2f(y float32, x float32) float32 { + var z float32 + var m uint32 + var ix uint32 + var iy uint32 + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(y)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + y + } + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_20_atan2f{x})) + if true { + break + } + } + for { + iy = *(*uint32)(unsafe.Pointer(&_cgoz_21_atan2f{y})) + if true { + break + } + } + if ix == uint32(1065353216) { + return Atanf(y) + } + m = iy>>int32(31)&uint32(1) | ix>>int32(30)&uint32(2) + ix &= uint32(2147483647) + iy &= uint32(2147483647) + if iy == uint32(0) { + switch m { + case uint32(0): + fallthrough + case uint32(1): + return y + case uint32(2): + return pi_cgo18_atan2f + case uint32(3): + return -pi_cgo18_atan2f + } + } + if ix == uint32(0) { + return func() float32 { + if m&uint32(1) != 0 { + return -pi_cgo18_atan2f / float32(int32(2)) + } else { + return pi_cgo18_atan2f / float32(int32(2)) + } + }() + } + if ix == uint32(2139095040) { + if iy == uint32(2139095040) { + switch m { + case uint32(0): + return pi_cgo18_atan2f / float32(int32(4)) + case uint32(1): + return -pi_cgo18_atan2f / float32(int32(4)) + case uint32(2): + return float32(int32(3)) * pi_cgo18_atan2f / float32(int32(4)) + case uint32(3): + return float32(-3) * pi_cgo18_atan2f / float32(int32(4)) + } + } else { + switch m { + case uint32(0): + return float32(0) + case uint32(1): + return float32(-0) + case uint32(2): + return pi_cgo18_atan2f + case uint32(3): + return -pi_cgo18_atan2f + } + } + } + if ix+uint32(218103808) < iy || iy == uint32(2139095040) { + return func() float32 { + if m&uint32(1) != 0 { + return -pi_cgo18_atan2f / float32(int32(2)) + } else { + return pi_cgo18_atan2f / float32(int32(2)) + } + }() + } + if m&uint32(2) != 0 && iy+uint32(218103808) < ix { + z = float32(0) + } else { + z = Atanf(Fabsf(y / x)) + } + switch m { + case uint32(0): + return z + case uint32(1): + return -z + case uint32(2): + return pi_cgo18_atan2f - (z - pi_lo_cgo19_atan2f) + default: + return z - pi_lo_cgo19_atan2f - pi_cgo18_atan2f + } + return 0 +} + +type _cgoz_20_atan2f struct { + _f float32 +} +type _cgoz_21_atan2f struct { + _f float32 +} diff --git a/atan2l.c.i.go b/atan2l.c.i.go new file mode 100644 index 0000000..9280cca --- /dev/null +++ b/atan2l.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Atan2l(y float64, x float64) float64 { + return float64(Atan2(float64(y), float64(x))) +} diff --git a/atanf.c.i.go b/atanf.c.i.go new file mode 100644 index 0000000..3b9ca3e --- /dev/null +++ b/atanf.c.i.go @@ -0,0 +1,124 @@ +package libc + +import unsafe "unsafe" + +var atanhi_cgo18_atanf [4]float32 = [4]float32{float32(0.46364760398999999), float32(0.78539812565), float32(0.98279368876999995), float32(1.5707962513)} +var atanlo_cgo19_atanf [4]float32 = [4]float32{float32(5.0121582440000004e-9), float32(3.7748947078999999e-8), float32(3.4473217170000002e-8), float32(7.5497894159e-8)} +var aT_cgo20_atanf [5]float32 = [5]float32{float32(0.33333328365999998), float32(-0.19999158382000001), float32(0.14253635705000001), float32(-0.10648017377000001), float32(0.061687607318)} + +func Atanf(x float32) float32 { + var w float32 + var s1 float32 + var s2 float32 + var z float32 + var ix uint32 + var sign uint32 + var id int32 + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_21_atanf{x})) + if true { + break + } + } + sign = ix >> int32(31) + ix &= uint32(2147483647) + if ix >= uint32(1283457024) { + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + z = *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&atanhi_cgo18_atanf)))) + uintptr(int32(3))*4)) + 7.52316385e-37 + return func() float32 { + if sign != 0 { + return -z + } else { + return z + } + }() + } + if ix < uint32(1054867456) { + if ix < uint32(964689920) { + if ix < uint32(8388608) { + for { + if 4 == 4 { + fp_force_evalf(x * x) + } else if 4 == 8 { + fp_force_eval(float64(x * x)) + } else { + fp_force_evall(float64(x * x)) + } + if true { + break + } + } + } + return x + } + id = -1 + } else { + x = Fabsf(x) + if ix < uint32(1066926080) { + if ix < uint32(1060110336) { + id = int32(0) + x = (2*x - 1) / (2 + x) + } else { + id = int32(1) + x = (x - 1) / (x + 1) + } + } else if ix < uint32(1075576832) { + id = int32(2) + x = (x - 1.5) / (1 + 1.5*x) + } else { + id = int32(3) + x = -1 / x + } + } + z = x * x + w = z * z + s1 = z * (*(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&aT_cgo20_atanf)))) + uintptr(int32(0))*4)) + w*(*(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&aT_cgo20_atanf)))) + uintptr(int32(2))*4))+w**(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&aT_cgo20_atanf)))) + uintptr(int32(4))*4)))) + s2 = w * (*(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&aT_cgo20_atanf)))) + uintptr(int32(1))*4)) + w**(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&aT_cgo20_atanf)))) + uintptr(int32(3))*4))) + if id < int32(0) { + return x - x*(s1+s2) + } + z = *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&atanhi_cgo18_atanf)))) + uintptr(id)*4)) - (x*(s1+s2) - *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&atanlo_cgo19_atanf)))) + uintptr(id)*4)) - x) + return func() float32 { + if sign != 0 { + return -z + } else { + return z + } + }() +} + +type _cgoz_21_atanf struct { + _f float32 +} diff --git a/atanh.c.i.go b/atanh.c.i.go new file mode 100644 index 0000000..f937dd0 --- /dev/null +++ b/atanh.c.i.go @@ -0,0 +1,45 @@ +package libc + +import unsafe "unsafe" + +func Atanh(x float64) float64 { + type _cgoa_18_atanh struct { + f float64 + } + var u _cgoa_18_atanh + u.f = x + var e uint32 = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + var s uint32 = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(63)) + var y float64 + *(*uint64)(unsafe.Pointer(&u)) &= 9223372036854775807 + y = u.f + if e < uint32(1022) { + if e < uint32(991) { + if e == uint32(0) { + for { + if 4 == 4 { + fp_force_evalf(float32(y)) + } else if 4 == 8 { + fp_force_eval(float64(float32(y))) + } else { + fp_force_evall(float64(float32(y))) + } + if true { + break + } + } + } + } else { + y = 0.5 * Log1p(float64(int32(2))*y+float64(int32(2))*y*y/(float64(int32(1))-y)) + } + } else { + y = 0.5 * Log1p(float64(int32(2))*(y/(float64(int32(1))-y))) + } + return func() float64 { + if s != 0 { + return -y + } else { + return y + } + }() +} diff --git a/atanhf.c.i.go b/atanhf.c.i.go new file mode 100644 index 0000000..33b7ff3 --- /dev/null +++ b/atanhf.c.i.go @@ -0,0 +1,44 @@ +package libc + +import unsafe "unsafe" + +func Atanhf(x float32) float32 { + type _cgoa_18_atanhf struct { + f float32 + } + var u _cgoa_18_atanhf + u.f = x + var s uint32 = *(*uint32)(unsafe.Pointer(&u)) >> int32(31) + var y float32 + *(*uint32)(unsafe.Pointer(&u)) &= uint32(2147483647) + y = u.f + if *(*uint32)(unsafe.Pointer(&u)) < uint32(1056964608) { + if *(*uint32)(unsafe.Pointer(&u)) < uint32(796917760) { + if *(*uint32)(unsafe.Pointer(&u)) < uint32(8388608) { + for { + if 4 == 4 { + fp_force_evalf(float32(y * y)) + } else if 4 == 8 { + fp_force_eval(float64(float32(y * y))) + } else { + fp_force_evall(float64(float32(y * y))) + } + if true { + break + } + } + } + } else { + y = 0.5 * Log1pf(float32(int32(2))*y+float32(int32(2))*y*y/(float32(int32(1))-y)) + } + } else { + y = 0.5 * Log1pf(float32(int32(2))*(y/(float32(int32(1))-y))) + } + return func() float32 { + if s != 0 { + return -y + } else { + return y + } + }() +} diff --git a/atanhl.c.i.go b/atanhl.c.i.go new file mode 100644 index 0000000..329817b --- /dev/null +++ b/atanhl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Atanhl(x float64) float64 { + return float64(Atanh(float64(x))) +} diff --git a/atanl.c.i.go b/atanl.c.i.go new file mode 100644 index 0000000..13bcfa1 --- /dev/null +++ b/atanl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Atanl(x float64) float64 { + return float64(Atan(float64(x))) +} diff --git a/c2go.a.pub b/c2go.a.pub index 31c7af5..d6660f7 100644 --- a/c2go.a.pub +++ b/c2go.a.pub @@ -11,8 +11,29 @@ __signbitl a64l abort abs +acos +acosf +acosh +acoshf +acoshl +acosl aligned_alloc +asin +asinf +asinh +asinhf +asinhl +asinl at_quick_exit +atan +atan2 +atan2f +atan2l +atanf +atanh +atanhf +atanhl +atanl atexit atof atoi @@ -23,23 +44,60 @@ blkcnt_t blksize_t bsearch calloc +cbrt +cbrtf +cbrtl +ceil +ceilf +ceill clearenv clock_t clockid_t copysign copysignf copysignl +cos +cosf +cosh +coshf +coshl +cosl dev_t div div_t double_t drand48 +drem +dremf +ecvt erand48 +erf +erfc +erfcf +erfcl +erff +erfl exit +exp +exp10 +exp10f +exp10l +exp2 +exp2f +exp2l +expf +expl explicit_bzero +expm1 +expm1f +expm1l fabs fabsf fabsl +fcvt +fdim +fdimf +fdiml feclearexcept fegetenv fegetround @@ -47,7 +105,21 @@ feraiseexcept fesetenv fesetround fetestexcept +finite +finitef float_t +floor +floorf +floorl +fma +fmaf +fmal +fmax +fmaxf +fmaxl +fmin +fminf +fminl fmod fmodf fmodl @@ -57,11 +129,18 @@ frexp frexpf frexpl fwrite +gcvt getenv getloadavg getsubopt gid_t grantpt +hypot +hypotf +hypotl +ilogb +ilogbf +ilogbl initstate ino_t int16_t @@ -95,17 +174,59 @@ isupper isupper_l isxdigit isxdigit_l +j0 +j0f +j1 +j1f +jn +jnf jrand48 l64a labs lcong48 +ldexp +ldexpf +ldexpl ldiv ldiv_t +lgamma +lgamma_r +lgammaf +lgammaf_r +lgammal +lgammal_r llabs lldiv lldiv_t +llrint +llrintf +llrintl +llround +llroundf +llroundl locale_t +log +log10 +log10f +log10l +log1p +log1pf +log1pl +log2 +log2f +log2l +logb +logbf +logbl +logf +logl lrand48 +lrint +lrintf +lrintl +lround +lroundf +lroundl malloc max_align_t mblen @@ -129,13 +250,34 @@ mkstemp mkstemps mktemp mode_t +modf +modff +modfl mrand48 +nan +nanf +nanl +nearbyint +nearbyintf +nearbyintl +nextafter +nextafterf +nextafterl +nexttoward +nexttowardf +nexttowardl nlink_t nrand48 off_t pid_t posix_memalign posix_openpt +pow +pow10 +pow10f +pow10l +powf +powl printf pthread_attr_t pthread_barrier_t @@ -152,6 +294,7 @@ pthread_spinlock_t pthread_t ptrdiff_t ptsname +ptsname_r putenv qsort quick_exit @@ -161,17 +304,50 @@ random realloc reallocarray realpath +remainder +remainderf +remainderl +remquo +remquof +remquol +rint +rintf +rintl +round +roundf +roundl +scalb +scalbf +scalbln +scalblnf +scalblnl scalbn scalbnf scalbnl +secure_getenv seed48 setenv setkey setstate +signgam +significand +significandf sigset_t +sin +sincos +sincosf +sincosl +sinf +sinh +sinhf +sinhl +sinl size_t snprintf sprintf +sqrt +sqrtf +sqrtl srand srand48 srandom @@ -209,11 +385,14 @@ strsignal strspn strstr strtod +strtod_l strtof +strtof_l strtok strtok_r strtol strtold +strtold_l strtoll strtoul strtoull @@ -221,6 +400,15 @@ strverscmp strxfrm strxfrm_l system +tan +tanf +tanh +tanhf +tanhl +tanl +tgamma +tgammaf +tgammal time_t timer_t toascii @@ -228,6 +416,9 @@ tolower tolower_l toupper toupper_l +trunc +truncf +truncl uid_t uint16_t uint32_t @@ -248,4 +439,10 @@ wcstombs wctomb wctype_t wint_t -write \ No newline at end of file +write +y0 +y0f +y1 +y1f +yn +ynf \ No newline at end of file diff --git a/c2go.cfg b/c2go.cfg index e273bb1..4d2093b 100644 --- a/c2go.cfg +++ b/c2go.cfg @@ -6,6 +6,7 @@ "./src/include/string.h" ], "from": [ + "./include/math.h", "./include/stdlib.h", "./include/string.h", "./include/ctype.h", @@ -27,14 +28,31 @@ "__syscall1_r1", "__syscall2_r1", "__syscall3_r1", "__syscall4_r1", "__syscall5_r1", "__syscall6_r1", "__syscall_ret", "__syscall_cp", - "__libc_malloc", "Malloc", + "__libc_malloc", "malloc", + "__builtin_inff", "__builtin_nanf", "__pthread_self" ], - "paths": [ - "syscall_ret.c" + "files": [ + "./src/math/ilogb.c", + "./src/math/ilogbf.c", + "./src/math/j0.c", + "./src/math/j0f.c", + "./src/math/j1.c", + "./src/math/j1f.c", + "./src/math/jn.c", + "./src/math/jnf.c", + "./src/math/log2f.c", + "./src/math/logf.c", + "./src/math/powf.c", + "./src/math/sincos.c", + "./src/math/sincosf.c", + "./src/math/sincosl.c", + "./src/math/sqrtf.c", + "./src/math/tgamma.c" ] }, "dirs": [ + "./src/math", "./src/prng", "./src/ctype", "./src/string" @@ -49,25 +67,6 @@ "./src/errno/__errno_location.c", "./src/fenv/fenv.c", "./src/fenv/fesetround.c", - "./src/math/__fpclassify.c", - "./src/math/__fpclassifyl.c", - "./src/math/__signbit.c", - "./src/math/__signbitl.c", - "./src/math/copysign.c", - "./src/math/copysignf.c", - "./src/math/copysignl.c", - "./src/math/fabs.c", - "./src/math/fabsf.c", - "./src/math/fabsl.c", - "./src/math/fmod.c", - "./src/math/fmodf.c", - "./src/math/fmodl.c", - "./src/math/frexp.c", - "./src/math/frexpf.c", - "./src/math/frexpl.c", - "./src/math/scalbn.c", - "./src/math/scalbnf.c", - "./src/math/scalbnl.c", "./src/stdlib/strtod.c", "./src/stdlib/qsort.c", "./src/env/__environ.c", diff --git a/c2go_autogen.go b/c2go_autogen.go index 4261f64..d4596d0 100644 --- a/c2go_autogen.go +++ b/c2go_autogen.go @@ -2,6 +2,21 @@ package libc import unsafe "unsafe" +func Ilogb(float64) int32 { + panic("notimpl") +} +func Ilogbf(float32) int32 { + panic("notimpl") +} +func Logf(float32) float32 { + panic("notimpl") +} +func Sqrtf(float32) float32 { + panic("notimpl") +} +func Tgamma(float64) float64 { + panic("notimpl") +} func Wctomb(*int8, uint32) int32 { panic("notimpl") } diff --git a/c2go_header.i.go b/c2go_header.i.go index 0a8acd1..1079873 100644 --- a/c2go_header.i.go +++ b/c2go_header.i.go @@ -62,71 +62,71 @@ type pthread_key_t = uint32 type Pthread_key_t = uint32 type pthread_spinlock_t = int32 type Pthread_spinlock_t = int32 -type _cgoa_1___rand48_step struct { +type _cgoa_1___cos struct { __attr uint32 } -type pthread_mutexattr_t = _cgoa_1___rand48_step -type Pthread_mutexattr_t = _cgoa_1___rand48_step -type _cgoa_2___rand48_step struct { +type pthread_mutexattr_t = _cgoa_1___cos +type Pthread_mutexattr_t = _cgoa_1___cos +type _cgoa_2___cos struct { __attr uint32 } -type pthread_condattr_t = _cgoa_2___rand48_step -type Pthread_condattr_t = _cgoa_2___rand48_step -type _cgoa_3___rand48_step struct { +type pthread_condattr_t = _cgoa_2___cos +type Pthread_condattr_t = _cgoa_2___cos +type _cgoa_3___cos struct { __attr uint32 } -type pthread_barrierattr_t = _cgoa_3___rand48_step -type Pthread_barrierattr_t = _cgoa_3___rand48_step -type _cgoa_4___rand48_step struct { +type pthread_barrierattr_t = _cgoa_3___cos +type Pthread_barrierattr_t = _cgoa_3___cos +type _cgoa_4___cos struct { __attr [2]uint32 } -type pthread_rwlockattr_t = _cgoa_4___rand48_step -type Pthread_rwlockattr_t = _cgoa_4___rand48_step +type pthread_rwlockattr_t = _cgoa_4___cos +type Pthread_rwlockattr_t = _cgoa_4___cos type struct___sigset_t struct { __bits [16]uint64 } type sigset_t = struct___sigset_t type Sigset_t = struct___sigset_t -type _cgoa_6___rand48_step struct { +type _cgoa_6___cos struct { __i [14]int32 } -type _cgoa_5___rand48_step struct { - __u _cgoa_6___rand48_step +type _cgoa_5___cos struct { + __u _cgoa_6___cos } -type pthread_attr_t = _cgoa_5___rand48_step -type Pthread_attr_t = _cgoa_5___rand48_step -type _cgoa_8___rand48_step struct { +type pthread_attr_t = _cgoa_5___cos +type Pthread_attr_t = _cgoa_5___cos +type _cgoa_8___cos struct { __i [10]int32 } -type _cgoa_7___rand48_step struct { - __u _cgoa_8___rand48_step +type _cgoa_7___cos struct { + __u _cgoa_8___cos } -type pthread_mutex_t = _cgoa_7___rand48_step -type Pthread_mutex_t = _cgoa_7___rand48_step -type _cgoa_10___rand48_step struct { +type pthread_mutex_t = _cgoa_7___cos +type Pthread_mutex_t = _cgoa_7___cos +type _cgoa_10___cos struct { __i [12]int32 } -type _cgoa_9___rand48_step struct { - __u _cgoa_10___rand48_step +type _cgoa_9___cos struct { + __u _cgoa_10___cos } -type pthread_cond_t = _cgoa_9___rand48_step -type Pthread_cond_t = _cgoa_9___rand48_step -type _cgoa_12___rand48_step struct { +type pthread_cond_t = _cgoa_9___cos +type Pthread_cond_t = _cgoa_9___cos +type _cgoa_12___cos struct { __i [14]int32 } -type _cgoa_11___rand48_step struct { - __u _cgoa_12___rand48_step +type _cgoa_11___cos struct { + __u _cgoa_12___cos } -type pthread_rwlock_t = _cgoa_11___rand48_step -type Pthread_rwlock_t = _cgoa_11___rand48_step -type _cgoa_14___rand48_step struct { +type pthread_rwlock_t = _cgoa_11___cos +type Pthread_rwlock_t = _cgoa_11___cos +type _cgoa_14___cos struct { __i [8]int32 } -type _cgoa_13___rand48_step struct { - __u _cgoa_14___rand48_step +type _cgoa_13___cos struct { + __u _cgoa_14___cos } -type pthread_barrier_t = _cgoa_13___rand48_step -type Pthread_barrier_t = _cgoa_13___rand48_step +type pthread_barrier_t = _cgoa_13___cos +type Pthread_barrier_t = _cgoa_13___cos type pid_t = int32 type Pid_t = int32 type struct_sched_param struct { @@ -163,74 +163,26 @@ type struct___ptcb struct { __x unsafe.Pointer __next *struct___ptcb } -type struct___pthread struct { - tid int32 - errno_val int32 - sys_r1 int64 - locale *struct___locale_struct -} type wchar_t = uint32 type Wchar_t = uint32 -type _cgoa_15_drand48 struct { +type _cgoa_15___cos struct { quot int32 rem int32 } -type div_t = _cgoa_15_drand48 -type Div_t = _cgoa_15_drand48 -type _cgoa_16_drand48 struct { - quot int64 - rem int64 -} -type ldiv_t = _cgoa_16_drand48 -type Ldiv_t = _cgoa_16_drand48 -type _cgoa_17_drand48 struct { +type div_t = _cgoa_15___cos +type Div_t = _cgoa_15___cos +type _cgoa_16___cos struct { quot int64 rem int64 } -type lldiv_t = _cgoa_17_drand48 -type Lldiv_t = _cgoa_17_drand48 -type _cgoa_18_drand48 struct { +type ldiv_t = _cgoa_16___cos +type Ldiv_t = _cgoa_16___cos +type _cgoa_17___cos struct { quot int64 rem int64 } -type imaxdiv_t = _cgoa_18_drand48 - -func __bswap16(__x uint16) uint16 { - return uint16(int32(__x)<>int32(8)) -} -func __bswap32(__x uint32) uint32 { - return __x>>int32(24) | __x>>int32(8)&uint32(65280) | __x<>int32(32)))) -} - -type struct_lconv struct { - decimal_point *int8 - thousands_sep *int8 - grouping *int8 - int_curr_symbol *int8 - currency_symbol *int8 - mon_decimal_point *int8 - mon_thousands_sep *int8 - mon_grouping *int8 - positive_sign *int8 - negative_sign *int8 - int_frac_digits int8 - frac_digits int8 - p_cs_precedes int8 - p_sep_by_space int8 - n_cs_precedes int8 - n_sep_by_space int8 - p_sign_posn int8 - n_sign_posn int8 - int_p_cs_precedes int8 - int_p_sep_by_space int8 - int_n_cs_precedes int8 - int_n_sep_by_space int8 - int_p_sign_posn int8 - int_n_sign_posn int8 -} +type lldiv_t = _cgoa_17___cos +type Lldiv_t = _cgoa_17___cos type ssize_t = int64 type Ssize_t = int64 type off_t = int64 @@ -271,268 +223,202 @@ type struct___libc struct { page_size uint64 global_locale struct___locale_struct } -type struct___locale_map struct { - map_ unsafe.Pointer - map_size uint64 - name [24]int8 - next *struct___locale_map +type struct___pthread struct { + tid int32 + errno_val int32 + sys_r1 int64 + locale *struct___locale_struct } +type float_t = float32 +type Float_t = float32 +type double_t = float64 +type Double_t = float64 -func __isspace(_c int32) int32 { +func X__FLOAT_BITS(__f float32) uint32 { + type _cgoa_18___cos struct { + __f float32 + } + var __u _cgoa_18___cos + __u.__f = __f + return *(*uint32)(unsafe.Pointer(&__u)) +} +func X__DOUBLE_BITS(__f float64) uint64 { + type _cgoa_19___cos struct { + __f float64 + } + var __u _cgoa_19___cos + __u.__f = __f + return *(*uint64)(unsafe.Pointer(&__u)) +} +func __islessf(__x float32, __y float32) int32 { return func() int32 { - if _c == ' ' || uint32(_c)-uint32('\t') < uint32(5) { + if !(func() int32 { + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(__x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(__x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(__x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return func() int32 { + func() int { + _ = __y + return 0 + }() + return int32(1) + }() + } else { + return func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(__y)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(__y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(__y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() + } + }() != 0) && __x < __y { return 1 } else { return 0 } }() } - -type wint_t = uint32 -type Wint_t = uint32 -type wctype_t = uint64 -type Wctype_t = uint64 -type wctrans_t = *int32 -type struct___mbstate_t struct { - __opaque1 uint32 - __opaque2 uint32 -} -type mbstate_t = struct___mbstate_t -type Mbstate_t = struct___mbstate_t - -var tab_cgo19_towctrans [2666]uint8 = [2666]uint8{uint8(7), uint8(8), uint8(9), uint8(10), uint8(11), uint8(12), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(13), uint8(6), uint8(6), uint8(14), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(15), uint8(16), uint8(17), uint8(18), uint8(6), uint8(19), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(20), uint8(21), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(22), uint8(23), uint8(6), uint8(6), uint8(6), uint8(24), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(25), uint8(6), uint8(6), uint8(6), uint8(6), uint8(26), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(27), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(28), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(29), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(30), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(0), uint8(84), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(24), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(43), uint8(43), uint8(91), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(74), uint8(86), uint8(86), uint8(5), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(36), uint8(80), uint8(121), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(56), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(78), uint8(49), uint8(2), uint8(78), uint8(13), uint8(13), uint8(78), uint8(3), uint8(78), uint8(0), uint8(36), uint8(110), uint8(0), uint8(78), uint8(49), uint8(38), uint8(110), uint8(81), uint8(78), uint8(36), uint8(80), uint8(78), uint8(57), uint8(20), uint8(129), uint8(27), uint8(29), uint8(29), uint8(83), uint8(49), uint8(80), uint8(49), uint8(80), uint8(13), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(27), uint8(83), uint8(36), uint8(80), uint8(49), uint8(2), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(20), uint8(121), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(45), uint8(43), uint8(73), uint8(3), uint8(72), uint8(3), uint8(120), uint8(92), uint8(123), uint8(20), uint8(0), uint8(150), uint8(10), uint8(1), uint8(43), uint8(40), uint8(6), uint8(6), uint8(0), uint8(42), uint8(6), uint8(42), uint8(42), uint8(43), uint8(7), uint8(187), uint8(181), uint8(43), uint8(30), uint8(0), uint8(43), uint8(7), uint8(43), uint8(43), uint8(43), uint8(1), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(205), uint8(70), uint8(205), uint8(43), uint8(0), uint8(37), uint8(43), uint8(7), uint8(1), uint8(6), uint8(1), uint8(85), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(85), uint8(86), uint8(86), uint8(2), uint8(36), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(21), uint8(129), uint8(129), uint8(129), uint8(0), uint8(0), uint8(43), uint8(0), uint8(178), uint8(209), uint8(178), uint8(209), uint8(178), uint8(209), uint8(178), uint8(209), uint8(0), uint8(0), uint8(205), uint8(204), uint8(1), uint8(0), uint8(215), uint8(215), uint8(215), uint8(215), uint8(215), uint8(131), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(28), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(2), uint8(0), uint8(0), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(78), uint8(49), uint8(80), uint8(49), uint8(80), uint8(78), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(2), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(0), uint8(0), uint8(0), uint8(84), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(84), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(12), uint8(0), uint8(12), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(42), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(108), uint8(129), uint8(21), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(108), uint8(3), uint8(65), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(44), uint8(86), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(12), uint8(108), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(86), uint8(122), uint8(158), uint8(38), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(1), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(44), uint8(43), uint8(127), uint8(86), uint8(86), uint8(57), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(44), uint8(43), uint8(127), uint8(86), uint8(86), uint8(129), uint8(55), uint8(117), uint8(91), uint8(123), uint8(92), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(2), uint8(172), uint8(4), uint8(0), uint8(0), uint8(57), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(44), uint8(43), uint8(43), uint8(86), uint8(86), uint8(50), uint8(19), uint8(129), uint8(87), uint8(0), uint8(111), uint8(129), uint8(126), uint8(201), uint8(215), uint8(126), uint8(45), uint8(129), uint8(129), uint8(14), uint8(126), uint8(57), uint8(127), uint8(111), uint8(87), uint8(0), uint8(129), uint8(129), uint8(126), uint8(21), uint8(0), uint8(126), uint8(3), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(43), uint8(36), uint8(43), uint8(151), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(128), uint8(129), uint8(129), uint8(129), uint8(129), uint8(57), uint8(187), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(201), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(208), uint8(13), uint8(0), uint8(78), uint8(49), uint8(2), uint8(180), uint8(193), uint8(193), uint8(215), uint8(215), uint8(36), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(215), uint8(215), uint8(83), uint8(193), uint8(71), uint8(212), uint8(215), uint8(215), uint8(215), uint8(5), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(78), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(13), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(121), uint8(92), uint8(123), uint8(92), uint8(123), uint8(79), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(45), uint8(43), uint8(43), uint8(121), uint8(20), uint8(92), uint8(123), uint8(92), uint8(45), uint8(121), uint8(42), uint8(92), uint8(39), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(164), uint8(0), uint8(10), uint8(180), uint8(92), uint8(123), uint8(92), uint8(123), uint8(79), uint8(3), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(72), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(0), uint8(72), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(0), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(0), uint8(0), uint8(0), uint8(0), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} -var rules_cgo20_towctrans [240]int32 = [240]int32{int32(0), int32(8193), -8192, int32(1949440), int32(190208), int32(30976), int32(9218), int32(257), -256, int32(0), int32(513), -512, -50943, -59392, -30975, -76800, int32(49920), int32(53761), int32(52737), int32(52481), int32(20225), int32(51713), int32(51969), int32(52993), int32(24832), int32(54017), int32(53505), int32(41728), int32(54529), int32(33280), int32(54785), int32(55809), int32(55553), int32(56065), int32(14336), int32(3), -20224, -24831, -14335, int32(2369538), int32(0), int32(257), -256, -52480, -55808, -33279, int32(2763521), -41727, int32(2762753), int32(2768640), -49919, int32(17665), int32(18177), int32(2760448), int32(2759680), int32(2760192), -53760, -52736, -51712, -51968, int32(10833664), int32(10832640), -52992, int32(10823680), int32(10830848), -53504, -54016, int32(2750208), int32(10830080), int32(2751744), -54528, -54784, int32(2746112), int32(10830592), int32(10824192), -17664, -55552, -18176, -56064, int32(10818816), int32(10818048), int32(4989954), int32(0), int32(8193), -8192, int32(257), -256, int32(21504), int32(29697), int32(9729), int32(9473), int32(16385), int32(16129), -9728, -9472, -7936, -16384, -16128, int32(2049), -15872, -14592, -12032, -13824, -2048, -22016, -20480, int32(1792), -29696, -15359, -24576, -1791, int32(7346690), int32(257), -256, int32(8193), -8192, int32(20481), int32(3841), -3840, int32(0), int32(12289), -12288, int32(257), -256, int32(0), int32(770048), int32(1859585), int32(0), int32(9949185), int32(2049), -2048, int32(9045250), int32(0), -770047, -1597952, int32(9028096), -1582336, -1601024, -1600768, -1598464, -1598208, -1596416, int32(0), int32(9058304), int32(9044992), int32(976384), int32(257), -256, int32(0), -15104, -1949439, int32(9379074), int32(2048), -2047, int32(0), int32(22016), -22015, int32(18944), int32(25600), int32(32768), int32(28672), int32(32256), int32(2304), -18943, -2303, -1844480, -25599, -28671, -32767, -32255, int32(11273474), int32(0), int32(4097), -4096, int32(7169), int32(257), -1924351, -2146047, -2115071, -7168, int32(11602690), int32(257), -256, int32(12289), -12288, int32(0), -2750207, -976383, -2746111, -2763520, -2762752, -2759679, -2751743, -2760447, -2760191, -2768639, int32(0), -1859584, int32(0), int32(257), -256, int32(12323842), int32(0), int32(257), -256, -10830847, int32(237569), -9044991, -10823679, int32(12288), -10833663, -10832639, -10830079, -10818047, -10824191, -10818815, -12287, -10830591, -9058303, int32(0), -9949184, -237568, int32(0), int32(8193), -8192, int32(0), int32(10241), -10240, int32(0), int32(16385), -16384, int32(0), int32(8193), -8192, int32(0), int32(8193), -8192, int32(0), int32(8705), -8704} -var rulebases_cgo21_towctrans [512]uint8 = [512]uint8{uint8(0), uint8(6), uint8(39), uint8(81), uint8(111), uint8(119), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(124), uint8(0), uint8(0), uint8(127), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(131), uint8(142), uint8(146), uint8(151), uint8(0), uint8(170), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(180), uint8(196), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(198), uint8(201), uint8(0), uint8(0), uint8(0), uint8(219), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(222), uint8(0), uint8(0), uint8(0), uint8(0), uint8(225), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(228), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(231), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(234), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(237), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} -var exceptions_cgo22_towctrans [200][2]uint8 = [200][2]uint8{[2]uint8{uint8(48), uint8(12)}, [2]uint8{uint8(49), uint8(13)}, [2]uint8{uint8(120), uint8(14)}, [2]uint8{uint8(127), uint8(15)}, [2]uint8{uint8(128), uint8(16)}, [2]uint8{uint8(129), uint8(17)}, [2]uint8{uint8(134), uint8(18)}, [2]uint8{uint8(137), uint8(19)}, [2]uint8{uint8(138), uint8(19)}, [2]uint8{uint8(142), uint8(20)}, [2]uint8{uint8(143), uint8(21)}, [2]uint8{uint8(144), uint8(22)}, [2]uint8{uint8(147), uint8(19)}, [2]uint8{uint8(148), uint8(23)}, [2]uint8{uint8(149), uint8(24)}, [2]uint8{uint8(150), uint8(25)}, [2]uint8{uint8(151), uint8(26)}, [2]uint8{uint8(154), uint8(27)}, [2]uint8{uint8(156), uint8(25)}, [2]uint8{uint8(157), uint8(28)}, [2]uint8{uint8(158), uint8(29)}, [2]uint8{uint8(159), uint8(30)}, [2]uint8{uint8(166), uint8(31)}, [2]uint8{uint8(169), uint8(31)}, [2]uint8{uint8(174), uint8(31)}, [2]uint8{uint8(177), uint8(32)}, [2]uint8{uint8(178), uint8(32)}, [2]uint8{uint8(183), uint8(33)}, [2]uint8{uint8(191), uint8(34)}, [2]uint8{uint8(197), uint8(35)}, [2]uint8{uint8(200), uint8(35)}, [2]uint8{uint8(203), uint8(35)}, [2]uint8{uint8(221), uint8(36)}, [2]uint8{uint8(242), uint8(35)}, [2]uint8{uint8(246), uint8(37)}, [2]uint8{uint8(247), uint8(38)}, [2]uint8{uint8(32), uint8(45)}, [2]uint8{uint8(58), uint8(46)}, [2]uint8{uint8(61), uint8(47)}, [2]uint8{uint8(62), uint8(48)}, [2]uint8{uint8(63), uint8(49)}, [2]uint8{uint8(64), uint8(49)}, [2]uint8{uint8(67), uint8(50)}, [2]uint8{uint8(68), uint8(51)}, [2]uint8{uint8(69), uint8(52)}, [2]uint8{uint8(80), uint8(53)}, [2]uint8{uint8(81), uint8(54)}, [2]uint8{uint8(82), uint8(55)}, [2]uint8{uint8(83), uint8(56)}, [2]uint8{uint8(84), uint8(57)}, [2]uint8{uint8(89), uint8(58)}, [2]uint8{uint8(91), uint8(59)}, [2]uint8{uint8(92), uint8(60)}, [2]uint8{uint8(97), uint8(61)}, [2]uint8{uint8(99), uint8(62)}, [2]uint8{uint8(101), uint8(63)}, [2]uint8{uint8(102), uint8(64)}, [2]uint8{uint8(104), uint8(65)}, [2]uint8{uint8(105), uint8(66)}, [2]uint8{uint8(106), uint8(64)}, [2]uint8{uint8(107), uint8(67)}, [2]uint8{uint8(108), uint8(68)}, [2]uint8{uint8(111), uint8(66)}, [2]uint8{uint8(113), uint8(69)}, [2]uint8{uint8(114), uint8(70)}, [2]uint8{uint8(117), uint8(71)}, [2]uint8{uint8(125), uint8(72)}, [2]uint8{uint8(130), uint8(73)}, [2]uint8{uint8(135), uint8(74)}, [2]uint8{uint8(137), uint8(75)}, [2]uint8{uint8(138), uint8(76)}, [2]uint8{uint8(139), uint8(76)}, [2]uint8{uint8(140), uint8(77)}, [2]uint8{uint8(146), uint8(78)}, [2]uint8{uint8(157), uint8(79)}, [2]uint8{uint8(158), uint8(80)}, [2]uint8{uint8(69), uint8(87)}, [2]uint8{uint8(123), uint8(29)}, [2]uint8{uint8(124), uint8(29)}, [2]uint8{uint8(125), uint8(29)}, [2]uint8{uint8(127), uint8(88)}, [2]uint8{uint8(134), uint8(89)}, [2]uint8{uint8(136), uint8(90)}, [2]uint8{uint8(137), uint8(90)}, [2]uint8{uint8(138), uint8(90)}, [2]uint8{uint8(140), uint8(91)}, [2]uint8{uint8(142), uint8(92)}, [2]uint8{uint8(143), uint8(92)}, [2]uint8{uint8(172), uint8(93)}, [2]uint8{uint8(173), uint8(94)}, [2]uint8{uint8(174), uint8(94)}, [2]uint8{uint8(175), uint8(94)}, [2]uint8{uint8(194), uint8(95)}, [2]uint8{uint8(204), uint8(96)}, [2]uint8{uint8(205), uint8(97)}, [2]uint8{uint8(206), uint8(97)}, [2]uint8{uint8(207), uint8(98)}, [2]uint8{uint8(208), uint8(99)}, [2]uint8{uint8(209), uint8(100)}, [2]uint8{uint8(213), uint8(101)}, [2]uint8{uint8(214), uint8(102)}, [2]uint8{uint8(215), uint8(103)}, [2]uint8{uint8(240), uint8(104)}, [2]uint8{uint8(241), uint8(105)}, [2]uint8{uint8(242), uint8(106)}, [2]uint8{uint8(243), uint8(107)}, [2]uint8{uint8(244), uint8(108)}, [2]uint8{uint8(245), uint8(109)}, [2]uint8{uint8(249), uint8(110)}, [2]uint8{uint8(253), uint8(45)}, [2]uint8{uint8(254), uint8(45)}, [2]uint8{uint8(255), uint8(45)}, [2]uint8{uint8(80), uint8(105)}, [2]uint8{uint8(81), uint8(105)}, [2]uint8{uint8(82), uint8(105)}, [2]uint8{uint8(83), uint8(105)}, [2]uint8{uint8(84), uint8(105)}, [2]uint8{uint8(85), uint8(105)}, [2]uint8{uint8(86), uint8(105)}, [2]uint8{uint8(87), uint8(105)}, [2]uint8{uint8(88), uint8(105)}, [2]uint8{uint8(89), uint8(105)}, [2]uint8{uint8(90), uint8(105)}, [2]uint8{uint8(91), uint8(105)}, [2]uint8{uint8(92), uint8(105)}, [2]uint8{uint8(93), uint8(105)}, [2]uint8{uint8(94), uint8(105)}, [2]uint8{uint8(95), uint8(105)}, [2]uint8{uint8(130), uint8(0)}, [2]uint8{uint8(131), uint8(0)}, [2]uint8{uint8(132), uint8(0)}, [2]uint8{uint8(133), uint8(0)}, [2]uint8{uint8(134), uint8(0)}, [2]uint8{uint8(135), uint8(0)}, [2]uint8{uint8(136), uint8(0)}, [2]uint8{uint8(137), uint8(0)}, [2]uint8{uint8(192), uint8(117)}, [2]uint8{uint8(207), uint8(118)}, [2]uint8{uint8(128), uint8(137)}, [2]uint8{uint8(129), uint8(138)}, [2]uint8{uint8(130), uint8(139)}, [2]uint8{uint8(133), uint8(140)}, [2]uint8{uint8(134), uint8(141)}, [2]uint8{uint8(112), uint8(157)}, [2]uint8{uint8(113), uint8(157)}, [2]uint8{uint8(118), uint8(158)}, [2]uint8{uint8(119), uint8(158)}, [2]uint8{uint8(120), uint8(159)}, [2]uint8{uint8(121), uint8(159)}, [2]uint8{uint8(122), uint8(160)}, [2]uint8{uint8(123), uint8(160)}, [2]uint8{uint8(124), uint8(161)}, [2]uint8{uint8(125), uint8(161)}, [2]uint8{uint8(179), uint8(162)}, [2]uint8{uint8(186), uint8(163)}, [2]uint8{uint8(187), uint8(163)}, [2]uint8{uint8(188), uint8(164)}, [2]uint8{uint8(190), uint8(165)}, [2]uint8{uint8(195), uint8(162)}, [2]uint8{uint8(204), uint8(164)}, [2]uint8{uint8(218), uint8(166)}, [2]uint8{uint8(219), uint8(166)}, [2]uint8{uint8(229), uint8(106)}, [2]uint8{uint8(234), uint8(167)}, [2]uint8{uint8(235), uint8(167)}, [2]uint8{uint8(236), uint8(110)}, [2]uint8{uint8(243), uint8(162)}, [2]uint8{uint8(248), uint8(168)}, [2]uint8{uint8(249), uint8(168)}, [2]uint8{uint8(250), uint8(169)}, [2]uint8{uint8(251), uint8(169)}, [2]uint8{uint8(252), uint8(164)}, [2]uint8{uint8(38), uint8(176)}, [2]uint8{uint8(42), uint8(177)}, [2]uint8{uint8(43), uint8(178)}, [2]uint8{uint8(78), uint8(179)}, [2]uint8{uint8(132), uint8(8)}, [2]uint8{uint8(98), uint8(186)}, [2]uint8{uint8(99), uint8(187)}, [2]uint8{uint8(100), uint8(188)}, [2]uint8{uint8(101), uint8(189)}, [2]uint8{uint8(102), uint8(190)}, [2]uint8{uint8(109), uint8(191)}, [2]uint8{uint8(110), uint8(192)}, [2]uint8{uint8(111), uint8(193)}, [2]uint8{uint8(112), uint8(194)}, [2]uint8{uint8(126), uint8(195)}, [2]uint8{uint8(127), uint8(195)}, [2]uint8{uint8(125), uint8(207)}, [2]uint8{uint8(141), uint8(208)}, [2]uint8{uint8(148), uint8(209)}, [2]uint8{uint8(171), uint8(210)}, [2]uint8{uint8(172), uint8(211)}, [2]uint8{uint8(173), uint8(212)}, [2]uint8{uint8(176), uint8(213)}, [2]uint8{uint8(177), uint8(214)}, [2]uint8{uint8(178), uint8(215)}, [2]uint8{uint8(196), uint8(216)}, [2]uint8{uint8(197), uint8(217)}, [2]uint8{uint8(198), uint8(218)}} - -type struct_cpu_set_t struct { - __bits [16]uint64 +func __isless(__x float64, __y float64) int32 { + return func() int32 { + if !(func() int32 { + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(__x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(__x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(__x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return func() int32 { + func() int { + _ = __y + return 0 + }() + return int32(1) + }() + } else { + return func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(__y))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(__y)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(__y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() + } + }() != 0) && __x < __y { + return 1 + } else { + return 0 + } + }() } -type cpu_set_t = struct_cpu_set_t - -func __CPU_AND_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) { - var __i uint64 - for __i = uint64(0); __i < __size/8; __i++ { - *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) & *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8)) - } -} -func __CPU_OR_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) { - var __i uint64 - for __i = uint64(0); __i < __size/8; __i++ { - *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) | *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8)) - } -} -func __CPU_XOR_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) { - var __i uint64 - for __i = uint64(0); __i < __size/8; __i++ { - *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) ^ *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8)) - } -} - -type uid_t = uint32 -type Uid_t = uint32 -type stack_t = struct_sigaltstack -type greg_t = int32 -type gregset_t = [18]int32 -type struct_sigcontext struct { - trap_no uint64 - error_code uint64 - oldmask uint64 - arm_r0 uint64 - arm_r1 uint64 - arm_r2 uint64 - arm_r3 uint64 - arm_r4 uint64 - arm_r5 uint64 - arm_r6 uint64 - arm_r7 uint64 - arm_r8 uint64 - arm_r9 uint64 - arm_r10 uint64 - arm_fp uint64 - arm_ip uint64 - arm_sp uint64 - arm_lr uint64 - arm_pc uint64 - arm_cpsr uint64 - fault_address uint64 -} -type mcontext_t = struct_sigcontext -type struct_sigaltstack struct { - ss_sp unsafe.Pointer - ss_flags int32 - ss_size uint64 -} -type struct___ucontext struct { - uc_flags uint64 - uc_link *struct___ucontext - uc_stack struct_sigaltstack - uc_mcontext struct_sigcontext - uc_sigmask struct___sigset_t - uc_regspace [64]uint64 -} -type ucontext_t = struct___ucontext -type union_sigval struct { - sival_ptr unsafe.Pointer -} -type _cgoa_19_strsignal struct { - si_pid int32 - si_uid uint32 -} -type _cgoa_20_strsignal struct { - si_timerid int32 - si_overrun int32 -} -type _cgoa_18_strsignal struct { - __piduid _cgoa_19_strsignal -} -type _cgoa_22_strsignal struct { - si_status int32 - si_utime int64 - si_stime int64 -} -type _cgoa_21_strsignal struct { - __sigchld _cgoa_22_strsignal -} -type _cgoa_17_strsignal struct { - __first _cgoa_18_strsignal - __second _cgoa_21_strsignal -} -type _cgoa_25_strsignal struct { - si_lower unsafe.Pointer - si_upper unsafe.Pointer -} -type _cgoa_24_strsignal struct { - __addr_bnd _cgoa_25_strsignal -} -type _cgoa_23_strsignal struct { - si_addr unsafe.Pointer - si_addr_lsb int16 - __first _cgoa_24_strsignal -} -type _cgoa_26_strsignal struct { - si_band int64 - si_fd int32 -} -type _cgoa_27_strsignal struct { - si_call_addr unsafe.Pointer - si_syscall int32 - si_arch uint32 -} -type _cgoa_16_strsignal struct { - __pad [112]int8 -} -type _cgoa_15_strsignal struct { - si_signo int32 - si_errno int32 - si_code int32 - __si_fields _cgoa_16_strsignal -} -type siginfo_t = _cgoa_15_strsignal -type _cgoa_28_strsignal struct { - sa_handler func(int32) -} -type struct_sigaction struct { - __sa_handler _cgoa_28_strsignal - sa_mask struct___sigset_t - sa_flags int32 - sa_restorer func() -} -type _cgoa_30_strsignal struct { - sigev_notify_function func(union_sigval) - sigev_notify_attributes *_cgoa_5___rand48_step -} -type _cgoa_29_strsignal struct { - __pad [48]int8 -} -type struct_sigevent struct { - sigev_value union_sigval - sigev_signo int32 - sigev_notify int32 - __sev_fields _cgoa_29_strsignal -} -type sig_t = func(int32) -type sig_atomic_t = int32 -type gid_t = uint32 -type Gid_t = uint32 -type useconds_t = uint32 -type Useconds_t = uint32 -type syscall_arg_t = int64 - -func __alt_socketcall(sys int32, sock int32, cp int32, a int64, b int64, c int64, d int64, e int64, f int64) int64 { - var r int64 - if cp != 0 { - r = __syscall_cp(int64(sys), int64(a), int64(b), int64(c), int64(d), int64(e), int64(f)) - } else { - r = __syscall6(int64(sys), int64(a), int64(b), int64(c), int64(d), int64(e), int64(f)) - } - if r != int64(-38) { - return r - } - return r -} - -type struct__IO_FILE struct { - flags uint32 - rpos *uint8 - rend *uint8 - close func(*struct__IO_FILE) int32 - wend *uint8 - wpos *uint8 - mustbezero_1 *uint8 - wbase *uint8 - read func(*struct__IO_FILE, *uint8, uint64) uint64 - write func(*struct__IO_FILE, *uint8, uint64) uint64 - seek func(*struct__IO_FILE, int64, int32) int64 - buf *uint8 - buf_size uint64 - prev *struct__IO_FILE - next *struct__IO_FILE - fd int32 - pipe_pid int32 - lockcount int64 - mode int32 - lock int32 - lbf int32 - cookie unsafe.Pointer - off int64 - getln_buf *int8 - mustbezero_2 unsafe.Pointer - shend *uint8 - shlim int64 - shcnt int64 - prev_locked *struct__IO_FILE - next_locked *struct__IO_FILE - locale *struct___locale_struct -} -type float_t = float32 -type Float_t = float32 -type double_t = float64 -type Double_t = float64 - -func X__FLOAT_BITS(__f float32) uint32 { - type _cgoa_15_floatscan struct { - __f float32 - } - var __u _cgoa_15_floatscan - __u.__f = __f - return *(*uint32)(unsafe.Pointer(&__u)) -} -func X__DOUBLE_BITS(__f float64) uint64 { - type _cgoa_16_floatscan struct { - __f float64 - } - var __u _cgoa_16_floatscan - __u.__f = __f - return *(*uint64)(unsafe.Pointer(&__u)) -} -func __islessf(__x float32, __y float32) int32 { +func __islessl(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { - if 4 == 4 { + if 8 == 4 { return func() int32 { - if X__FLOAT_BITS(__x)&uint32(2147483647) > uint32(2139095040) { + if X__FLOAT_BITS(float32(__x))&uint32(2147483647) > uint32(2139095040) { return 1 } else { return 0 @@ -540,7 +426,7 @@ func __islessf(__x float32, __y float32) int32 { }() } else { return func() int32 { - if 4 == 8 { + if 8 == 8 { return func() int32 { if X__DOUBLE_BITS(float64(__x))&9223372036854775807 > 9218868437227405312 { return 1 @@ -550,7 +436,7 @@ func __islessf(__x float32, __y float32) int32 { }() } else { return func() int32 { - if X__fpclassifyl(float64(__x)) == int32(0) { + if X__fpclassifyl(__x) == int32(0) { return 1 } else { return 0 @@ -569,9 +455,9 @@ func __islessf(__x float32, __y float32) int32 { }() } else { return func() int32 { - if 4 == 4 { + if 8 == 4 { return func() int32 { - if X__FLOAT_BITS(__y)&uint32(2147483647) > uint32(2139095040) { + if X__FLOAT_BITS(float32(__y))&uint32(2147483647) > uint32(2139095040) { return 1 } else { return 0 @@ -579,7 +465,7 @@ func __islessf(__x float32, __y float32) int32 { }() } else { return func() int32 { - if 4 == 8 { + if 8 == 8 { return func() int32 { if X__DOUBLE_BITS(float64(__y))&9223372036854775807 > 9218868437227405312 { return 1 @@ -589,7 +475,7 @@ func __islessf(__x float32, __y float32) int32 { }() } else { return func() int32 { - if X__fpclassifyl(float64(__y)) == int32(0) { + if X__fpclassifyl(__y) == int32(0) { return 1 } else { return 0 @@ -607,13 +493,13 @@ func __islessf(__x float32, __y float32) int32 { } }() } -func __isless(__x float64, __y float64) int32 { +func __islessequalf(__x float32, __y float32) int32 { return func() int32 { if !(func() int32 { if func() int32 { - if 8 == 4 { + if 4 == 4 { return func() int32 { - if X__FLOAT_BITS(float32(__x))&uint32(2147483647) > uint32(2139095040) { + if X__FLOAT_BITS(__x)&uint32(2147483647) > uint32(2139095040) { return 1 } else { return 0 @@ -621,9 +507,9 @@ func __isless(__x float64, __y float64) int32 { }() } else { return func() int32 { - if 8 == 8 { + if 4 == 8 { return func() int32 { - if X__DOUBLE_BITS(__x)&9223372036854775807 > 9218868437227405312 { + if X__DOUBLE_BITS(float64(__x))&9223372036854775807 > 9218868437227405312 { return 1 } else { return 0 @@ -650,9 +536,9 @@ func __isless(__x float64, __y float64) int32 { }() } else { return func() int32 { - if 8 == 4 { + if 4 == 4 { return func() int32 { - if X__FLOAT_BITS(float32(__y))&uint32(2147483647) > uint32(2139095040) { + if X__FLOAT_BITS(__y)&uint32(2147483647) > uint32(2139095040) { return 1 } else { return 0 @@ -660,9 +546,9 @@ func __isless(__x float64, __y float64) int32 { }() } else { return func() int32 { - if 8 == 8 { + if 4 == 8 { return func() int32 { - if X__DOUBLE_BITS(__y)&9223372036854775807 > 9218868437227405312 { + if X__DOUBLE_BITS(float64(__y))&9223372036854775807 > 9218868437227405312 { return 1 } else { return 0 @@ -681,14 +567,14 @@ func __isless(__x float64, __y float64) int32 { } }() } - }() != 0) && __x < __y { + }() != 0) && __x <= __y { return 1 } else { return 0 } }() } -func __islessl(__x float64, __y float64) int32 { +func __islessequal(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -704,7 +590,7 @@ func __islessl(__x float64, __y float64) int32 { return func() int32 { if 8 == 8 { return func() int32 { - if X__DOUBLE_BITS(float64(__x))&9223372036854775807 > 9218868437227405312 { + if X__DOUBLE_BITS(__x)&9223372036854775807 > 9218868437227405312 { return 1 } else { return 0 @@ -712,7 +598,7 @@ func __islessl(__x float64, __y float64) int32 { }() } else { return func() int32 { - if X__fpclassifyl(__x) == int32(0) { + if X__fpclassifyl(float64(__x)) == int32(0) { return 1 } else { return 0 @@ -743,7 +629,7 @@ func __islessl(__x float64, __y float64) int32 { return func() int32 { if 8 == 8 { return func() int32 { - if X__DOUBLE_BITS(float64(__y))&9223372036854775807 > 9218868437227405312 { + if X__DOUBLE_BITS(__y)&9223372036854775807 > 9218868437227405312 { return 1 } else { return 0 @@ -751,169 +637,7 @@ func __islessl(__x float64, __y float64) int32 { }() } else { return func() int32 { - if X__fpclassifyl(__y) == int32(0) { - return 1 - } else { - return 0 - } - }() - } - }() - } - }() - } - }() != 0) && __x < __y { - return 1 - } else { - return 0 - } - }() -} -func __islessequalf(__x float32, __y float32) int32 { - return func() int32 { - if !(func() int32 { - if func() int32 { - if 4 == 4 { - return func() int32 { - if X__FLOAT_BITS(__x)&uint32(2147483647) > uint32(2139095040) { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if 4 == 8 { - return func() int32 { - if X__DOUBLE_BITS(float64(__x))&9223372036854775807 > 9218868437227405312 { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if X__fpclassifyl(float64(__x)) == int32(0) { - return 1 - } else { - return 0 - } - }() - } - }() - } - }() != 0 { - return func() int32 { - func() int { - _ = __y - return 0 - }() - return int32(1) - }() - } else { - return func() int32 { - if 4 == 4 { - return func() int32 { - if X__FLOAT_BITS(__y)&uint32(2147483647) > uint32(2139095040) { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if 4 == 8 { - return func() int32 { - if X__DOUBLE_BITS(float64(__y))&9223372036854775807 > 9218868437227405312 { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if X__fpclassifyl(float64(__y)) == int32(0) { - return 1 - } else { - return 0 - } - }() - } - }() - } - }() - } - }() != 0) && __x <= __y { - return 1 - } else { - return 0 - } - }() -} -func __islessequal(__x float64, __y float64) int32 { - return func() int32 { - if !(func() int32 { - if func() int32 { - if 8 == 4 { - return func() int32 { - if X__FLOAT_BITS(float32(__x))&uint32(2147483647) > uint32(2139095040) { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if 8 == 8 { - return func() int32 { - if X__DOUBLE_BITS(__x)&9223372036854775807 > 9218868437227405312 { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if X__fpclassifyl(float64(__x)) == int32(0) { - return 1 - } else { - return 0 - } - }() - } - }() - } - }() != 0 { - return func() int32 { - func() int { - _ = __y - return 0 - }() - return int32(1) - }() - } else { - return func() int32 { - if 8 == 4 { - return func() int32 { - if X__FLOAT_BITS(float32(__y))&uint32(2147483647) > uint32(2139095040) { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if 8 == 8 { - return func() int32 { - if X__DOUBLE_BITS(__y)&9223372036854775807 > 9218868437227405312 { - return 1 - } else { - return 0 - } - }() - } else { - return func() int32 { - if X__fpclassifyl(float64(__y)) == int32(0) { + if X__fpclassifyl(float64(__y)) == int32(0) { return 1 } else { return 0 @@ -1741,21 +1465,15 @@ func __isgreaterequall(__x float64, __y float64) int32 { } }() } - -type _cgoa_15_strerror struct { - __ll int64 - __ld float64 +func __bswap16(__x uint16) uint16 { + return uint16(int32(__x)<>int32(8)) } -type max_align_t = _cgoa_15_strerror -type Max_align_t = _cgoa_15_strerror -type ptrdiff_t = int64 -type Ptrdiff_t = int64 -type fexcept_t = uint64 -type _cgoa_1_fenv struct { - __cw uint64 +func __bswap32(__x uint32) uint32 { + return __x>>int32(24) | __x>>int32(8)&uint32(65280) | __x<>int32(32)))) } -type fenv_t = _cgoa_1_fenv - func eval_as_float(x float32) float32 { var y float32 = x return y @@ -1794,16 +1512,61 @@ func fp_force_evall(x float64) { _ = y y = x } -func a_fetch_add(p *int32, v int32) int32 { - var old int32 - for { - old = a_ll(p) - if !!(a_sc(p, int32(uint32(old)+uint32(v))) != 0) { - break - } + +type struct_exp_data struct { + invln2N float64 + shift float64 + negln2hiN float64 + negln2loN float64 + poly [4]float64 + exp2_shift float64 + exp2_poly [5]float64 + tab [256]uint64 +} +type struct_cpu_set_t struct { + __bits [16]uint64 +} +type cpu_set_t = struct_cpu_set_t + +func __CPU_AND_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) { + var __i uint64 + for __i = uint64(0); __i < __size/8; __i++ { + *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) & *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8)) + } +} +func __CPU_OR_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) { + var __i uint64 + for __i = uint64(0); __i < __size/8; __i++ { + *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) | *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8)) + } +} +func __CPU_XOR_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set_t, __src2 *struct_cpu_set_t) { + var __i uint64 + for __i = uint64(0); __i < __size/8; __i++ { + *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__dest)))) + uintptr(__i)*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src1)))) + uintptr(__i)*8)) ^ *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(__src2)))) + uintptr(__i)*8)) } - return old } + +type cookie_read_function_t = func(unsafe.Pointer, *int8, uint64) int64 +type cookie_write_function_t = func(unsafe.Pointer, *int8, uint64) int64 +type cookie_seek_function_t = func(unsafe.Pointer, *int64, int32) int32 +type cookie_close_function_t = func(unsafe.Pointer) int32 +type struct__IO_cookie_io_functions_t struct { + read func(unsafe.Pointer, *int8, uint64) int64 + write func(unsafe.Pointer, *int8, uint64) int64 + seek func(unsafe.Pointer, *int64, int32) int32 + close func(unsafe.Pointer) int32 +} +type cookie_io_functions_t = struct__IO_cookie_io_functions_t +type struct_exp2f_data struct { + tab [32]uint64 + shift_scaled float64 + poly [3]float64 + shift float64 + invln2_scaled float64 + poly_scaled [3]float64 +} + func a_fetch_and(p *int32, v int32) int32 { var old int32 for { @@ -1845,10 +1608,10 @@ func a_barrier() { a_cas(&tmp, int32(0), int32(0)) } func a_and_64(p *uint64, v uint64) { - type _cgoa_18_qsort struct { + type _cgoa_18_fma struct { v uint64 } - var u _cgoa_18_qsort + var u _cgoa_18_fma u.v = v if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4))+uint32(1) != 0 { a_and((*int32)(unsafe.Pointer(p)), int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4)))) @@ -1858,10 +1621,10 @@ func a_and_64(p *uint64, v uint64) { } } func a_or_64(p *uint64, v uint64) { - type _cgoa_19_qsort struct { + type _cgoa_19_fma struct { v uint64 } - var u _cgoa_19_qsort + var u _cgoa_19_fma u.v = v if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4)) != 0 { a_or((*int32)(unsafe.Pointer(p)), int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&*(*[2]uint32)(unsafe.Pointer(&u)))))) + uintptr(int32(0))*4)))) @@ -1881,10 +1644,10 @@ func a_crash() { *(*int8)(nil) = int8(0) } func a_ctz_32(x uint32) int32 { - return int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&debruijn32_cgo20_qsort)))) + uintptr(x&-x*uint32(124511785)>>int32(27))))) + return int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&debruijn32_cgo20_fma)))) + uintptr(x&-x*uint32(124511785)>>int32(27))))) } -var debruijn32_cgo20_qsort [32]int8 = [32]int8{int8(0), int8(1), int8(23), int8(2), int8(29), int8(24), int8(19), int8(3), int8(30), int8(27), int8(25), int8(11), int8(20), int8(8), int8(4), int8(13), int8(31), int8(22), int8(28), int8(18), int8(26), int8(10), int8(7), int8(12), int8(21), int8(17), int8(9), int8(6), int8(16), int8(5), int8(15), int8(14)} +var debruijn32_cgo20_fma [32]int8 = [32]int8{int8(0), int8(1), int8(23), int8(2), int8(29), int8(24), int8(19), int8(3), int8(30), int8(27), int8(25), int8(11), int8(20), int8(8), int8(4), int8(13), int8(31), int8(22), int8(28), int8(18), int8(26), int8(10), int8(7), int8(12), int8(21), int8(17), int8(9), int8(6), int8(16), int8(5), int8(15), int8(14)} func a_ctz_64(x uint64) int32 { if false { @@ -1895,10 +1658,10 @@ func a_ctz_64(x uint64) int32 { } return a_ctz_32(y) } - return int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&debruijn64_cgo21_qsort)))) + uintptr(x&-x*uint64(157587932685088877)>>int32(58))))) + return int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&debruijn64_cgo21_fma)))) + uintptr(x&-x*uint64(157587932685088877)>>int32(58))))) } -var debruijn64_cgo21_qsort [64]int8 = [64]int8{int8(0), int8(1), int8(2), int8(53), int8(3), int8(7), int8(54), int8(27), int8(4), int8(38), int8(41), int8(8), int8(34), int8(55), int8(48), int8(28), int8(62), int8(5), int8(39), int8(46), int8(44), int8(42), int8(22), int8(9), int8(24), int8(35), int8(59), int8(56), int8(49), int8(18), int8(29), int8(11), int8(63), int8(52), int8(6), int8(26), int8(37), int8(40), int8(33), int8(47), int8(61), int8(45), int8(43), int8(21), int8(23), int8(58), int8(17), int8(10), int8(51), int8(25), int8(36), int8(32), int8(60), int8(20), int8(57), int8(16), int8(50), int8(31), int8(19), int8(15), int8(30), int8(14), int8(13), int8(12)} +var debruijn64_cgo21_fma [64]int8 = [64]int8{int8(0), int8(1), int8(2), int8(53), int8(3), int8(7), int8(54), int8(27), int8(4), int8(38), int8(41), int8(8), int8(34), int8(55), int8(48), int8(28), int8(62), int8(5), int8(39), int8(46), int8(44), int8(42), int8(22), int8(9), int8(24), int8(35), int8(59), int8(56), int8(49), int8(18), int8(29), int8(11), int8(63), int8(52), int8(6), int8(26), int8(37), int8(40), int8(33), int8(47), int8(61), int8(45), int8(43), int8(21), int8(23), int8(58), int8(17), int8(10), int8(51), int8(25), int8(36), int8(32), int8(60), int8(20), int8(57), int8(16), int8(50), int8(31), int8(19), int8(15), int8(30), int8(14), int8(13), int8(12)} func a_ctz_l(x uint64) int32 { return func() int32 { @@ -1970,6 +1733,341 @@ func a_clz_32(x uint32) int32 { return int32(31) - a_ctz_32(x) } +type fexcept_t = uint64 +type _cgoa_1_fmaf struct { + __cw uint64 +} +type fenv_t = _cgoa_1_fmaf +type _cgoa_18_log struct { + invc float64 + logc float64 +} +type _cgoa_19_log struct { + chi float64 + clo float64 +} +type struct_log_data struct { + ln2hi float64 + ln2lo float64 + poly [5]float64 + poly1 [11]float64 + tab [128]_cgoa_18_log + tab2 [128]_cgoa_19_log +} +type _cgoa_18_log2 struct { + invc float64 + logc float64 +} +type _cgoa_19_log2 struct { + chi float64 + clo float64 +} +type struct_log2_data struct { + invln2hi float64 + invln2lo float64 + poly [6]float64 + poly1 [10]float64 + tab [64]_cgoa_18_log2 + tab2 [64]_cgoa_19_log2 +} +type _cgoa_18_log2f_data struct { + invc float64 + logc float64 +} +type struct_log2f_data struct { + tab [16]_cgoa_18_log2f_data + poly [4]float64 +} +type _cgoa_18_logf_data struct { + invc float64 + logc float64 +} +type struct_logf_data struct { + tab [16]_cgoa_18_logf_data + ln2 float64 + poly [3]float64 +} +type _cgoa_18_pow struct { + invc float64 + pad float64 + logc float64 + logctail float64 +} +type struct_pow_log_data struct { + ln2hi float64 + ln2lo float64 + poly [7]float64 + tab [128]_cgoa_18_pow +} +type _cgoa_18_powf_data struct { + invc float64 + logc float64 +} +type struct_powf_log2_data struct { + tab [16]_cgoa_18_powf_data + poly [5]float64 +} +type _cgoa_18_drand48 struct { + quot int64 + rem int64 +} +type imaxdiv_t = _cgoa_18_drand48 +type struct_lconv struct { + decimal_point *int8 + thousands_sep *int8 + grouping *int8 + int_curr_symbol *int8 + currency_symbol *int8 + mon_decimal_point *int8 + mon_thousands_sep *int8 + mon_grouping *int8 + positive_sign *int8 + negative_sign *int8 + int_frac_digits int8 + frac_digits int8 + p_cs_precedes int8 + p_sep_by_space int8 + n_cs_precedes int8 + n_sep_by_space int8 + p_sign_posn int8 + n_sign_posn int8 + int_p_cs_precedes int8 + int_p_sep_by_space int8 + int_n_cs_precedes int8 + int_n_sep_by_space int8 + int_p_sign_posn int8 + int_n_sign_posn int8 +} +type struct___locale_map struct { + map_ unsafe.Pointer + map_size uint64 + name [24]int8 + next *struct___locale_map +} + +func __isspace(_c int32) int32 { + return func() int32 { + if _c == ' ' || uint32(_c)-uint32('\t') < uint32(5) { + return 1 + } else { + return 0 + } + }() +} + +type wint_t = uint32 +type Wint_t = uint32 +type wctype_t = uint64 +type Wctype_t = uint64 +type wctrans_t = *int32 +type struct___mbstate_t struct { + __opaque1 uint32 + __opaque2 uint32 +} +type mbstate_t = struct___mbstate_t +type Mbstate_t = struct___mbstate_t + +var tab_cgo19_towctrans [2666]uint8 = [2666]uint8{uint8(7), uint8(8), uint8(9), uint8(10), uint8(11), uint8(12), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(13), uint8(6), uint8(6), uint8(14), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(15), uint8(16), uint8(17), uint8(18), uint8(6), uint8(19), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(20), uint8(21), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(22), uint8(23), uint8(6), uint8(6), uint8(6), uint8(24), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(25), uint8(6), uint8(6), uint8(6), uint8(6), uint8(26), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(27), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(28), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(29), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(30), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(0), uint8(84), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(24), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(43), uint8(43), uint8(91), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(74), uint8(86), uint8(86), uint8(5), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(36), uint8(80), uint8(121), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(56), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(78), uint8(49), uint8(2), uint8(78), uint8(13), uint8(13), uint8(78), uint8(3), uint8(78), uint8(0), uint8(36), uint8(110), uint8(0), uint8(78), uint8(49), uint8(38), uint8(110), uint8(81), uint8(78), uint8(36), uint8(80), uint8(78), uint8(57), uint8(20), uint8(129), uint8(27), uint8(29), uint8(29), uint8(83), uint8(49), uint8(80), uint8(49), uint8(80), uint8(13), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(27), uint8(83), uint8(36), uint8(80), uint8(49), uint8(2), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(20), uint8(121), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(45), uint8(43), uint8(73), uint8(3), uint8(72), uint8(3), uint8(120), uint8(92), uint8(123), uint8(20), uint8(0), uint8(150), uint8(10), uint8(1), uint8(43), uint8(40), uint8(6), uint8(6), uint8(0), uint8(42), uint8(6), uint8(42), uint8(42), uint8(43), uint8(7), uint8(187), uint8(181), uint8(43), uint8(30), uint8(0), uint8(43), uint8(7), uint8(43), uint8(43), uint8(43), uint8(1), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(205), uint8(70), uint8(205), uint8(43), uint8(0), uint8(37), uint8(43), uint8(7), uint8(1), uint8(6), uint8(1), uint8(85), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(85), uint8(86), uint8(86), uint8(2), uint8(36), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(21), uint8(129), uint8(129), uint8(129), uint8(0), uint8(0), uint8(43), uint8(0), uint8(178), uint8(209), uint8(178), uint8(209), uint8(178), uint8(209), uint8(178), uint8(209), uint8(0), uint8(0), uint8(205), uint8(204), uint8(1), uint8(0), uint8(215), uint8(215), uint8(215), uint8(215), uint8(215), uint8(131), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(28), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(2), uint8(0), uint8(0), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(78), uint8(49), uint8(80), uint8(49), uint8(80), uint8(78), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(2), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(135), uint8(166), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(0), uint8(0), uint8(0), uint8(84), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(84), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(12), uint8(0), uint8(12), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(42), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(108), uint8(129), uint8(21), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(108), uint8(3), uint8(65), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(44), uint8(86), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(12), uint8(108), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(86), uint8(122), uint8(158), uint8(38), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(37), uint8(6), uint8(1), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(44), uint8(43), uint8(127), uint8(86), uint8(86), uint8(57), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(44), uint8(43), uint8(127), uint8(86), uint8(86), uint8(129), uint8(55), uint8(117), uint8(91), uint8(123), uint8(92), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(2), uint8(172), uint8(4), uint8(0), uint8(0), uint8(57), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(43), uint8(43), uint8(79), uint8(86), uint8(86), uint8(44), uint8(43), uint8(43), uint8(86), uint8(86), uint8(50), uint8(19), uint8(129), uint8(87), uint8(0), uint8(111), uint8(129), uint8(126), uint8(201), uint8(215), uint8(126), uint8(45), uint8(129), uint8(129), uint8(14), uint8(126), uint8(57), uint8(127), uint8(111), uint8(87), uint8(0), uint8(129), uint8(129), uint8(126), uint8(21), uint8(0), uint8(126), uint8(3), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(43), uint8(36), uint8(43), uint8(151), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(128), uint8(129), uint8(129), uint8(129), uint8(129), uint8(57), uint8(187), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(201), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(208), uint8(13), uint8(0), uint8(78), uint8(49), uint8(2), uint8(180), uint8(193), uint8(193), uint8(215), uint8(215), uint8(36), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(215), uint8(215), uint8(83), uint8(193), uint8(71), uint8(212), uint8(215), uint8(215), uint8(215), uint8(5), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(78), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(13), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(49), uint8(80), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(121), uint8(92), uint8(123), uint8(92), uint8(123), uint8(79), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(45), uint8(43), uint8(43), uint8(121), uint8(20), uint8(92), uint8(123), uint8(92), uint8(45), uint8(121), uint8(42), uint8(92), uint8(39), uint8(92), uint8(123), uint8(92), uint8(123), uint8(92), uint8(123), uint8(164), uint8(0), uint8(10), uint8(180), uint8(92), uint8(123), uint8(92), uint8(123), uint8(79), uint8(3), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(72), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(0), uint8(72), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(0), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(36), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(7), uint8(0), uint8(0), uint8(0), uint8(0), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(42), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(43), uint8(85), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(86), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} +var rules_cgo20_towctrans [240]int32 = [240]int32{int32(0), int32(8193), -8192, int32(1949440), int32(190208), int32(30976), int32(9218), int32(257), -256, int32(0), int32(513), -512, -50943, -59392, -30975, -76800, int32(49920), int32(53761), int32(52737), int32(52481), int32(20225), int32(51713), int32(51969), int32(52993), int32(24832), int32(54017), int32(53505), int32(41728), int32(54529), int32(33280), int32(54785), int32(55809), int32(55553), int32(56065), int32(14336), int32(3), -20224, -24831, -14335, int32(2369538), int32(0), int32(257), -256, -52480, -55808, -33279, int32(2763521), -41727, int32(2762753), int32(2768640), -49919, int32(17665), int32(18177), int32(2760448), int32(2759680), int32(2760192), -53760, -52736, -51712, -51968, int32(10833664), int32(10832640), -52992, int32(10823680), int32(10830848), -53504, -54016, int32(2750208), int32(10830080), int32(2751744), -54528, -54784, int32(2746112), int32(10830592), int32(10824192), -17664, -55552, -18176, -56064, int32(10818816), int32(10818048), int32(4989954), int32(0), int32(8193), -8192, int32(257), -256, int32(21504), int32(29697), int32(9729), int32(9473), int32(16385), int32(16129), -9728, -9472, -7936, -16384, -16128, int32(2049), -15872, -14592, -12032, -13824, -2048, -22016, -20480, int32(1792), -29696, -15359, -24576, -1791, int32(7346690), int32(257), -256, int32(8193), -8192, int32(20481), int32(3841), -3840, int32(0), int32(12289), -12288, int32(257), -256, int32(0), int32(770048), int32(1859585), int32(0), int32(9949185), int32(2049), -2048, int32(9045250), int32(0), -770047, -1597952, int32(9028096), -1582336, -1601024, -1600768, -1598464, -1598208, -1596416, int32(0), int32(9058304), int32(9044992), int32(976384), int32(257), -256, int32(0), -15104, -1949439, int32(9379074), int32(2048), -2047, int32(0), int32(22016), -22015, int32(18944), int32(25600), int32(32768), int32(28672), int32(32256), int32(2304), -18943, -2303, -1844480, -25599, -28671, -32767, -32255, int32(11273474), int32(0), int32(4097), -4096, int32(7169), int32(257), -1924351, -2146047, -2115071, -7168, int32(11602690), int32(257), -256, int32(12289), -12288, int32(0), -2750207, -976383, -2746111, -2763520, -2762752, -2759679, -2751743, -2760447, -2760191, -2768639, int32(0), -1859584, int32(0), int32(257), -256, int32(12323842), int32(0), int32(257), -256, -10830847, int32(237569), -9044991, -10823679, int32(12288), -10833663, -10832639, -10830079, -10818047, -10824191, -10818815, -12287, -10830591, -9058303, int32(0), -9949184, -237568, int32(0), int32(8193), -8192, int32(0), int32(10241), -10240, int32(0), int32(16385), -16384, int32(0), int32(8193), -8192, int32(0), int32(8193), -8192, int32(0), int32(8705), -8704} +var rulebases_cgo21_towctrans [512]uint8 = [512]uint8{uint8(0), uint8(6), uint8(39), uint8(81), uint8(111), uint8(119), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(124), uint8(0), uint8(0), uint8(127), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(131), uint8(142), uint8(146), uint8(151), uint8(0), uint8(170), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(180), uint8(196), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(198), uint8(201), uint8(0), uint8(0), uint8(0), uint8(219), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(222), uint8(0), uint8(0), uint8(0), uint8(0), uint8(225), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(228), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(231), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(234), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(237), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} +var exceptions_cgo22_towctrans [200][2]uint8 = [200][2]uint8{[2]uint8{uint8(48), uint8(12)}, [2]uint8{uint8(49), uint8(13)}, [2]uint8{uint8(120), uint8(14)}, [2]uint8{uint8(127), uint8(15)}, [2]uint8{uint8(128), uint8(16)}, [2]uint8{uint8(129), uint8(17)}, [2]uint8{uint8(134), uint8(18)}, [2]uint8{uint8(137), uint8(19)}, [2]uint8{uint8(138), uint8(19)}, [2]uint8{uint8(142), uint8(20)}, [2]uint8{uint8(143), uint8(21)}, [2]uint8{uint8(144), uint8(22)}, [2]uint8{uint8(147), uint8(19)}, [2]uint8{uint8(148), uint8(23)}, [2]uint8{uint8(149), uint8(24)}, [2]uint8{uint8(150), uint8(25)}, [2]uint8{uint8(151), uint8(26)}, [2]uint8{uint8(154), uint8(27)}, [2]uint8{uint8(156), uint8(25)}, [2]uint8{uint8(157), uint8(28)}, [2]uint8{uint8(158), uint8(29)}, [2]uint8{uint8(159), uint8(30)}, [2]uint8{uint8(166), uint8(31)}, [2]uint8{uint8(169), uint8(31)}, [2]uint8{uint8(174), uint8(31)}, [2]uint8{uint8(177), uint8(32)}, [2]uint8{uint8(178), uint8(32)}, [2]uint8{uint8(183), uint8(33)}, [2]uint8{uint8(191), uint8(34)}, [2]uint8{uint8(197), uint8(35)}, [2]uint8{uint8(200), uint8(35)}, [2]uint8{uint8(203), uint8(35)}, [2]uint8{uint8(221), uint8(36)}, [2]uint8{uint8(242), uint8(35)}, [2]uint8{uint8(246), uint8(37)}, [2]uint8{uint8(247), uint8(38)}, [2]uint8{uint8(32), uint8(45)}, [2]uint8{uint8(58), uint8(46)}, [2]uint8{uint8(61), uint8(47)}, [2]uint8{uint8(62), uint8(48)}, [2]uint8{uint8(63), uint8(49)}, [2]uint8{uint8(64), uint8(49)}, [2]uint8{uint8(67), uint8(50)}, [2]uint8{uint8(68), uint8(51)}, [2]uint8{uint8(69), uint8(52)}, [2]uint8{uint8(80), uint8(53)}, [2]uint8{uint8(81), uint8(54)}, [2]uint8{uint8(82), uint8(55)}, [2]uint8{uint8(83), uint8(56)}, [2]uint8{uint8(84), uint8(57)}, [2]uint8{uint8(89), uint8(58)}, [2]uint8{uint8(91), uint8(59)}, [2]uint8{uint8(92), uint8(60)}, [2]uint8{uint8(97), uint8(61)}, [2]uint8{uint8(99), uint8(62)}, [2]uint8{uint8(101), uint8(63)}, [2]uint8{uint8(102), uint8(64)}, [2]uint8{uint8(104), uint8(65)}, [2]uint8{uint8(105), uint8(66)}, [2]uint8{uint8(106), uint8(64)}, [2]uint8{uint8(107), uint8(67)}, [2]uint8{uint8(108), uint8(68)}, [2]uint8{uint8(111), uint8(66)}, [2]uint8{uint8(113), uint8(69)}, [2]uint8{uint8(114), uint8(70)}, [2]uint8{uint8(117), uint8(71)}, [2]uint8{uint8(125), uint8(72)}, [2]uint8{uint8(130), uint8(73)}, [2]uint8{uint8(135), uint8(74)}, [2]uint8{uint8(137), uint8(75)}, [2]uint8{uint8(138), uint8(76)}, [2]uint8{uint8(139), uint8(76)}, [2]uint8{uint8(140), uint8(77)}, [2]uint8{uint8(146), uint8(78)}, [2]uint8{uint8(157), uint8(79)}, [2]uint8{uint8(158), uint8(80)}, [2]uint8{uint8(69), uint8(87)}, [2]uint8{uint8(123), uint8(29)}, [2]uint8{uint8(124), uint8(29)}, [2]uint8{uint8(125), uint8(29)}, [2]uint8{uint8(127), uint8(88)}, [2]uint8{uint8(134), uint8(89)}, [2]uint8{uint8(136), uint8(90)}, [2]uint8{uint8(137), uint8(90)}, [2]uint8{uint8(138), uint8(90)}, [2]uint8{uint8(140), uint8(91)}, [2]uint8{uint8(142), uint8(92)}, [2]uint8{uint8(143), uint8(92)}, [2]uint8{uint8(172), uint8(93)}, [2]uint8{uint8(173), uint8(94)}, [2]uint8{uint8(174), uint8(94)}, [2]uint8{uint8(175), uint8(94)}, [2]uint8{uint8(194), uint8(95)}, [2]uint8{uint8(204), uint8(96)}, [2]uint8{uint8(205), uint8(97)}, [2]uint8{uint8(206), uint8(97)}, [2]uint8{uint8(207), uint8(98)}, [2]uint8{uint8(208), uint8(99)}, [2]uint8{uint8(209), uint8(100)}, [2]uint8{uint8(213), uint8(101)}, [2]uint8{uint8(214), uint8(102)}, [2]uint8{uint8(215), uint8(103)}, [2]uint8{uint8(240), uint8(104)}, [2]uint8{uint8(241), uint8(105)}, [2]uint8{uint8(242), uint8(106)}, [2]uint8{uint8(243), uint8(107)}, [2]uint8{uint8(244), uint8(108)}, [2]uint8{uint8(245), uint8(109)}, [2]uint8{uint8(249), uint8(110)}, [2]uint8{uint8(253), uint8(45)}, [2]uint8{uint8(254), uint8(45)}, [2]uint8{uint8(255), uint8(45)}, [2]uint8{uint8(80), uint8(105)}, [2]uint8{uint8(81), uint8(105)}, [2]uint8{uint8(82), uint8(105)}, [2]uint8{uint8(83), uint8(105)}, [2]uint8{uint8(84), uint8(105)}, [2]uint8{uint8(85), uint8(105)}, [2]uint8{uint8(86), uint8(105)}, [2]uint8{uint8(87), uint8(105)}, [2]uint8{uint8(88), uint8(105)}, [2]uint8{uint8(89), uint8(105)}, [2]uint8{uint8(90), uint8(105)}, [2]uint8{uint8(91), uint8(105)}, [2]uint8{uint8(92), uint8(105)}, [2]uint8{uint8(93), uint8(105)}, [2]uint8{uint8(94), uint8(105)}, [2]uint8{uint8(95), uint8(105)}, [2]uint8{uint8(130), uint8(0)}, [2]uint8{uint8(131), uint8(0)}, [2]uint8{uint8(132), uint8(0)}, [2]uint8{uint8(133), uint8(0)}, [2]uint8{uint8(134), uint8(0)}, [2]uint8{uint8(135), uint8(0)}, [2]uint8{uint8(136), uint8(0)}, [2]uint8{uint8(137), uint8(0)}, [2]uint8{uint8(192), uint8(117)}, [2]uint8{uint8(207), uint8(118)}, [2]uint8{uint8(128), uint8(137)}, [2]uint8{uint8(129), uint8(138)}, [2]uint8{uint8(130), uint8(139)}, [2]uint8{uint8(133), uint8(140)}, [2]uint8{uint8(134), uint8(141)}, [2]uint8{uint8(112), uint8(157)}, [2]uint8{uint8(113), uint8(157)}, [2]uint8{uint8(118), uint8(158)}, [2]uint8{uint8(119), uint8(158)}, [2]uint8{uint8(120), uint8(159)}, [2]uint8{uint8(121), uint8(159)}, [2]uint8{uint8(122), uint8(160)}, [2]uint8{uint8(123), uint8(160)}, [2]uint8{uint8(124), uint8(161)}, [2]uint8{uint8(125), uint8(161)}, [2]uint8{uint8(179), uint8(162)}, [2]uint8{uint8(186), uint8(163)}, [2]uint8{uint8(187), uint8(163)}, [2]uint8{uint8(188), uint8(164)}, [2]uint8{uint8(190), uint8(165)}, [2]uint8{uint8(195), uint8(162)}, [2]uint8{uint8(204), uint8(164)}, [2]uint8{uint8(218), uint8(166)}, [2]uint8{uint8(219), uint8(166)}, [2]uint8{uint8(229), uint8(106)}, [2]uint8{uint8(234), uint8(167)}, [2]uint8{uint8(235), uint8(167)}, [2]uint8{uint8(236), uint8(110)}, [2]uint8{uint8(243), uint8(162)}, [2]uint8{uint8(248), uint8(168)}, [2]uint8{uint8(249), uint8(168)}, [2]uint8{uint8(250), uint8(169)}, [2]uint8{uint8(251), uint8(169)}, [2]uint8{uint8(252), uint8(164)}, [2]uint8{uint8(38), uint8(176)}, [2]uint8{uint8(42), uint8(177)}, [2]uint8{uint8(43), uint8(178)}, [2]uint8{uint8(78), uint8(179)}, [2]uint8{uint8(132), uint8(8)}, [2]uint8{uint8(98), uint8(186)}, [2]uint8{uint8(99), uint8(187)}, [2]uint8{uint8(100), uint8(188)}, [2]uint8{uint8(101), uint8(189)}, [2]uint8{uint8(102), uint8(190)}, [2]uint8{uint8(109), uint8(191)}, [2]uint8{uint8(110), uint8(192)}, [2]uint8{uint8(111), uint8(193)}, [2]uint8{uint8(112), uint8(194)}, [2]uint8{uint8(126), uint8(195)}, [2]uint8{uint8(127), uint8(195)}, [2]uint8{uint8(125), uint8(207)}, [2]uint8{uint8(141), uint8(208)}, [2]uint8{uint8(148), uint8(209)}, [2]uint8{uint8(171), uint8(210)}, [2]uint8{uint8(172), uint8(211)}, [2]uint8{uint8(173), uint8(212)}, [2]uint8{uint8(176), uint8(213)}, [2]uint8{uint8(177), uint8(214)}, [2]uint8{uint8(178), uint8(215)}, [2]uint8{uint8(196), uint8(216)}, [2]uint8{uint8(197), uint8(217)}, [2]uint8{uint8(198), uint8(218)}} + +type uid_t = uint32 +type Uid_t = uint32 +type stack_t = struct_sigaltstack +type greg_t = int32 +type gregset_t = [18]int32 +type struct_sigcontext struct { + trap_no uint64 + error_code uint64 + oldmask uint64 + arm_r0 uint64 + arm_r1 uint64 + arm_r2 uint64 + arm_r3 uint64 + arm_r4 uint64 + arm_r5 uint64 + arm_r6 uint64 + arm_r7 uint64 + arm_r8 uint64 + arm_r9 uint64 + arm_r10 uint64 + arm_fp uint64 + arm_ip uint64 + arm_sp uint64 + arm_lr uint64 + arm_pc uint64 + arm_cpsr uint64 + fault_address uint64 +} +type mcontext_t = struct_sigcontext +type struct_sigaltstack struct { + ss_sp unsafe.Pointer + ss_flags int32 + ss_size uint64 +} +type struct___ucontext struct { + uc_flags uint64 + uc_link *struct___ucontext + uc_stack struct_sigaltstack + uc_mcontext struct_sigcontext + uc_sigmask struct___sigset_t + uc_regspace [64]uint64 +} +type ucontext_t = struct___ucontext +type union_sigval struct { + sival_ptr unsafe.Pointer +} +type _cgoa_19_strsignal struct { + si_pid int32 + si_uid uint32 +} +type _cgoa_20_strsignal struct { + si_timerid int32 + si_overrun int32 +} +type _cgoa_18_strsignal struct { + __piduid _cgoa_19_strsignal +} +type _cgoa_22_strsignal struct { + si_status int32 + si_utime int64 + si_stime int64 +} +type _cgoa_21_strsignal struct { + __sigchld _cgoa_22_strsignal +} +type _cgoa_17_strsignal struct { + __first _cgoa_18_strsignal + __second _cgoa_21_strsignal +} +type _cgoa_25_strsignal struct { + si_lower unsafe.Pointer + si_upper unsafe.Pointer +} +type _cgoa_24_strsignal struct { + __addr_bnd _cgoa_25_strsignal +} +type _cgoa_23_strsignal struct { + si_addr unsafe.Pointer + si_addr_lsb int16 + __first _cgoa_24_strsignal +} +type _cgoa_26_strsignal struct { + si_band int64 + si_fd int32 +} +type _cgoa_27_strsignal struct { + si_call_addr unsafe.Pointer + si_syscall int32 + si_arch uint32 +} +type _cgoa_16_strsignal struct { + __pad [112]int8 +} +type _cgoa_15_strsignal struct { + si_signo int32 + si_errno int32 + si_code int32 + __si_fields _cgoa_16_strsignal +} +type siginfo_t = _cgoa_15_strsignal +type _cgoa_28_strsignal struct { + sa_handler func(int32) +} +type struct_sigaction struct { + __sa_handler _cgoa_28_strsignal + sa_mask struct___sigset_t + sa_flags int32 + sa_restorer func() +} +type _cgoa_30_strsignal struct { + sigev_notify_function func(union_sigval) + sigev_notify_attributes *_cgoa_5___cos +} +type _cgoa_29_strsignal struct { + __pad [48]int8 +} +type struct_sigevent struct { + sigev_value union_sigval + sigev_signo int32 + sigev_notify int32 + __sev_fields _cgoa_29_strsignal +} +type sig_t = func(int32) +type sig_atomic_t = int32 +type gid_t = uint32 +type Gid_t = uint32 +type useconds_t = uint32 +type Useconds_t = uint32 +type syscall_arg_t = int64 + +func __alt_socketcall(sys int32, sock int32, cp int32, a int64, b int64, c int64, d int64, e int64, f int64) int64 { + var r int64 + if cp != 0 { + r = __syscall_cp(int64(sys), int64(a), int64(b), int64(c), int64(d), int64(e), int64(f)) + } else { + r = __syscall6(int64(sys), int64(a), int64(b), int64(c), int64(d), int64(e), int64(f)) + } + if r != int64(-38) { + return r + } + return r +} + +type struct__IO_FILE struct { + flags uint32 + rpos *uint8 + rend *uint8 + close func(*struct__IO_FILE) int32 + wend *uint8 + wpos *uint8 + mustbezero_1 *uint8 + wbase *uint8 + read func(*struct__IO_FILE, *uint8, uint64) uint64 + write func(*struct__IO_FILE, *uint8, uint64) uint64 + seek func(*struct__IO_FILE, int64, int32) int64 + buf *uint8 + buf_size uint64 + prev *struct__IO_FILE + next *struct__IO_FILE + fd int32 + pipe_pid int32 + lockcount int64 + mode int32 + lock int32 + lbf int32 + cookie unsafe.Pointer + off int64 + getln_buf *int8 + mustbezero_2 unsafe.Pointer + shend *uint8 + shlim int64 + shcnt int64 + prev_locked *struct__IO_FILE + next_locked *struct__IO_FILE + locale *struct___locale_struct +} +type _cgoa_15_strerror struct { + __ll int64 + __ld float64 +} +type max_align_t = _cgoa_15_strerror +type Max_align_t = _cgoa_15_strerror +type ptrdiff_t = int64 +type Ptrdiff_t = int64 + +func a_fetch_add(p *int32, v int32) int32 { + var old int32 + for { + old = a_ll(p) + if !!(a_sc(p, int32(uint32(old)+uint32(v))) != 0) { + break + } + } + return old +} + type mode_t = uint32 type Mode_t = uint32 type struct_flock struct { diff --git a/cbrt.c.i.go b/cbrt.c.i.go new file mode 100644 index 0000000..dfb6397 --- /dev/null +++ b/cbrt.c.i.go @@ -0,0 +1,51 @@ +package libc + +import unsafe "unsafe" + +var B1_cgo18_cbrt uint32 = uint32(715094163) +var B2_cgo19_cbrt uint32 = uint32(696219795) +var P0_cgo20_cbrt float64 = 1.8759518242717701 +var P1_cgo21_cbrt float64 = -1.8849797954337717 +var P2_cgo22_cbrt float64 = 1.6214297201053545 +var P3_cgo23_cbrt float64 = -0.75839793477876605 +var P4_cgo24_cbrt float64 = 0.14599619288661245 + +func Cbrt(x float64) float64 { + type _cgoa_25_cbrt struct { + f float64 + } + var u _cgoa_25_cbrt + u.f = x + var r float64 + var s float64 + var t float64 + var w float64 + var hx uint32 = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32) & uint64(2147483647)) + if hx >= uint32(2146435072) { + return x + x + } + if hx < uint32(1048576) { + u.f = x * 18014398509481984 + hx = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32) & uint64(2147483647)) + if hx == uint32(0) { + return x + } + hx = hx/uint32(3) + B2_cgo19_cbrt + } else { + hx = hx/uint32(3) + B1_cgo18_cbrt + } + *(*uint64)(unsafe.Pointer(&u)) &= 9223372036854775808 + *(*uint64)(unsafe.Pointer(&u)) |= uint64(hx) << int32(32) + t = u.f + r = t * t * (t / x) + t = t * (P0_cgo20_cbrt + r*(P1_cgo21_cbrt+r*P2_cgo22_cbrt) + r*r*r*(P3_cgo23_cbrt+r*P4_cgo24_cbrt)) + u.f = t + *(*uint64)(unsafe.Pointer(&u)) = (*(*uint64)(unsafe.Pointer(&u)) + uint64(2147483648)) & uint64(18446744072635809792) + t = u.f + s = t * t + r = x / s + w = t + t + r = (r - t) / (w + r) + t = t + t*r + return t +} diff --git a/cbrtf.c.i.go b/cbrtf.c.i.go new file mode 100644 index 0000000..8c12193 --- /dev/null +++ b/cbrtf.c.i.go @@ -0,0 +1,38 @@ +package libc + +import unsafe "unsafe" + +var B1_cgo18_cbrtf uint32 = uint32(709958130) +var B2_cgo19_cbrtf uint32 = uint32(642849266) + +func Cbrtf(x float32) float32 { + var r float64 + var T float64 + type _cgoa_20_cbrtf struct { + f float32 + } + var u _cgoa_20_cbrtf + u.f = x + var hx uint32 = *(*uint32)(unsafe.Pointer(&u)) & uint32(2147483647) + if hx >= uint32(2139095040) { + return x + x + } + if hx < uint32(8388608) { + if hx == uint32(0) { + return x + } + u.f = x * 16777216 + hx = *(*uint32)(unsafe.Pointer(&u)) & uint32(2147483647) + hx = hx/uint32(3) + B2_cgo19_cbrtf + } else { + hx = hx/uint32(3) + B1_cgo18_cbrtf + } + *(*uint32)(unsafe.Pointer(&u)) &= uint32(2147483648) + *(*uint32)(unsafe.Pointer(&u)) |= hx + T = float64(u.f) + r = T * T * T + T = T * (float64(x) + float64(x) + r) / (float64(x) + r + r) + r = T * T * T + T = T * (float64(x) + float64(x) + r) / (float64(x) + r + r) + return float32(T) +} diff --git a/cbrtl.c.i.go b/cbrtl.c.i.go new file mode 100644 index 0000000..d3e42da --- /dev/null +++ b/cbrtl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Cbrtl(x float64) float64 { + return float64(Cbrt(float64(x))) +} diff --git a/ceil.c.i.go b/ceil.c.i.go new file mode 100644 index 0000000..77e0abf --- /dev/null +++ b/ceil.c.i.go @@ -0,0 +1,48 @@ +package libc + +import unsafe "unsafe" + +var toint_cgo18_ceil float64 = float64(int32(1)) / 2.2204460492503131e-16 + +func Ceil(x float64) float64 { + type _cgoa_19_ceil struct { + f float64 + } + var u _cgoa_19_ceil + u.f = x + var e int32 = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + var y float64 + if e >= 1075 || x == float64(int32(0)) { + return x + } + if *(*uint64)(unsafe.Pointer(&u))>>int32(63) != 0 { + y = x - toint_cgo18_ceil + toint_cgo18_ceil - x + } else { + y = x + toint_cgo18_ceil - toint_cgo18_ceil - x + } + if e <= 1022 { + for { + if 8 == 4 { + fp_force_evalf(float32(y)) + } else if 8 == 8 { + fp_force_eval(y) + } else { + fp_force_evall(float64(y)) + } + if true { + break + } + } + return func() float64 { + if *(*uint64)(unsafe.Pointer(&u))>>int32(63) != 0 { + return -0 + } else { + return float64(int32(1)) + } + }() + } + if y < float64(int32(0)) { + return x + y + float64(int32(1)) + } + return x + y +} diff --git a/ceilf.c.i.go b/ceilf.c.i.go new file mode 100644 index 0000000..9eb6d56 --- /dev/null +++ b/ceilf.c.i.go @@ -0,0 +1,57 @@ +package libc + +import unsafe "unsafe" + +func Ceilf(x float32) float32 { + type _cgoa_18_ceilf struct { + f float32 + } + var u _cgoa_18_ceilf + u.f = x + var e int32 = int32(*(*uint32)(unsafe.Pointer(&u))>>int32(23)&uint32(255)) - int32(127) + var m uint32 + if e >= int32(23) { + return x + } + if e >= int32(0) { + m = uint32(int32(8388607) >> e) + if *(*uint32)(unsafe.Pointer(&u))&m == uint32(0) { + return x + } + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + if *(*uint32)(unsafe.Pointer(&u))>>int32(31) == uint32(0) { + *(*uint32)(unsafe.Pointer(&u)) += m + } + *(*uint32)(unsafe.Pointer(&u)) &= ^m + } else { + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + if *(*uint32)(unsafe.Pointer(&u))>>int32(31) != 0 { + u.f = float32(-0) + } else if *(*uint32)(unsafe.Pointer(&u))<> int32(32)) + if true { + break + } + } + ix &= uint32(2147483647) + if ix <= uint32(1072243195) { + if ix < uint32(1044816030) { + for { + if 8 == 4 { + fp_force_evalf(float32(x + float64(1.329228e+36))) + } else if 8 == 8 { + fp_force_eval(x + float64(1.329228e+36)) + } else { + fp_force_evall(float64(x + float64(1.329228e+36))) + } + if true { + break + } + } + return float64(1) + } + return __cos(x, float64(int32(0))) + } + if ix >= uint32(2146435072) { + return x - x + } + n = uint32(__rem_pio2(x, (*float64)(unsafe.Pointer(&y)))) + switch n & uint32(3) { + case uint32(0): + return __cos(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8))) + case uint32(1): + return -__sin(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8)), int32(1)) + case uint32(2): + return -__cos(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8))) + default: + return __sin(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8)), int32(1)) + } + return 0 +} + +type _cgoz_18_cos struct { + _f float64 +} diff --git a/cosf.c.i.go b/cosf.c.i.go new file mode 100644 index 0000000..a016414 --- /dev/null +++ b/cosf.c.i.go @@ -0,0 +1,90 @@ +package libc + +import unsafe "unsafe" + +var c1pio2_cgo18_cosf float64 = float64(int32(1)) * 1.5707963267948966 +var c2pio2_cgo19_cosf float64 = float64(int32(2)) * 1.5707963267948966 +var c3pio2_cgo20_cosf float64 = float64(int32(3)) * 1.5707963267948966 +var c4pio2_cgo21_cosf float64 = float64(int32(4)) * 1.5707963267948966 + +func Cosf(x float32) float32 { + var y float64 + var ix uint32 + var n uint32 + var sign uint32 + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_22_cosf{x})) + if true { + break + } + } + sign = ix >> int32(31) + ix &= uint32(2147483647) + if ix <= uint32(1061752794) { + if ix < uint32(964689920) { + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + return float32(1) + } + return __cosdf(float64(x)) + } + if ix <= uint32(1081824209) { + if ix > uint32(1075235811) { + return -__cosdf(func() float64 { + if sign != 0 { + return float64(x) + c2pio2_cgo19_cosf + } else { + return float64(x) - c2pio2_cgo19_cosf + } + }()) + } else if sign != 0 { + return __sindf(float64(x) + c1pio2_cgo18_cosf) + } else { + return __sindf(c1pio2_cgo18_cosf - float64(x)) + } + } + if ix <= uint32(1088565717) { + if ix > uint32(1085271519) { + return __cosdf(func() float64 { + if sign != 0 { + return float64(x) + c4pio2_cgo21_cosf + } else { + return float64(x) - c4pio2_cgo21_cosf + } + }()) + } else if sign != 0 { + return __sindf(float64(-x) - c3pio2_cgo20_cosf) + } else { + return __sindf(float64(x) - c3pio2_cgo20_cosf) + } + } + if ix >= uint32(2139095040) { + return x - x + } + n = uint32(__rem_pio2f(x, &y)) + switch n & uint32(3) { + case uint32(0): + return __cosdf(y) + case uint32(1): + return __sindf(-y) + case uint32(2): + return -__cosdf(y) + default: + return __sindf(y) + } + return 0 +} + +type _cgoz_22_cosf struct { + _f float32 +} diff --git a/cosh.c.i.go b/cosh.c.i.go new file mode 100644 index 0000000..3ed55ba --- /dev/null +++ b/cosh.c.i.go @@ -0,0 +1,41 @@ +package libc + +import unsafe "unsafe" + +func Cosh(x float64) float64 { + type _cgoa_18_cosh struct { + f float64 + } + var u _cgoa_18_cosh + u.f = x + var w uint32 + var t float64 + *(*uint64)(unsafe.Pointer(&u)) &= 9223372036854775807 + x = u.f + w = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32)) + if w < uint32(1072049730) { + if w < uint32(1045430272) { + for { + if 8 == 4 { + fp_force_evalf(float32(x + float64(1.329228e+36))) + } else if 8 == 8 { + fp_force_eval(x + float64(1.329228e+36)) + } else { + fp_force_evall(float64(x + float64(1.329228e+36))) + } + if true { + break + } + } + return float64(int32(1)) + } + t = Expm1(x) + return float64(int32(1)) + t*t/(float64(int32(2))*(float64(int32(1))+t)) + } + if w < uint32(1082535490) { + t = Exp(x) + return 0.5 * (t + float64(int32(1))/t) + } + t = __expo2(x, 1) + return t +} diff --git a/coshf.c.i.go b/coshf.c.i.go new file mode 100644 index 0000000..2837c7f --- /dev/null +++ b/coshf.c.i.go @@ -0,0 +1,41 @@ +package libc + +import unsafe "unsafe" + +func Coshf(x float32) float32 { + type _cgoa_18_coshf struct { + f float32 + } + var u _cgoa_18_coshf + u.f = x + var w uint32 + var t float32 + *(*uint32)(unsafe.Pointer(&u)) &= uint32(2147483647) + x = u.f + w = *(*uint32)(unsafe.Pointer(&u)) + if w < uint32(1060205079) { + if w < uint32(964689920) { + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + return float32(int32(1)) + } + t = Expm1f(x) + return float32(int32(1)) + t*t/(float32(int32(2))*(float32(int32(1))+t)) + } + if w < uint32(1118925335) { + t = Expf(x) + return 0.5 * (t + float32(int32(1))/t) + } + t = __expo2f(x, 1) + return t +} diff --git a/coshl.c.i.go b/coshl.c.i.go new file mode 100644 index 0000000..9eab7a5 --- /dev/null +++ b/coshl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Coshl(x float64) float64 { + return float64(Cosh(float64(x))) +} diff --git a/cosl.c.i.go b/cosl.c.i.go new file mode 100644 index 0000000..7626f6d --- /dev/null +++ b/cosl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Cosl(x float64) float64 { + return float64(Cos(float64(x))) +} diff --git a/erf.c.i.go b/erf.c.i.go new file mode 100644 index 0000000..21c79cb --- /dev/null +++ b/erf.c.i.go @@ -0,0 +1,201 @@ +package libc + +import unsafe "unsafe" + +var erx_cgo18_erf float64 = 0.84506291151046753 +var efx8_cgo19_erf float64 = 1.0270333367641007 +var pp0_cgo20_erf float64 = 0.12837916709551256 +var pp1_cgo21_erf float64 = -0.3250421072470015 +var pp2_cgo22_erf float64 = -0.02848174957559851 +var pp3_cgo23_erf float64 = -0.0057702702964894416 +var pp4_cgo24_erf float64 = -2.3763016656650163e-5 +var qq1_cgo25_erf float64 = 0.39791722395915535 +var qq2_cgo26_erf float64 = 0.065022249988767294 +var qq3_cgo27_erf float64 = 0.0050813062818757656 +var qq4_cgo28_erf float64 = 1.3249473800432164e-4 +var qq5_cgo29_erf float64 = -3.9602282787753681e-6 +var pa0_cgo30_erf float64 = -0.0023621185607526594 +var pa1_cgo31_erf float64 = 0.41485611868374833 +var pa2_cgo32_erf float64 = -0.37220787603570132 +var pa3_cgo33_erf float64 = 0.31834661990116175 +var pa4_cgo34_erf float64 = -0.11089469428239668 +var pa5_cgo35_erf float64 = 0.035478304325618236 +var pa6_cgo36_erf float64 = -0.0021663755948687908 +var qa1_cgo37_erf float64 = 0.10642088040084423 +var qa2_cgo38_erf float64 = 0.54039791770217105 +var qa3_cgo39_erf float64 = 0.071828654414196266 +var qa4_cgo40_erf float64 = 0.12617121980876164 +var qa5_cgo41_erf float64 = 0.013637083912029051 +var qa6_cgo42_erf float64 = 0.011984499846799107 +var ra0_cgo43_erf float64 = -0.0098649440348471482 +var ra1_cgo44_erf float64 = -0.69385857270718176 +var ra2_cgo45_erf float64 = -10.558626225323291 +var ra3_cgo46_erf float64 = -62.375332450326006 +var ra4_cgo47_erf float64 = -162.39666946257347 +var ra5_cgo48_erf float64 = -184.60509290671104 +var ra6_cgo49_erf float64 = -81.287435506306593 +var ra7_cgo50_erf float64 = -9.8143293441691454 +var sa1_cgo51_erf float64 = 19.651271667439257 +var sa2_cgo52_erf float64 = 137.65775414351904 +var sa3_cgo53_erf float64 = 434.56587747522923 +var sa4_cgo54_erf float64 = 645.38727173326788 +var sa5_cgo55_erf float64 = 429.00814002756783 +var sa6_cgo56_erf float64 = 108.63500554177944 +var sa7_cgo57_erf float64 = 6.5702497703192817 +var sa8_cgo58_erf float64 = -0.060424415214858099 +var rb0_cgo59_erf float64 = -0.0098649429247000992 +var rb1_cgo60_erf float64 = -0.79928323768052301 +var rb2_cgo61_erf float64 = -17.757954917754752 +var rb3_cgo62_erf float64 = -160.63638485582192 +var rb4_cgo63_erf float64 = -637.56644336838963 +var rb5_cgo64_erf float64 = -1025.0951316110772 +var rb6_cgo65_erf float64 = -483.5191916086514 +var sb1_cgo66_erf float64 = 30.338060743482458 +var sb2_cgo67_erf float64 = 325.79251299657392 +var sb3_cgo68_erf float64 = 1536.729586084437 +var sb4_cgo69_erf float64 = 3199.8582195085955 +var sb5_cgo70_erf float64 = 2553.0504064331644 +var sb6_cgo71_erf float64 = 474.52854120695537 +var sb7_cgo72_erf float64 = -22.440952446585818 + +func erfc1_cgo73_erf(x float64) float64 { + var s float64 + var P float64 + var Q float64 + s = Fabs(x) - float64(int32(1)) + P = pa0_cgo30_erf + s*(pa1_cgo31_erf+s*(pa2_cgo32_erf+s*(pa3_cgo33_erf+s*(pa4_cgo34_erf+s*(pa5_cgo35_erf+s*pa6_cgo36_erf))))) + Q = float64(int32(1)) + s*(qa1_cgo37_erf+s*(qa2_cgo38_erf+s*(qa3_cgo39_erf+s*(qa4_cgo40_erf+s*(qa5_cgo41_erf+s*qa6_cgo42_erf))))) + return float64(int32(1)) - erx_cgo18_erf - P/Q +} +func erfc2_cgo74_erf(ix uint32, x float64) float64 { + var s float64 + var R float64 + var S float64 + var z float64 + if ix < uint32(1072955392) { + return erfc1_cgo73_erf(x) + } + x = Fabs(x) + s = float64(int32(1)) / (x * x) + if ix < uint32(1074191213) { + R = ra0_cgo43_erf + s*(ra1_cgo44_erf+s*(ra2_cgo45_erf+s*(ra3_cgo46_erf+s*(ra4_cgo47_erf+s*(ra5_cgo48_erf+s*(ra6_cgo49_erf+s*ra7_cgo50_erf)))))) + S = 1 + s*(sa1_cgo51_erf+s*(sa2_cgo52_erf+s*(sa3_cgo53_erf+s*(sa4_cgo54_erf+s*(sa5_cgo55_erf+s*(sa6_cgo56_erf+s*(sa7_cgo57_erf+s*sa8_cgo58_erf))))))) + } else { + R = rb0_cgo59_erf + s*(rb1_cgo60_erf+s*(rb2_cgo61_erf+s*(rb3_cgo62_erf+s*(rb4_cgo63_erf+s*(rb5_cgo64_erf+s*rb6_cgo65_erf))))) + S = 1 + s*(sb1_cgo66_erf+s*(sb2_cgo67_erf+s*(sb3_cgo68_erf+s*(sb4_cgo69_erf+s*(sb5_cgo70_erf+s*(sb6_cgo71_erf+s*sb7_cgo72_erf)))))) + } + z = x + for { + z = *(*float64)(unsafe.Pointer(&_cgoz_75_erf{uint64(*(*uint64)(unsafe.Pointer(&_cgoz_76_erf{z}))>>int32(32))<> int32(32)) + if true { + break + } + } + sign = int32(ix >> int32(31)) + ix &= uint32(2147483647) + if ix >= uint32(2146435072) { + return float64(int32(1)-int32(2)*sign) + float64(int32(1))/x + } + if ix < uint32(1072365568) { + if ix < uint32(1043333120) { + return 0.125 * (float64(int32(8))*x + efx8_cgo19_erf*x) + } + z = x * x + r = pp0_cgo20_erf + z*(pp1_cgo21_erf+z*(pp2_cgo22_erf+z*(pp3_cgo23_erf+z*pp4_cgo24_erf))) + s = 1 + z*(qq1_cgo25_erf+z*(qq2_cgo26_erf+z*(qq3_cgo27_erf+z*(qq4_cgo28_erf+z*qq5_cgo29_erf)))) + y = r / s + return x + x*y + } + if ix < uint32(1075314688) { + y = float64(int32(1)) - erfc2_cgo74_erf(ix, x) + } else { + y = float64(int32(1)) - 2.2250738585072014e-308 + } + return func() float64 { + if sign != 0 { + return -y + } else { + return y + } + }() +} + +type _cgoz_77_erf struct { + _f float64 +} + +func Erfc(x float64) float64 { + var r float64 + var s float64 + var z float64 + var y float64 + var ix uint32 + var sign int32 + for { + ix = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_78_erf{x})) >> int32(32)) + if true { + break + } + } + sign = int32(ix >> int32(31)) + ix &= uint32(2147483647) + if ix >= uint32(2146435072) { + return float64(int32(2)*sign) + float64(int32(1))/x + } + if ix < uint32(1072365568) { + if ix < uint32(1013972992) { + return 1 - x + } + z = x * x + r = pp0_cgo20_erf + z*(pp1_cgo21_erf+z*(pp2_cgo22_erf+z*(pp3_cgo23_erf+z*pp4_cgo24_erf))) + s = 1 + z*(qq1_cgo25_erf+z*(qq2_cgo26_erf+z*(qq3_cgo27_erf+z*(qq4_cgo28_erf+z*qq5_cgo29_erf)))) + y = r / s + if sign != 0 || ix < uint32(1070596096) { + return 1 - (x + x*y) + } + return 0.5 - (x - 0.5 + x*y) + } + if ix < uint32(1077673984) { + return func() float64 { + if sign != 0 { + return float64(int32(2)) - erfc2_cgo74_erf(ix, x) + } else { + return erfc2_cgo74_erf(ix, x) + } + }() + } + return func() float64 { + if sign != 0 { + return float64(int32(2)) - 2.2250738585072014e-308 + } else { + return 2.2250738585072014e-308 * 2.2250738585072014e-308 + } + }() +} + +type _cgoz_78_erf struct { + _f float64 +} diff --git a/erff.c.i.go b/erff.c.i.go new file mode 100644 index 0000000..4443287 --- /dev/null +++ b/erff.c.i.go @@ -0,0 +1,206 @@ +package libc + +import unsafe "unsafe" + +var erx_cgo18_erff float32 = float32(0.84506291151000001) +var efx8_cgo19_erff float32 = float32(1.027033329) +var pp0_cgo20_erff float32 = float32(0.12837916613) +var pp1_cgo21_erff float32 = float32(-0.32504209876000001) +var pp2_cgo22_erff float32 = float32(-0.028481749818000002) +var pp3_cgo23_erff float32 = float32(-0.0057702702470000004) +var pp4_cgo24_erff float32 = float32(-2.3763017451999999e-5) +var qq1_cgo25_erff float32 = float32(0.39791721106) +var qq2_cgo26_erff float32 = float32(0.065022252500000002) +var qq3_cgo27_erff float32 = float32(0.0050813062117000003) +var qq4_cgo28_erff float32 = float32(1.3249473704e-4) +var qq5_cgo29_erff float32 = float32(-3.9602282412999997e-6) +var pa0_cgo30_erff float32 = float32(-0.0023621185682999998) +var pa1_cgo31_erff float32 = float32(0.41485610604000001) +var pa2_cgo32_erff float32 = float32(-0.37220788001999999) +var pa3_cgo33_erff float32 = float32(0.31834661960999999) +var pa4_cgo34_erff float32 = float32(-0.11089469491999999) +var pa5_cgo35_erff float32 = float32(0.035478305071999998) +var pa6_cgo36_erff float32 = float32(-0.0021663755177999998) +var qa1_cgo37_erff float32 = float32(0.10642088205) +var qa2_cgo38_erff float32 = float32(0.54039794207000003) +var qa3_cgo39_erff float32 = float32(0.071828655899000005) +var qa4_cgo40_erff float32 = float32(0.12617121637000001) +var qa5_cgo41_erff float32 = float32(0.013637083583) +var qa6_cgo42_erff float32 = float32(0.011984500103) +var ra0_cgo43_erff float32 = float32(-0.0098649440333000004) +var ra1_cgo44_erff float32 = float32(-0.6938585639) +var ra2_cgo45_erff float32 = float32(-10.558626175000001) +var ra3_cgo46_erff float32 = float32(-62.375331879000001) +var ra4_cgo47_erff float32 = float32(-162.39666747999999) +var ra5_cgo48_erff float32 = float32(-184.60508727999999) +var ra6_cgo49_erff float32 = float32(-81.287437439000001) +var ra7_cgo50_erff float32 = float32(-9.8143291473000004) +var sa1_cgo51_erff float32 = float32(19.651271820000002) +var sa2_cgo52_erff float32 = float32(137.65776062) +var sa3_cgo53_erff float32 = float32(434.56588744999999) +var sa4_cgo54_erff float32 = float32(645.38726807) +var sa5_cgo55_erff float32 = float32(429.00814818999999) +var sa6_cgo56_erff float32 = float32(108.63500214) +var sa7_cgo57_erff float32 = float32(6.5702495575000004) +var sa8_cgo58_erff float32 = float32(-0.060424413532000003) +var rb0_cgo59_erff float32 = float32(-0.0098649431019999997) +var rb1_cgo60_erff float32 = float32(-0.79928326607) +var rb2_cgo61_erff float32 = float32(-17.757955550999998) +var rb3_cgo62_erff float32 = float32(-160.63638305999999) +var rb4_cgo63_erff float32 = float32(-637.56646728999999) +var rb5_cgo64_erff float32 = float32(-1025.0950928) +var rb6_cgo65_erff float32 = float32(-483.51919556000001) +var sb1_cgo66_erff float32 = float32(30.338060379000002) +var sb2_cgo67_erff float32 = float32(325.79251098999998) +var sb3_cgo68_erff float32 = float32(1536.7296143000001) +var sb4_cgo69_erff float32 = float32(3199.8581543) +var sb5_cgo70_erff float32 = float32(2553.0502929999998) +var sb6_cgo71_erff float32 = float32(474.52853393999999) +var sb7_cgo72_erff float32 = float32(-22.440952300999999) + +func erfc1_cgo73_erff(x float32) float32 { + var s float32 + var P float32 + var Q float32 + s = Fabsf(x) - float32(int32(1)) + P = pa0_cgo30_erff + s*(pa1_cgo31_erff+s*(pa2_cgo32_erff+s*(pa3_cgo33_erff+s*(pa4_cgo34_erff+s*(pa5_cgo35_erff+s*pa6_cgo36_erff))))) + Q = float32(int32(1)) + s*(qa1_cgo37_erff+s*(qa2_cgo38_erff+s*(qa3_cgo39_erff+s*(qa4_cgo40_erff+s*(qa5_cgo41_erff+s*qa6_cgo42_erff))))) + return float32(int32(1)) - erx_cgo18_erff - P/Q +} +func erfc2_cgo74_erff(ix uint32, x float32) float32 { + var s float32 + var R float32 + var S float32 + var z float32 + if ix < uint32(1067450368) { + return erfc1_cgo73_erff(x) + } + x = Fabsf(x) + s = float32(int32(1)) / (x * x) + if ix < uint32(1077336941) { + R = ra0_cgo43_erff + s*(ra1_cgo44_erff+s*(ra2_cgo45_erff+s*(ra3_cgo46_erff+s*(ra4_cgo47_erff+s*(ra5_cgo48_erff+s*(ra6_cgo49_erff+s*ra7_cgo50_erff)))))) + S = 1 + s*(sa1_cgo51_erff+s*(sa2_cgo52_erff+s*(sa3_cgo53_erff+s*(sa4_cgo54_erff+s*(sa5_cgo55_erff+s*(sa6_cgo56_erff+s*(sa7_cgo57_erff+s*sa8_cgo58_erff))))))) + } else { + R = rb0_cgo59_erff + s*(rb1_cgo60_erff+s*(rb2_cgo61_erff+s*(rb3_cgo62_erff+s*(rb4_cgo63_erff+s*(rb5_cgo64_erff+s*rb6_cgo65_erff))))) + S = 1 + s*(sb1_cgo66_erff+s*(sb2_cgo67_erff+s*(sb3_cgo68_erff+s*(sb4_cgo69_erff+s*(sb5_cgo70_erff+s*(sb6_cgo71_erff+s*sb7_cgo72_erff)))))) + } + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_75_erff{x})) + if true { + break + } + } + for { + z = *(*float32)(unsafe.Pointer(&_cgoz_76_erff{ix & uint32(4294959104)})) + if true { + break + } + } + return Expf(-z*z-0.5625) * Expf((z-x)*(z+x)+R/S) / x +} + +type _cgoz_75_erff struct { + _f float32 +} +type _cgoz_76_erff struct { + _i uint32 +} + +func Erff(x float32) float32 { + var r float32 + var s float32 + var z float32 + var y float32 + var ix uint32 + var sign int32 + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_77_erff{x})) + if true { + break + } + } + sign = int32(ix >> int32(31)) + ix &= uint32(2147483647) + if ix >= uint32(2139095040) { + return float32(int32(1)-int32(2)*sign) + float32(int32(1))/x + } + if ix < uint32(1062731776) { + if ix < uint32(830472192) { + return 0.125 * (float32(int32(8))*x + efx8_cgo19_erff*x) + } + z = x * x + r = pp0_cgo20_erff + z*(pp1_cgo21_erff+z*(pp2_cgo22_erff+z*(pp3_cgo23_erff+z*pp4_cgo24_erff))) + s = float32(int32(1)) + z*(qq1_cgo25_erff+z*(qq2_cgo26_erff+z*(qq3_cgo27_erff+z*(qq4_cgo28_erff+z*qq5_cgo29_erff)))) + y = r / s + return x + x*y + } + if ix < uint32(1086324736) { + y = float32(int32(1)) - erfc2_cgo74_erff(ix, x) + } else { + y = float32(int32(1)) - 7.52316385e-37 + } + return func() float32 { + if sign != 0 { + return -y + } else { + return y + } + }() +} + +type _cgoz_77_erff struct { + _f float32 +} + +func Erfcf(x float32) float32 { + var r float32 + var s float32 + var z float32 + var y float32 + var ix uint32 + var sign int32 + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_78_erff{x})) + if true { + break + } + } + sign = int32(ix >> int32(31)) + ix &= uint32(2147483647) + if ix >= uint32(2139095040) { + return float32(int32(2)*sign) + float32(int32(1))/x + } + if ix < uint32(1062731776) { + if ix < uint32(595591168) { + return 1 - x + } + z = x * x + r = pp0_cgo20_erff + z*(pp1_cgo21_erff+z*(pp2_cgo22_erff+z*(pp3_cgo23_erff+z*pp4_cgo24_erff))) + s = 1 + z*(qq1_cgo25_erff+z*(qq2_cgo26_erff+z*(qq3_cgo27_erff+z*(qq4_cgo28_erff+z*qq5_cgo29_erff)))) + y = r / s + if sign != 0 || ix < uint32(1048576000) { + return 1 - (x + x*y) + } + return 0.5 - (x - 0.5 + x*y) + } + if ix < uint32(1105199104) { + return func() float32 { + if sign != 0 { + return float32(int32(2)) - erfc2_cgo74_erff(ix, x) + } else { + return erfc2_cgo74_erff(ix, x) + } + }() + } + return func() float32 { + if sign != 0 { + return float32(int32(2)) - 7.52316385e-37 + } else { + return 7.52316385e-37 * 7.52316385e-37 + } + }() +} + +type _cgoz_78_erff struct { + _f float32 +} diff --git a/erfl.c.i.go b/erfl.c.i.go new file mode 100644 index 0000000..7cb59e1 --- /dev/null +++ b/erfl.c.i.go @@ -0,0 +1,8 @@ +package libc + +func Erfl(x float64) float64 { + return float64(Erf(float64(x))) +} +func Erfcl(x float64) float64 { + return float64(Erfc(float64(x))) +} diff --git a/exp.c.i.go b/exp.c.i.go new file mode 100644 index 0000000..dc274cd --- /dev/null +++ b/exp.c.i.go @@ -0,0 +1,134 @@ +package libc + +import unsafe "unsafe" + +func specialcase_cgo18_exp(tmp float64, sbits uint64, ki uint64) float64 { + var scale float64 + var y float64 + if ki&uint64(2147483648) == uint64(0) { + sbits -= 4544132024016830464 + scale = *(*float64)(unsafe.Pointer(&_cgoz_19_exp{sbits})) + y = 5.4861240687936887e+303 * (scale + scale*tmp) + return eval_as_double(y) + } + sbits += 4602678819172646912 + scale = *(*float64)(unsafe.Pointer(&_cgoz_20_exp{sbits})) + y = scale + scale*tmp + if y < 1 { + var hi float64 + var lo float64 + lo = scale - y + scale*tmp + hi = 1 + y + lo = 1 - hi + y + lo + y = eval_as_double(hi+lo) - 1 + if int32(1) != 0 && y == 0 { + y = float64(0) + } + fp_force_eval(fp_barrier(2.2250738585072014e-308) * 2.2250738585072014e-308) + } + y = 2.2250738585072014e-308 * y + return eval_as_double(y) +} + +type _cgoz_19_exp struct { + _i uint64 +} +type _cgoz_20_exp struct { + _i uint64 +} + +func top12_cgo21_exp(x float64) uint32 { + return uint32(*(*uint64)(unsafe.Pointer(&_cgoz_22_exp{x})) >> int32(52)) +} + +type _cgoz_22_exp struct { + _f float64 +} + +func Exp(x float64) float64 { + var abstop uint32 + var ki uint64 + var idx uint64 + var top uint64 + var sbits uint64 + var kd float64 + var z float64 + var r float64 + var r2 float64 + var scale float64 + var tail float64 + var tmp float64 + abstop = top12_cgo21_exp(x) & uint32(2047) + if func() int64 { + if abstop-top12_cgo21_exp(5.5511151231257827e-17) >= top12_cgo21_exp(512)-top12_cgo21_exp(5.5511151231257827e-17) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if abstop-top12_cgo21_exp(5.5511151231257827e-17) >= uint32(2147483648) { + return func() float64 { + if int32(1) != 0 { + return 1 + x + } else { + return 1 + } + }() + } + if abstop >= top12_cgo21_exp(1024) { + if *(*uint64)(unsafe.Pointer(&_cgoz_23_exp{x})) == *(*uint64)(unsafe.Pointer(&_cgoz_24_exp{float64(-X__builtin_inff())})) { + return float64(0) + } + if abstop >= top12_cgo21_exp(float64(X__builtin_inff())) { + return 1 + x + } + if *(*uint64)(unsafe.Pointer(&_cgoz_25_exp{x}))>>int32(63) != 0 { + return __math_uflow(uint32(0)) + } else { + return __math_oflow(uint32(0)) + } + } + abstop = uint32(0) + } + z = __exp_data.invln2N * x + kd = eval_as_double(z + __exp_data.shift) + ki = *(*uint64)(unsafe.Pointer(&_cgoz_26_exp{kd})) + kd -= __exp_data.shift + r = x + kd*__exp_data.negln2hiN + kd*__exp_data.negln2loN + idx = uint64(2) * (ki % uint64(128)) + top = ki << 45 + tail = *(*float64)(unsafe.Pointer(&_cgoz_27_exp{*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp_data.tab)))) + uintptr(idx)*8))})) + sbits = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp_data.tab)))) + uintptr(idx+uint64(1))*8)) + top + r2 = r * r + tmp = tail + r + r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(0)*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(1)*8))) + r2*r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(2)*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(3)*8))) + if func() int64 { + if abstop == uint32(0) { + return 1 + } else { + return 0 + } + }() == int64(0) { + return specialcase_cgo18_exp(tmp, sbits, ki) + } + scale = *(*float64)(unsafe.Pointer(&_cgoz_28_exp{sbits})) + return eval_as_double(scale + scale*tmp) +} + +type _cgoz_23_exp struct { + _f float64 +} +type _cgoz_24_exp struct { + _f float64 +} +type _cgoz_25_exp struct { + _f float64 +} +type _cgoz_26_exp struct { + _f float64 +} +type _cgoz_27_exp struct { + _i uint64 +} +type _cgoz_28_exp struct { + _i uint64 +} diff --git a/exp10.c.i.go b/exp10.c.i.go new file mode 100644 index 0000000..472a605 --- /dev/null +++ b/exp10.c.i.go @@ -0,0 +1,23 @@ +package libc + +import unsafe "unsafe" + +func Exp10(x float64) float64 { + var n float64 + var y float64 = Modf(x, &n) + type _cgoa_19_exp10 struct { + f float64 + } + var u _cgoa_19_exp10 + u.f = n + if *(*uint64)(unsafe.Pointer(&u))>>int32(52)&uint64(2047) < uint64(1027) { + if !(y != 0) { + return *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&p10_cgo18_exp10)))) + uintptr(int32(n)+int32(15))*8)) + } + y = Exp2(3.3219280948873622 * y) + return y * *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&p10_cgo18_exp10)))) + uintptr(int32(n)+int32(15))*8)) + } + return Pow(10, x) +} + +var p10_cgo18_exp10 [31]float64 = [31]float64{1.0000000000000001e-15, 9.9999999999999999e-15, 1.0e-13, 9.9999999999999998e-13, 9.9999999999999993e-12, 1.0e-10, 1.0000000000000001e-9, 1.0e-8, 9.9999999999999995e-8, 9.9999999999999995e-7, 1.0000000000000001e-5, 1.0e-4, 0.001, 0.01, 0.10000000000000001, float64(int32(1)), 10, 100, 1000, 1.0e+4, 1.0e+5, 1.0e+6, 1.0e+7, 1.0e+8, 1.0e+9, 1.0e+10, 1.0e+11, 1.0e+12, 1.0e+13, 1.0e+14, 1.0e+15} diff --git a/exp10f.c.i.go b/exp10f.c.i.go new file mode 100644 index 0000000..f350b1a --- /dev/null +++ b/exp10f.c.i.go @@ -0,0 +1,23 @@ +package libc + +import unsafe "unsafe" + +func Exp10f(x float32) float32 { + var n float32 + var y float32 = Modff(x, &n) + type _cgoa_19_exp10f struct { + f float32 + } + var u _cgoa_19_exp10f + u.f = n + if *(*uint32)(unsafe.Pointer(&u))>>int32(23)&uint32(255) < uint32(130) { + if !(y != 0) { + return *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&p10_cgo18_exp10f)))) + uintptr(int32(n)+int32(7))*4)) + } + y = Exp2f(3.32192802 * y) + return y * *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer((*float32)(unsafe.Pointer(&p10_cgo18_exp10f)))) + uintptr(int32(n)+int32(7))*4)) + } + return float32(Exp2(3.3219280948873622 * float64(x))) +} + +var p10_cgo18_exp10f [15]float32 = [15]float32{1.00000001e-7, 9.99999997e-7, 9.99999974e-6, 9.99999974e-5, 0.00100000005, 0.00999999977, 0.100000001, float32(int32(1)), float32(10), float32(100), float32(1000), float32(1.0e+4), float32(1.0e+5), float32(1.0e+6), float32(1.0e+7)} diff --git a/exp10l.c.i.go b/exp10l.c.i.go new file mode 100644 index 0000000..12fbf6b --- /dev/null +++ b/exp10l.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Exp10l(x float64) float64 { + return float64(Exp10(float64(x))) +} diff --git a/exp2.c.i.go b/exp2.c.i.go new file mode 100644 index 0000000..43ad063 --- /dev/null +++ b/exp2.c.i.go @@ -0,0 +1,146 @@ +package libc + +import unsafe "unsafe" + +func specialcase_cgo18_exp2(tmp float64, sbits uint64, ki uint64) float64 { + var scale float64 + var y float64 + if ki&uint64(2147483648) == uint64(0) { + sbits -= 4503599627370496 + scale = *(*float64)(unsafe.Pointer(&_cgoz_19_exp2{sbits})) + y = float64(int32(2)) * (scale + scale*tmp) + return eval_as_double(y) + } + sbits += 4602678819172646912 + scale = *(*float64)(unsafe.Pointer(&_cgoz_20_exp2{sbits})) + y = scale + scale*tmp + if y < 1 { + var hi float64 + var lo float64 + lo = scale - y + scale*tmp + hi = 1 + y + lo = 1 - hi + y + lo + y = eval_as_double(hi+lo) - 1 + if int32(1) != 0 && y == 0 { + y = float64(0) + } + fp_force_eval(fp_barrier(2.2250738585072014e-308) * 2.2250738585072014e-308) + } + y = 2.2250738585072014e-308 * y + return eval_as_double(y) +} + +type _cgoz_19_exp2 struct { + _i uint64 +} +type _cgoz_20_exp2 struct { + _i uint64 +} + +func top12_cgo21_exp2(x float64) uint32 { + return uint32(*(*uint64)(unsafe.Pointer(&_cgoz_22_exp2{x})) >> int32(52)) +} + +type _cgoz_22_exp2 struct { + _f float64 +} + +func Exp2(x float64) float64 { + var abstop uint32 + var ki uint64 + var idx uint64 + var top uint64 + var sbits uint64 + var kd float64 + var r float64 + var r2 float64 + var scale float64 + var tail float64 + var tmp float64 + abstop = top12_cgo21_exp2(x) & uint32(2047) + if func() int64 { + if abstop-top12_cgo21_exp2(5.5511151231257827e-17) >= top12_cgo21_exp2(512)-top12_cgo21_exp2(5.5511151231257827e-17) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if abstop-top12_cgo21_exp2(5.5511151231257827e-17) >= uint32(2147483648) { + return func() float64 { + if int32(1) != 0 { + return 1 + x + } else { + return 1 + } + }() + } + if abstop >= top12_cgo21_exp2(1024) { + if *(*uint64)(unsafe.Pointer(&_cgoz_23_exp2{x})) == *(*uint64)(unsafe.Pointer(&_cgoz_24_exp2{float64(-X__builtin_inff())})) { + return float64(0) + } + if abstop >= top12_cgo21_exp2(float64(X__builtin_inff())) { + return 1 + x + } + if !(*(*uint64)(unsafe.Pointer(&_cgoz_25_exp2{x}))>>int32(63) != 0) { + return __math_oflow(uint32(0)) + } else if *(*uint64)(unsafe.Pointer(&_cgoz_26_exp2{x})) >= *(*uint64)(unsafe.Pointer(&_cgoz_27_exp2{-1075})) { + return __math_uflow(uint32(0)) + } + } + if uint64(2)**(*uint64)(unsafe.Pointer(&_cgoz_28_exp2{x})) > uint64(2)**(*uint64)(unsafe.Pointer(&_cgoz_29_exp2{928})) { + abstop = uint32(0) + } + } + kd = eval_as_double(x + __exp_data.exp2_shift) + ki = *(*uint64)(unsafe.Pointer(&_cgoz_30_exp2{kd})) + kd -= __exp_data.exp2_shift + r = x - kd + idx = uint64(2) * (ki % uint64(128)) + top = ki << 45 + tail = *(*float64)(unsafe.Pointer(&_cgoz_31_exp2{*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp_data.tab)))) + uintptr(idx)*8))})) + sbits = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp_data.tab)))) + uintptr(idx+uint64(1))*8)) + top + r2 = r * r + tmp = tail + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.exp2_poly)))) + uintptr(int32(0))*8)) + r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.exp2_poly)))) + uintptr(int32(1))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.exp2_poly)))) + uintptr(int32(2))*8))) + r2*r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.exp2_poly)))) + uintptr(int32(3))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.exp2_poly)))) + uintptr(int32(4))*8))) + if func() int64 { + if abstop == uint32(0) { + return 1 + } else { + return 0 + } + }() == int64(0) { + return specialcase_cgo18_exp2(tmp, sbits, ki) + } + scale = *(*float64)(unsafe.Pointer(&_cgoz_32_exp2{sbits})) + return eval_as_double(scale + scale*tmp) +} + +type _cgoz_23_exp2 struct { + _f float64 +} +type _cgoz_24_exp2 struct { + _f float64 +} +type _cgoz_25_exp2 struct { + _f float64 +} +type _cgoz_26_exp2 struct { + _f float64 +} +type _cgoz_27_exp2 struct { + _f float64 +} +type _cgoz_28_exp2 struct { + _f float64 +} +type _cgoz_29_exp2 struct { + _f float64 +} +type _cgoz_30_exp2 struct { + _f float64 +} +type _cgoz_31_exp2 struct { + _i uint64 +} +type _cgoz_32_exp2 struct { + _i uint64 +} diff --git a/exp2f.c.i.go b/exp2f.c.i.go new file mode 100644 index 0000000..69c9cf8 --- /dev/null +++ b/exp2f.c.i.go @@ -0,0 +1,72 @@ +package libc + +import unsafe "unsafe" + +func top12_cgo18_exp2f(x float32) uint32 { + return *(*uint32)(unsafe.Pointer(&_cgoz_19_exp2f{x})) >> int32(20) +} + +type _cgoz_19_exp2f struct { + _f float32 +} + +func Exp2f(x float32) float32 { + var abstop uint32 + var ki uint64 + var t uint64 + var kd float64 + var xd float64 + var z float64 + var r float64 + var r2 float64 + var y float64 + var s float64 + xd = float64(x) + abstop = top12_cgo18_exp2f(x) & uint32(2047) + if func() int64 { + if abstop >= top12_cgo18_exp2f(128) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if *(*uint32)(unsafe.Pointer(&_cgoz_20_exp2f{x})) == *(*uint32)(unsafe.Pointer(&_cgoz_21_exp2f{-X__builtin_inff()})) { + return float32(0) + } + if abstop >= top12_cgo18_exp2f(X__builtin_inff()) { + return x + x + } + if x > 0 { + return __math_oflowf(uint32(0)) + } + if x <= -150 { + return __math_uflowf(uint32(0)) + } + } + kd = eval_as_double(xd + __exp2f_data.shift_scaled) + ki = *(*uint64)(unsafe.Pointer(&_cgoz_22_exp2f{kd})) + kd -= __exp2f_data.shift_scaled + r = xd - kd + t = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp2f_data.tab)))) + uintptr(ki%uint64(32))*8)) + t += ki << 47 + s = *(*float64)(unsafe.Pointer(&_cgoz_23_exp2f{t})) + z = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp2f_data.poly)))) + uintptr(int32(0))*8))*r + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp2f_data.poly)))) + uintptr(int32(1))*8)) + r2 = r * r + y = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp2f_data.poly)))) + uintptr(int32(2))*8))*r + float64(int32(1)) + y = z*r2 + y + y = y * s + return eval_as_float(float32(y)) +} + +type _cgoz_20_exp2f struct { + _f float32 +} +type _cgoz_21_exp2f struct { + _f float32 +} +type _cgoz_22_exp2f struct { + _f float64 +} +type _cgoz_23_exp2f struct { + _i uint64 +} diff --git a/exp2f_data.c.i.go b/exp2f_data.c.i.go new file mode 100644 index 0000000..33aad31 --- /dev/null +++ b/exp2f_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __exp2f_data struct_exp2f_data = struct_exp2f_data{[32]uint64{uint64(4607182418800017408), uint64(4607140297302181236), uint64(4607100335213349135), uint64(4607062579818421073), uint64(4607027079437701499), uint64(4606993883449571754), uint64(4606963042313658936), uint64(4606934607594512097), uint64(4606908631985796885), uint64(4606885169335019979), uint64(4606864274668794914), uint64(4606846004218661165), uint64(4606830415447468583), uint64(4606817567076339586), uint64(4606807519112221737), uint64(4606800332876043653), uint64(4606796071031487437), uint64(4606794797614391156), uint64(4606796578062795143), uint64(4606801479247646227), uint64(4606809569504174299), uint64(4606820918663955941), uint64(4606835598087680144), uint64(4606853680698631517), uint64(4606875241016906669), uint64(4606900355194379847), uint64(4606929101050434204), uint64(4606961558108475497), uint64(4606997807633245319), uint64(4607037932668951391), uint64(4607082018078232794), uint64(4607130150581978432)}, 6755399441055744 / float64(32), [3]float64{0.055503615593415351, 0.2402284522445722, 0.69314718069162029}, 6755399441055744, 1.4426950408889634 * float64(32), [3]float64{0.055503615593415351 / float64(32) / float64(32) / float64(32), 0.2402284522445722 / float64(32) / float64(32), 0.69314718069162029 / float64(32)}} diff --git a/exp2l.c.i.go b/exp2l.c.i.go new file mode 100644 index 0000000..fc14cf9 --- /dev/null +++ b/exp2l.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Exp2l(x float64) float64 { + return float64(Exp2(float64(x))) +} diff --git a/exp_data.c.i.go b/exp_data.c.i.go new file mode 100644 index 0000000..1cddc99 --- /dev/null +++ b/exp_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __exp_data struct_exp_data = struct_exp_data{1.4426950408889634 * float64(128), 6755399441055744, -0.0054152123481117087, -1.2864023111638346e-14, [4]float64{0.49999999999996786, 0.16666666666665886, 0.041666680841067401, 0.008333335853059549}, 6755399441055744 / float64(128), [5]float64{0.69314718055994529, 0.24022650695909065, 0.0555041086686087, 0.0096181319757210545, 0.0013332074570119598}, [256]uint64{uint64(0), uint64(4607182418800017408), uint64(4367149474599452526), uint64(4607171688528556853), uint64(13578739988850859101), uint64(4607161091040444513), uint64(13587463954133116625), uint64(4607150627056680837), uint64(4363093389540324883), uint64(4607140297302181236), uint64(13586179750647926522), uint64(4607130102505797342), uint64(4350749156061923425), uint64(4607120043400338376), uint64(4364168240100004761), uint64(4607110120722592643), uint64(4366128403083131757), uint64(4607100335213349135), uint64(4363624214708482044), uint64(4607090687617419255), uint64(4341116261916187857), uint64(4607081178683658658), uint64(13576667550842908171), uint64(4607071809164989211), uint64(13588862361555418382), uint64(4607062579818421073), uint64(13569487443606825557), uint64(4607053491405074892), uint64(13587862706032342038), uint64(4607044544690204128), uint64(4359717415120819631), uint64(4607035740443217489), uint64(13582886257094398792), uint64(4607027079437701499), uint64(13587113717893313085), uint64(4607018562451443178), uint64(4362731899485115327), uint64(4607010190266452853), uint64(13589288191656061734), uint64(4607001963668987092), uint64(4367063335334195040), uint64(4606993883449571754), uint64(13587333149746411677), uint64(4606985950403025181), uint64(4362421515177083789), uint64(4606978165328481494), uint64(4359618604155798653), uint64(4606970529029414038), uint64(4365834109879625876), uint64(4606963042313658936), uint64(4361558225371547773), uint64(4606955705993438783), uint64(4359562691856033778), uint64(4606948520885386461), uint64(13589251765121910878), uint64(4606941487810569089), uint64(4360319936817113905), uint64(4606934607594512097), uint64(13564034602756980730), uint64(4606927881067223440), uint64(4362641697437125300), uint64(4606921309063217931), uint64(4354440509323660175), uint64(4606914892421541718), uint64(4360414030434708406), uint64(4606908631985796885), uint64(4361245865020257356), uint64(4606902528604166193), uint64(4363949802402347082), uint64(4606896583129437951), uint64(13584725097160006404), uint64(4606890796419031025), uint64(13588005410925400168), uint64(4606885169335019979), uint64(13589902112758771086), uint64(4606879702744160358), uint64(13578865146911274706), uint64(4606874397517914103), uint64(13589920948748688149), uint64(4606869254532475109), uint64(4361066948569222253), uint64(4606864274668794914), uint64(13588224706282547594), uint64(4606859458812608540), uint64(13571781710912653659), uint64(4606854807854460458), uint64(13581779622207003163), uint64(4606850322689730711), uint64(4342424336897059857), uint64(4606846004218661165), uint64(4365789078613288175), uint64(4606841853346381911), uint64(4354643160121541497), uint64(4606837870982937808), uint64(4365113450260533808), uint64(4606834058043315166), uint64(4356828907110576048), uint64(4606830415447468583), uint64(4364865165386375287), uint64(4606826944120347917), uint64(13587241551866733454), uint64(4606823644991925415), uint64(13585071772441748297), uint64(4606820518997222978), uint64(13580849621492512863), uint64(4606817567076339586), uint64(13584565421834198262), uint64(4606814790174478863), uint64(4364890759862540174), uint64(4606812189241976794), uint64(4358244976955136773), uint64(4606809765234329597), uint64(4364097860734309385), uint64(4606807519112221737), uint64(4338311716453074666), uint64(4606805451841554103), uint64(4365169902980743221), uint64(4606803564393472328), uint64(13586485183986103967), uint64(4606801857744395273), uint64(13586291098077056424), uint64(4606800332876043653), uint64(13584074153218795950), uint64(4606798990775468832), uint64(13588431951308937304), uint64(4606797832435081765), uint64(4347962289735735652), uint64(4606796858852682099), uint64(13588402342996091432), uint64(4606796071031487437), uint64(13576684563168803202), uint64(4606795469980162751), uint64(13574807981113846254), uint64(4606795056712849967), uint64(13583098632124532817), uint64(4606794832249197700), uint64(13580639192812764879), uint64(4606794797614391156), uint64(13584807330835037616), uint64(4606794953839182196), uint64(13584573029057685130), uint64(4606795301959919561), uint64(4364160436192007379), uint64(4606795843018579263), uint64(13581505024848930077), uint64(4606796578062795143), uint64(4365374511615819883), uint64(4606797508145889586), uint64(4352143969406577749), uint64(4606798634326904418), uint64(13585286144244043586), uint64(4606799957670631954), uint64(13588320735159072564), uint64(4606801479247646227), uint64(13582960398152892190), uint64(4606803200134334381), uint64(13588719419377473390), uint64(4606805121412928237), uint64(4364178698342926848), uint64(4606807244171536025), uint64(4363345029737015988), uint64(4606809569504174299), uint64(13575457177841559551), uint64(4606812098510800012), uint64(4358348108421357380), uint64(4606814832297342774), uint64(13588214532259331459), uint64(4606817771975737286), uint64(13573191462042738217), uint64(4606820918663955941), uint64(13577266531058891097), uint64(4606824273486041615), uint64(13587996981358557610), uint64(4606827837572140624), uint64(13584486419852070475), uint64(4606831612058535866), uint64(4355455812241575463), uint64(4606835598087680144), uint64(4354367543587795899), uint64(4606839796808229667), uint64(13585043422533788259), uint64(4606844209375077733), uint64(4362612029712904661), uint64(4606848836949388595), uint64(13587848060628417301), uint64(4606853680698631517), uint64(4364212552380330450), uint64(4606858741796615000), uint64(4360726356711135923), uint64(4606864021423521215), uint64(13583665500206833076), uint64(4606869520765940602), uint64(4362891239881388935), uint64(4606875241016906669), uint64(13587495931142593018), uint64(4606881183375930982), uint64(13570968390383480506), uint64(4606887349049038331), uint64(13587540456847636032), uint64(4606893739248802106), uint64(13576337421119623988), uint64(4606900355194379847), uint64(13587904206984481333), uint64(4606907198111549002), uint64(4356388038631218637), uint64(4606914269232742866), uint64(13587850440691849388), uint64(4606921569797086729), uint64(4355946959017544883), uint64(4606929101050434204), uint64(4363674894410448276), uint64(4606936864245403770), uint64(4360857247493478828), uint64(4606944860641415499), uint64(4351547817417644647), uint64(4606953091504727989), uint64(4352565403421120872), uint64(4606961558108475497), uint64(13583008314044495314), uint64(4606970261732705274), uint64(13587269216817379951), uint64(4606979203664415100), uint64(13587375117699492169), uint64(4606988385197591026), uint64(4356286533989107623), uint64(4606997807633245319), uint64(13583579534434771471), uint64(4607007472279454616), uint64(4363524392198705836), uint64(4607017380451398277), uint64(4360674496013757259), uint64(4607027533471396960), uint64(13583653763942727199), uint64(4607037932668951391), uint64(13585436725991640521), uint64(4607048579380781353), uint64(4356306869484685523), uint64(4607059474950864886), uint64(4360546482996998769), uint64(4607070620730477699), uint64(13587350259894555120), uint64(4607082018078232794), uint64(13586707622498890877), uint64(4607093668360120305), uint64(4363640302291525640), uint64(4607105572949547559), uint64(4360658257139329842), uint64(4607117733227379351), uint64(4362409866909812206), uint64(4607130150581978432), uint64(13586858401655940077), uint64(4607142826409246228), uint64(4357102052301720989), uint64(4607155762112663768), uint64(4346824392926350473), uint64(4607168959103332849)}} diff --git a/expf.c.i.go b/expf.c.i.go new file mode 100644 index 0000000..fca77b6 --- /dev/null +++ b/expf.c.i.go @@ -0,0 +1,73 @@ +package libc + +import unsafe "unsafe" + +func top12_cgo18_expf(x float32) uint32 { + return *(*uint32)(unsafe.Pointer(&_cgoz_19_expf{x})) >> int32(20) +} + +type _cgoz_19_expf struct { + _f float32 +} + +func Expf(x float32) float32 { + var abstop uint32 + var ki uint64 + var t uint64 + var kd float64 + var xd float64 + var z float64 + var r float64 + var r2 float64 + var y float64 + var s float64 + xd = float64(x) + abstop = top12_cgo18_expf(x) & uint32(2047) + if func() int64 { + if abstop >= top12_cgo18_expf(88) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if *(*uint32)(unsafe.Pointer(&_cgoz_20_expf{x})) == *(*uint32)(unsafe.Pointer(&_cgoz_21_expf{-X__builtin_inff()})) { + return float32(0) + } + if abstop >= top12_cgo18_expf(X__builtin_inff()) { + return x + x + } + if x > 88.7228317 { + return __math_oflowf(uint32(0)) + } + if x < -103.972076 { + return __math_uflowf(uint32(0)) + } + } + z = __exp2f_data.invln2_scaled * xd + kd = eval_as_double(z + __exp2f_data.shift) + ki = *(*uint64)(unsafe.Pointer(&_cgoz_22_expf{kd})) + kd -= __exp2f_data.shift + r = z - kd + t = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp2f_data.tab)))) + uintptr(ki%uint64(32))*8)) + t += ki << 47 + s = *(*float64)(unsafe.Pointer(&_cgoz_23_expf{t})) + z = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp2f_data.poly_scaled)))) + uintptr(int32(0))*8))*r + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp2f_data.poly_scaled)))) + uintptr(int32(1))*8)) + r2 = r * r + y = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp2f_data.poly_scaled)))) + uintptr(int32(2))*8))*r + float64(int32(1)) + y = z*r2 + y + y = y * s + return eval_as_float(float32(y)) +} + +type _cgoz_20_expf struct { + _f float32 +} +type _cgoz_21_expf struct { + _f float32 +} +type _cgoz_22_expf struct { + _f float64 +} +type _cgoz_23_expf struct { + _i uint64 +} diff --git a/expl.c.i.go b/expl.c.i.go new file mode 100644 index 0000000..376db10 --- /dev/null +++ b/expl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Expl(x float64) float64 { + return float64(Exp(float64(x))) +} diff --git a/expm1.c.i.go b/expm1.c.i.go new file mode 100644 index 0000000..94d1ba2 --- /dev/null +++ b/expm1.c.i.go @@ -0,0 +1,157 @@ +package libc + +import unsafe "unsafe" + +var o_threshold_cgo18_expm1 float64 = 709.78271289338397 +var ln2_hi_cgo19_expm1 float64 = 0.69314718036912382 +var ln2_lo_cgo20_expm1 float64 = 1.9082149292705877e-10 +var invln2_cgo21_expm1 float64 = 1.4426950408889634 +var Q1_cgo22_expm1 float64 = -0.033333333333333132 +var Q2_cgo23_expm1 float64 = 0.0015873015872548146 +var Q3_cgo24_expm1 float64 = -7.9365075786748794e-5 +var Q4_cgo25_expm1 float64 = 4.0082178273293624e-6 +var Q5_cgo26_expm1 float64 = -2.0109921818362437e-7 + +func Expm1(x float64) float64 { + var y float64 + var hi float64 + var lo float64 + var c float64 + var t float64 + var e float64 + var hxs float64 + var hfx float64 + var r1 float64 + var twopk float64 + type _cgoa_27_expm1 struct { + f float64 + } + var u _cgoa_27_expm1 + u.f = x + var hx uint32 = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32) & uint64(2147483647)) + var k int32 + var sign int32 = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(63)) + if hx >= uint32(1078159482) { + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + if sign != 0 { + return float64(-1) + } + if x > o_threshold_cgo18_expm1 { + x *= float64(8.9884656743115795e+307) + return x + } + } + if hx > uint32(1071001154) { + if hx < uint32(1072734898) { + if !(sign != 0) { + hi = x - ln2_hi_cgo19_expm1 + lo = ln2_lo_cgo20_expm1 + k = int32(1) + } else { + hi = x + ln2_hi_cgo19_expm1 + lo = -ln2_lo_cgo20_expm1 + k = -1 + } + } else { + k = int32(invln2_cgo21_expm1*x + func() float64 { + if sign != 0 { + return -0.5 + } else { + return 0.5 + } + }()) + t = float64(k) + hi = x - t*ln2_hi_cgo19_expm1 + lo = t * ln2_lo_cgo20_expm1 + } + x = hi - lo + c = hi - x - lo + } else if hx < uint32(1016070144) { + if hx < uint32(1048576) { + for { + if 4 == 4 { + fp_force_evalf(float32(x)) + } else if 4 == 8 { + fp_force_eval(float64(float32(x))) + } else { + fp_force_evall(float64(float32(x))) + } + if true { + break + } + } + } + return x + } else { + k = int32(0) + } + hfx = 0.5 * x + hxs = x * hfx + r1 = 1 + hxs*(Q1_cgo22_expm1+hxs*(Q2_cgo23_expm1+hxs*(Q3_cgo24_expm1+hxs*(Q4_cgo25_expm1+hxs*Q5_cgo26_expm1)))) + t = 3 - r1*hfx + e = hxs * ((r1 - t) / (6 - x*t)) + if k == int32(0) { + return x - (x*e - hxs) + } + e = x*(e-c) - c + e -= hxs + if k == -1 { + return 0.5*(x-e) - 0.5 + } + if k == int32(1) { + if x < -0.25 { + return -2 * (e - (x + 0.5)) + } + return 1 + 2*(x-e) + } + *(*uint64)(unsafe.Pointer(&u)) = uint64(int32(1023)+k) << int32(52) + twopk = u.f + if k < int32(0) || k > int32(56) { + y = x - e + 1 + if k == int32(1024) { + y = y * 2 * 8.9884656743115795e+307 + } else { + y = y * twopk + } + return y - 1 + } + *(*uint64)(unsafe.Pointer(&u)) = uint64(int32(1023)-k) << int32(52) + if k < int32(20) { + y = (x - e + (float64(int32(1)) - u.f)) * twopk + } else { + y = (x - (e + u.f) + float64(int32(1))) * twopk + } + return y +} diff --git a/expm1f.c.i.go b/expm1f.c.i.go new file mode 100644 index 0000000..4bfa0a4 --- /dev/null +++ b/expm1f.c.i.go @@ -0,0 +1,124 @@ +package libc + +import unsafe "unsafe" + +var o_threshold_cgo18_expm1f float32 = float32(88.721679687999995) +var ln2_hi_cgo19_expm1f float32 = float32(0.69313812255999996) +var ln2_lo_cgo20_expm1f float32 = float32(9.0580006144999996e-6) +var invln2_cgo21_expm1f float32 = float32(1.4426950216000001) +var Q1_cgo22_expm1f float32 = float32(-0.033333212137000003) +var Q2_cgo23_expm1f float32 = float32(0.0015807170421000001) + +func Expm1f(x float32) float32 { + var y float32 + var hi float32 + var lo float32 + var c float32 + var t float32 + var e float32 + var hxs float32 + var hfx float32 + var r1 float32 + var twopk float32 + type _cgoa_24_expm1f struct { + f float32 + } + var u _cgoa_24_expm1f + u.f = x + var hx uint32 = *(*uint32)(unsafe.Pointer(&u)) & uint32(2147483647) + var k int32 + var sign int32 = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(31)) + if hx >= uint32(1100331076) { + if hx > uint32(2139095040) { + return x + } + if sign != 0 { + return float32(-1) + } + if x > o_threshold_cgo18_expm1f { + x *= float32(1.70141183e+38) + return x + } + } + if hx > uint32(1051816472) { + if hx < uint32(1065686418) { + if !(sign != 0) { + hi = x - ln2_hi_cgo19_expm1f + lo = ln2_lo_cgo20_expm1f + k = int32(1) + } else { + hi = x + ln2_hi_cgo19_expm1f + lo = -ln2_lo_cgo20_expm1f + k = -1 + } + } else { + k = int32(invln2_cgo21_expm1f*x + func() float32 { + if sign != 0 { + return -0.5 + } else { + return 0.5 + } + }()) + t = float32(k) + hi = x - t*ln2_hi_cgo19_expm1f + lo = t * ln2_lo_cgo20_expm1f + } + x = hi - lo + c = hi - x - lo + } else if hx < uint32(855638016) { + if hx < uint32(8388608) { + for { + if 4 == 4 { + fp_force_evalf(x * x) + } else if 4 == 8 { + fp_force_eval(float64(x * x)) + } else { + fp_force_evall(float64(x * x)) + } + if true { + break + } + } + } + return x + } else { + k = int32(0) + } + hfx = 0.5 * x + hxs = x * hfx + r1 = 1 + hxs*(Q1_cgo22_expm1f+hxs*Q2_cgo23_expm1f) + t = 3 - r1*hfx + e = hxs * ((r1 - t) / (6 - x*t)) + if k == int32(0) { + return x - (x*e - hxs) + } + e = x*(e-c) - c + e -= hxs + if k == -1 { + return 0.5*(x-e) - 0.5 + } + if k == int32(1) { + if x < -0.25 { + return -2 * (e - (x + 0.5)) + } + return 1 + 2*(x-e) + } + *(*uint32)(unsafe.Pointer(&u)) = uint32((int32(127) + k) << int32(23)) + twopk = u.f + if k < int32(0) || k > int32(56) { + y = x - e + 1 + if k == int32(128) { + y = y * 2 * 1.70141183e+38 + } else { + y = y * twopk + } + return y - 1 + } + *(*uint32)(unsafe.Pointer(&u)) = uint32((int32(127) - k) << int32(23)) + if k < int32(23) { + y = (x - e + (float32(int32(1)) - u.f)) * twopk + } else { + y = (x - (e + u.f) + float32(int32(1))) * twopk + } + return y +} diff --git a/expm1l.c.i.go b/expm1l.c.i.go new file mode 100644 index 0000000..a4c252e --- /dev/null +++ b/expm1l.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Expm1l(x float64) float64 { + return float64(Expm1(float64(x))) +} diff --git a/fdim.c.i.go b/fdim.c.i.go new file mode 100644 index 0000000..7be0f56 --- /dev/null +++ b/fdim.c.i.go @@ -0,0 +1,77 @@ +package libc + +func Fdim(x float64, y float64) float64 { + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(y))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(y)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return y + } + return func() float64 { + if x > y { + return x - y + } else { + return float64(int32(0)) + } + }() +} diff --git a/fdimf.c.i.go b/fdimf.c.i.go new file mode 100644 index 0000000..98988b0 --- /dev/null +++ b/fdimf.c.i.go @@ -0,0 +1,77 @@ +package libc + +func Fdimf(x float32, y float32) float32 { + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(y)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return y + } + return func() float32 { + if x > y { + return x - y + } else { + return float32(int32(0)) + } + }() +} diff --git a/fdiml.c.i.go b/fdiml.c.i.go new file mode 100644 index 0000000..68a7125 --- /dev/null +++ b/fdiml.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Fdiml(x float64, y float64) float64 { + return float64(Fdim(float64(x), float64(y))) +} diff --git a/fenv.c.i.go b/fenv.c.i.go index 1eaf46b..8853292 100644 --- a/fenv.c.i.go +++ b/fenv.c.i.go @@ -15,9 +15,9 @@ func Fegetround() int32 { func __fesetround(r int32) int32 { return int32(0) } -func Fegetenv(envp *_cgoa_1_fenv) int32 { +func Fegetenv(envp *_cgoa_1_fmaf) int32 { return int32(0) } -func Fesetenv(envp *_cgoa_1_fenv) int32 { +func Fesetenv(envp *_cgoa_1_fmaf) int32 { return int32(0) } diff --git a/finite.c.i.go b/finite.c.i.go new file mode 100644 index 0000000..b2d7543 --- /dev/null +++ b/finite.c.i.go @@ -0,0 +1,35 @@ +package libc + +func Finite(x float64) int32 { + return func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) < uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 < 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) > int32(1) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() +} diff --git a/finitef.c.i.go b/finitef.c.i.go new file mode 100644 index 0000000..2269bf9 --- /dev/null +++ b/finitef.c.i.go @@ -0,0 +1,35 @@ +package libc + +func Finitef(x float32) int32 { + return func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) < uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 < 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) > int32(1) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() +} diff --git a/floatscan.c.i.go b/floatscan.c.i.go index 9b7e5e0..a0eadb0 100644 --- a/floatscan.c.i.go +++ b/floatscan.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func scanexp_cgo17_floatscan(f *struct__IO_FILE, pok int32) int64 { +func scanexp_cgo15_floatscan(f *struct__IO_FILE, pok int32) int64 { var c int32 var x int32 var y int64 @@ -142,7 +142,7 @@ func scanexp_cgo17_floatscan(f *struct__IO_FILE, pok int32) int64 { } }() } -func decfloat_cgo18_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int32, sign int32, pok int32) float64 { +func decfloat_cgo16_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int32, sign int32, pok int32) float64 { var x [128]uint32 var i int32 var j int32 @@ -264,7 +264,7 @@ func decfloat_cgo18_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 lrp = dc } if gotdig != 0 && c|int32(32) == 'e' { - e10 = scanexp_cgo17_floatscan(f, pok) + e10 = scanexp_cgo15_floatscan(f, pok) if e10 == -9223372036854775808 { if pok != 0 { if f.shlim >= int64(0) { @@ -343,11 +343,11 @@ func decfloat_cgo18_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 return float64(sign) * float64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(int32(0))*4))) } if rp < int32(9) { - return float64(sign) * float64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(int32(0))*4))) / float64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&p10s_cgo20_floatscan)))) + uintptr(int32(8)-rp)*4))) + return float64(sign) * float64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(int32(0))*4))) / float64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&p10s_cgo18_floatscan)))) + uintptr(int32(8)-rp)*4))) } var bitlim int32 = bits - int32(3)*int32(rp-int32(9)) if bitlim > int32(30) || *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(int32(0))*4))>>bitlim == uint32(0) { - return float64(sign) * float64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(int32(0))*4))) * float64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&p10s_cgo20_floatscan)))) + uintptr(rp-int32(10))*4))) + return float64(sign) * float64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(int32(0))*4))) * float64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&p10s_cgo18_floatscan)))) + uintptr(rp-int32(10))*4))) } } for ; !(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(z-int32(1))*4)) != 0); z-- { @@ -360,7 +360,7 @@ func decfloat_cgo18_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 return rp%int32(9) + int32(9) } }() - var p10 int32 = *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&p10s_cgo20_floatscan)))) + uintptr(int32(8)-rpm9)*4)) + var p10 int32 = *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&p10s_cgo18_floatscan)))) + uintptr(int32(8)-rpm9)*4)) var carry uint32 = uint32(0) for k = a; k != z; k++ { var tmp uint32 = *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(k)*4)) % uint32(p10) @@ -381,7 +381,7 @@ func decfloat_cgo18_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 } rp += int32(9) - rpm9 } - for rp < 18 || rp == 18 && *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(a)*4)) < *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&th_cgo19_floatscan)))) + uintptr(int32(0))*4)) { + for rp < 18 || rp == 18 && *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(a)*4)) < *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&th_cgo17_floatscan)))) + uintptr(int32(0))*4)) { var carry uint32 = uint32(0) e2 -= int32(29) for k = (z - int32(1)) & 127; ; k = (k - int32(1)) & 127 { @@ -415,11 +415,11 @@ func decfloat_cgo18_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 var sh int32 = int32(1) for i = int32(0); i < int32(2); i++ { k = (a + i) & 127 - if k == z || *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(k)*4)) < *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&th_cgo19_floatscan)))) + uintptr(i)*4)) { + if k == z || *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(k)*4)) < *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&th_cgo17_floatscan)))) + uintptr(i)*4)) { i = int32(2) break } - if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr((a+i)&127)*4)) > *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&th_cgo19_floatscan)))) + uintptr(i)*4)) { + if *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr((a+i)&127)*4)) > *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&th_cgo17_floatscan)))) + uintptr(i)*4)) { break } } @@ -511,10 +511,10 @@ func decfloat_cgo18_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 return Scalbnl(y, e2) } -var th_cgo19_floatscan [2]uint32 = [2]uint32{uint32(9007199), uint32(254740991)} -var p10s_cgo20_floatscan [8]int32 = [8]int32{int32(10), int32(100), int32(1000), int32(10000), int32(100000), int32(1000000), int32(10000000), int32(100000000)} +var th_cgo17_floatscan [2]uint32 = [2]uint32{uint32(9007199), uint32(254740991)} +var p10s_cgo18_floatscan [8]int32 = [8]int32{int32(10), int32(100), int32(1000), int32(10000), int32(100000), int32(1000000), int32(10000000), int32(100000000)} -func hexfloat_cgo21_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign int32, pok int32) float64 { +func hexfloat_cgo19_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign int32, pok int32) float64 { var x uint32 = uint32(0) var y float64 = float64(int32(0)) var scale float64 = float64(int32(1)) @@ -702,7 +702,7 @@ func hexfloat_cgo21_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i }() } if c|int32(32) == 'p' { - e2 = scanexp_cgo17_floatscan(f, pok) + e2 = scanexp_cgo15_floatscan(f, pok) if e2 == -9223372036854775808 { if pok != 0 { if f.shlim >= int64(0) { @@ -1059,7 +1059,7 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } }() if c|int32(32) == 'x' { - return hexfloat_cgo21_floatscan(f, bits, emin, sign, pok) + return hexfloat_cgo19_floatscan(f, bits, emin, sign, pok) } if f.shlim >= int64(0) { func() int { @@ -1079,5 +1079,5 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } c = int32('0') } - return decfloat_cgo18_floatscan(f, c, bits, emin, sign, pok) + return decfloat_cgo16_floatscan(f, c, bits, emin, sign, pok) } diff --git a/floor.c.i.go b/floor.c.i.go new file mode 100644 index 0000000..1c26e13 --- /dev/null +++ b/floor.c.i.go @@ -0,0 +1,48 @@ +package libc + +import unsafe "unsafe" + +var toint_cgo18_floor float64 = float64(int32(1)) / 2.2204460492503131e-16 + +func Floor(x float64) float64 { + type _cgoa_19_floor struct { + f float64 + } + var u _cgoa_19_floor + u.f = x + var e int32 = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + var y float64 + if e >= 1075 || x == float64(int32(0)) { + return x + } + if *(*uint64)(unsafe.Pointer(&u))>>int32(63) != 0 { + y = x - toint_cgo18_floor + toint_cgo18_floor - x + } else { + y = x + toint_cgo18_floor - toint_cgo18_floor - x + } + if e <= 1022 { + for { + if 8 == 4 { + fp_force_evalf(float32(y)) + } else if 8 == 8 { + fp_force_eval(y) + } else { + fp_force_evall(float64(y)) + } + if true { + break + } + } + return float64(func() int32 { + if *(*uint64)(unsafe.Pointer(&u))>>int32(63) != 0 { + return -1 + } else { + return int32(0) + } + }()) + } + if y > float64(int32(0)) { + return x + y - float64(int32(1)) + } + return x + y +} diff --git a/floorf.c.i.go b/floorf.c.i.go new file mode 100644 index 0000000..63a8a7d --- /dev/null +++ b/floorf.c.i.go @@ -0,0 +1,57 @@ +package libc + +import unsafe "unsafe" + +func Floorf(x float32) float32 { + type _cgoa_18_floorf struct { + f float32 + } + var u _cgoa_18_floorf + u.f = x + var e int32 = int32(*(*uint32)(unsafe.Pointer(&u))>>int32(23)&uint32(255)) - int32(127) + var m uint32 + if e >= int32(23) { + return x + } + if e >= int32(0) { + m = uint32(int32(8388607) >> e) + if *(*uint32)(unsafe.Pointer(&u))&m == uint32(0) { + return x + } + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + if *(*uint32)(unsafe.Pointer(&u))>>int32(31) != 0 { + *(*uint32)(unsafe.Pointer(&u)) += m + } + *(*uint32)(unsafe.Pointer(&u)) &= ^m + } else { + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + if *(*uint32)(unsafe.Pointer(&u))>>int32(31) == uint32(0) { + *(*uint32)(unsafe.Pointer(&u)) = uint32(0) + } else if *(*uint32)(unsafe.Pointer(&u))<> int32(52)) + var sign int32 = e & int32(2048) + e &= int32(2047) + if !(e != 0) { + ix = *(*uint64)(unsafe.Pointer(&_cgoz_24_fma{x * 9.2233720368547758e+18})) + e = int32(ix >> int32(52) & uint64(2047)) + e = func() int32 { + if e != 0 { + return e - int32(63) + } else { + return int32(2048) + } + }() + } + ix &= 4503599627370495 + ix |= 4503599627370496 + ix <<= int32(1) + e -= 1076 + return struct_num{ix, e, sign} +} + +type _cgoz_23_fma struct { + f float64 +} +type _cgoz_24_fma struct { + f float64 +} + +func mul_cgo25_fma(hi *uint64, lo *uint64, x uint64, y uint64) { + var t1 uint64 + var t2 uint64 + var t3 uint64 + var xlo uint64 = uint64(uint32(x)) + var xhi uint64 = x >> int32(32) + var ylo uint64 = uint64(uint32(y)) + var yhi uint64 = y >> int32(32) + t1 = xlo * ylo + t2 = xlo*yhi + xhi*ylo + t3 = xhi * yhi + *lo = t1 + t2<>int32(32) + func() uint64 { + if t1 > *lo { + return 1 + } else { + return 0 + } + }() +} +func Fma(x float64, y float64, z float64) float64 { + var nx struct_num + var ny struct_num + var nz struct_num + nx = normalize_cgo22_fma(x) + ny = normalize_cgo22_fma(y) + nz = normalize_cgo22_fma(z) + if nx.e >= 971 || ny.e >= 971 { + return x*y + z + } + if nz.e >= 971 { + if nz.e > 971 { + return x*y + z + } + return z + } + var rhi uint64 + var rlo uint64 + var zhi uint64 + var zlo uint64 + mul_cgo25_fma(&rhi, &rlo, nx.m, ny.m) + var e int32 = nx.e + ny.e + var d int32 = nz.e - e + if d > int32(0) { + if d < int32(64) { + zlo = nz.m << d + zhi = nz.m >> (int32(64) - d) + } else { + zlo = uint64(0) + zhi = nz.m + e = nz.e - int32(64) + d -= int32(64) + if d == int32(0) { + } else if d < int32(64) { + rlo = rhi<<(int32(64)-d) | rlo>>d | func() uint64 { + if !!(rlo<<(int32(64)-d) != 0) { + return 1 + } else { + return 0 + } + }() + rhi = rhi >> d + } else { + rlo = uint64(1) + rhi = uint64(0) + } + } + } else { + zhi = uint64(0) + d = -d + if d == int32(0) { + zlo = nz.m + } else if d < int32(64) { + zlo = nz.m>>d | func() uint64 { + if !!(nz.m<<(int32(64)-d) != 0) { + return 1 + } else { + return 0 + } + }() + } else { + zlo = uint64(1) + } + } + var sign int32 = nx.sign ^ ny.sign + var samesign int32 = func() int32 { + if !(sign^nz.sign != 0) { + return 1 + } else { + return 0 + } + }() + var nonzero int32 = int32(1) + if samesign != 0 { + rlo += zlo + rhi += zhi + func() uint64 { + if rlo < zlo { + return 1 + } else { + return 0 + } + }() + } else { + var t uint64 = rlo + rlo -= zlo + rhi = rhi - zhi - func() uint64 { + if t < rlo { + return 1 + } else { + return 0 + } + }() + if rhi>>int32(63) != 0 { + rlo = -rlo + rhi = -rhi - func() uint64 { + if !!(rlo != 0) { + return 1 + } else { + return 0 + } + }() + sign = func() int32 { + if !(sign != 0) { + return 1 + } else { + return 0 + } + }() + } + nonzero = func() int32 { + if !!(rhi != 0) { + return 1 + } else { + return 0 + } + }() + } + if nonzero != 0 { + e += int32(64) + d = a_clz_64(rhi) - int32(1) + rhi = rhi<>(int32(64)-d) | func() uint64 { + if !!(rlo<>int32(1) | rlo&uint64(1) + } else { + rhi = rlo << d + } + } else { + return x*y + z + } + e -= d + var i int64 = int64(rhi) + if sign != 0 { + i = -i + } + var r float64 = float64(i) + if e < -1084 { + if e == -1085 { + var c float64 = 9.2233720368547758e+18 + if sign != 0 { + c = -c + } + if r == c { + var fltmin float32 = float32(1.0842021401737618e-19 * float64(1.17549435e-38) * r) + return 2.2250738585072014e-308 / float64(1.17549435e-38) * float64(fltmin) + } + if rhi<>int32(1) | rhi&uint64(1) | 4611686018427387904) + if sign != 0 { + i = -i + } + r = float64(i) + r = float64(int32(2))*r - c + { + var tiny float64 = 2.2250738585072014e-308 / float64(1.17549435e-38) * r + r += float64(tiny*tiny) * (r - r) + } + } + } else { + d = int32(10) + i = int64((rhi>>d | func() uint64 { + if !!(rhi<<(int32(64)-d) != 0) { + return 1 + } else { + return 0 + } + }()) << d) + if sign != 0 { + i = -i + } + r = float64(i) + } + } + return Scalbn(r, e) +} diff --git a/fmaf.c.i.go b/fmaf.c.i.go new file mode 100644 index 0000000..06a20bf --- /dev/null +++ b/fmaf.c.i.go @@ -0,0 +1,32 @@ +package libc + +import unsafe "unsafe" + +func Fmaf(x float32, y float32, z float32) float32 { + var xy float64 + var result float64 + type _cgoa_19_fmaf struct { + f float64 + } + var u _cgoa_19_fmaf + var e int32 + xy = float64(x) * float64(y) + result = xy + float64(z) + u.f = result + e = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + if *(*uint64)(unsafe.Pointer(&u))&uint64(536870911) != uint64(268435456) || e == int32(2047) || result-xy == float64(z) && result-float64(z) == xy || Fegetround() != int32(0) { + z = float32(result) + return z + } + var vxy float64 = xy + _ = vxy + var adjusted_result float64 = vxy + float64(z) + Fesetround(int32(0)) + if result == adjusted_result { + u.f = adjusted_result + *(*uint64)(unsafe.Pointer(&u))++ + adjusted_result = u.f + } + z = float32(adjusted_result) + return z +} diff --git a/fmal.c.i.go b/fmal.c.i.go new file mode 100644 index 0000000..5f2f043 --- /dev/null +++ b/fmal.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Fmal(x float64, y float64, z float64) float64 { + return float64(Fma(float64(x), float64(y), float64(z))) +} diff --git a/fmax.c.i.go b/fmax.c.i.go new file mode 100644 index 0000000..d110bc0 --- /dev/null +++ b/fmax.c.i.go @@ -0,0 +1,122 @@ +package libc + +func Fmax(x float64, y float64) float64 { + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return y + } + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(y))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(y)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + if func() int32 { + if 8 == 4 { + return int32(X__FLOAT_BITS(float32(x)) >> int32(31)) + } else { + return func() int32 { + if 8 == 8 { + return int32(X__DOUBLE_BITS(x) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != func() int32 { + if 8 == 4 { + return int32(X__FLOAT_BITS(float32(y)) >> int32(31)) + } else { + return func() int32 { + if 8 == 8 { + return int32(X__DOUBLE_BITS(y) >> int32(63)) + } else { + return X__signbitl(float64(y)) + } + }() + } + }() { + return func() float64 { + if func() int32 { + if 8 == 4 { + return int32(X__FLOAT_BITS(float32(x)) >> int32(31)) + } else { + return func() int32 { + if 8 == 8 { + return int32(X__DOUBLE_BITS(x) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != 0 { + return y + } else { + return x + } + }() + } + return func() float64 { + if x < y { + return y + } else { + return x + } + }() +} diff --git a/fmaxf.c.i.go b/fmaxf.c.i.go new file mode 100644 index 0000000..713aa0c --- /dev/null +++ b/fmaxf.c.i.go @@ -0,0 +1,122 @@ +package libc + +func Fmaxf(x float32, y float32) float32 { + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return y + } + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(y)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + if func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(x) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(x)) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(y) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(y)) >> int32(63)) + } else { + return X__signbitl(float64(y)) + } + }() + } + }() { + return func() float32 { + if func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(x) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(x)) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != 0 { + return y + } else { + return x + } + }() + } + return func() float32 { + if x < y { + return y + } else { + return x + } + }() +} diff --git a/fmaxl.c.i.go b/fmaxl.c.i.go new file mode 100644 index 0000000..15f9b99 --- /dev/null +++ b/fmaxl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Fmaxl(x float64, y float64) float64 { + return float64(Fmax(float64(x), float64(y))) +} diff --git a/fmin.c.i.go b/fmin.c.i.go new file mode 100644 index 0000000..f6c5e1d --- /dev/null +++ b/fmin.c.i.go @@ -0,0 +1,122 @@ +package libc + +func Fmin(x float64, y float64) float64 { + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return y + } + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(y))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(y)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + if func() int32 { + if 8 == 4 { + return int32(X__FLOAT_BITS(float32(x)) >> int32(31)) + } else { + return func() int32 { + if 8 == 8 { + return int32(X__DOUBLE_BITS(x) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != func() int32 { + if 8 == 4 { + return int32(X__FLOAT_BITS(float32(y)) >> int32(31)) + } else { + return func() int32 { + if 8 == 8 { + return int32(X__DOUBLE_BITS(y) >> int32(63)) + } else { + return X__signbitl(float64(y)) + } + }() + } + }() { + return func() float64 { + if func() int32 { + if 8 == 4 { + return int32(X__FLOAT_BITS(float32(x)) >> int32(31)) + } else { + return func() int32 { + if 8 == 8 { + return int32(X__DOUBLE_BITS(x) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != 0 { + return x + } else { + return y + } + }() + } + return func() float64 { + if x < y { + return x + } else { + return y + } + }() +} diff --git a/fminf.c.i.go b/fminf.c.i.go new file mode 100644 index 0000000..002736e --- /dev/null +++ b/fminf.c.i.go @@ -0,0 +1,122 @@ +package libc + +func Fminf(x float32, y float32) float32 { + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return y + } + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(y)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + } + if func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(x) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(x)) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(y) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(y)) >> int32(63)) + } else { + return X__signbitl(float64(y)) + } + }() + } + }() { + return func() float32 { + if func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(x) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(x)) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != 0 { + return x + } else { + return y + } + }() + } + return func() float32 { + if x < y { + return x + } else { + return y + } + }() +} diff --git a/fminl.c.i.go b/fminl.c.i.go new file mode 100644 index 0000000..a183534 --- /dev/null +++ b/fminl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Fminl(x float64, y float64) float64 { + return float64(Fmin(float64(x), float64(y))) +} diff --git a/hypot.c.i.go b/hypot.c.i.go new file mode 100644 index 0000000..b153bc7 --- /dev/null +++ b/hypot.c.i.go @@ -0,0 +1,64 @@ +package libc + +import unsafe "unsafe" + +func sq_cgo18_hypot(hi *float64, lo *float64, x float64) { + var xh float64 + var xl float64 + var xc float64 + xc = float64(x) * (134217728 + float64(int32(1))) + xh = x - xc + xc + xl = x - xh + *hi = float64(x) * x + *lo = xh*xh - *hi + float64(int32(2))*xh*xl + xl*xl +} +func Hypot(x float64, y float64) float64 { + type _cgoa_19_hypot struct { + f float64 + } + var ux _cgoa_19_hypot + ux.f = x + var uy _cgoa_19_hypot + uy.f = y + var ut _cgoa_19_hypot + var ex int32 + var ey int32 + var hx float64 + var lx float64 + var hy float64 + var ly float64 + var z float64 + *(*uint64)(unsafe.Pointer(&ux)) &= 9223372036854775807 + *(*uint64)(unsafe.Pointer(&uy)) &= 9223372036854775807 + if *(*uint64)(unsafe.Pointer(&ux)) < *(*uint64)(unsafe.Pointer(&uy)) { + ut = ux + ux = uy + uy = ut + } + ex = int32(*(*uint64)(unsafe.Pointer(&ux)) >> int32(52)) + ey = int32(*(*uint64)(unsafe.Pointer(&uy)) >> int32(52)) + x = ux.f + y = uy.f + if ey == int32(2047) { + return y + } + if ex == int32(2047) || *(*uint64)(unsafe.Pointer(&uy)) == uint64(0) { + return x + } + if ex-ey > int32(64) { + return x + y + } + z = float64(int32(1)) + if ex > 1533 { + z = float64(5.2601359015483735e+210) + x *= float64(1.9010915662951598e-211) + y *= float64(1.9010915662951598e-211) + } else if ey < 573 { + z = float64(1.9010915662951598e-211) + x *= float64(5.2601359015483735e+210) + y *= float64(5.2601359015483735e+210) + } + sq_cgo18_hypot(&hx, &lx, x) + sq_cgo18_hypot(&hy, &ly, y) + return z * Sqrt(ly+lx+hy+hx) +} diff --git a/hypotf.c.i.go b/hypotf.c.i.go new file mode 100644 index 0000000..b081b42 --- /dev/null +++ b/hypotf.c.i.go @@ -0,0 +1,41 @@ +package libc + +import unsafe "unsafe" + +func Hypotf(x float32, y float32) float32 { + type _cgoa_18_hypotf struct { + f float32 + } + var ux _cgoa_18_hypotf + ux.f = x + var uy _cgoa_18_hypotf + uy.f = y + var ut _cgoa_18_hypotf + var z float32 + *(*uint32)(unsafe.Pointer(&ux)) &= 2147483647 + *(*uint32)(unsafe.Pointer(&uy)) &= 2147483647 + if *(*uint32)(unsafe.Pointer(&ux)) < *(*uint32)(unsafe.Pointer(&uy)) { + ut = ux + ux = uy + uy = ut + } + x = ux.f + y = uy.f + if *(*uint32)(unsafe.Pointer(&uy)) == uint32(2139095040) { + return y + } + if *(*uint32)(unsafe.Pointer(&ux)) >= uint32(2139095040) || *(*uint32)(unsafe.Pointer(&uy)) == uint32(0) || *(*uint32)(unsafe.Pointer(&ux))-*(*uint32)(unsafe.Pointer(&uy)) >= uint32(209715200) { + return x + y + } + z = float32(int32(1)) + if *(*uint32)(unsafe.Pointer(&ux)) >= uint32(1568669696) { + z = float32(1.23794004e+27) + x *= float32(8.07793567e-28) + y *= float32(8.07793567e-28) + } else if *(*uint32)(unsafe.Pointer(&uy)) < uint32(562036736) { + z = float32(8.07793567e-28) + x *= float32(1.23794004e+27) + y *= float32(1.23794004e+27) + } + return z * Sqrtf(float32(float64(x)*float64(x)+float64(y)*float64(y))) +} diff --git a/hypotl.c.i.go b/hypotl.c.i.go new file mode 100644 index 0000000..fe4cf0f --- /dev/null +++ b/hypotl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Hypotl(x float64, y float64) float64 { + return float64(Hypot(float64(x), float64(y))) +} diff --git a/ilogbl.c.i.go b/ilogbl.c.i.go new file mode 100644 index 0000000..afbd2e3 --- /dev/null +++ b/ilogbl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Ilogbl(x float64) int32 { + return Ilogb(float64(x)) +} diff --git a/ldexp.c.i.go b/ldexp.c.i.go new file mode 100644 index 0000000..38a0de2 --- /dev/null +++ b/ldexp.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Ldexp(x float64, n int32) float64 { + return Scalbn(x, n) +} diff --git a/ldexpf.c.i.go b/ldexpf.c.i.go new file mode 100644 index 0000000..9a616b3 --- /dev/null +++ b/ldexpf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Ldexpf(x float32, n int32) float32 { + return Scalbnf(x, n) +} diff --git a/ldexpl.c.i.go b/ldexpl.c.i.go new file mode 100644 index 0000000..e20a990 --- /dev/null +++ b/ldexpl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Ldexpl(x float64, n int32) float64 { + return Scalbnl(x, n) +} diff --git a/lgamma.c.i.go b/lgamma.c.i.go new file mode 100644 index 0000000..589012e --- /dev/null +++ b/lgamma.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lgamma(x float64) float64 { + return __lgamma_r(x, &__signgam) +} diff --git a/lgamma_r.c.i.go b/lgamma_r.c.i.go new file mode 100644 index 0000000..f516f07 --- /dev/null +++ b/lgamma_r.c.i.go @@ -0,0 +1,219 @@ +package libc + +import unsafe "unsafe" + +var pi_cgo18_lgamma_r float64 = 3.1415926535897931 +var a0_cgo19_lgamma_r float64 = 0.077215664901532866 +var a1_cgo20_lgamma_r float64 = 0.32246703342411359 +var a2_cgo21_lgamma_r float64 = 0.067352301053129268 +var a3_cgo22_lgamma_r float64 = 0.020580808432516733 +var a4_cgo23_lgamma_r float64 = 0.0073855508608140288 +var a5_cgo24_lgamma_r float64 = 0.0028905138367341563 +var a6_cgo25_lgamma_r float64 = 0.0011927076318336207 +var a7_cgo26_lgamma_r float64 = 5.1006979215351134e-4 +var a8_cgo27_lgamma_r float64 = 2.2086279071390839e-4 +var a9_cgo28_lgamma_r float64 = 1.0801156724758394e-4 +var a10_cgo29_lgamma_r float64 = 2.5214456545125733e-5 +var a11_cgo30_lgamma_r float64 = 4.4864094961891516e-5 +var tc_cgo31_lgamma_r float64 = 1.4616321449683622 +var tf_cgo32_lgamma_r float64 = -0.12148629053584961 +var tt_cgo33_lgamma_r float64 = -3.6386769970395054e-18 +var t0_cgo34_lgamma_r float64 = 0.48383612272381005 +var t1_cgo35_lgamma_r float64 = -0.14758772299459391 +var t2_cgo36_lgamma_r float64 = 0.064624940239133385 +var t3_cgo37_lgamma_r float64 = -0.032788541075985965 +var t4_cgo38_lgamma_r float64 = 0.017970675081182039 +var t5_cgo39_lgamma_r float64 = -0.010314224129834144 +var t6_cgo40_lgamma_r float64 = 0.0061005387024629133 +var t7_cgo41_lgamma_r float64 = -0.0036845201678113826 +var t8_cgo42_lgamma_r float64 = 0.0022596478090061247 +var t9_cgo43_lgamma_r float64 = -0.0014034646998923284 +var t10_cgo44_lgamma_r float64 = 8.8108188243765401e-4 +var t11_cgo45_lgamma_r float64 = -5.3859530535674055e-4 +var t12_cgo46_lgamma_r float64 = 3.1563207090362595e-4 +var t13_cgo47_lgamma_r float64 = -3.1275416837512086e-4 +var t14_cgo48_lgamma_r float64 = 3.3552919263551907e-4 +var u0_cgo49_lgamma_r float64 = -0.077215664901532866 +var u1_cgo50_lgamma_r float64 = 0.63282706402509337 +var u2_cgo51_lgamma_r float64 = 1.4549225013723477 +var u3_cgo52_lgamma_r float64 = 0.97771752796337275 +var u4_cgo53_lgamma_r float64 = 0.22896372806469245 +var u5_cgo54_lgamma_r float64 = 0.013381091853678766 +var v1_cgo55_lgamma_r float64 = 2.4559779371304113 +var v2_cgo56_lgamma_r float64 = 2.128489763798934 +var v3_cgo57_lgamma_r float64 = 0.76928515045667278 +var v4_cgo58_lgamma_r float64 = 0.10422264559336913 +var v5_cgo59_lgamma_r float64 = 0.0032170924228242391 +var s0_cgo60_lgamma_r float64 = -0.077215664901532866 +var s1_cgo61_lgamma_r float64 = 0.21498241596060885 +var s2_cgo62_lgamma_r float64 = 0.32577879640893098 +var s3_cgo63_lgamma_r float64 = 0.14635047265246445 +var s4_cgo64_lgamma_r float64 = 0.026642270303363861 +var s5_cgo65_lgamma_r float64 = 0.0018402845140733772 +var s6_cgo66_lgamma_r float64 = 3.1947532658410087e-5 +var r1_cgo67_lgamma_r float64 = 1.3920053346762105 +var r2_cgo68_lgamma_r float64 = 0.72193554756713807 +var r3_cgo69_lgamma_r float64 = 0.17193386563280308 +var r4_cgo70_lgamma_r float64 = 0.01864591917156529 +var r5_cgo71_lgamma_r float64 = 7.779424963818936e-4 +var r6_cgo72_lgamma_r float64 = 7.3266843074462564e-6 +var w0_cgo73_lgamma_r float64 = 0.41893853320467273 +var w1_cgo74_lgamma_r float64 = 0.083333333333332968 +var w2_cgo75_lgamma_r float64 = -0.0027777777772877554 +var w3_cgo76_lgamma_r float64 = 7.9365055864301956e-4 +var w4_cgo77_lgamma_r float64 = -5.9518755745033996e-4 +var w5_cgo78_lgamma_r float64 = 8.3633991899628213e-4 +var w6_cgo79_lgamma_r float64 = -0.0016309293409657527 + +func sin_pi_cgo80_lgamma_r(x float64) float64 { + var n int32 + x = 2 * (x*0.5 - Floor(x*0.5)) + n = int32(x * 4) + n = (n + int32(1)) / int32(2) + x -= float64(float32(n) * 0.5) + x *= pi_cgo18_lgamma_r + switch n { + default: + fallthrough + case int32(0): + return __sin(x, 0, int32(0)) + case int32(1): + return __cos(x, 0) + case int32(2): + return __sin(-x, 0, int32(0)) + case int32(3): + return -__cos(x, 0) + } + return 0 +} +func __lgamma_r(x float64, signgamp *int32) float64 { + type _cgoa_81_lgamma_r struct { + f float64 + } + var u _cgoa_81_lgamma_r + u.f = x + var t float64 + var y float64 + var z float64 + var nadj float64 + var p float64 + var p1 float64 + var p2 float64 + var p3 float64 + var q float64 + var r float64 + var w float64 + var ix uint32 + var sign int32 + var i int32 + *signgamp = int32(1) + sign = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(63)) + ix = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32) & uint64(2147483647)) + if ix >= uint32(2146435072) { + return x * x + } + if ix < uint32(999292928) { + if sign != 0 { + x = -x + *signgamp = -1 + } + return -Log(x) + } + if sign != 0 { + x = -x + t = sin_pi_cgo80_lgamma_r(x) + if t == 0 { + return 1 / (x - x) + } + if t > 0 { + *signgamp = -1 + } else { + t = -t + } + nadj = Log(pi_cgo18_lgamma_r / (t * x)) + } + if (ix == uint32(1072693248) || ix == uint32(1073741824)) && uint32(*(*uint64)(unsafe.Pointer(&u))) == uint32(0) { + r = float64(int32(0)) + } else if ix < uint32(1073741824) { + if ix <= uint32(1072483532) { + r = -Log(x) + if ix >= uint32(1072130372) { + y = 1 - x + i = int32(0) + } else if ix >= uint32(1070442081) { + y = x - (tc_cgo31_lgamma_r - 1) + i = int32(1) + } else { + y = x + i = int32(2) + } + } else { + r = float64(0) + if ix >= uint32(1073460419) { + y = 2 - x + i = int32(0) + } else if ix >= uint32(1072936132) { + y = x - tc_cgo31_lgamma_r + i = int32(1) + } else { + y = x - 1 + i = int32(2) + } + } + switch i { + case int32(0): + z = y * y + p1 = a0_cgo19_lgamma_r + z*(a2_cgo21_lgamma_r+z*(a4_cgo23_lgamma_r+z*(a6_cgo25_lgamma_r+z*(a8_cgo27_lgamma_r+z*a10_cgo29_lgamma_r)))) + p2 = z * (a1_cgo20_lgamma_r + z*(a3_cgo22_lgamma_r+z*(a5_cgo24_lgamma_r+z*(a7_cgo26_lgamma_r+z*(a9_cgo28_lgamma_r+z*a11_cgo30_lgamma_r))))) + p = y*p1 + p2 + r += p - 0.5*y + break + case int32(1): + z = y * y + w = z * y + p1 = t0_cgo34_lgamma_r + w*(t3_cgo37_lgamma_r+w*(t6_cgo40_lgamma_r+w*(t9_cgo43_lgamma_r+w*t12_cgo46_lgamma_r))) + p2 = t1_cgo35_lgamma_r + w*(t4_cgo38_lgamma_r+w*(t7_cgo41_lgamma_r+w*(t10_cgo44_lgamma_r+w*t13_cgo47_lgamma_r))) + p3 = t2_cgo36_lgamma_r + w*(t5_cgo39_lgamma_r+w*(t8_cgo42_lgamma_r+w*(t11_cgo45_lgamma_r+w*t14_cgo48_lgamma_r))) + p = z*p1 - (tt_cgo33_lgamma_r - w*(p2+y*p3)) + r += tf_cgo32_lgamma_r + p + break + case int32(2): + p1 = y * (u0_cgo49_lgamma_r + y*(u1_cgo50_lgamma_r+y*(u2_cgo51_lgamma_r+y*(u3_cgo52_lgamma_r+y*(u4_cgo53_lgamma_r+y*u5_cgo54_lgamma_r))))) + p2 = 1 + y*(v1_cgo55_lgamma_r+y*(v2_cgo56_lgamma_r+y*(v3_cgo57_lgamma_r+y*(v4_cgo58_lgamma_r+y*v5_cgo59_lgamma_r)))) + r += -0.5*y + p1/p2 + } + } else if ix < uint32(1075838976) { + i = int32(x) + y = x - float64(i) + p = y * (s0_cgo60_lgamma_r + y*(s1_cgo61_lgamma_r+y*(s2_cgo62_lgamma_r+y*(s3_cgo63_lgamma_r+y*(s4_cgo64_lgamma_r+y*(s5_cgo65_lgamma_r+y*s6_cgo66_lgamma_r)))))) + q = 1 + y*(r1_cgo67_lgamma_r+y*(r2_cgo68_lgamma_r+y*(r3_cgo69_lgamma_r+y*(r4_cgo70_lgamma_r+y*(r5_cgo71_lgamma_r+y*r6_cgo72_lgamma_r))))) + r = 0.5*y + p/q + z = float64(1) + switch i { + case int32(7): + z *= y + 6 + case int32(6): + z *= y + 5 + case int32(5): + z *= y + 4 + case int32(4): + z *= y + 3 + case int32(3): + z *= y + 2 + r += Log(z) + break + } + } else if ix < uint32(1133510656) { + t = Log(x) + z = 1 / x + y = z * z + w = w0_cgo73_lgamma_r + z*(w1_cgo74_lgamma_r+y*(w2_cgo75_lgamma_r+y*(w3_cgo76_lgamma_r+y*(w4_cgo77_lgamma_r+y*(w5_cgo78_lgamma_r+y*w6_cgo79_lgamma_r))))) + r = (x-0.5)*(t-1) + w + } else { + r = x * (Log(x) - 1) + } + if sign != 0 { + r = nadj - r + } + return r +} diff --git a/lgammaf.c.i.go b/lgammaf.c.i.go new file mode 100644 index 0000000..544d5ec --- /dev/null +++ b/lgammaf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lgammaf(x float32) float32 { + return __lgammaf_r(x, &__signgam) +} diff --git a/lgammaf_r.c.i.go b/lgammaf_r.c.i.go new file mode 100644 index 0000000..b36502b --- /dev/null +++ b/lgammaf_r.c.i.go @@ -0,0 +1,220 @@ +package libc + +import unsafe "unsafe" + +var pi_cgo18_lgammaf_r float32 = float32(3.1415927410000002) +var a0_cgo19_lgammaf_r float32 = float32(0.077215664089000005) +var a1_cgo20_lgammaf_r float32 = float32(0.32246702909000002) +var a2_cgo21_lgammaf_r float32 = float32(0.067352302372000003) +var a3_cgo22_lgammaf_r float32 = float32(0.020580807701000001) +var a4_cgo23_lgammaf_r float32 = float32(0.0073855509982000004) +var a5_cgo24_lgammaf_r float32 = float32(0.0028905137442000002) +var a6_cgo25_lgammaf_r float32 = float32(0.0011927076848) +var a7_cgo26_lgammaf_r float32 = float32(5.1006977445999997e-4) +var a8_cgo27_lgammaf_r float32 = float32(2.2086278476999999e-4) +var a9_cgo28_lgammaf_r float32 = float32(1.0801156894999999e-4) +var a10_cgo29_lgammaf_r float32 = float32(2.52144564e-5) +var a11_cgo30_lgammaf_r float32 = float32(4.4864096708000002e-5) +var tc_cgo31_lgammaf_r float32 = float32(1.4616321324999999) +var tf_cgo32_lgammaf_r float32 = float32(-0.12148628384) +var tt_cgo33_lgammaf_r float32 = float32(6.6971006517999998e-9) +var t0_cgo34_lgammaf_r float32 = float32(0.48383611441000002) +var t1_cgo35_lgammaf_r float32 = float32(-0.14758771658) +var t2_cgo36_lgammaf_r float32 = float32(0.064624942838999999) +var t3_cgo37_lgammaf_r float32 = float32(-0.032788541168) +var t4_cgo38_lgammaf_r float32 = float32(0.017970675602999999) +var t5_cgo39_lgammaf_r float32 = float32(-0.010314224287999999) +var t6_cgo40_lgammaf_r float32 = float32(0.0061005386524000003) +var t7_cgo41_lgammaf_r float32 = float32(-0.0036845202557999998) +var t8_cgo42_lgammaf_r float32 = float32(0.0022596477065) +var t9_cgo43_lgammaf_r float32 = float32(-0.0014034647029) +var t10_cgo44_lgammaf_r float32 = float32(8.8108185445999996e-4) +var t11_cgo45_lgammaf_r float32 = float32(-5.3859531181000002e-4) +var t12_cgo46_lgammaf_r float32 = float32(3.1563205994e-4) +var t13_cgo47_lgammaf_r float32 = float32(-3.1275415677000002e-4) +var t14_cgo48_lgammaf_r float32 = float32(3.3552918466999999e-4) +var u0_cgo49_lgammaf_r float32 = float32(-0.077215664089000005) +var u1_cgo50_lgammaf_r float32 = float32(0.63282704352999997) +var u2_cgo51_lgammaf_r float32 = float32(1.4549225568999999) +var u3_cgo52_lgammaf_r float32 = float32(0.97771751881000001) +var u4_cgo53_lgammaf_r float32 = float32(0.22896373272000001) +var u5_cgo54_lgammaf_r float32 = float32(0.013381091878) +var v1_cgo55_lgammaf_r float32 = float32(2.4559779167000002) +var v2_cgo56_lgammaf_r float32 = float32(2.1284897326999999) +var v3_cgo57_lgammaf_r float32 = float32(0.76928514242000001) +var v4_cgo58_lgammaf_r float32 = float32(0.10422264785) +var v5_cgo59_lgammaf_r float32 = float32(0.0032170924824000001) +var s0_cgo60_lgammaf_r float32 = float32(-0.077215664089000005) +var s1_cgo61_lgammaf_r float32 = float32(0.21498242021) +var s2_cgo62_lgammaf_r float32 = float32(0.32577878237000002) +var s3_cgo63_lgammaf_r float32 = float32(0.14635047317) +var s4_cgo64_lgammaf_r float32 = float32(0.026642270385999998) +var s5_cgo65_lgammaf_r float32 = float32(0.0018402845599) +var s6_cgo66_lgammaf_r float32 = float32(3.1947532988999999e-5) +var r1_cgo67_lgammaf_r float32 = float32(1.3920053243999999) +var r2_cgo68_lgammaf_r float32 = float32(0.72193557023999999) +var r3_cgo69_lgammaf_r float32 = float32(0.17193385958999999) +var r4_cgo70_lgammaf_r float32 = float32(0.018645919859) +var r5_cgo71_lgammaf_r float32 = float32(7.7794247772999998e-4) +var r6_cgo72_lgammaf_r float32 = float32(7.3266842264000001e-6) +var w0_cgo73_lgammaf_r float32 = float32(0.41893854737000003) +var w1_cgo74_lgammaf_r float32 = float32(0.083333335817000003) +var w2_cgo75_lgammaf_r float32 = float32(-0.002777777845) +var w3_cgo76_lgammaf_r float32 = float32(7.9365057172000003e-4) +var w4_cgo77_lgammaf_r float32 = float32(-5.9518753551000001e-4) +var w5_cgo78_lgammaf_r float32 = float32(8.3633989560999997e-4) +var w6_cgo79_lgammaf_r float32 = float32(-0.0016309292987) + +func sin_pi_cgo80_lgammaf_r(x float32) float32 { + var y float64 + var n int32 + x = float32(int32(2)) * (x*0.5 - Floorf(x*0.5)) + n = int32(x * float32(int32(4))) + n = (n + int32(1)) / int32(2) + y = float64(x - float32(n)*0.5) + y *= float64(3.1415926535897931) + switch n { + default: + fallthrough + case int32(0): + return __sindf(y) + case int32(1): + return __cosdf(y) + case int32(2): + return __sindf(-y) + case int32(3): + return -__cosdf(y) + } + return 0 +} +func __lgammaf_r(x float32, signgamp *int32) float32 { + type _cgoa_81_lgammaf_r struct { + f float32 + } + var u _cgoa_81_lgammaf_r + u.f = x + var t float32 + var y float32 + var z float32 + var nadj float32 + var p float32 + var p1 float32 + var p2 float32 + var p3 float32 + var q float32 + var r float32 + var w float32 + var ix uint32 + var i int32 + var sign int32 + *signgamp = int32(1) + sign = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(31)) + ix = *(*uint32)(unsafe.Pointer(&u)) & uint32(2147483647) + if ix >= uint32(2139095040) { + return x * x + } + if ix < uint32(889192448) { + if sign != 0 { + *signgamp = -1 + x = -x + } + return -Logf(x) + } + if sign != 0 { + x = -x + t = sin_pi_cgo80_lgammaf_r(x) + if t == 0 { + return 1 / (x - x) + } + if t > 0 { + *signgamp = -1 + } else { + t = -t + } + nadj = Logf(pi_cgo18_lgammaf_r / (t * x)) + } + if ix == uint32(1065353216) || ix == uint32(1073741824) { + r = float32(int32(0)) + } else if ix < uint32(1073741824) { + if ix <= uint32(1063675494) { + r = -Logf(x) + if ix >= uint32(1060850208) { + y = 1 - x + i = int32(0) + } else if ix >= uint32(1047343880) { + y = x - (tc_cgo31_lgammaf_r - 1) + i = int32(1) + } else { + y = x + i = int32(2) + } + } else { + r = float32(0) + if ix >= uint32(1071490584) { + y = 2 - x + i = int32(0) + } else if ix >= uint32(1067296288) { + y = x - tc_cgo31_lgammaf_r + i = int32(1) + } else { + y = x - 1 + i = int32(2) + } + } + switch i { + case int32(0): + z = y * y + p1 = a0_cgo19_lgammaf_r + z*(a2_cgo21_lgammaf_r+z*(a4_cgo23_lgammaf_r+z*(a6_cgo25_lgammaf_r+z*(a8_cgo27_lgammaf_r+z*a10_cgo29_lgammaf_r)))) + p2 = z * (a1_cgo20_lgammaf_r + z*(a3_cgo22_lgammaf_r+z*(a5_cgo24_lgammaf_r+z*(a7_cgo26_lgammaf_r+z*(a9_cgo28_lgammaf_r+z*a11_cgo30_lgammaf_r))))) + p = y*p1 + p2 + r += p - 0.5*y + break + case int32(1): + z = y * y + w = z * y + p1 = t0_cgo34_lgammaf_r + w*(t3_cgo37_lgammaf_r+w*(t6_cgo40_lgammaf_r+w*(t9_cgo43_lgammaf_r+w*t12_cgo46_lgammaf_r))) + p2 = t1_cgo35_lgammaf_r + w*(t4_cgo38_lgammaf_r+w*(t7_cgo41_lgammaf_r+w*(t10_cgo44_lgammaf_r+w*t13_cgo47_lgammaf_r))) + p3 = t2_cgo36_lgammaf_r + w*(t5_cgo39_lgammaf_r+w*(t8_cgo42_lgammaf_r+w*(t11_cgo45_lgammaf_r+w*t14_cgo48_lgammaf_r))) + p = z*p1 - (tt_cgo33_lgammaf_r - w*(p2+y*p3)) + r += tf_cgo32_lgammaf_r + p + break + case int32(2): + p1 = y * (u0_cgo49_lgammaf_r + y*(u1_cgo50_lgammaf_r+y*(u2_cgo51_lgammaf_r+y*(u3_cgo52_lgammaf_r+y*(u4_cgo53_lgammaf_r+y*u5_cgo54_lgammaf_r))))) + p2 = 1 + y*(v1_cgo55_lgammaf_r+y*(v2_cgo56_lgammaf_r+y*(v3_cgo57_lgammaf_r+y*(v4_cgo58_lgammaf_r+y*v5_cgo59_lgammaf_r)))) + r += -0.5*y + p1/p2 + } + } else if ix < uint32(1090519040) { + i = int32(x) + y = x - float32(i) + p = y * (s0_cgo60_lgammaf_r + y*(s1_cgo61_lgammaf_r+y*(s2_cgo62_lgammaf_r+y*(s3_cgo63_lgammaf_r+y*(s4_cgo64_lgammaf_r+y*(s5_cgo65_lgammaf_r+y*s6_cgo66_lgammaf_r)))))) + q = 1 + y*(r1_cgo67_lgammaf_r+y*(r2_cgo68_lgammaf_r+y*(r3_cgo69_lgammaf_r+y*(r4_cgo70_lgammaf_r+y*(r5_cgo71_lgammaf_r+y*r6_cgo72_lgammaf_r))))) + r = 0.5*y + p/q + z = float32(1) + switch i { + case int32(7): + z *= y + 6 + case int32(6): + z *= y + 5 + case int32(5): + z *= y + 4 + case int32(4): + z *= y + 3 + case int32(3): + z *= y + 2 + r += Logf(z) + break + } + } else if ix < uint32(1551892480) { + t = Logf(x) + z = 1 / x + y = z * z + w = w0_cgo73_lgammaf_r + z*(w1_cgo74_lgammaf_r+y*(w2_cgo75_lgammaf_r+y*(w3_cgo76_lgammaf_r+y*(w4_cgo77_lgammaf_r+y*(w5_cgo78_lgammaf_r+y*w6_cgo79_lgammaf_r))))) + r = (x-0.5)*(t-1) + w + } else { + r = x * (Logf(x) - 1) + } + if sign != 0 { + r = nadj - r + } + return r +} diff --git a/lgammal.c.i.go b/lgammal.c.i.go new file mode 100644 index 0000000..84ad83b --- /dev/null +++ b/lgammal.c.i.go @@ -0,0 +1,8 @@ +package libc + +func __lgammal_r(x float64, sg *int32) float64 { + return float64(__lgamma_r(float64(x), sg)) +} +func Lgammal(x float64) float64 { + return __lgammal_r(x, &__signgam) +} diff --git a/llrint.c.i.go b/llrint.c.i.go new file mode 100644 index 0000000..9e69ad7 --- /dev/null +++ b/llrint.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Llrint(x float64) int64 { + return int64(Rint(x)) +} diff --git a/llrintf.c.i.go b/llrintf.c.i.go new file mode 100644 index 0000000..842ae0a --- /dev/null +++ b/llrintf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Llrintf(x float32) int64 { + return int64(Rintf(x)) +} diff --git a/llrintl.c.i.go b/llrintl.c.i.go new file mode 100644 index 0000000..11a8694 --- /dev/null +++ b/llrintl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Llrintl(x float64) int64 { + return Llrint(float64(x)) +} diff --git a/llround.c.i.go b/llround.c.i.go new file mode 100644 index 0000000..4d683d5 --- /dev/null +++ b/llround.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Llround(x float64) int64 { + return int64(Round(x)) +} diff --git a/llroundf.c.i.go b/llroundf.c.i.go new file mode 100644 index 0000000..f29a9d5 --- /dev/null +++ b/llroundf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Llroundf(x float32) int64 { + return int64(Roundf(x)) +} diff --git a/llroundl.c.i.go b/llroundl.c.i.go new file mode 100644 index 0000000..4cf0af6 --- /dev/null +++ b/llroundl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Llroundl(x float64) int64 { + return int64(Roundl(x)) +} diff --git a/log.c.i.go b/log.c.i.go new file mode 100644 index 0000000..269f988 --- /dev/null +++ b/log.c.i.go @@ -0,0 +1,123 @@ +package libc + +import unsafe "unsafe" + +func top16_cgo20_log(x float64) uint32 { + return uint32(*(*uint64)(unsafe.Pointer(&_cgoz_21_log{x})) >> int32(48)) +} + +type _cgoz_21_log struct { + _f float64 +} + +func Log(x float64) float64 { + var w float64 + var z float64 + var r float64 + var r2 float64 + var r3 float64 + var y float64 + var invc float64 + var logc float64 + var kd float64 + var hi float64 + var lo float64 + var ix uint64 + var iz uint64 + var tmp uint64 + var top uint32 + var k int32 + var i int32 + ix = *(*uint64)(unsafe.Pointer(&_cgoz_22_log{x})) + top = top16_cgo20_log(x) + if func() int64 { + if ix-*(*uint64)(unsafe.Pointer(&_cgoz_23_log{1 - 0.0625})) < *(*uint64)(unsafe.Pointer(&_cgoz_24_log{1 + 0.064697265625}))-*(*uint64)(unsafe.Pointer(&_cgoz_25_log{1 - 0.0625})) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if int32(1) != 0 && func() int64 { + if ix == *(*uint64)(unsafe.Pointer(&_cgoz_26_log{1})) { + return 1 + } else { + return 0 + } + }() == int64(0) { + return float64(int32(0)) + } + r = x - 1 + r2 = r * r + r3 = r * r2 + y = r3 * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(1))*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(2))*8)) + r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(3))*8)) + r3*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(4))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(5))*8))+r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(6))*8))+r3*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(7))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(8))*8))+r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(9))*8))+r3**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(10))*8))))) + w = r * 134217728 + var rhi float64 = r + w - w + var rlo float64 = r - rhi + w = rhi * rhi * *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(0))*8)) + hi = r + w + lo = r - hi + w + lo += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly1)))) + uintptr(int32(0))*8)) * rlo * (rhi + r) + y += lo + y += hi + return eval_as_double(y) + } + if func() int64 { + if top-uint32(16) >= uint32(32736) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if ix*uint64(2) == uint64(0) { + return __math_divzero(uint32(1)) + } + if ix == *(*uint64)(unsafe.Pointer(&_cgoz_27_log{float64(X__builtin_inff())})) { + return x + } + if top&uint32(32768) != 0 || top&uint32(32752) == uint32(32752) { + return __math_invalid(x) + } + ix = *(*uint64)(unsafe.Pointer(&_cgoz_28_log{x * 4503599627370496})) + ix -= 234187180623265792 + } + tmp = ix - uint64(4604367669032910848) + i = int32(tmp >> 45 % uint64(128)) + k = int32(int64(tmp) >> int32(52)) + iz = ix - tmp&18442240474082181120 + invc = (*(*_cgoa_18_log)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_18_log)(unsafe.Pointer(&__log_data.tab)))) + uintptr(i)*16))).invc + logc = (*(*_cgoa_18_log)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_18_log)(unsafe.Pointer(&__log_data.tab)))) + uintptr(i)*16))).logc + z = *(*float64)(unsafe.Pointer(&_cgoz_29_log{iz})) + r = (z - (*(*_cgoa_19_log)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_19_log)(unsafe.Pointer(&__log_data.tab2)))) + uintptr(i)*16))).chi - (*(*_cgoa_19_log)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_19_log)(unsafe.Pointer(&__log_data.tab2)))) + uintptr(i)*16))).clo) * invc + kd = float64(k) + w = kd*__log_data.ln2hi + logc + hi = w + r + lo = w - hi + r + kd*__log_data.ln2lo + r2 = r * r + y = lo + r2**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly)))) + uintptr(int32(0))*8)) + r*r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly)))) + uintptr(int32(1))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly)))) + uintptr(int32(2))*8))+r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly)))) + uintptr(int32(3))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log_data.poly)))) + uintptr(int32(4))*8)))) + hi + return eval_as_double(y) +} + +type _cgoz_22_log struct { + _f float64 +} +type _cgoz_23_log struct { + _f float64 +} +type _cgoz_24_log struct { + _f float64 +} +type _cgoz_25_log struct { + _f float64 +} +type _cgoz_26_log struct { + _f float64 +} +type _cgoz_27_log struct { + _f float64 +} +type _cgoz_28_log struct { + _f float64 +} +type _cgoz_29_log struct { + _i uint64 +} diff --git a/log10.c.i.go b/log10.c.i.go new file mode 100644 index 0000000..a89e0de --- /dev/null +++ b/log10.c.i.go @@ -0,0 +1,83 @@ +package libc + +import unsafe "unsafe" + +var ivln10hi_cgo18_log10 float64 = 0.43429448187816888 +var ivln10lo_cgo19_log10 float64 = 2.5082946711645275e-11 +var log10_2hi_cgo20_log10 float64 = 0.30102999566361177 +var log10_2lo_cgo21_log10 float64 = 3.6942390771589308e-13 +var Lg1_cgo22_log10 float64 = 0.66666666666667351 +var Lg2_cgo23_log10 float64 = 0.39999999999409419 +var Lg3_cgo24_log10 float64 = 0.28571428743662391 +var Lg4_cgo25_log10 float64 = 0.22222198432149784 +var Lg5_cgo26_log10 float64 = 0.1818357216161805 +var Lg6_cgo27_log10 float64 = 0.15313837699209373 +var Lg7_cgo28_log10 float64 = 0.14798198605116586 + +func Log10(x float64) float64 { + type _cgoa_29_log10 struct { + f float64 + } + var u _cgoa_29_log10 + u.f = x + var hfsq float64 + var f float64 + var s float64 + var z float64 + var R float64 + var w float64 + var t1 float64 + var t2 float64 + var dk float64 + var y float64 + var hi float64 + var lo float64 + var val_hi float64 + var val_lo float64 + var hx uint32 + var k int32 + hx = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32)) + k = int32(0) + if hx < uint32(1048576) || hx>>int32(31) != 0 { + if *(*uint64)(unsafe.Pointer(&u))<>int32(31) != 0 { + return (x - x) / 0 + } + k -= int32(54) + x *= float64(18014398509481984) + u.f = x + hx = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32)) + } else if hx >= uint32(2146435072) { + return x + } else if hx == uint32(1072693248) && *(*uint64)(unsafe.Pointer(&u))<>int32(20)) - int32(1023) + hx = hx&uint32(1048575) + uint32(1072079006) + *(*uint64)(unsafe.Pointer(&u)) = uint64(hx)<>int32(31) != 0 { + if ix<>int32(31) != 0 { + return (x - x) / 0 + } + k -= int32(25) + x *= float32(33554432) + u.f = x + ix = *(*uint32)(unsafe.Pointer(&u)) + } else if ix >= uint32(2139095040) { + return x + } else if ix == uint32(1065353216) { + return float32(int32(0)) + } + ix += uint32(4913933) + k += int32(ix>>int32(23)) - int32(127) + ix = ix&uint32(8388607) + uint32(1060439283) + *(*uint32)(unsafe.Pointer(&u)) = ix + x = u.f + f = x - 1 + s = f / (2 + f) + z = s * s + w = z * z + t1 = w * (Lg2_cgo23_log10f + w*Lg4_cgo25_log10f) + t2 = z * (Lg1_cgo22_log10f + w*Lg3_cgo24_log10f) + R = t2 + t1 + hfsq = 0.5 * f * f + hi = f - hfsq + u.f = hi + *(*uint32)(unsafe.Pointer(&u)) &= uint32(4294963200) + hi = u.f + lo = f - hi - hfsq + s*(hfsq+R) + dk = float32(k) + return dk*log10_2lo_cgo21_log10f + (lo+hi)*ivln10lo_cgo19_log10f + lo*ivln10hi_cgo18_log10f + hi*ivln10hi_cgo18_log10f + dk*log10_2hi_cgo20_log10f +} diff --git a/log10l.c.i.go b/log10l.c.i.go new file mode 100644 index 0000000..1ef734c --- /dev/null +++ b/log10l.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Log10l(x float64) float64 { + return float64(Log10(float64(x))) +} diff --git a/log1p.c.i.go b/log1p.c.i.go new file mode 100644 index 0000000..f1b9144 --- /dev/null +++ b/log1p.c.i.go @@ -0,0 +1,98 @@ +package libc + +import unsafe "unsafe" + +var ln2_hi_cgo18_log1p float64 = 0.69314718036912382 +var ln2_lo_cgo19_log1p float64 = 1.9082149292705877e-10 +var Lg1_cgo20_log1p float64 = 0.66666666666667351 +var Lg2_cgo21_log1p float64 = 0.39999999999409419 +var Lg3_cgo22_log1p float64 = 0.28571428743662391 +var Lg4_cgo23_log1p float64 = 0.22222198432149784 +var Lg5_cgo24_log1p float64 = 0.1818357216161805 +var Lg6_cgo25_log1p float64 = 0.15313837699209373 +var Lg7_cgo26_log1p float64 = 0.14798198605116586 + +func Log1p(x float64) float64 { + type _cgoa_27_log1p struct { + f float64 + } + var u _cgoa_27_log1p + u.f = x + var hfsq float64 + var f float64 + var c float64 + var s float64 + var z float64 + var R float64 + var w float64 + var t1 float64 + var t2 float64 + var dk float64 + var hx uint32 + var hu uint32 + var k int32 + hx = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32)) + k = int32(1) + if hx < uint32(1071284858) || hx>>int32(31) != 0 { + if hx >= uint32(3220176896) { + if x == float64(-1) { + return x / 0 + } + return (x - x) / 0 + } + if hx<= uint32(2146435072) { + return x + } + if k != 0 { + u.f = float64(int32(1)) + x + hu = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32)) + hu += uint32(614242) + k = int32(hu>>int32(20)) - int32(1023) + if k < int32(54) { + c = func() float64 { + if k >= int32(2) { + return float64(int32(1)) - (u.f - x) + } else { + return x - (u.f - float64(int32(1))) + } + }() + c /= u.f + } else { + c = float64(int32(0)) + } + hu = hu&uint32(1048575) + uint32(1072079006) + *(*uint64)(unsafe.Pointer(&u)) = uint64(hu)<>int32(31) != 0 { + if ix >= uint32(3212836864) { + if x == float32(-1) { + return x / 0 + } + return (x - x) / 0 + } + if ix<= uint32(2139095040) { + return x + } + if k != 0 { + u.f = float32(int32(1)) + x + iu = *(*uint32)(unsafe.Pointer(&u)) + iu += uint32(4913933) + k = int32(iu>>int32(23)) - int32(127) + if k < int32(25) { + c = func() float32 { + if k >= int32(2) { + return float32(int32(1)) - (u.f - x) + } else { + return x - (u.f - float32(int32(1))) + } + }() + c /= u.f + } else { + c = float32(int32(0)) + } + iu = iu&uint32(8388607) + uint32(1060439283) + *(*uint32)(unsafe.Pointer(&u)) = iu + f = u.f - float32(int32(1)) + } + s = f / (2 + f) + z = s * s + w = z * z + t1 = w * (Lg2_cgo21_log1pf + w*Lg4_cgo23_log1pf) + t2 = z * (Lg1_cgo20_log1pf + w*Lg3_cgo22_log1pf) + R = t2 + t1 + hfsq = 0.5 * f * f + dk = float32(k) + return s*(hfsq+R) + (dk*ln2_lo_cgo19_log1pf + c) - hfsq + f + dk*ln2_hi_cgo18_log1pf +} diff --git a/log1pl.c.i.go b/log1pl.c.i.go new file mode 100644 index 0000000..7c68358 --- /dev/null +++ b/log1pl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Log1pl(x float64) float64 { + return float64(Log1p(float64(x))) +} diff --git a/log2.c.i.go b/log2.c.i.go new file mode 100644 index 0000000..4a3331d --- /dev/null +++ b/log2.c.i.go @@ -0,0 +1,147 @@ +package libc + +import unsafe "unsafe" + +func top16_cgo20_log2(x float64) uint32 { + return uint32(*(*uint64)(unsafe.Pointer(&_cgoz_21_log2{x})) >> int32(48)) +} + +type _cgoz_21_log2 struct { + _f float64 +} + +func Log2(x float64) float64 { + var z float64 + var r float64 + var r2 float64 + var r4 float64 + var y float64 + var invc float64 + var logc float64 + var kd float64 + var hi float64 + var lo float64 + var t1 float64 + var t2 float64 + var t3 float64 + var p float64 + var ix uint64 + var iz uint64 + var tmp uint64 + var top uint32 + var k int32 + var i int32 + ix = *(*uint64)(unsafe.Pointer(&_cgoz_22_log2{x})) + top = top16_cgo20_log2(x) + if func() int64 { + if ix-*(*uint64)(unsafe.Pointer(&_cgoz_23_log2{1 - 0.042397022247314453})) < *(*uint64)(unsafe.Pointer(&_cgoz_24_log2{1 + 0.044274330139160156}))-*(*uint64)(unsafe.Pointer(&_cgoz_25_log2{1 - 0.042397022247314453})) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if int32(1) != 0 && func() int64 { + if ix == *(*uint64)(unsafe.Pointer(&_cgoz_26_log2{1})) { + return 1 + } else { + return 0 + } + }() == int64(0) { + return float64(int32(0)) + } + r = x - 1 + var rhi float64 + var rlo float64 + rhi = *(*float64)(unsafe.Pointer(&_cgoz_27_log2{*(*uint64)(unsafe.Pointer(&_cgoz_28_log2{r})) & 18446744069414584320})) + rlo = r - rhi + hi = rhi * __log2_data.invln2hi + lo = rlo*__log2_data.invln2hi + r*__log2_data.invln2lo + r2 = r * r + r4 = r2 * r2 + p = r2 * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(0))*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(1))*8))) + y = hi + p + lo += hi - y + p + lo += r4 * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(2))*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(3))*8)) + r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(4))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(5))*8))) + r4*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(6))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(7))*8))+r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(8))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly1)))) + uintptr(int32(9))*8))))) + y += lo + return eval_as_double(y) + } + if func() int64 { + if top-uint32(16) >= uint32(32736) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if ix*uint64(2) == uint64(0) { + return __math_divzero(uint32(1)) + } + if ix == *(*uint64)(unsafe.Pointer(&_cgoz_29_log2{float64(X__builtin_inff())})) { + return x + } + if top&uint32(32768) != 0 || top&uint32(32752) == uint32(32752) { + return __math_invalid(x) + } + ix = *(*uint64)(unsafe.Pointer(&_cgoz_30_log2{x * 4503599627370496})) + ix -= 234187180623265792 + } + tmp = ix - uint64(4604367669032910848) + i = int32(tmp >> 46 % uint64(64)) + k = int32(int64(tmp) >> int32(52)) + iz = ix - tmp&18442240474082181120 + invc = (*(*_cgoa_18_log2)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_18_log2)(unsafe.Pointer(&__log2_data.tab)))) + uintptr(i)*16))).invc + logc = (*(*_cgoa_18_log2)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_18_log2)(unsafe.Pointer(&__log2_data.tab)))) + uintptr(i)*16))).logc + z = *(*float64)(unsafe.Pointer(&_cgoz_31_log2{iz})) + kd = float64(k) + var rhi float64 + var rlo float64 + r = (z - (*(*_cgoa_19_log2)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_19_log2)(unsafe.Pointer(&__log2_data.tab2)))) + uintptr(i)*16))).chi - (*(*_cgoa_19_log2)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_19_log2)(unsafe.Pointer(&__log2_data.tab2)))) + uintptr(i)*16))).clo) * invc + rhi = *(*float64)(unsafe.Pointer(&_cgoz_32_log2{*(*uint64)(unsafe.Pointer(&_cgoz_33_log2{r})) & 18446744069414584320})) + rlo = r - rhi + t1 = rhi * __log2_data.invln2hi + t2 = rlo*__log2_data.invln2hi + r*__log2_data.invln2lo + t3 = kd + logc + hi = t3 + t1 + lo = t3 - hi + t1 + t2 + r2 = r * r + r4 = r2 * r2 + p = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly)))) + uintptr(int32(0))*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly)))) + uintptr(int32(1))*8)) + r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly)))) + uintptr(int32(2))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly)))) + uintptr(int32(3))*8))) + r4*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly)))) + uintptr(int32(4))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__log2_data.poly)))) + uintptr(int32(5))*8))) + y = lo + r2*p + hi + return eval_as_double(y) +} + +type _cgoz_22_log2 struct { + _f float64 +} +type _cgoz_23_log2 struct { + _f float64 +} +type _cgoz_24_log2 struct { + _f float64 +} +type _cgoz_25_log2 struct { + _f float64 +} +type _cgoz_26_log2 struct { + _f float64 +} +type _cgoz_27_log2 struct { + _i uint64 +} +type _cgoz_28_log2 struct { + _f float64 +} +type _cgoz_29_log2 struct { + _f float64 +} +type _cgoz_30_log2 struct { + _f float64 +} +type _cgoz_31_log2 struct { + _i uint64 +} +type _cgoz_32_log2 struct { + _i uint64 +} +type _cgoz_33_log2 struct { + _f float64 +} diff --git a/log2_data.c.i.go b/log2_data.c.i.go new file mode 100644 index 0000000..2dde8d4 --- /dev/null +++ b/log2_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __log2_data struct_log2_data = struct_log2_data{1.4426950407214463, 1.6751713164886512e-10, [6]float64{-0.72134752044448824, 0.48089834696299849, -0.36067375954075914, 0.2885390073180969, -0.24046935556284221, 0.20612023821736031}, [10]float64{-0.72134752044448169, 0.48089834696298744, -0.36067376022214498, 0.2885390081805197, -0.24044917405728863, 0.20609928610229539, -0.18033596705327856, 0.1603032746063156, -0.14483316576701266, 0.13046826811283835}, [64]_cgoa_18_log2{_cgoa_18_log2{1.4463276106642393, -0.53239437714864835}, _cgoa_18_log2{1.4301675812282968, -0.51618420605382198}, _cgoa_18_log2{1.4143648676229383, -0.50015434419742633}, _cgoa_18_log2{1.3989068970611538, -0.4842999484799293}, _cgoa_18_log2{1.3837838957784339, -0.46861865624623533}, _cgoa_18_log2{1.368983882697786, -0.45310546157838871}, _cgoa_18_log2{1.3544972916324536, -0.43775750882059583}, _cgoa_18_log2{1.3403139676437443, -0.42257099061271219}, _cgoa_18_log2{1.3264249304188642, -0.40754302793970965}, _cgoa_18_log2{1.3128203652112156, -0.3926695240384106}, _cgoa_18_log2{1.299492412370217, -0.37794821005650192}, _cgoa_18_log2{1.28643198385998, -0.36337518101890964}, _cgoa_18_log2{1.2736319291846832, -0.34894840894253321}, _cgoa_18_log2{1.2610838968062879, -0.33466425780738973}, _cgoa_18_log2{1.2487803143135721, -0.3205197000629596}, _cgoa_18_log2{1.2367150450059063, -0.30651312318013879}, _cgoa_18_log2{1.2248804968401878, -0.2926410022678283}, _cgoa_18_log2{1.2132702353497795, -0.27890092208053829}, _cgoa_18_log2{1.2018780785715362, -0.26529055298624371}, _cgoa_18_log2{1.1906977650613551, -0.2518072602367738}, _cgoa_18_log2{1.1797235410550593, -0.23844881494437686}, _cgoa_18_log2{1.1689498986205256, -0.22521309705462045}, _cgoa_18_log2{1.1583711374084551, -0.21209756102439314}, _cgoa_18_log2{1.1479820146386086, -0.1991000395789797}, _cgoa_18_log2{1.1377775576851088, -0.18621852970682085}, _cgoa_18_log2{1.127753150630225, -0.17345131655361001}, _cgoa_18_log2{1.1179037012282074, -0.16079591649577196}, _cgoa_18_log2{1.1082251967632821, -0.14825107384353942}, _cgoa_18_log2{1.098712461056607, -0.13581387465410444}, _cgoa_18_log2{1.0893619091634283, -0.12348332762257996}, _cgoa_18_log2{1.0801689912316736, -0.11125703807351783}, _cgoa_18_log2{1.071129489697672, -0.099132899184496637}, _cgoa_18_log2{1.0622406576750423, -0.087110655314972973}, _cgoa_18_log2{1.0534977607927976, -0.075187247713301986}, _cgoa_18_log2{1.0448978779823419, -0.06336194888240243}, _cgoa_18_log2{1.0364370289499079, -0.051632464945669199}, _cgoa_18_log2{1.0281122132034575, -0.039997735929773626}, _cgoa_18_log2{1.0199202450036955, -0.028456341769015125}, _cgoa_18_log2{1.0118577522306755, -0.017006489068080555}, _cgoa_18_log2{1.003921649236766, -0.0056466789815203811}, _cgoa_18_log2{0.99224804675507749, 0.011227277611396858}, _cgoa_18_log2{0.97709933661785486, 0.033422853921138085}, _cgoa_18_log2{0.9624059787315814, 0.05528248992573026}, _cgoa_18_log2{0.94814805982863692, 0.076815731437136492}, _cgoa_18_log2{0.93430659312610653, 0.098032046236312453}, _cgoa_18_log2{0.9208633936884979, 0.11894094059630334}, _cgoa_18_log2{0.90780136418406021, 0.13955143862290242}, _cgoa_18_log2{0.89510481815129272, 0.15987146080919956}, _cgoa_18_log2{0.88275857426047299, 0.17990916589428707}, _cgoa_18_log2{0.87074819022417093, 0.19967252559081317}, _cgoa_18_log2{0.85906028817469715, 0.21916871276857819}, _cgoa_18_log2{0.84768220443366882, 0.23840459427242422}, _cgoa_18_log2{0.83660132840532875, 0.25738780610663525}, _cgoa_18_log2{0.82580649136212581, 0.27612433583180973}, _cgoa_18_log2{0.81528651015791931, 0.29462095070221039}, _cgoa_18_log2{0.8050314363208223, 0.31288297359969874}, _cgoa_18_log2{0.79503104926405421, 0.33091689015759584}, _cgoa_18_log2{0.78527604324872713, 0.34872821002795718}, _cgoa_18_log2{0.77575756603147117, 0.36632223233368677}, _cgoa_18_log2{0.76646705665889459, 0.38370430980853598}, _cgoa_18_log2{0.75739656080786454, 0.40087922465090742}, _cgoa_18_log2{0.7485380168514022, 0.41785250494945103}, _cgoa_18_log2{0.73988442137550092, 0.4346281724315304}, _cgoa_18_log2{0.73142861131781123, 0.45121103315341315}}, [64]_cgoa_19_log2{_cgoa_19_log2{0.69140628487396483, 4.3399718934181822e-17}, _cgoa_19_log2{0.69921875808508527, 7.8055933387120743e-18}, _cgoa_19_log2{0.70703113665475625, 3.2084332036962602e-17}, _cgoa_19_log2{0.71484385565673891, 4.3364919464739848e-17}, _cgoa_19_log2{0.72265619151280835, 4.6818903197616072e-17}, _cgoa_19_log2{0.73046878976350804, -1.6471266421472941e-17}, _cgoa_19_log2{0.73828128426509443, 2.0846837208642192e-17}, _cgoa_19_log2{0.74609384378645838, -7.8213179536193196e-18}, _cgoa_19_log2{0.75390621592449691, -3.4709878100152008e-17}, _cgoa_19_log2{0.76171883564520504, 1.2996798345429576e-17}, _cgoa_19_log2{0.76953123425787773, -5.2071007285622585e-17}, _cgoa_19_log2{0.77734385692080532, -4.5136367312261827e-17}, _cgoa_19_log2{0.78515619551101479, -2.0797044446832382e-17}, _cgoa_19_log2{0.7929686538163826, -1.9947626198727574e-17}, _cgoa_19_log2{0.8007813612514213, 1.4720648710613419e-17}, _cgoa_19_log2{0.80859370478122072, 5.2908041093772089e-17}, _cgoa_19_log2{0.81640617397345305, -1.129659587857177e-17}, _cgoa_19_log2{0.82421868670643283, 3.9015437381546907e-17}, _cgoa_19_log2{0.83203115010511419, -3.2124828531271869e-17}, _cgoa_19_log2{0.83984368606627169, 5.2200817947060353e-18}, _cgoa_19_log2{0.84765622215665248, -5.3741637898827798e-17}, _cgoa_19_log2{0.85546865710848441, 4.2919923774713591e-18}, _cgoa_19_log2{0.86328117794546566, 1.7319616935225806e-17}, _cgoa_19_log2{0.8710937865301015, 1.8251073579011692e-17}, _cgoa_19_log2{0.87890642001638064, 1.2113671810693101e-17}, _cgoa_19_log2{0.88671887056238119, -2.4311951964962691e-17}, _cgoa_19_log2{0.89453143316488704, -2.2589527817694029e-17}, _cgoa_19_log2{0.90234367791007808, 4.3322028821617186e-17}, _cgoa_19_log2{0.91015623781887622, -5.2414676705491076e-18}, _cgoa_19_log2{0.91796857553790046, -2.3432856904274634e-17}, _cgoa_19_log2{0.92578106584946473, 3.9914341909758727e-17}, _cgoa_19_log2{0.93359393949862368, -1.8218382846902827e-17}, _cgoa_19_log2{0.94140625551720991, 4.4236693744315378e-17}, _cgoa_19_log2{0.94921891361920085, -2.6059674623550364e-17}, _cgoa_19_log2{0.95703132437302107, -4.9470192619465948e-17}, _cgoa_19_log2{0.9648439529540691, -5.4644837229582306e-17}, _cgoa_19_log2{0.97265647383385944, -5.4656321533328614e-17}, _cgoa_19_log2{0.98046882086978937, -1.782581090537996e-18}, _cgoa_19_log2{0.98828120632120997, -5.2277711573086786e-18}, _cgoa_19_log2{0.99609367001922166, 4.1586638841164565e-17}, _cgoa_19_log2{1.0078125154998021, 9.5409123891377362e-17}, _cgoa_19_log2{1.0234373952820537, 3.9858217045613471e-17}, _cgoa_19_log2{1.0390625391978199, -5.1794956409603549e-18}, _cgoa_19_log2{1.0546875982436061, -6.074512782488841e-17}, _cgoa_19_log2{1.0703124727548901, -4.853656019321416e-17}, _cgoa_19_log2{1.0859374005459401, -1.0233609026899023e-16}, _cgoa_19_log2{1.101562565835984, 9.7145045102816682e-17}, _cgoa_19_log2{1.1171875960464082, -5.7286314916596165e-17}, _cgoa_19_log2{1.1328125595809087, -4.3353271744463366e-17}, _cgoa_19_log2{1.1484376438870962, 5.0294552578128642e-17}, _cgoa_19_log2{1.1640626551656426, -1.3886091944776072e-17}, _cgoa_19_log2{1.1796873813908759, 9.535864385063222e-17}, _cgoa_19_log2{1.19531246968748, 2.5970710873556995e-17}, _cgoa_19_log2{1.2109374417129501, -1.0412863482435496e-16}, _cgoa_19_log2{1.2265626715770166, 1.9030809306814571e-17}, _cgoa_19_log2{1.2421875157698543, 9.8849331542884509e-17}, _cgoa_19_log2{1.2578125104996614, 2.6050284010464489e-17}, _cgoa_19_log2{1.273437549250769, 3.128070230699857e-17}, _cgoa_19_log2{1.2890625161616944, -4.5064602935108912e-17}, _cgoa_19_log2{1.3046875156762752, -2.0874781900380847e-17}, _cgoa_19_log2{1.3203123063212308, 8.5053570242475104e-17}, _cgoa_19_log2{1.3359374907988373, -3.99657459893118e-17}, _cgoa_19_log2{1.351562448282023, 4.1576596545783999e-17}, _cgoa_19_log2{1.3671874254389709, -6.0722954507800655e-17}}} diff --git a/log2f_data.c.i.go b/log2f_data.c.i.go new file mode 100644 index 0000000..b44d232 --- /dev/null +++ b/log2f_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __log2f_data struct_log2f_data = struct_log2f_data{[16]_cgoa_18_log2f_data{_cgoa_18_log2f_data{1.3989071621465281, -0.48430022186289673}, _cgoa_18_log2f_data{1.3403141896637998, -0.42257122959194704}, _cgoa_18_log2f_data{1.286432210124115, -0.36337543476735562}, _cgoa_18_log2f_data{1.2367150214269895, -0.30651309567405577}, _cgoa_18_log2f_data{1.1906977166711752, -0.25180720160537634}, _cgoa_18_log2f_data{1.1479821020556429, -0.19910014943794563}, _cgoa_18_log2f_data{1.1082251448272158, -0.14825100623281615}, _cgoa_18_log2f_data{1.0711297413057381, -0.099133238073183915}, _cgoa_18_log2f_data{1.0364372789772831, -0.051632812977629436}, _cgoa_18_log2f_data{1, 0}, _cgoa_18_log2f_data{0.9492859795739057, 0.075085319379430041}, _cgoa_18_log2f_data{0.89510494286090036, 0.15987125980713107}, _cgoa_18_log2f_data{0.84768216203511026, 0.23840466643176811}, _cgoa_18_log2f_data{0.80503148516920009, 0.31288288605863257}, _cgoa_18_log2f_data{0.7664671008843108, 0.38370422656453185}, _cgoa_18_log2f_data{0.73142860331632797, 0.45121104893581498}}, [4]float64{-0.36051725506874704, 0.48112470787672912, -0.72134762998677693, 1.4426950186867042}} diff --git a/log2l.c.i.go b/log2l.c.i.go new file mode 100644 index 0000000..f1ccf3b --- /dev/null +++ b/log2l.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Log2l(x float64) float64 { + return float64(Log2(float64(x))) +} diff --git a/log_data.c.i.go b/log_data.c.i.go new file mode 100644 index 0000000..dee5168 --- /dev/null +++ b/log_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __log_data struct_log_data = struct_log_data{0.69314718055989033, 5.4979230187083712e-14, [5]float64{-0.50000000000000011, 0.33333333331825593, -0.24999999996229549, 0.20000304511814496, -0.16667054827627667}, [11]float64{-0.5, 0.3333333333333352, -0.24999999999998432, 0.19999999999320328, -0.16666666669929706, 0.14285715076560868, -0.12499997863982555, 0.11110712032936046, -0.10000486757818193, 0.091819940061954666, -0.083283630622893415}, [128]_cgoa_18_log{_cgoa_18_log{1.4504249240398293, -0.37185656456335892}, _cgoa_18_log{1.4422535083272761, -0.36620682668944937}, _cgoa_18_log{1.4341736174350004, -0.36058880697919449}, _cgoa_18_log{1.4261838163299949, -0.35500221714198688}, _cgoa_18_log{1.4182825527052965, -0.34944666968829097}, _cgoa_18_log{1.4104682921759335, -0.34392177136032842}, _cgoa_18_log{1.4027396147468003, -0.33842719212611883}, _cgoa_18_log{1.3950954438932313, -0.33296283149434203}, _cgoa_18_log{1.3875338232485754, -0.32752794345742586}, _cgoa_18_log{1.3800539211058593, -0.32212257167088865}, _cgoa_18_log{1.3726542695419708, -0.3167462884799761}, _cgoa_18_log{1.3653332798446802, -0.3113985598928366}, _cgoa_18_log{1.358090204587874, -0.30607945151655258}, _cgoa_18_log{1.3509234892132138, -0.30078842466764399}, _cgoa_18_log{1.3438320840699889, -0.29552529684769979}, _cgoa_18_log{1.3368146974742003, -0.29028969275850613}, _cgoa_18_log{1.3298701146777361, -0.28508127932775551}, _cgoa_18_log{1.3229973391611061, -0.27989987391470095}, _cgoa_18_log{1.316195352741367, -0.27474526621870154}, _cgoa_18_log{1.3094628125672239, -0.26961698637012432}, _cgoa_18_log{1.3027990455471041, -0.26451506180308115}, _cgoa_18_log{1.2962024229438942, -0.25943877627673828}, _cgoa_18_log{1.2896726275815547, -0.25438840909816918}, _cgoa_18_log{1.2832080305745537, -0.24936321635129843}, _cgoa_18_log{1.276807885983376, -0.24436312405975968}, _cgoa_18_log{1.2704714060687552, -0.23938801747897287}, _cgoa_18_log{1.2641976054949482, -0.23443761696705678}, _cgoa_18_log{1.2579853575148821, -0.22951151871518505}, _cgoa_18_log{1.2518337750655457, -0.2246094963439873}, _cgoa_18_log{1.2457421919097305, -0.21973149037705753}, _cgoa_18_log{1.2397094966625508, -0.2148770752847895}, _cgoa_18_log{1.2337348463589233, -0.21004602910363701}, _cgoa_18_log{1.2278176973028803, -0.20523836373934046}, _cgoa_18_log{1.2219570190618474, -0.20045368751368642}, _cgoa_18_log{1.2161519732977757, -0.1956917537758045}, _cgoa_18_log{1.2104018095009725, -0.19095237845203883}, _cgoa_18_log{1.204705805718973, -0.18623539250290833}, _cgoa_18_log{1.1990631185441964, -0.18154051731551135}, _cgoa_18_log{1.1934733004462308, -0.17686779574319189}, _cgoa_18_log{1.1879350812847385, -0.17221657406412305}, _cgoa_18_log{1.1824481322833125, -0.16758697765942543}, _cgoa_18_log{1.1770114976921955, -0.16297859687290384}, _cgoa_18_log{1.1716248121809465, -0.15839151377804228}, _cgoa_18_log{1.1662869231674715, -0.15382513241456763}, _cgoa_18_log{1.1609977486762766, -0.14927976358922024}, _cgoa_18_log{1.1557563220795803, -0.14475495398119165}, _cgoa_18_log{1.1505619105480347, -0.14025044090817573}, _cgoa_18_log{1.1454138888505974, -0.13576604666855019}, _cgoa_18_log{1.1403118773746559, -0.1313018016355727}, _cgoa_18_log{1.1352550225747513, -0.12685731518763532}, _cgoa_18_log{1.1302429094831266, -0.12243257376712791}, _cgoa_18_log{1.1252747693068048, -0.11802724521862729}, _cgoa_18_log{1.1203501571039876, -0.11364127671663482}, _cgoa_18_log{1.1154683327680124, -0.10927434611278386}, _cgoa_18_log{1.1106291463292157, -0.10492665324943573}, _cgoa_18_log{1.1058315813301596, -0.10059761422644442}, _cgoa_18_log{1.1010752177696026, -0.096287173090559008}, _cgoa_18_log{1.0963597137952512, -0.091995340695575578}, _cgoa_18_log{1.0916844827550398, -0.087721900366886985}, _cgoa_18_log{1.0870487291277784, -0.083466436138678546}, _cgoa_18_log{1.082452357388312, -0.079229168275446682}, _cgoa_18_log{1.0778948225025884, -0.075009900475038194}, _cgoa_18_log{1.0733751731601076, -0.070808051333528965}, _cgoa_18_log{1.068893585073351, -0.06662408085151128}, _cgoa_18_log{1.0644491706655506, -0.062457454719151428}, _cgoa_18_log{1.0600414846328305, -0.058308043804231602}, _cgoa_18_log{1.0556701316181605, -0.05417576112313327}, _cgoa_18_log{1.0513347505569259, -0.050060547896805474}, _cgoa_18_log{1.0470347288442157, -0.045962101199052086}, _cgoa_18_log{1.0427699229652954, -0.041880560088657148}, _cgoa_18_log{1.0385395013738175, -0.037815400561839851}, _cgoa_18_log{1.0343434189403451, -0.033766847579158821}, _cgoa_18_log{1.0301811073173315, -0.029734619131772888}, _cgoa_18_log{1.026052043621297, -0.025718470239212365}, _cgoa_18_log{1.0219561082336197, -0.021718543925430822}, _cgoa_18_log{1.0178926505784922, -0.017734461269810708}, _cgoa_18_log{1.0138614436244586, -0.013766252464051831}, _cgoa_18_log{1.0098620186501341, -0.0098137063225749444}, _cgoa_18_log{1.0058938559734134, -0.005876555150052809}, _cgoa_18_log{1.0019569623501401, -0.0019550499938532084}, _cgoa_18_log{0.99610899230885086, 0.0038985973556009412}, _cgoa_18_log{0.98841703381852008, 0.011650571286395461}, _cgoa_18_log{0.98084291910052968, 0.019342955478919066}, _cgoa_18_log{0.97338401699874455, 0.026976601484648199}, _cgoa_18_log{0.96603775688765558, 0.034552359728422744}, _cgoa_18_log{0.95880149453073693, 0.042071217671832528}, _cgoa_18_log{0.95167285690731107, 0.049533940950141186}, _cgoa_18_log{0.9446494635965822, 0.056941358295944156}, _cgoa_18_log{0.93772889930262227, 0.064294391683461072}, _cgoa_18_log{0.93090910737906807, 0.071593635494650698}, _cgoa_18_log{0.92418768161272202, 0.078840109337761533}, _cgoa_18_log{0.91756267655991919, 0.086034389059705063}, _cgoa_18_log{0.91103204036240337, 0.093177211800139048}, _cgoa_18_log{0.90459358397620238, 0.10026951462748457}, _cgoa_18_log{0.89824563759228249, 0.10731170956330516}, _cgoa_18_log{0.89198609667825013, 0.11430473320717738}, _cgoa_18_log{0.88581311211851287, 0.12124928503033061}, _cgoa_18_log{0.87972507576067604, 0.12814583422959913}, _cgoa_18_log{0.87372013726346853, 0.13499516368517561}, _cgoa_18_log{0.86779664057822725, 0.1417978768189414}, _cgoa_18_log{0.86195280500607385, 0.14855476039031146}, _cgoa_18_log{0.8561872354420692, 0.15526619376589679}, _cgoa_18_log{0.85049839278168926, 0.16193275688146969}, _cgoa_18_log{0.84488445727903039, 0.16855539792220497}, _cgoa_18_log{0.83934427415759649, 0.1751343179947753}, _cgoa_18_log{0.83387622493494384, 0.1816702989864325}, _cgoa_18_log{0.82847893205577783, 0.18816387146023317}, _cgoa_18_log{0.82315108000658321, 0.1946155228479256}, _cgoa_18_log{0.81789139037787073, 0.20102572579389744}, _cgoa_18_log{0.81269840072453736, 0.20739520907955011}, _cgoa_18_log{0.80757100294602269, 0.21372429840596396}, _cgoa_18_log{0.80250788811604146, 0.22001359459818559}, _cgoa_18_log{0.79750773793643315, 0.22626374162859975}, _cgoa_18_log{0.79256960496637296, 0.23247494747693054}, _cgoa_18_log{0.78769236412541144, 0.23864766620658884}, _cgoa_18_log{0.78287467249409981, 0.24478265647405806}, _cgoa_18_log{0.77811553887908114, 0.25088025827324145}, _cgoa_18_log{0.77341395578697769, 0.25694085525105947}, _cgoa_18_log{0.76876871799149327, 0.26296511155101143}, _cgoa_18_log{0.76417906980418537, 0.26895313271893428}, _cgoa_18_log{0.75964387636923991, 0.27490553924610595}, _cgoa_18_log{0.75516219510786675, 0.28082272484789428}, _cgoa_18_log{0.75073317802168659, 0.28670497926725602}, _cgoa_18_log{0.74635571963617509, 0.29255295645509705}, _cgoa_18_log{0.74202893648696533, 0.29836703861428759}, _cgoa_18_log{0.73775215370658764, 0.30414734587282055}, _cgoa_18_log{0.73352429660026075, 0.30989455774829366}, _cgoa_18_log{0.72934477745784099, 0.31560871301871884}}, [128]_cgoa_19_log{_cgoa_19_log{0.68945312744263043, 2.6029065281053499e-17}, _cgoa_19_log{0.69335938115331663, 5.1607448519931415e-17}, _cgoa_19_log{0.69726565029726739, 5.2906724148878689e-17}, _cgoa_19_log{0.70117188860921476, 7.8010306348060135e-18}, _cgoa_19_log{0.70507812289769389, -2.471355337688684e-17}, _cgoa_19_log{0.7089843887644558, -4.6413389636862956e-17}, _cgoa_19_log{0.71289068155425528, 3.3387408065940366e-17}, _cgoa_19_log{0.71679683592783028, -2.6454587338050098e-17}, _cgoa_19_log{0.7207031520563163, 2.4284096334522285e-17}, _cgoa_19_log{0.72460936830546729, 4.8578243503198198e-17}, _cgoa_19_log{0.72851556447180355, -1.3014776598894487e-17}, _cgoa_19_log{0.73242190369355065, -1.0402317671225898e-17}, _cgoa_19_log{0.73632811474658999, 3.0782914274674313e-17}, _cgoa_19_log{0.74023437151307969, -1.4304998976623033e-17}, _cgoa_19_log{0.74414059007384026, -2.8625955785571303e-17}, _cgoa_19_log{0.74804683243640002, 5.1609093535635645e-17}, _cgoa_19_log{0.75195313359028848, 4.423423949536319e-17}, _cgoa_19_log{0.75585941891167063, -4.6830167620995081e-17}, _cgoa_19_log{0.75976563655023054, 4.4667420075147718e-17}, _cgoa_19_log{0.76367193508877373, -4.8134498775190266e-17}, _cgoa_19_log{0.76757808767050095, -4.3371015350542286e-17}, _cgoa_19_log{0.77148443969795355, -2.5156444722517071e-17}, _cgoa_19_log{0.77539057479667517, -4.163636184961329e-17}, _cgoa_19_log{0.77929686860847658, 3.3837161384165165e-17}, _cgoa_19_log{0.78320318270106604, 4.3792065650567583e-17}, _cgoa_19_log{0.78710941090309128, 2.7322930976146396e-17}, _cgoa_19_log{0.79101557830311531, -5.4636612253640457e-17}, _cgoa_19_log{0.79492181210715718, -1.4320502634189868e-17}, _cgoa_19_log{0.79882810315422292, -4.0766731402809024e-17}, _cgoa_19_log{0.80273431091467962, -4.0338264352540086e-17}, _cgoa_19_log{0.80664059014803224, 1.7241428071650815e-18}, _cgoa_19_log{0.81054693636259334, -4.5534218930924523e-17}, _cgoa_19_log{0.8144531571720115, 1.8212169205891421e-17}, _cgoa_19_log{0.81835938940613961, 4.9864288025894273e-17}, _cgoa_19_log{0.82226565590182965, 4.3359904167266887e-17}, _cgoa_19_log{0.82617193080063434, -5.4220014716611272e-17}, _cgoa_19_log{0.83007817780308302, -5.3336037289290352e-17}, _cgoa_19_log{0.83398445380766739, -1.1270648442682386e-17}, _cgoa_19_log{0.83789054989844136, -3.1651267348003982e-17}, _cgoa_19_log{0.84179684206186689, 1.1286283062565865e-17}, _cgoa_19_log{0.84570305681738078, 5.643595964448442e-18}, _cgoa_19_log{0.84960937251737334, -2.1687834632368187e-17}, _cgoa_19_log{0.85351555344626772, -2.2548234217914977e-17}, _cgoa_19_log{0.85742194320771458, 4.6832605563531392e-17}, _cgoa_19_log{0.86132811294437062, 2.5148296884122795e-17}, _cgoa_19_log{0.86523428935320534, -8.6721875709494672e-18}, _cgoa_19_log{0.86914053979388284, -1.2576268285559751e-17}, _cgoa_19_log{0.87304686081943916, -2.9930851265147998e-17}, _cgoa_19_log{0.87695306857831168, 4.8148015076816437e-17}, _cgoa_19_log{0.88085934888181006, -9.1054953361102193e-18}, _cgoa_19_log{0.88476555934096667, -3.5124146516207661e-17}, _cgoa_19_log{0.88867184022620804, 3.5552618153740227e-17}, _cgoa_19_log{0.89257808700176133, 1.692380503540994e-17}, _cgoa_19_log{0.89648443673745537, -1.0837881791715702e-17}, _cgoa_19_log{0.90039056088626834, 5.2900545724138363e-17}, _cgoa_19_log{0.90429683586820775, 5.3330721088784517e-17}, _cgoa_19_log{0.90820316710574411, 1.8640040753232978e-17}, _cgoa_19_log{0.91210939933054969, 4.4679728320540751e-17}, _cgoa_19_log{0.91601558490264567, -5.2162134195850327e-18}, _cgoa_19_log{0.91992196228624989, -2.7324731032846873e-17}, _cgoa_19_log{0.9238281880717143, -1.7769263393434193e-17}, _cgoa_19_log{0.92773430127279288, 4.9433630808174411e-17}, _cgoa_19_log{0.93164070215627881, 4.164434042024055e-17}, _cgoa_19_log{0.93554682520746602, 1.3011820859795741e-17}, _cgoa_19_log{0.93945303125629431, -2.7332907838481398e-17}, _cgoa_19_log{0.94335930668446688, 2.3421331708032919e-17}, _cgoa_19_log{0.94726559940383293, 1.6478717480487438e-17}, _cgoa_19_log{0.9511718313032721, -5.1960829013149901e-18}, _cgoa_19_log{0.95507815782181782, -3.5565573220578997e-17}, _cgoa_19_log{0.95898431473390433, 2.0816772146458738e-17}, _cgoa_19_log{0.96289067356336854, -3.4719628261468409e-18}, _cgoa_19_log{0.9667968893972092, -3.6864683447264197e-17}, _cgoa_19_log{0.97070310540257787, -3.4674108076868834e-18}, _cgoa_19_log{0.97460943254949305, 4.5981526247743919e-17}, _cgoa_19_log{0.9785156054582722, 4.5531457523925683e-17}, _cgoa_19_log{0.98242186878122816, -7.8112591694189783e-18}, _cgoa_19_log{0.98632806907529169, 2.0375615178047467e-17}, _cgoa_19_log{0.99023429095460336, -1.344597043422914e-17}, _cgoa_19_log{0.99414067802640083, 1.5185372369505401e-17}, _cgoa_19_log{0.99804685987155583, -1.301926039598001e-17}, _cgoa_19_log{1.0039062067717412, -4.5961206417449733e-17}, _cgoa_19_log{1.0117187035281372, -8.1524050026653491e-17}, _cgoa_19_log{1.0195312424919558, 8.2399270147578115e-17}, _cgoa_19_log{1.0273437641634193, 3.1228510053270453e-17}, _cgoa_19_log{1.0351562274561221, -1.3010212611128995e-17}, _cgoa_19_log{1.0429687539123276, -5.9841166886334577e-17}, _cgoa_19_log{1.0507812561238108, 2.8609238548223351e-17}, _cgoa_19_log{1.0585937308350133, -1.9962944508904598e-17}, _cgoa_19_log{1.0664062936992642, 5.2914691303090992e-17}, _cgoa_19_log{1.0742187309945372, 1.0321575006732523e-16}, _cgoa_19_log{1.0820313015371339, 9.0211943734191189e-17}, _cgoa_19_log{1.0898438063644336, 5.2027989923579528e-17}, _cgoa_19_log{1.0976562356711468, 5.8983184825007853e-17}, _cgoa_19_log{1.1054688179463226, 8.8463776906532518e-17}, _cgoa_19_log{1.113281220803328, -9.5294559652125745e-18}, _cgoa_19_log{1.1210937073167315, 6.7650807093777866e-17}, _cgoa_19_log{1.1289062967338532, 1.0929327370933015e-16}, _cgoa_19_log{1.1367187631150848, 6.9385705512305156e-17}, _cgoa_19_log{1.1445312490244826, 1.908841015045148e-17}, _cgoa_19_log{1.1523437096203593, 2.7744504138979832e-17}, _cgoa_19_log{1.1601563266482477, -1.5621964097491672e-17}, _cgoa_19_log{1.1679688257483505, -6.4191661495975e-17}, _cgoa_19_log{1.1757811754697645, -4.3364651650592681e-17}, _cgoa_19_log{1.1835937936656129, -3.8159292551356396e-17}, _cgoa_19_log{1.1914062331617676, -2.94933042768015e-17}, _cgoa_19_log{1.1992187450577771, -6.2441429163513478e-17}, _cgoa_19_log{1.2070312971249755, 7.4586446226274127e-17}, _cgoa_19_log{1.2148438169965134, 2.7760519266147807e-17}, _cgoa_19_log{1.2226562252208011, -7.0251069210796655e-17}, _cgoa_19_log{1.2304687681290862, 3.7292622364618835e-17}, _cgoa_19_log{1.2382812116234925, 2.2558949940652082e-17}, _cgoa_19_log{1.2460936706149877, 8.4993689444006646e-17}, _cgoa_19_log{1.2539063289686938, 1.039515474644361e-17}, _cgoa_19_log{1.2617188367227732, 3.2972622232754989e-17}, _cgoa_19_log{1.2695311590462317, 4.5098832535941547e-17}, _cgoa_19_log{1.2773436606579409, -7.546987371769545e-17}, _cgoa_19_log{1.2851561882963496, 9.4542955988181837e-17}, _cgoa_19_log{1.2929686521915196, -7.2854560911974897e-17}, _cgoa_19_log{1.3007813359167737, -8.9343576514628023e-17}, _cgoa_19_log{1.3085938093753886, 8.1525705945810205e-17}, _cgoa_19_log{1.3164063202609564, 6.9463414607658815e-18}, _cgoa_19_log{1.3242188320313901, -7.8927313807216758e-17}, _cgoa_19_log{1.3320311786874468, -4.3384657500713545e-17}, _cgoa_19_log{1.3398436880573092, 9.6275779545987923e-17}, _cgoa_19_log{1.3476563390295309, 4.2492400590204517e-17}, _cgoa_19_log{1.3554687641043626, -1.0843419551446047e-16}, _cgoa_19_log{1.3632813590971713, -8.5017278247202501e-17}, _cgoa_19_log{1.3710936595522603, -7.1106272061629222e-17}}} diff --git a/logb.c.i.go b/logb.c.i.go new file mode 100644 index 0000000..81b082b --- /dev/null +++ b/logb.c.i.go @@ -0,0 +1,41 @@ +package libc + +func Logb(x float64) float64 { + if !(func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) < uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 < 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) > int32(1) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0) { + return x * x + } + if x == float64(int32(0)) { + return float64(-1) / (x * x) + } + return float64(Ilogb(x)) +} diff --git a/logbf.c.i.go b/logbf.c.i.go new file mode 100644 index 0000000..887c5b5 --- /dev/null +++ b/logbf.c.i.go @@ -0,0 +1,41 @@ +package libc + +func Logbf(x float32) float32 { + if !(func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) < uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 < 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) > int32(1) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0) { + return x * x + } + if x == float32(int32(0)) { + return float32(-1) / (x * x) + } + return float32(Ilogbf(x)) +} diff --git a/logbl.c.i.go b/logbl.c.i.go new file mode 100644 index 0000000..ffad0f0 --- /dev/null +++ b/logbl.c.i.go @@ -0,0 +1,41 @@ +package libc + +func Logbl(x float64) float64 { + if !(func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) < uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 < 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(x) > int32(1) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0) { + return x * x + } + if x == float64(int32(0)) { + return float64(-1) / (x * x) + } + return float64(Ilogbl(x)) +} diff --git a/logf_data.c.i.go b/logf_data.c.i.go new file mode 100644 index 0000000..6835380 --- /dev/null +++ b/logf_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __logf_data struct_logf_data = struct_logf_data{[16]_cgoa_18_logf_data{_cgoa_18_logf_data{1.3989071621465281, -0.33569133332882284}, _cgoa_18_logf_data{1.3403141896637998, -0.29290405637740741}, _cgoa_18_logf_data{1.286432210124115, -0.25187265809373688}, _cgoa_18_logf_data{1.2367150214269895, -0.21245868807117255}, _cgoa_18_logf_data{1.1906977166711752, -0.17453945183745634}, _cgoa_18_logf_data{1.1479821020556429, -0.1380057072319758}, _cgoa_18_logf_data{1.1082251448272158, -0.10275976698545139}, _cgoa_18_logf_data{1.0711297413057381, -0.068713924470205245}, _cgoa_18_logf_data{1.0364372789772831, -0.035789138739822798}, _cgoa_18_logf_data{1, 0}, _cgoa_18_logf_data{0.9492859795739057, 0.052045177429294959}, _cgoa_18_logf_data{0.89510494286090036, 0.11081431298787942}, _cgoa_18_logf_data{0.84768216203511026, 0.16524952236951429}, _cgoa_18_logf_data{0.80503148516920009, 0.21687389031699977}, _cgoa_18_logf_data{0.7664671008843108, 0.26596350281213971}, _cgoa_18_logf_data{0.73142860331632797, 0.31275566640735569}}, 0.69314718055994529, [3]float64{-0.25089342214237154, 0.33345676574406602, -0.49999974858021029}} diff --git a/logl.c.i.go b/logl.c.i.go new file mode 100644 index 0000000..0766ff5 --- /dev/null +++ b/logl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Logl(x float64) float64 { + return float64(Log(float64(x))) +} diff --git a/lrint.c.i.go b/lrint.c.i.go new file mode 100644 index 0000000..a929283 --- /dev/null +++ b/lrint.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lrint(x float64) int64 { + return int64(Rint(x)) +} diff --git a/lrintf.c.i.go b/lrintf.c.i.go new file mode 100644 index 0000000..0f73143 --- /dev/null +++ b/lrintf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lrintf(x float32) int64 { + return int64(Rintf(x)) +} diff --git a/lrintl.c.i.go b/lrintl.c.i.go new file mode 100644 index 0000000..de602db --- /dev/null +++ b/lrintl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lrintl(x float64) int64 { + return Lrint(float64(x)) +} diff --git a/lround.c.i.go b/lround.c.i.go new file mode 100644 index 0000000..e6d8c47 --- /dev/null +++ b/lround.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lround(x float64) int64 { + return int64(Round(x)) +} diff --git a/lroundf.c.i.go b/lroundf.c.i.go new file mode 100644 index 0000000..fb25a5d --- /dev/null +++ b/lroundf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lroundf(x float32) int64 { + return int64(Roundf(x)) +} diff --git a/lroundl.c.i.go b/lroundl.c.i.go new file mode 100644 index 0000000..e2984ae --- /dev/null +++ b/lroundl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Lroundl(x float64) int64 { + return int64(Roundl(x)) +} diff --git a/modf.c.i.go b/modf.c.i.go new file mode 100644 index 0000000..3b84849 --- /dev/null +++ b/modf.c.i.go @@ -0,0 +1,35 @@ +package libc + +import unsafe "unsafe" + +func Modf(x float64, iptr *float64) float64 { + type _cgoa_18_modf struct { + f float64 + } + var u _cgoa_18_modf + u.f = x + var mask uint64 + var e int32 = int32(*(*uint64)(unsafe.Pointer(&u))>>int32(52)&uint64(2047)) - int32(1023) + if e >= int32(52) { + *iptr = x + if e == int32(1024) && *(*uint64)(unsafe.Pointer(&u))<> e + if *(*uint64)(unsafe.Pointer(&u))&mask == uint64(0) { + *iptr = x + *(*uint64)(unsafe.Pointer(&u)) &= 9223372036854775808 + return u.f + } + *(*uint64)(unsafe.Pointer(&u)) &= ^mask + *iptr = u.f + return x - u.f +} diff --git a/modff.c.i.go b/modff.c.i.go new file mode 100644 index 0000000..b203a8b --- /dev/null +++ b/modff.c.i.go @@ -0,0 +1,35 @@ +package libc + +import unsafe "unsafe" + +func Modff(x float32, iptr *float32) float32 { + type _cgoa_18_modff struct { + f float32 + } + var u _cgoa_18_modff + u.f = x + var mask uint32 + var e int32 = int32(*(*uint32)(unsafe.Pointer(&u))>>int32(23)&uint32(255)) - int32(127) + if e >= int32(23) { + *iptr = x + if e == int32(128) && *(*uint32)(unsafe.Pointer(&u))<> e) + if *(*uint32)(unsafe.Pointer(&u))&mask == uint32(0) { + *iptr = x + *(*uint32)(unsafe.Pointer(&u)) &= uint32(2147483648) + return u.f + } + *(*uint32)(unsafe.Pointer(&u)) &= ^mask + *iptr = u.f + return x - u.f +} diff --git a/modfl.c.i.go b/modfl.c.i.go new file mode 100644 index 0000000..994f3ce --- /dev/null +++ b/modfl.c.i.go @@ -0,0 +1,9 @@ +package libc + +func Modfl(x float64, iptr *float64) float64 { + var d float64 + var r float64 + r = float64(Modf(float64(x), &d)) + *iptr = float64(d) + return r +} diff --git a/nan.c.i.go b/nan.c.i.go new file mode 100644 index 0000000..c4c4ee4 --- /dev/null +++ b/nan.c.i.go @@ -0,0 +1,7 @@ +package libc + +import unsafe "unsafe" + +func Nan(s *int8) float64 { + return float64(X__builtin_nanf((*int8)(unsafe.Pointer(&[1]int8{'\x00'})))) +} diff --git a/nanf.c.i.go b/nanf.c.i.go new file mode 100644 index 0000000..c911f31 --- /dev/null +++ b/nanf.c.i.go @@ -0,0 +1,7 @@ +package libc + +import unsafe "unsafe" + +func Nanf(s *int8) float32 { + return X__builtin_nanf((*int8)(unsafe.Pointer(&[1]int8{'\x00'}))) +} diff --git a/nanl.c.i.go b/nanl.c.i.go new file mode 100644 index 0000000..3855738 --- /dev/null +++ b/nanl.c.i.go @@ -0,0 +1,7 @@ +package libc + +import unsafe "unsafe" + +func Nanl(s *int8) float64 { + return float64(X__builtin_nanf((*int8)(unsafe.Pointer(&[1]int8{'\x00'})))) +} diff --git a/nearbyint.c.i.go b/nearbyint.c.i.go new file mode 100644 index 0000000..6dbc38e --- /dev/null +++ b/nearbyint.c.i.go @@ -0,0 +1,6 @@ +package libc + +func Nearbyint(x float64) float64 { + x = Rint(x) + return x +} diff --git a/nearbyintf.c.i.go b/nearbyintf.c.i.go new file mode 100644 index 0000000..abaecc7 --- /dev/null +++ b/nearbyintf.c.i.go @@ -0,0 +1,6 @@ +package libc + +func Nearbyintf(x float32) float32 { + x = Rintf(x) + return x +} diff --git a/nearbyintl.c.i.go b/nearbyintl.c.i.go new file mode 100644 index 0000000..bd3c9b7 --- /dev/null +++ b/nearbyintl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Nearbyintl(x float64) float64 { + return float64(Nearbyint(float64(x))) +} diff --git a/nextafter.c.i.go b/nextafter.c.i.go new file mode 100644 index 0000000..ae5644d --- /dev/null +++ b/nextafter.c.i.go @@ -0,0 +1,124 @@ +package libc + +import unsafe "unsafe" + +func Nextafter(x float64, y float64) float64 { + type _cgoa_18_nextafter struct { + f float64 + } + var ux _cgoa_18_nextafter + ux.f = x + var uy _cgoa_18_nextafter + uy.f = y + var ax uint64 + var ay uint64 + var e int32 + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(y))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(y)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + y + } + if *(*uint64)(unsafe.Pointer(&ux)) == *(*uint64)(unsafe.Pointer(&uy)) { + return y + } + ax = *(*uint64)(unsafe.Pointer(&ux)) & 9223372036854775807 + ay = *(*uint64)(unsafe.Pointer(&uy)) & 9223372036854775807 + if ax == uint64(0) { + if ay == uint64(0) { + return y + } + *(*uint64)(unsafe.Pointer(&ux)) = *(*uint64)(unsafe.Pointer(&uy))&9223372036854775808 | uint64(1) + } else if ax > ay || (*(*uint64)(unsafe.Pointer(&ux))^*(*uint64)(unsafe.Pointer(&uy)))&9223372036854775808 != 0 { + *(*uint64)(unsafe.Pointer(&ux))-- + } else { + *(*uint64)(unsafe.Pointer(&ux))++ + } + e = int32(*(*uint64)(unsafe.Pointer(&ux)) >> int32(52) & uint64(2047)) + if e == int32(2047) { + for { + if 8 == 4 { + fp_force_evalf(float32(x + x)) + } else if 8 == 8 { + fp_force_eval(x + x) + } else { + fp_force_evall(float64(x + x)) + } + if true { + break + } + } + } + if e == int32(0) { + for { + if 8 == 4 { + fp_force_evalf(float32(x*x + ux.f*ux.f)) + } else if 8 == 8 { + fp_force_eval(x*x + ux.f*ux.f) + } else { + fp_force_evall(float64(x*x + ux.f*ux.f)) + } + if true { + break + } + } + } + return ux.f +} diff --git a/nextafterf.c.i.go b/nextafterf.c.i.go new file mode 100644 index 0000000..7c003f9 --- /dev/null +++ b/nextafterf.c.i.go @@ -0,0 +1,124 @@ +package libc + +import unsafe "unsafe" + +func Nextafterf(x float32, y float32) float32 { + type _cgoa_18_nextafterf struct { + f float32 + } + var ux _cgoa_18_nextafterf + ux.f = x + var uy _cgoa_18_nextafterf + uy.f = y + var ax uint32 + var ay uint32 + var e uint32 + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(y)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x + y + } + if *(*uint32)(unsafe.Pointer(&ux)) == *(*uint32)(unsafe.Pointer(&uy)) { + return y + } + ax = *(*uint32)(unsafe.Pointer(&ux)) & uint32(2147483647) + ay = *(*uint32)(unsafe.Pointer(&uy)) & uint32(2147483647) + if ax == uint32(0) { + if ay == uint32(0) { + return y + } + *(*uint32)(unsafe.Pointer(&ux)) = *(*uint32)(unsafe.Pointer(&uy))&uint32(2147483648) | uint32(1) + } else if ax > ay || (*(*uint32)(unsafe.Pointer(&ux))^*(*uint32)(unsafe.Pointer(&uy)))&uint32(2147483648) != 0 { + *(*uint32)(unsafe.Pointer(&ux))-- + } else { + *(*uint32)(unsafe.Pointer(&ux))++ + } + e = *(*uint32)(unsafe.Pointer(&ux)) & uint32(2139095040) + if e == uint32(2139095040) { + for { + if 4 == 4 { + fp_force_evalf(x + x) + } else if 4 == 8 { + fp_force_eval(float64(x + x)) + } else { + fp_force_evall(float64(x + x)) + } + if true { + break + } + } + } + if e == uint32(0) { + for { + if 4 == 4 { + fp_force_evalf(x*x + ux.f*ux.f) + } else if 4 == 8 { + fp_force_eval(float64(x*x + ux.f*ux.f)) + } else { + fp_force_evall(float64(x*x + ux.f*ux.f)) + } + if true { + break + } + } + } + return ux.f +} diff --git a/nextafterl.c.i.go b/nextafterl.c.i.go new file mode 100644 index 0000000..0949002 --- /dev/null +++ b/nextafterl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Nextafterl(x float64, y float64) float64 { + return float64(Nextafter(float64(x), float64(y))) +} diff --git a/nexttoward.c.i.go b/nexttoward.c.i.go new file mode 100644 index 0000000..538584d --- /dev/null +++ b/nexttoward.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Nexttoward(x float64, y float64) float64 { + return Nextafter(x, float64(y)) +} diff --git a/nexttowardf.c.i.go b/nexttowardf.c.i.go new file mode 100644 index 0000000..a757ee4 --- /dev/null +++ b/nexttowardf.c.i.go @@ -0,0 +1,160 @@ +package libc + +import unsafe "unsafe" + +func Nexttowardf(x float32, y float64) float32 { + type _cgoa_18_nexttowardf struct { + f float32 + } + var ux _cgoa_18_nexttowardf + ux.f = x + var e uint32 + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(y))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(y) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return float32(float64(x) + y) + } + if float64(x) == y { + return float32(y) + } + if x == float32(int32(0)) { + *(*uint32)(unsafe.Pointer(&ux)) = uint32(1) + if func() int32 { + if 8 == 4 { + return int32(X__FLOAT_BITS(float32(y)) >> int32(31)) + } else { + return func() int32 { + if 8 == 8 { + return int32(X__DOUBLE_BITS(float64(y)) >> int32(63)) + } else { + return X__signbitl(y) + } + }() + } + }() != 0 { + *(*uint32)(unsafe.Pointer(&ux)) |= uint32(2147483648) + } + } else if float64(x) < y { + if func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(x) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(x)) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != 0 { + *(*uint32)(unsafe.Pointer(&ux))-- + } else { + *(*uint32)(unsafe.Pointer(&ux))++ + } + } else if func() int32 { + if 4 == 4 { + return int32(X__FLOAT_BITS(x) >> int32(31)) + } else { + return func() int32 { + if 4 == 8 { + return int32(X__DOUBLE_BITS(float64(x)) >> int32(63)) + } else { + return X__signbitl(float64(x)) + } + }() + } + }() != 0 { + *(*uint32)(unsafe.Pointer(&ux))++ + } else { + *(*uint32)(unsafe.Pointer(&ux))-- + } + e = *(*uint32)(unsafe.Pointer(&ux)) & uint32(2139095040) + if e == uint32(2139095040) { + for { + if 4 == 4 { + fp_force_evalf(x + x) + } else if 4 == 8 { + fp_force_eval(float64(x + x)) + } else { + fp_force_evall(float64(x + x)) + } + if true { + break + } + } + } + if e == uint32(0) { + for { + if 4 == 4 { + fp_force_evalf(x*x + ux.f*ux.f) + } else if 4 == 8 { + fp_force_eval(float64(x*x + ux.f*ux.f)) + } else { + fp_force_evall(float64(x*x + ux.f*ux.f)) + } + if true { + break + } + } + } + return ux.f +} diff --git a/nexttowardl.c.i.go b/nexttowardl.c.i.go new file mode 100644 index 0000000..8203f51 --- /dev/null +++ b/nexttowardl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Nexttowardl(x float64, y float64) float64 { + return Nextafterl(x, y) +} diff --git a/pow.c.i.go b/pow.c.i.go new file mode 100644 index 0000000..4dfb094 --- /dev/null +++ b/pow.c.i.go @@ -0,0 +1,413 @@ +package libc + +import unsafe "unsafe" + +func top12_cgo19_pow(x float64) uint32 { + return uint32(*(*uint64)(unsafe.Pointer(&_cgoz_20_pow{x})) >> int32(52)) +} + +type _cgoz_20_pow struct { + _f float64 +} + +func log_inline_cgo21_pow(ix uint64, tail *float64) float64 { + var z float64 + var r float64 + var y float64 + var invc float64 + var logc float64 + var logctail float64 + var kd float64 + var hi float64 + var t1 float64 + var t2 float64 + var lo float64 + var lo1 float64 + var lo2 float64 + var p float64 + var iz uint64 + var tmp uint64 + var k int32 + var i int32 + tmp = ix - uint64(4604531861337669632) + i = int32(tmp >> 45 % uint64(128)) + k = int32(int64(tmp) >> int32(52)) + iz = ix - tmp&18442240474082181120 + z = *(*float64)(unsafe.Pointer(&_cgoz_22_pow{iz})) + kd = float64(k) + invc = (*(*_cgoa_18_pow)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_18_pow)(unsafe.Pointer(&__pow_log_data.tab)))) + uintptr(i)*32))).invc + logc = (*(*_cgoa_18_pow)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_18_pow)(unsafe.Pointer(&__pow_log_data.tab)))) + uintptr(i)*32))).logc + logctail = (*(*_cgoa_18_pow)(unsafe.Pointer(uintptr(unsafe.Pointer((*_cgoa_18_pow)(unsafe.Pointer(&__pow_log_data.tab)))) + uintptr(i)*32))).logctail + var zhi float64 = *(*float64)(unsafe.Pointer(&_cgoz_23_pow{(iz + 2147483648) & 18446744069414584320})) + var zlo float64 = z - zhi + var rhi float64 = zhi*invc - 1 + var rlo float64 = zlo * invc + r = rhi + rlo + t1 = kd*__pow_log_data.ln2hi + logc + t2 = t1 + r + lo1 = kd*__pow_log_data.ln2lo + logctail + lo2 = t1 - t2 + r + var ar float64 + var ar2 float64 + var ar3 float64 + var lo3 float64 + var lo4 float64 + ar = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(0))*8)) * r + ar2 = r * ar + ar3 = r * ar2 + var arhi float64 = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(0))*8)) * rhi + var arhi2 float64 = rhi * arhi + hi = t2 + arhi2 + lo3 = rlo * (ar + arhi) + lo4 = t2 - hi + arhi2 + p = ar3 * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(1))*8)) + r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(2))*8)) + ar2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(3))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(4))*8))+ar2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(5))*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__pow_log_data.poly)))) + uintptr(int32(6))*8))))) + lo = lo1 + lo2 + lo3 + lo4 + p + y = hi + lo + *tail = hi - y + lo + return y +} + +type _cgoz_22_pow struct { + _i uint64 +} +type _cgoz_23_pow struct { + _i uint64 +} + +func specialcase_cgo24_pow(tmp float64, sbits uint64, ki uint64) float64 { + var scale float64 + var y float64 + if ki&uint64(2147483648) == uint64(0) { + sbits -= 4544132024016830464 + scale = *(*float64)(unsafe.Pointer(&_cgoz_25_pow{sbits})) + y = 5.4861240687936887e+303 * (scale + scale*tmp) + return eval_as_double(y) + } + sbits += 4602678819172646912 + scale = *(*float64)(unsafe.Pointer(&_cgoz_26_pow{sbits})) + y = scale + scale*tmp + if Fabs(y) < 1 { + var hi float64 + var lo float64 + var one float64 = 1 + if y < 0 { + one = float64(-1) + } + lo = scale - y + scale*tmp + hi = one + y + lo = one - hi + y + lo + y = eval_as_double(hi+lo) - one + if y == 0 { + y = *(*float64)(unsafe.Pointer(&_cgoz_27_pow{sbits & uint64(9223372036854775808)})) + } + fp_force_eval(fp_barrier(2.2250738585072014e-308) * 2.2250738585072014e-308) + } + y = 2.2250738585072014e-308 * y + return eval_as_double(y) +} + +type _cgoz_25_pow struct { + _i uint64 +} +type _cgoz_26_pow struct { + _i uint64 +} +type _cgoz_27_pow struct { + _i uint64 +} + +func exp_inline_cgo28_pow(x float64, xtail float64, sign_bias uint32) float64 { + var abstop uint32 + var ki uint64 + var idx uint64 + var top uint64 + var sbits uint64 + var kd float64 + var z float64 + var r float64 + var r2 float64 + var scale float64 + var tail float64 + var tmp float64 + abstop = top12_cgo19_pow(x) & uint32(2047) + if func() int64 { + if abstop-top12_cgo19_pow(5.5511151231257827e-17) >= top12_cgo19_pow(512)-top12_cgo19_pow(5.5511151231257827e-17) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if abstop-top12_cgo19_pow(5.5511151231257827e-17) >= uint32(2147483648) { + var one float64 = func() float64 { + if int32(1) != 0 { + return 1 + x + } else { + return 1 + } + }() + return func() float64 { + if sign_bias != 0 { + return -one + } else { + return one + } + }() + } + if abstop >= top12_cgo19_pow(1024) { + if *(*uint64)(unsafe.Pointer(&_cgoz_29_pow{x}))>>int32(63) != 0 { + return __math_uflow(sign_bias) + } else { + return __math_oflow(sign_bias) + } + } + abstop = uint32(0) + } + z = __exp_data.invln2N * x + kd = eval_as_double(z + __exp_data.shift) + ki = *(*uint64)(unsafe.Pointer(&_cgoz_30_pow{kd})) + kd -= __exp_data.shift + r = x + kd*__exp_data.negln2hiN + kd*__exp_data.negln2loN + r += xtail + idx = uint64(2) * (ki % uint64(128)) + top = (ki + uint64(sign_bias)) << 45 + tail = *(*float64)(unsafe.Pointer(&_cgoz_31_pow{*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp_data.tab)))) + uintptr(idx)*8))})) + sbits = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&__exp_data.tab)))) + uintptr(idx+uint64(1))*8)) + top + r2 = r * r + tmp = tail + r + r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(0)*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(1)*8))) + r2*r2*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(2)*8))+r**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&__exp_data.poly)))) + uintptr(3)*8))) + if func() int64 { + if abstop == uint32(0) { + return 1 + } else { + return 0 + } + }() == int64(0) { + return specialcase_cgo24_pow(tmp, sbits, ki) + } + scale = *(*float64)(unsafe.Pointer(&_cgoz_32_pow{sbits})) + return eval_as_double(scale + scale*tmp) +} + +type _cgoz_29_pow struct { + _f float64 +} +type _cgoz_30_pow struct { + _f float64 +} +type _cgoz_31_pow struct { + _i uint64 +} +type _cgoz_32_pow struct { + _i uint64 +} + +func checkint_cgo33_pow(iy uint64) int32 { + var e int32 = int32(iy >> int32(52) & uint64(2047)) + if e < int32(1023) { + return int32(0) + } + if e > 1075 { + return int32(2) + } + if iy&(uint64(1)<<(1075-e)-uint64(1)) != 0 { + return int32(0) + } + if iy&(uint64(1)<<(1075-e)) != 0 { + return int32(1) + } + return int32(2) +} +func zeroinfnan_cgo34_pow(i uint64) int32 { + return func() int32 { + if uint64(2)*i-uint64(1) >= uint64(2)**(*uint64)(unsafe.Pointer(&_cgoz_35_pow{float64(X__builtin_inff())}))-uint64(1) { + return 1 + } else { + return 0 + } + }() +} + +type _cgoz_35_pow struct { + _f float64 +} + +func Pow(x float64, y float64) float64 { + var sign_bias uint32 = uint32(0) + var ix uint64 + var iy uint64 + var topx uint32 + var topy uint32 + ix = *(*uint64)(unsafe.Pointer(&_cgoz_36_pow{x})) + iy = *(*uint64)(unsafe.Pointer(&_cgoz_37_pow{y})) + topx = top12_cgo19_pow(x) + topy = top12_cgo19_pow(y) + if func() int64 { + if topx-uint32(1) >= uint32(2046) || topy&uint32(2047)-uint32(958) >= uint32(128) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if int64(zeroinfnan_cgo34_pow(iy)) == int64(0) { + if uint64(2)*iy == uint64(0) { + return func() float64 { + if int32(0) != 0 { + return x + y + } else { + return 1 + } + }() + } + if ix == *(*uint64)(unsafe.Pointer(&_cgoz_38_pow{1})) { + return func() float64 { + if int32(0) != 0 { + return x + y + } else { + return 1 + } + }() + } + if uint64(2)*ix > uint64(2)**(*uint64)(unsafe.Pointer(&_cgoz_39_pow{float64(X__builtin_inff())})) || uint64(2)*iy > uint64(2)**(*uint64)(unsafe.Pointer(&_cgoz_40_pow{float64(X__builtin_inff())})) { + return x + y + } + if uint64(2)*ix == uint64(2)**(*uint64)(unsafe.Pointer(&_cgoz_41_pow{1})) { + return float64(1) + } + if func() int32 { + if uint64(2)*ix < uint64(2)**(*uint64)(unsafe.Pointer(&_cgoz_42_pow{1})) { + return 1 + } else { + return 0 + } + }() == func() int32 { + if !(iy>>int32(63) != 0) { + return 1 + } else { + return 0 + } + }() { + return float64(0) + } + return y * y + } + if int64(zeroinfnan_cgo34_pow(ix)) == int64(0) { + var x2 float64 = x * x + if ix>>int32(63) != 0 && checkint_cgo33_pow(iy) == int32(1) { + x2 = -x2 + } + return func() float64 { + if iy>>int32(63) != 0 { + return fp_barrier(float64(int32(1)) / x2) + } else { + return x2 + } + }() + } + if ix>>int32(63) != 0 { + var yint int32 = checkint_cgo33_pow(iy) + if yint == int32(0) { + return __math_invalid(x) + } + if yint == int32(1) { + sign_bias = uint32(262144) + } + ix &= uint64(9223372036854775807) + topx &= uint32(2047) + } + if topy&uint32(2047)-uint32(958) >= uint32(128) { + if ix == *(*uint64)(unsafe.Pointer(&_cgoz_43_pow{1})) { + return float64(1) + } + if topy&uint32(2047) < uint32(958) { + if int32(1) != 0 { + return func() float64 { + if ix > *(*uint64)(unsafe.Pointer(&_cgoz_44_pow{1})) { + return 1 + y + } else { + return 1 - y + } + }() + } else { + return float64(1) + } + } + return func() float64 { + if func() int32 { + if ix > *(*uint64)(unsafe.Pointer(&_cgoz_45_pow{1})) { + return 1 + } else { + return 0 + } + }() == func() int32 { + if topy < uint32(2048) { + return 1 + } else { + return 0 + } + }() { + return __math_oflow(uint32(0)) + } else { + return __math_uflow(uint32(0)) + } + }() + } + if topx == uint32(0) { + ix = *(*uint64)(unsafe.Pointer(&_cgoz_46_pow{x * 4503599627370496})) + ix &= uint64(9223372036854775807) + ix -= 234187180623265792 + } + } + var lo float64 + var hi float64 = log_inline_cgo21_pow(ix, &lo) + var ehi float64 + var elo float64 + var yhi float64 = *(*float64)(unsafe.Pointer(&_cgoz_47_pow{iy & 18446744073575333888})) + var ylo float64 = y - yhi + var lhi float64 = *(*float64)(unsafe.Pointer(&_cgoz_48_pow{*(*uint64)(unsafe.Pointer(&_cgoz_49_pow{hi})) & 18446744073575333888})) + var llo float64 = hi - lhi + lo + ehi = yhi * lhi + elo = ylo*lhi + y*llo + return exp_inline_cgo28_pow(ehi, elo, sign_bias) +} + +type _cgoz_36_pow struct { + _f float64 +} +type _cgoz_37_pow struct { + _f float64 +} +type _cgoz_38_pow struct { + _f float64 +} +type _cgoz_39_pow struct { + _f float64 +} +type _cgoz_40_pow struct { + _f float64 +} +type _cgoz_41_pow struct { + _f float64 +} +type _cgoz_42_pow struct { + _f float64 +} +type _cgoz_43_pow struct { + _f float64 +} +type _cgoz_44_pow struct { + _f float64 +} +type _cgoz_45_pow struct { + _f float64 +} +type _cgoz_46_pow struct { + _f float64 +} +type _cgoz_47_pow struct { + _i uint64 +} +type _cgoz_48_pow struct { + _i uint64 +} +type _cgoz_49_pow struct { + _f float64 +} diff --git a/pow_data.c.i.go b/pow_data.c.i.go new file mode 100644 index 0000000..45b6884 --- /dev/null +++ b/pow_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __pow_log_data struct_pow_log_data = struct_pow_log_data{0.69314718055989033, 5.4979230187083712e-14, [7]float64{-0.5, 0.33333333333333393 * float64(-2), -0.25000000000000033 * float64(-2), 0.19999999988309941 * float64(int32(4)), -0.16666666658719348 * float64(int32(4)), 0.14286370355743763 * float64(-8), -0.12500519079594427 * float64(-8)}, [128]_cgoa_18_pow{_cgoa_18_pow{1.4140625, float64(int32(0)), -0.34646676734621451, 5.9294073458896252e-15}, _cgoa_18_pow{1.40625, float64(int32(0)), -0.34092658697056777, -2.544157440035963e-14}, _cgoa_18_pow{1.3984375, float64(int32(0)), -0.33535554192110339, -3.4435259407750449e-14}, _cgoa_18_pow{1.390625, float64(int32(0)), -0.32975328637246548, -2.500123826022799e-15}, _cgoa_18_pow{1.3828125, float64(int32(0)), -0.32411946865420305, -8.9293371338506168e-15}, _cgoa_18_pow{1.375, float64(int32(0)), -0.31845373111855224, 1.7625431312172662e-14}, _cgoa_18_pow{1.3671875, float64(int32(0)), -0.31275571000389846, 1.5688303180062087e-15}, _cgoa_18_pow{1.359375, float64(int32(0)), -0.30702503529494152, 2.9655274673691784e-14}, _cgoa_18_pow{1.3515625, float64(int32(0)), -0.3012613305781997, 3.7923164802093147e-14}, _cgoa_18_pow{1.34375, float64(int32(0)), -0.29546421289387581, 3.9934163843878439e-14}, _cgoa_18_pow{1.3359375, float64(int32(0)), -0.28963329258306203, 1.9352855826489123e-14}, _cgoa_18_pow{1.3359375, float64(int32(0)), -0.28963329258306203, 1.9352855826489123e-14}, _cgoa_18_pow{1.328125, float64(int32(0)), -0.28376817313062475, -1.9852665484979036e-14}, _cgoa_18_pow{1.3203125, float64(int32(0)), -0.27786845100342816, -2.814323765595281e-14}, _cgoa_18_pow{1.3125, float64(int32(0)), -0.2719337154836694, 2.7643769993528702e-14}, _cgoa_18_pow{1.3046875, float64(int32(0)), -0.26596354849709769, -4.0250924022938059e-14}, _cgoa_18_pow{1.296875, float64(int32(0)), -0.25995752443691345, -1.2621729398885316e-14}, _cgoa_18_pow{1.2890625, float64(int32(0)), -0.25391520998095984, -3.6001767326373346e-15}, _cgoa_18_pow{1.2890625, float64(int32(0)), -0.25391520998095984, -3.6001767326373346e-15}, _cgoa_18_pow{1.28125, float64(int32(0)), -0.24783616390459429, 1.3029797173308663e-14}, _cgoa_18_pow{1.2734375, float64(int32(0)), -0.2417199368871934, 4.8230289429940886e-14}, _cgoa_18_pow{1.265625, float64(int32(0)), -0.23556607131274632, -2.0592242769647135e-14}, _cgoa_18_pow{1.2578125, float64(int32(0)), -0.22937410106487732, 3.1492650651914838e-14}, _cgoa_18_pow{1.25, float64(int32(0)), -0.22314355131425145, 4.1697965845271953e-14}, _cgoa_18_pow{1.25, float64(int32(0)), -0.22314355131425145, 4.1697965845271953e-14}, _cgoa_18_pow{1.2421875, float64(int32(0)), -0.21687393830063684, 2.2477465222466186e-14}, _cgoa_18_pow{1.234375, float64(int32(0)), -0.21056476910735, 3.6507188831790577e-16}, _cgoa_18_pow{1.2265625, float64(int32(0)), -0.20421554142865261, -3.8277672602054141e-14}, _cgoa_18_pow{1.2265625, float64(int32(0)), -0.20421554142865261, -3.8277672602054141e-14}, _cgoa_18_pow{1.21875, float64(int32(0)), -0.19782574332987224, -4.7641388950792196e-14}, _cgoa_18_pow{1.2109375, float64(int32(0)), -0.19139485299967873, 4.9278276214647115e-14}, _cgoa_18_pow{1.203125, float64(int32(0)), -0.18492233849406148, 4.9485167661250996e-14}, _cgoa_18_pow{1.203125, float64(int32(0)), -0.18492233849406148, 4.9485167661250996e-14}, _cgoa_18_pow{1.1953125, float64(int32(0)), -0.17840765747280329, -1.5003333854266542e-14}, _cgoa_18_pow{1.1875, float64(int32(0)), -0.17185025692663203, -2.7194441649495324e-14}, _cgoa_18_pow{1.1875, float64(int32(0)), -0.17185025692663203, -2.7194441649495324e-14}, _cgoa_18_pow{1.1796875, float64(int32(0)), -0.1652495728952772, -2.9965926729256903e-14}, _cgoa_18_pow{1.171875, float64(int32(0)), -0.15860503017665906, 2.0472357800461955e-14}, _cgoa_18_pow{1.171875, float64(int32(0)), -0.15860503017665906, 2.0472357800461955e-14}, _cgoa_18_pow{1.1640625, float64(int32(0)), -0.15191604202584585, 3.8792967230636458e-15}, _cgoa_18_pow{1.15625, float64(int32(0)), -0.14518200984446139, -3.6506824353335045e-14}, _cgoa_18_pow{1.1484375, float64(int32(0)), -0.13840232285906495, -5.4183331379008994e-14}, _cgoa_18_pow{1.1484375, float64(int32(0)), -0.13840232285906495, -5.4183331379008994e-14}, _cgoa_18_pow{1.140625, float64(int32(0)), -0.131576357788731, 1.1729485484531301e-14}, _cgoa_18_pow{1.140625, float64(int32(0)), -0.131576357788731, 1.1729485484531301e-14}, _cgoa_18_pow{1.1328125, float64(int32(0)), -0.12470347850091912, -3.8117630847102661e-14}, _cgoa_18_pow{1.125, float64(int32(0)), -0.11778303565643, 4.6547297475984447e-14}, _cgoa_18_pow{1.125, float64(int32(0)), -0.11778303565643, 4.6547297475984447e-14}, _cgoa_18_pow{1.1171875, float64(int32(0)), -0.11081436634026431, -2.5799991283069902e-14}, _cgoa_18_pow{1.109375, float64(int32(0)), -0.10379679368168127, 3.7700471749674615e-14}, _cgoa_18_pow{1.109375, float64(int32(0)), -0.10379679368168127, 3.7700471749674615e-14}, _cgoa_18_pow{1.1015625, float64(int32(0)), -0.096729626458568418, 1.7306161136093256e-14}, _cgoa_18_pow{1.1015625, float64(int32(0)), -0.096729626458568418, 1.7306161136093256e-14}, _cgoa_18_pow{1.09375, float64(int32(0)), -0.089612158689647003, -4.0129135527265743e-14}, _cgoa_18_pow{1.0859375, float64(int32(0)), -0.082443669211102133, 2.7541708360737882e-14}, _cgoa_18_pow{1.0859375, float64(int32(0)), -0.082443669211102133, 2.7541708360737882e-14}, _cgoa_18_pow{1.078125, float64(int32(0)), -0.075223421237637922, 5.0396178134370583e-14}, _cgoa_18_pow{1.078125, float64(int32(0)), -0.075223421237637922, 5.0396178134370583e-14}, _cgoa_18_pow{1.0703125, float64(int32(0)), -0.067950661908525944, 1.8195060030168815e-14}, _cgoa_18_pow{1.0625, float64(int32(0)), -0.060624621816486979, 5.2136206391365041e-14}, _cgoa_18_pow{1.0625, float64(int32(0)), -0.060624621816486979, 5.2136206391365041e-14}, _cgoa_18_pow{1.0546875, float64(int32(0)), -0.053244514518837605, 2.532168943117445e-14}, _cgoa_18_pow{1.0546875, float64(int32(0)), -0.053244514518837605, 2.532168943117445e-14}, _cgoa_18_pow{1.046875, float64(int32(0)), -0.045809536031242715, -5.1488495726858107e-14}, _cgoa_18_pow{1.046875, float64(int32(0)), -0.045809536031242715, -5.1488495726858107e-14}, _cgoa_18_pow{1.0390625, float64(int32(0)), -0.038318864302141264, 4.6652946995830086e-15}, _cgoa_18_pow{1.0390625, float64(int32(0)), -0.038318864302141264, 4.6652946995830086e-15}, _cgoa_18_pow{1.03125, float64(int32(0)), -0.03077165866670839, -4.5298142577909288e-14}, _cgoa_18_pow{1.03125, float64(int32(0)), -0.03077165866670839, -4.5298142577909288e-14}, _cgoa_18_pow{1.0234375, float64(int32(0)), -0.023167059281490765, -4.3613240678515679e-14}, _cgoa_18_pow{1.015625, float64(int32(0)), -0.015504186535963527, -1.7274567499706107e-15}, _cgoa_18_pow{1.015625, float64(int32(0)), -0.015504186535963527, -1.7274567499706107e-15}, _cgoa_18_pow{1.0078125, float64(int32(0)), -0.0077821404420319595, -2.2989410046203511e-14}, _cgoa_18_pow{1.0078125, float64(int32(0)), -0.0077821404420319595, -2.2989410046203511e-14}, _cgoa_18_pow{1, float64(int32(0)), 0, 0}, _cgoa_18_pow{1, float64(int32(0)), 0, 0}, _cgoa_18_pow{0.9921875, float64(int32(0)), 0.0078431774610407956, -1.4902732911301337e-14}, _cgoa_18_pow{0.984375, float64(int32(0)), 0.015748356968174448, -3.5279803896553249e-14}, _cgoa_18_pow{0.9765625, float64(int32(0)), 0.023716526617363343, -4.7300547720332489e-14}, _cgoa_18_pow{0.96875, float64(int32(0)), 0.031748698314572721, 7.5803103693751609e-15}, _cgoa_18_pow{0.9609375, float64(int32(0)), 0.039845908547249564, -4.9893776716773285e-14}, _cgoa_18_pow{0.953125, float64(int32(0)), 0.048009219186383234, -2.2626293930306741e-14}, _cgoa_18_pow{0.9453125, float64(int32(0)), 0.056239718322899535, -2.3456744910186991e-14}, _cgoa_18_pow{0.94140625, float64(int32(0)), 0.060380510988920832, -1.3352588834854848e-14}, _cgoa_18_pow{0.93359375, float64(int32(0)), 0.068713892548089461, -3.7652968203888748e-14}, _cgoa_18_pow{0.92578125, float64(int32(0)), 0.077117303344380161, 5.1128335719851986e-14}, _cgoa_18_pow{0.91796875, float64(int32(0)), 0.085591930335453981, -5.0466744384701189e-14}, _cgoa_18_pow{0.9140625, float64(int32(0)), 0.089856329121857925, 3.1218748807418837e-15}, _cgoa_18_pow{0.90625, float64(int32(0)), 0.098440072813218648, 3.3871241029241416e-14}, _cgoa_18_pow{0.8984375, float64(int32(0)), 0.10709813555638448, -1.7376727386423858e-14}, _cgoa_18_pow{0.89453125, float64(int32(0)), 0.11145544092528326, 3.9571258997998038e-14}, _cgoa_18_pow{0.88671875, float64(int32(0)), 0.12022742699821265, -5.2849453521890294e-14}, _cgoa_18_pow{0.8828125, float64(int32(0)), 0.12464244520731427, -3.7670125023087379e-14}, _cgoa_18_pow{0.875, float64(int32(0)), 0.13353139262449076, 3.1859736349078334e-14}, _cgoa_18_pow{0.87109375, float64(int32(0)), 0.13800567301939282, 5.0900642926060466e-14}, _cgoa_18_pow{0.86328125, float64(int32(0)), 0.14701474296180095, 8.710783796122478e-15}, _cgoa_18_pow{0.859375, float64(int32(0)), 0.15154989812720032, 6.1578962291229762e-16}, _cgoa_18_pow{0.8515625, float64(int32(0)), 0.16068238169043525, 3.8215777439167963e-14}, _cgoa_18_pow{0.84765625, float64(int32(0)), 0.16528009093906348, 3.9440046718453496e-14}, _cgoa_18_pow{0.83984375, float64(int32(0)), 0.17453941635187675, 2.2924522154618074e-14}, _cgoa_18_pow{0.8359375, float64(int32(0)), 0.17920142945774842, -3.7425300947322631e-14}, _cgoa_18_pow{0.83203125, float64(int32(0)), 0.18388527877016259, -2.5223102140407338e-14}, _cgoa_18_pow{0.82421875, float64(int32(0)), 0.1933193110035063, -1.0320443688698849e-14}, _cgoa_18_pow{0.8203125, float64(int32(0)), 0.19806991376208316, 1.0634128304268335e-14}, _cgoa_18_pow{0.8125, float64(int32(0)), 0.20763936477828793, -4.3425422595242564e-14}, _cgoa_18_pow{0.80859375, float64(int32(0)), 0.21245865121420593, -1.2527395755711364e-14}, _cgoa_18_pow{0.8046875, float64(int32(0)), 0.21730127569003344, -5.2040087434058838e-14}, _cgoa_18_pow{0.80078125, float64(int32(0)), 0.22216746534115828, -3.9798445159517019e-15}, _cgoa_18_pow{0.79296875, float64(int32(0)), 0.2319714654378231, -4.7955860343296286e-14}, _cgoa_18_pow{0.7890625, float64(int32(0)), 0.23690974707835721, 5.0156860137916023e-16}, _cgoa_18_pow{0.78515625, float64(int32(0)), 0.24187253642048745, -7.2523189532402926e-16}, _cgoa_18_pow{0.78125, float64(int32(0)), 0.24686007793150111, 2.4688324156011588e-14}, _cgoa_18_pow{0.7734375, float64(int32(0)), 0.25691041378502177, 5.4651212536247919e-15}, _cgoa_18_pow{0.76953125, float64(int32(0)), 0.26197371574153294, 4.1026510716984462e-14}, _cgoa_18_pow{0.765625, float64(int32(0)), 0.26706278524909521, -4.9967365023459362e-14}, _cgoa_18_pow{0.76171875, float64(int32(0)), 0.27217788591576664, 4.9035807081563468e-14}, _cgoa_18_pow{0.7578125, float64(int32(0)), 0.27731928541618345, 5.0896280395007593e-14}, _cgoa_18_pow{0.75390625, float64(int32(0)), 0.28248725557466514, 1.1782016386565151e-14}, _cgoa_18_pow{0.74609375, float64(int32(0)), 0.29290401643288533, 4.7274529405144063e-14}, _cgoa_18_pow{0.7421875, float64(int32(0)), 0.29815337231912054, -4.4204083338755686e-14}, _cgoa_18_pow{0.73828125, float64(int32(0)), 0.30343042941990461, 1.5483459934980831e-14}, _cgoa_18_pow{0.734375, float64(int32(0)), 0.30873548164959175, 2.1522127491642888e-14}, _cgoa_18_pow{0.73046875, float64(int32(0)), 0.3140688276249648, 1.1054030169005386e-14}, _cgoa_18_pow{0.7265625, float64(int32(0)), 0.31943077076641657, -5.5343263520706788e-14}, _cgoa_18_pow{0.72265625, float64(int32(0)), 0.32482161940129117, -5.351646604259541e-14}, _cgoa_18_pow{0.71875, float64(int32(0)), 0.33024168687052224, 5.4612144489920215e-14}, _cgoa_18_pow{0.71484375, float64(int32(0)), 0.3356912916381134, 2.8136969901227338e-14}, _cgoa_18_pow{0.7109375, float64(int32(0)), 0.34117075740277869, -1.156568624616423e-14}}} diff --git a/powf_data.c.i.go b/powf_data.c.i.go new file mode 100644 index 0000000..c3bbd9a --- /dev/null +++ b/powf_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __powf_log2_data struct_powf_log2_data = struct_powf_log2_data{[16]_cgoa_18_powf_data{_cgoa_18_powf_data{1.3989071621465281, -0.48430022186289673 * float64(1)}, _cgoa_18_powf_data{1.3403141896637998, -0.42257122959194704 * float64(1)}, _cgoa_18_powf_data{1.286432210124115, -0.36337543476735562 * float64(1)}, _cgoa_18_powf_data{1.2367150214269895, -0.30651309567405577 * float64(1)}, _cgoa_18_powf_data{1.1906977166711752, -0.25180720160537634 * float64(1)}, _cgoa_18_powf_data{1.1479821020556429, -0.19910014943794563 * float64(1)}, _cgoa_18_powf_data{1.1082251448272158, -0.14825100623281615 * float64(1)}, _cgoa_18_powf_data{1.0711297413057381, -0.099133238073183915 * float64(1)}, _cgoa_18_powf_data{1.0364372789772831, -0.051632812977629436 * float64(1)}, _cgoa_18_powf_data{1, 0 * float64(1)}, _cgoa_18_powf_data{0.9492859795739057, 0.075085319379430041 * float64(1)}, _cgoa_18_powf_data{0.89510494286090036, 0.15987125980713107 * float64(1)}, _cgoa_18_powf_data{0.84768216203511026, 0.23840466643176811 * float64(1)}, _cgoa_18_powf_data{0.80503148516920009, 0.31288288605863257 * float64(1)}, _cgoa_18_powf_data{0.7664671008843108, 0.38370422656453185 * float64(1)}, _cgoa_18_powf_data{0.73142860331632797, 0.45121104893581498 * float64(1)}}, [5]float64{0.28845758110921399 * float64(1), -0.36092606229713164 * float64(1), 0.48089848147257702 * float64(1), -0.72134746750062906 * float64(1), 1.4426950408774342 * float64(1)}} diff --git a/powl.c.i.go b/powl.c.i.go new file mode 100644 index 0000000..5309675 --- /dev/null +++ b/powl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Powl(x float64, y float64) float64 { + return float64(Pow(float64(x), float64(y))) +} diff --git a/qsort.c.i.go b/qsort.c.i.go index aaa9fd0..065936b 100644 --- a/qsort.c.i.go +++ b/qsort.c.i.go @@ -4,7 +4,7 @@ import unsafe "unsafe" type cmpfun = func(unsafe.Pointer, unsafe.Pointer) int32 -func pntz_cgo22_qsort(p *uint64) int32 { +func pntz_cgo18_qsort(p *uint64) int32 { var r int32 = a_ctz_l(*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(0))*8)) - uint64(1)) if r != int32(0) || uint64(func() (_cgo_ret int32) { _cgo_addr := &r @@ -15,7 +15,7 @@ func pntz_cgo22_qsort(p *uint64) int32 { } return int32(0) } -func cycle_cgo23_qsort(width uint64, ar **uint8, n int32) { +func cycle_cgo19_qsort(width uint64, ar **uint8, n int32) { var tmp [256]uint8 var l uint64 var i int32 @@ -39,7 +39,7 @@ func cycle_cgo23_qsort(width uint64, ar **uint8, n int32) { width -= l } } -func shl_cgo24_qsort(p *uint64, n int32) { +func shl_cgo20_qsort(p *uint64, n int32) { if uint64(n) >= 64 { n -= int32(64) *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(1))*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(0))*8)) @@ -49,7 +49,7 @@ func shl_cgo24_qsort(p *uint64, n int32) { *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(1))*8)) |= *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(0))*8)) >> (64 - uint64(n)) *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(0))*8)) <<= n } -func shr_cgo25_qsort(p *uint64, n int32) { +func shr_cgo21_qsort(p *uint64, n int32) { if uint64(n) >= 64 { n -= int32(64) *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(0))*8)) = *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(1))*8)) @@ -59,7 +59,7 @@ func shr_cgo25_qsort(p *uint64, n int32) { *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(0))*8)) |= *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(1))*8)) << (64 - uint64(n)) *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(int32(1))*8)) >>= n } -func sift_cgo26_qsort(head *uint8, width uint64, cmp func(unsafe.Pointer, unsafe.Pointer) int32, pshift int32, lp *uint64) { +func sift_cgo22_qsort(head *uint8, width uint64, cmp func(unsafe.Pointer, unsafe.Pointer) int32, pshift int32, lp *uint64) { var rt *uint8 var lf *uint8 var ar [113]*uint8 @@ -91,9 +91,9 @@ func sift_cgo26_qsort(head *uint8, width uint64, cmp func(unsafe.Pointer, unsafe pshift -= int32(2) } } - cycle_cgo23_qsort(width, (**uint8)(unsafe.Pointer(&ar)), i) + cycle_cgo19_qsort(width, (**uint8)(unsafe.Pointer(&ar)), i) } -func trinkle_cgo27_qsort(head *uint8, width uint64, cmp func(unsafe.Pointer, unsafe.Pointer) int32, pp *uint64, pshift int32, trusty int32, lp *uint64) { +func trinkle_cgo23_qsort(head *uint8, width uint64, cmp func(unsafe.Pointer, unsafe.Pointer) int32, pp *uint64, pshift int32, trusty int32, lp *uint64) { var stepson *uint8 var rt *uint8 var lf *uint8 @@ -123,14 +123,14 @@ func trinkle_cgo27_qsort(head *uint8, width uint64, cmp func(unsafe.Pointer, uns return }())*8)) = stepson head = stepson - trail = pntz_cgo22_qsort((*uint64)(unsafe.Pointer(&p))) - shr_cgo25_qsort((*uint64)(unsafe.Pointer(&p)), trail) + trail = pntz_cgo18_qsort((*uint64)(unsafe.Pointer(&p))) + shr_cgo21_qsort((*uint64)(unsafe.Pointer(&p)), trail) pshift += trail trusty = int32(0) } if !(trusty != 0) { - cycle_cgo23_qsort(width, (**uint8)(unsafe.Pointer(&ar)), i) - sift_cgo26_qsort(head, width, cmp, pshift, lp) + cycle_cgo19_qsort(width, (**uint8)(unsafe.Pointer(&ar)), i) + sift_cgo22_qsort(head, width, cmp, pshift, lp) } } func Qsort(base unsafe.Pointer, nel uint64, width uint64, cmp func(unsafe.Pointer, unsafe.Pointer) int32) { @@ -166,41 +166,41 @@ func Qsort(base unsafe.Pointer, nel uint64, width uint64, cmp func(unsafe.Pointe } for uintptr(unsafe.Pointer(head)) < uintptr(unsafe.Pointer(high)) { if *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&p)))) + uintptr(int32(0))*8))&uint64(3) == uint64(3) { - sift_cgo26_qsort(head, width, cmp, pshift, (*uint64)(unsafe.Pointer(&lp))) - shr_cgo25_qsort((*uint64)(unsafe.Pointer(&p)), int32(2)) + sift_cgo22_qsort(head, width, cmp, pshift, (*uint64)(unsafe.Pointer(&lp))) + shr_cgo21_qsort((*uint64)(unsafe.Pointer(&p)), int32(2)) pshift += int32(2) } else { if *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&lp)))) + uintptr(pshift-int32(1))*8)) >= uint64(uintptr(unsafe.Pointer(high))-uintptr(unsafe.Pointer(head))) { - trinkle_cgo27_qsort(head, width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift, int32(0), (*uint64)(unsafe.Pointer(&lp))) + trinkle_cgo23_qsort(head, width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift, int32(0), (*uint64)(unsafe.Pointer(&lp))) } else { - sift_cgo26_qsort(head, width, cmp, pshift, (*uint64)(unsafe.Pointer(&lp))) + sift_cgo22_qsort(head, width, cmp, pshift, (*uint64)(unsafe.Pointer(&lp))) } if pshift == int32(1) { - shl_cgo24_qsort((*uint64)(unsafe.Pointer(&p)), int32(1)) + shl_cgo20_qsort((*uint64)(unsafe.Pointer(&p)), int32(1)) pshift = int32(0) } else { - shl_cgo24_qsort((*uint64)(unsafe.Pointer(&p)), pshift-int32(1)) + shl_cgo20_qsort((*uint64)(unsafe.Pointer(&p)), pshift-int32(1)) pshift = int32(1) } } *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&p)))) + uintptr(int32(0))*8)) |= uint64(1) *(*uintptr)(unsafe.Pointer(&head)) += uintptr(width) } - trinkle_cgo27_qsort(head, width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift, int32(0), (*uint64)(unsafe.Pointer(&lp))) + trinkle_cgo23_qsort(head, width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift, int32(0), (*uint64)(unsafe.Pointer(&lp))) for pshift != int32(1) || *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&p)))) + uintptr(int32(0))*8)) != uint64(1) || *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&p)))) + uintptr(int32(1))*8)) != uint64(0) { if pshift <= int32(1) { - trail = pntz_cgo22_qsort((*uint64)(unsafe.Pointer(&p))) - shr_cgo25_qsort((*uint64)(unsafe.Pointer(&p)), trail) + trail = pntz_cgo18_qsort((*uint64)(unsafe.Pointer(&p))) + shr_cgo21_qsort((*uint64)(unsafe.Pointer(&p)), trail) pshift += trail } else { - shl_cgo24_qsort((*uint64)(unsafe.Pointer(&p)), int32(2)) + shl_cgo20_qsort((*uint64)(unsafe.Pointer(&p)), int32(2)) pshift -= int32(2) *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&p)))) + uintptr(int32(0))*8)) ^= uint64(7) - shr_cgo25_qsort((*uint64)(unsafe.Pointer(&p)), int32(1)) - trinkle_cgo27_qsort((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(head))-uintptr(*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&lp)))) + uintptr(pshift)*8)))))))-uintptr(width))), width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift+int32(1), int32(1), (*uint64)(unsafe.Pointer(&lp))) - shl_cgo24_qsort((*uint64)(unsafe.Pointer(&p)), int32(1)) + shr_cgo21_qsort((*uint64)(unsafe.Pointer(&p)), int32(1)) + trinkle_cgo23_qsort((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(head))-uintptr(*(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&lp)))) + uintptr(pshift)*8)))))))-uintptr(width))), width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift+int32(1), int32(1), (*uint64)(unsafe.Pointer(&lp))) + shl_cgo20_qsort((*uint64)(unsafe.Pointer(&p)), int32(1)) *(*uint64)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint64)(unsafe.Pointer(&p)))) + uintptr(int32(0))*8)) |= uint64(1) - trinkle_cgo27_qsort((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(head))-uintptr(width))), width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift, int32(1), (*uint64)(unsafe.Pointer(&lp))) + trinkle_cgo23_qsort((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(head))-uintptr(width))), width, cmp, (*uint64)(unsafe.Pointer(&p)), pshift, int32(1), (*uint64)(unsafe.Pointer(&lp))) } *(*uintptr)(unsafe.Pointer(&head)) -= uintptr(width) } diff --git a/remainder.c.i.go b/remainder.c.i.go new file mode 100644 index 0000000..9328049 --- /dev/null +++ b/remainder.c.i.go @@ -0,0 +1,6 @@ +package libc + +func Remainder(x float64, y float64) float64 { + var q int32 + return Remquo(x, y, &q) +} diff --git a/remainderf.c.i.go b/remainderf.c.i.go new file mode 100644 index 0000000..1ce5860 --- /dev/null +++ b/remainderf.c.i.go @@ -0,0 +1,6 @@ +package libc + +func Remainderf(x float32, y float32) float32 { + var q int32 + return Remquof(x, y, &q) +} diff --git a/remainderl.c.i.go b/remainderl.c.i.go new file mode 100644 index 0000000..d53da3b --- /dev/null +++ b/remainderl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Remainderl(x float64, y float64) float64 { + return float64(Remainder(float64(x), float64(y))) +} diff --git a/remquo.c.i.go b/remquo.c.i.go new file mode 100644 index 0000000..39e5108 --- /dev/null +++ b/remquo.c.i.go @@ -0,0 +1,153 @@ +package libc + +import unsafe "unsafe" + +func Remquo(x float64, y float64, quo *int32) float64 { + type _cgoa_18_remquo struct { + f float64 + } + var ux _cgoa_18_remquo + ux.f = x + var uy _cgoa_18_remquo + uy.f = y + var ex int32 = int32(*(*uint64)(unsafe.Pointer(&ux)) >> int32(52) & uint64(2047)) + var ey int32 = int32(*(*uint64)(unsafe.Pointer(&uy)) >> int32(52) & uint64(2047)) + var sx int32 = int32(*(*uint64)(unsafe.Pointer(&ux)) >> int32(63)) + var sy int32 = int32(*(*uint64)(unsafe.Pointer(&uy)) >> int32(63)) + var q uint32 + var i uint64 + var uxi uint64 = *(*uint64)(unsafe.Pointer(&ux)) + *quo = int32(0) + if *(*uint64)(unsafe.Pointer(&uy))< uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(y)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || ex == int32(2047) { + return x * y / (x * y) + } + if *(*uint64)(unsafe.Pointer(&ux))<>int32(63) == uint64(0); func() uint64 { + ex-- + return func() (_cgo_ret uint64) { + _cgo_addr := &i + *_cgo_addr <<= int32(1) + return *_cgo_addr + }() + }() { + } + uxi <<= -ex + int32(1) + } else { + uxi &= 4503599627370495 + uxi |= 4503599627370496 + } + if !(ey != 0) { + for i = *(*uint64)(unsafe.Pointer(&uy)) << int32(12); i>>int32(63) == uint64(0); func() uint64 { + ey-- + return func() (_cgo_ret uint64) { + _cgo_addr := &i + *_cgo_addr <<= int32(1) + return *_cgo_addr + }() + }() { + } + *(*uint64)(unsafe.Pointer(&uy)) <<= -ey + int32(1) + } else { + *(*uint64)(unsafe.Pointer(&uy)) &= 4503599627370495 + *(*uint64)(unsafe.Pointer(&uy)) |= 4503599627370496 + } + q = uint32(0) + if ex < ey { + if ex+int32(1) == ey { + goto end + } + return x + } + for ; ex > ey; ex-- { + i = uxi - *(*uint64)(unsafe.Pointer(&uy)) + if i>>int32(63) == uint64(0) { + uxi = i + q++ + } + uxi <<= int32(1) + q <<= int32(1) + } + i = uxi - *(*uint64)(unsafe.Pointer(&uy)) + if i>>int32(63) == uint64(0) { + uxi = i + q++ + } + if uxi == uint64(0) { + ex = -60 + } else { + for ; uxi>>int32(52) == uint64(0); func() int32 { + uxi <<= int32(1) + return func() (_cgo_ret int32) { + _cgo_addr := &ex + _cgo_ret = *_cgo_addr + *_cgo_addr-- + return + }() + }() { + } + } +end: + if ex > int32(0) { + uxi -= 4503599627370496 + uxi |= uint64(ex) << int32(52) + } else { + uxi >>= -ex + int32(1) + } + *(*uint64)(unsafe.Pointer(&ux)) = uxi + x = ux.f + if sy != 0 { + y = -y + } + if ex == ey || ex+int32(1) == ey && (float64(int32(2))*x > y || float64(int32(2))*x == y && q%uint32(2) != 0) { + x -= y + q++ + } + q &= uint32(2147483647) + *quo = func() int32 { + if sx^sy != 0 { + return -int32(q) + } else { + return int32(q) + } + }() + return func() float64 { + if sx != 0 { + return -x + } else { + return x + } + }() +} diff --git a/remquof.c.i.go b/remquof.c.i.go new file mode 100644 index 0000000..11c1c48 --- /dev/null +++ b/remquof.c.i.go @@ -0,0 +1,153 @@ +package libc + +import unsafe "unsafe" + +func Remquof(x float32, y float32, quo *int32) float32 { + type _cgoa_18_remquof struct { + f float32 + } + var ux _cgoa_18_remquof + ux.f = x + var uy _cgoa_18_remquof + uy.f = y + var ex int32 = int32(*(*uint32)(unsafe.Pointer(&ux)) >> int32(23) & uint32(255)) + var ey int32 = int32(*(*uint32)(unsafe.Pointer(&uy)) >> int32(23) & uint32(255)) + var sx int32 = int32(*(*uint32)(unsafe.Pointer(&ux)) >> int32(31)) + var sy int32 = int32(*(*uint32)(unsafe.Pointer(&uy)) >> int32(31)) + var q uint32 + var i uint32 + var uxi uint32 = *(*uint32)(unsafe.Pointer(&ux)) + *quo = int32(0) + if *(*uint32)(unsafe.Pointer(&uy))< uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(y))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(y)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || ex == int32(255) { + return x * y / (x * y) + } + if *(*uint32)(unsafe.Pointer(&ux))<>int32(31) == uint32(0); func() uint32 { + ex-- + return func() (_cgo_ret uint32) { + _cgo_addr := &i + *_cgo_addr <<= int32(1) + return *_cgo_addr + }() + }() { + } + uxi <<= -ex + int32(1) + } else { + uxi &= 8388607 + uxi |= 8388608 + } + if !(ey != 0) { + for i = *(*uint32)(unsafe.Pointer(&uy)) << int32(9); i>>int32(31) == uint32(0); func() uint32 { + ey-- + return func() (_cgo_ret uint32) { + _cgo_addr := &i + *_cgo_addr <<= int32(1) + return *_cgo_addr + }() + }() { + } + *(*uint32)(unsafe.Pointer(&uy)) <<= -ey + int32(1) + } else { + *(*uint32)(unsafe.Pointer(&uy)) &= 8388607 + *(*uint32)(unsafe.Pointer(&uy)) |= 8388608 + } + q = uint32(0) + if ex < ey { + if ex+int32(1) == ey { + goto end + } + return x + } + for ; ex > ey; ex-- { + i = uxi - *(*uint32)(unsafe.Pointer(&uy)) + if i>>int32(31) == uint32(0) { + uxi = i + q++ + } + uxi <<= int32(1) + q <<= int32(1) + } + i = uxi - *(*uint32)(unsafe.Pointer(&uy)) + if i>>int32(31) == uint32(0) { + uxi = i + q++ + } + if uxi == uint32(0) { + ex = -30 + } else { + for ; uxi>>int32(23) == uint32(0); func() int32 { + uxi <<= int32(1) + return func() (_cgo_ret int32) { + _cgo_addr := &ex + _cgo_ret = *_cgo_addr + *_cgo_addr-- + return + }() + }() { + } + } +end: + if ex > int32(0) { + uxi -= 8388608 + uxi |= uint32(ex) << int32(23) + } else { + uxi >>= -ex + int32(1) + } + *(*uint32)(unsafe.Pointer(&ux)) = uxi + x = ux.f + if sy != 0 { + y = -y + } + if ex == ey || ex+int32(1) == ey && (float32(int32(2))*x > y || float32(int32(2))*x == y && q%uint32(2) != 0) { + x -= y + q++ + } + q &= uint32(2147483647) + *quo = func() int32 { + if sx^sy != 0 { + return -int32(q) + } else { + return int32(q) + } + }() + return func() float32 { + if sx != 0 { + return -x + } else { + return x + } + }() +} diff --git a/remquol.c.i.go b/remquol.c.i.go new file mode 100644 index 0000000..de87d23 --- /dev/null +++ b/remquol.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Remquol(x float64, y float64, quo *int32) float64 { + return float64(Remquo(float64(x), float64(y), quo)) +} diff --git a/rint.c.i.go b/rint.c.i.go new file mode 100644 index 0000000..cdcc232 --- /dev/null +++ b/rint.c.i.go @@ -0,0 +1,34 @@ +package libc + +import unsafe "unsafe" + +var toint_cgo18_rint float64 = float64(int32(1)) / 2.2204460492503131e-16 + +func Rint(x float64) float64 { + type _cgoa_19_rint struct { + f float64 + } + var u _cgoa_19_rint + u.f = x + var e int32 = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + var s int32 = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(63)) + var y float64 + if e >= 1075 { + return x + } + if s != 0 { + y = x - toint_cgo18_rint + toint_cgo18_rint + } else { + y = x + toint_cgo18_rint - toint_cgo18_rint + } + if y == float64(int32(0)) { + return func() float64 { + if s != 0 { + return -0 + } else { + return float64(int32(0)) + } + }() + } + return y +} diff --git a/rintf.c.i.go b/rintf.c.i.go new file mode 100644 index 0000000..debfcc7 --- /dev/null +++ b/rintf.c.i.go @@ -0,0 +1,34 @@ +package libc + +import unsafe "unsafe" + +var toint_cgo18_rintf float32 = float32(int32(1)) / 1.1920929e-7 + +func Rintf(x float32) float32 { + type _cgoa_19_rintf struct { + f float32 + } + var u _cgoa_19_rintf + u.f = x + var e int32 = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(23) & uint32(255)) + var s int32 = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(31)) + var y float32 + if e >= 150 { + return x + } + if s != 0 { + y = x - toint_cgo18_rintf + toint_cgo18_rintf + } else { + y = x + toint_cgo18_rintf - toint_cgo18_rintf + } + if y == float32(int32(0)) { + return func() float32 { + if s != 0 { + return -0 + } else { + return 0 + } + }() + } + return y +} diff --git a/rintl.c.i.go b/rintl.c.i.go new file mode 100644 index 0000000..3977f37 --- /dev/null +++ b/rintl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Rintl(x float64) float64 { + return float64(Rint(float64(x))) +} diff --git a/round.c.i.go b/round.c.i.go new file mode 100644 index 0000000..6e10b48 --- /dev/null +++ b/round.c.i.go @@ -0,0 +1,48 @@ +package libc + +import unsafe "unsafe" + +var toint_cgo18_round float64 = float64(int32(1)) / 2.2204460492503131e-16 + +func Round(x float64) float64 { + type _cgoa_19_round struct { + f float64 + } + var u _cgoa_19_round + u.f = x + var e int32 = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + var y float64 + if e >= 1075 { + return x + } + if *(*uint64)(unsafe.Pointer(&u))>>int32(63) != 0 { + x = -x + } + if e < 1022 { + for { + if 8 == 4 { + fp_force_evalf(float32(x + toint_cgo18_round)) + } else if 8 == 8 { + fp_force_eval(x + toint_cgo18_round) + } else { + fp_force_evall(float64(x + toint_cgo18_round)) + } + if true { + break + } + } + return float64(int32(0)) * u.f + } + y = x + toint_cgo18_round - toint_cgo18_round - x + if y > 0.5 { + y = y + x - float64(int32(1)) + } else if y <= -0.5 { + y = y + x + float64(int32(1)) + } else { + y = y + x + } + if *(*uint64)(unsafe.Pointer(&u))>>int32(63) != 0 { + y = -y + } + return y +} diff --git a/roundf.c.i.go b/roundf.c.i.go new file mode 100644 index 0000000..4acba05 --- /dev/null +++ b/roundf.c.i.go @@ -0,0 +1,48 @@ +package libc + +import unsafe "unsafe" + +var toint_cgo18_roundf float32 = float32(int32(1)) / 1.1920929e-7 + +func Roundf(x float32) float32 { + type _cgoa_19_roundf struct { + f float32 + } + var u _cgoa_19_roundf + u.f = x + var e int32 = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(23) & uint32(255)) + var y float32 + if e >= 150 { + return x + } + if *(*uint32)(unsafe.Pointer(&u))>>int32(31) != 0 { + x = -x + } + if e < 126 { + for { + if 4 == 4 { + fp_force_evalf(x + toint_cgo18_roundf) + } else if 4 == 8 { + fp_force_eval(float64(x + toint_cgo18_roundf)) + } else { + fp_force_evall(float64(x + toint_cgo18_roundf)) + } + if true { + break + } + } + return float32(int32(0)) * u.f + } + y = x + toint_cgo18_roundf - toint_cgo18_roundf - x + if y > 0.5 { + y = y + x - float32(int32(1)) + } else if y <= -0.5 { + y = y + x + float32(int32(1)) + } else { + y = y + x + } + if *(*uint32)(unsafe.Pointer(&u))>>int32(31) != 0 { + y = -y + } + return y +} diff --git a/roundl.c.i.go b/roundl.c.i.go new file mode 100644 index 0000000..f040a8f --- /dev/null +++ b/roundl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Roundl(x float64) float64 { + return float64(Round(float64(x))) +} diff --git a/scalb.c.i.go b/scalb.c.i.go new file mode 100644 index 0000000..ba23b6a --- /dev/null +++ b/scalb.c.i.go @@ -0,0 +1,114 @@ +package libc + +func Scalb(x float64, fn float64) float64 { + if func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(x))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(x)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(fn))&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(fn)&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(fn)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x * fn + } + if !(func() int32 { + if 8 == 4 { + return func() int32 { + if X__FLOAT_BITS(float32(fn))&uint32(2147483647) < uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 8 == 8 { + return func() int32 { + if X__DOUBLE_BITS(fn)&9223372036854775807 < 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(fn)) > int32(1) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0) { + if fn > 0 { + return x * fn + } else { + return x / -fn + } + } + if Rint(fn) != fn { + return (fn - fn) / (fn - fn) + } + if fn > 65000 { + return Scalbn(x, int32(65000)) + } + if -fn > 65000 { + return Scalbn(x, -65000) + } + return Scalbn(x, int32(fn)) +} diff --git a/scalbf.c.i.go b/scalbf.c.i.go new file mode 100644 index 0000000..c2ad42b --- /dev/null +++ b/scalbf.c.i.go @@ -0,0 +1,114 @@ +package libc + +func Scalbf(x float32, fn float32) float32 { + if func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(x)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(x))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(x)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 || func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(fn)&uint32(2147483647) > uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(fn))&9223372036854775807 > 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(fn)) == int32(0) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0 { + return x * fn + } + if !(func() int32 { + if 4 == 4 { + return func() int32 { + if X__FLOAT_BITS(fn)&uint32(2147483647) < uint32(2139095040) { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if 4 == 8 { + return func() int32 { + if X__DOUBLE_BITS(float64(fn))&9223372036854775807 < 9218868437227405312 { + return 1 + } else { + return 0 + } + }() + } else { + return func() int32 { + if X__fpclassifyl(float64(fn)) > int32(1) { + return 1 + } else { + return 0 + } + }() + } + }() + } + }() != 0) { + if fn > 0 { + return x * fn + } else { + return x / -fn + } + } + if Rintf(fn) != fn { + return (fn - fn) / (fn - fn) + } + if fn > 65000 { + return Scalbnf(x, int32(65000)) + } + if -fn > 65000 { + return Scalbnf(x, -65000) + } + return Scalbnf(x, int32(fn)) +} diff --git a/scalbln.c.i.go b/scalbln.c.i.go new file mode 100644 index 0000000..21be743 --- /dev/null +++ b/scalbln.c.i.go @@ -0,0 +1,10 @@ +package libc + +func Scalbln(x float64, n int64) float64 { + if n > int64(2147483647) { + n = int64(2147483647) + } else if n < int64(-2147483648) { + n = int64(-2147483648) + } + return Scalbn(x, int32(n)) +} diff --git a/scalblnf.c.i.go b/scalblnf.c.i.go new file mode 100644 index 0000000..a64eda8 --- /dev/null +++ b/scalblnf.c.i.go @@ -0,0 +1,10 @@ +package libc + +func Scalblnf(x float32, n int64) float32 { + if n > int64(2147483647) { + n = int64(2147483647) + } else if n < int64(-2147483648) { + n = int64(-2147483648) + } + return Scalbnf(x, int32(n)) +} diff --git a/scalblnl.c.i.go b/scalblnl.c.i.go new file mode 100644 index 0000000..13c0f1e --- /dev/null +++ b/scalblnl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Scalblnl(x float64, n int64) float64 { + return float64(Scalbln(float64(x), n)) +} diff --git a/signgam.c.i.go b/signgam.c.i.go new file mode 100644 index 0000000..b97b0ca --- /dev/null +++ b/signgam.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __signgam int32 = int32(0) diff --git a/significand.c.i.go b/significand.c.i.go new file mode 100644 index 0000000..ab0a7b5 --- /dev/null +++ b/significand.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Significand(x float64) float64 { + return Scalbn(x, -Ilogb(x)) +} diff --git a/significandf.c.i.go b/significandf.c.i.go new file mode 100644 index 0000000..c2aa708 --- /dev/null +++ b/significandf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Significandf(x float32) float32 { + return Scalbnf(x, -Ilogbf(x)) +} diff --git a/sin.c.i.go b/sin.c.i.go new file mode 100644 index 0000000..b046062 --- /dev/null +++ b/sin.c.i.go @@ -0,0 +1,71 @@ +package libc + +import unsafe "unsafe" + +func Sin(x float64) float64 { + var y [2]float64 + var ix uint32 + var n uint32 + for { + ix = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_18_sin{x})) >> int32(32)) + if true { + break + } + } + ix &= uint32(2147483647) + if ix <= uint32(1072243195) { + if ix < uint32(1045430272) { + for { + if 8 == 4 { + fp_force_evalf(float32(func() float64 { + if ix < uint32(1048576) { + return x / float64(1.329228e+36) + } else { + return x + float64(1.329228e+36) + } + }())) + } else if 8 == 8 { + fp_force_eval(func() float64 { + if ix < uint32(1048576) { + return x / float64(1.329228e+36) + } else { + return x + float64(1.329228e+36) + } + }()) + } else { + fp_force_evall(float64(func() float64 { + if ix < uint32(1048576) { + return x / float64(1.329228e+36) + } else { + return x + float64(1.329228e+36) + } + }())) + } + if true { + break + } + } + return x + } + return __sin(x, 0, int32(0)) + } + if ix >= uint32(2146435072) { + return x - x + } + n = uint32(__rem_pio2(x, (*float64)(unsafe.Pointer(&y)))) + switch n & uint32(3) { + case uint32(0): + return __sin(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8)), int32(1)) + case uint32(1): + return __cos(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8))) + case uint32(2): + return -__sin(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8)), int32(1)) + default: + return -__cos(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8))) + } + return 0 +} + +type _cgoz_18_sin struct { + _f float64 +} diff --git a/sinf.c.i.go b/sinf.c.i.go new file mode 100644 index 0000000..5da3483 --- /dev/null +++ b/sinf.c.i.go @@ -0,0 +1,110 @@ +package libc + +import unsafe "unsafe" + +var s1pio2_cgo18_sinf float64 = float64(int32(1)) * 1.5707963267948966 +var s2pio2_cgo19_sinf float64 = float64(int32(2)) * 1.5707963267948966 +var s3pio2_cgo20_sinf float64 = float64(int32(3)) * 1.5707963267948966 +var s4pio2_cgo21_sinf float64 = float64(int32(4)) * 1.5707963267948966 + +func Sinf(x float32) float32 { + var y float64 + var ix uint32 + var n int32 + var sign int32 + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_22_sinf{x})) + if true { + break + } + } + sign = int32(ix >> int32(31)) + ix &= uint32(2147483647) + if ix <= uint32(1061752794) { + if ix < uint32(964689920) { + for { + if 4 == 4 { + fp_force_evalf(func() float32 { + if ix < uint32(8388608) { + return x / 1.329228e+36 + } else { + return x + 1.329228e+36 + } + }()) + } else if 4 == 8 { + fp_force_eval(float64(func() float32 { + if ix < uint32(8388608) { + return x / 1.329228e+36 + } else { + return x + 1.329228e+36 + } + }())) + } else { + fp_force_evall(float64(func() float32 { + if ix < uint32(8388608) { + return x / 1.329228e+36 + } else { + return x + 1.329228e+36 + } + }())) + } + if true { + break + } + } + return x + } + return __sindf(float64(x)) + } + if ix <= uint32(1081824209) { + if ix <= uint32(1075235811) { + if sign != 0 { + return -__cosdf(float64(x) + s1pio2_cgo18_sinf) + } else { + return __cosdf(float64(x) - s1pio2_cgo18_sinf) + } + } + return __sindf(func() float64 { + if sign != 0 { + return -(float64(x) + s2pio2_cgo19_sinf) + } else { + return -(float64(x) - s2pio2_cgo19_sinf) + } + }()) + } + if ix <= uint32(1088565717) { + if ix <= uint32(1085271519) { + if sign != 0 { + return __cosdf(float64(x) + s3pio2_cgo20_sinf) + } else { + return -__cosdf(float64(x) - s3pio2_cgo20_sinf) + } + } + return __sindf(func() float64 { + if sign != 0 { + return float64(x) + s4pio2_cgo21_sinf + } else { + return float64(x) - s4pio2_cgo21_sinf + } + }()) + } + if ix >= uint32(2139095040) { + return x - x + } + n = __rem_pio2f(x, &y) + switch n & int32(3) { + case int32(0): + return __sindf(y) + case int32(1): + return __cosdf(y) + case int32(2): + return __sindf(-y) + default: + return -__cosdf(y) + } + return 0 +} + +type _cgoz_22_sinf struct { + _f float32 +} diff --git a/sinh.c.i.go b/sinh.c.i.go new file mode 100644 index 0000000..8d0954a --- /dev/null +++ b/sinh.c.i.go @@ -0,0 +1,34 @@ +package libc + +import unsafe "unsafe" + +func Sinh(x float64) float64 { + type _cgoa_18_sinh struct { + f float64 + } + var u _cgoa_18_sinh + u.f = x + var w uint32 + var t float64 + var h float64 + var absx float64 + h = float64(0.5) + if *(*uint64)(unsafe.Pointer(&u))>>int32(63) != 0 { + h = -h + } + *(*uint64)(unsafe.Pointer(&u)) &= 9223372036854775807 + absx = u.f + w = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32)) + if w < uint32(1082535490) { + t = Expm1(absx) + if w < uint32(1072693248) { + if w < uint32(1045430272) { + return x + } + return h * (float64(int32(2))*t - t*t/(t+float64(int32(1)))) + } + return h * (t + t/(t+float64(int32(1)))) + } + t = __expo2(absx, float64(int32(2))*h) + return t +} diff --git a/sinhf.c.i.go b/sinhf.c.i.go new file mode 100644 index 0000000..ea5247d --- /dev/null +++ b/sinhf.c.i.go @@ -0,0 +1,34 @@ +package libc + +import unsafe "unsafe" + +func Sinhf(x float32) float32 { + type _cgoa_18_sinhf struct { + f float32 + } + var u _cgoa_18_sinhf + u.f = x + var w uint32 + var t float32 + var h float32 + var absx float32 + h = float32(0.5) + if *(*uint32)(unsafe.Pointer(&u))>>int32(31) != 0 { + h = -h + } + *(*uint32)(unsafe.Pointer(&u)) &= uint32(2147483647) + absx = u.f + w = *(*uint32)(unsafe.Pointer(&u)) + if w < uint32(1118925335) { + t = Expm1f(absx) + if w < uint32(1065353216) { + if w < uint32(964689920) { + return x + } + return h * (float32(int32(2))*t - t*t/(t+float32(int32(1)))) + } + return h * (t + t/(t+float32(int32(1)))) + } + t = __expo2f(absx, float32(int32(2))*h) + return t +} diff --git a/sinhl.c.i.go b/sinhl.c.i.go new file mode 100644 index 0000000..ce6ce4c --- /dev/null +++ b/sinhl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Sinhl(x float64) float64 { + return float64(Sinh(float64(x))) +} diff --git a/sinl.c.i.go b/sinl.c.i.go new file mode 100644 index 0000000..d9077ee --- /dev/null +++ b/sinl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Sinl(x float64) float64 { + return float64(Sin(float64(x))) +} diff --git a/sqrt.c.i.go b/sqrt.c.i.go new file mode 100644 index 0000000..e9ab2bf --- /dev/null +++ b/sqrt.c.i.go @@ -0,0 +1,115 @@ +package libc + +import unsafe "unsafe" + +func mul32_cgo18_sqrt(a uint32, b uint32) uint32 { + return uint32(uint64(a) * uint64(b) >> int32(32)) +} +func mul64_cgo19_sqrt(a uint64, b uint64) uint64 { + var ahi uint64 = a >> int32(32) + var alo uint64 = a & uint64(4294967295) + var bhi uint64 = b >> int32(32) + var blo uint64 = b & uint64(4294967295) + return ahi*bhi + ahi*blo>>int32(32) + alo*bhi>>int32(32) +} +func Sqrt(x float64) float64 { + var ix uint64 + var top uint64 + var m uint64 + ix = *(*uint64)(unsafe.Pointer(&_cgoz_20_sqrt{x})) + top = ix >> int32(52) + if func() int64 { + if top-uint64(1) >= uint64(2046) { + return 1 + } else { + return 0 + } + }() == int64(0) { + if ix*uint64(2) == uint64(0) { + return x + } + if ix == uint64(9218868437227405312) { + return x + } + if ix > uint64(9218868437227405312) { + return __math_invalid(x) + } + ix = *(*uint64)(unsafe.Pointer(&_cgoz_21_sqrt{x * 4503599627370496})) + top = ix >> int32(52) + top -= uint64(52) + } + var even int32 = int32(top & uint64(1)) + m = ix<>= int32(1) + } + top = (top + uint64(1023)) >> int32(1) + var r uint64 + var s uint64 + var d uint64 + var u uint64 + var i uint64 + i = ix >> int32(46) % uint64(128) + r = uint64(uint32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint16)(unsafe.Pointer(&__rsqrt_tab)))) + uintptr(i)*2))) << int32(16)) + s = uint64(mul32_cgo18_sqrt(uint32(m>>int32(32)), uint32(r))) + d = uint64(mul32_cgo18_sqrt(uint32(s), uint32(r))) + u = three_cgo22_sqrt - d + r = uint64(mul32_cgo18_sqrt(uint32(r), uint32(u)) << int32(1)) + s = uint64(mul32_cgo18_sqrt(uint32(s), uint32(u)) << int32(1)) + d = uint64(mul32_cgo18_sqrt(uint32(s), uint32(r))) + u = three_cgo22_sqrt - d + r = uint64(mul32_cgo18_sqrt(uint32(r), uint32(u)) << int32(1)) + r = r << int32(32) + s = mul64_cgo19_sqrt(m, r) + d = mul64_cgo19_sqrt(s, r) + u = three_cgo22_sqrt<> int32(9) + var d0 uint64 + var d1 uint64 + var d2 uint64 + var y float64 + var t float64 + d0 = m<> int32(63) + s &= uint64(4503599627370495) + s |= top << int32(52) + y = *(*float64)(unsafe.Pointer(&_cgoz_23_sqrt{s})) + if int32(1) != 0 { + var tiny uint64 = uint64(func() int64 { + if func() int64 { + if d2 == uint64(0) { + return 1 + } else { + return 0 + } + }() == int64(0) { + return int64(0) + } else { + return int64(4503599627370496) + } + }()) + tiny |= (d1 ^ d2) & uint64(9223372036854775808) + t = *(*float64)(unsafe.Pointer(&_cgoz_24_sqrt{tiny})) + y = eval_as_double(y + t) + } + return y +} + +type _cgoz_20_sqrt struct { + _f float64 +} +type _cgoz_21_sqrt struct { + _f float64 +} + +var three_cgo22_sqrt uint64 = uint64(3221225472) + +type _cgoz_23_sqrt struct { + _i uint64 +} +type _cgoz_24_sqrt struct { + _i uint64 +} diff --git a/sqrt_data.c.i.go b/sqrt_data.c.i.go new file mode 100644 index 0000000..555b08a --- /dev/null +++ b/sqrt_data.c.i.go @@ -0,0 +1,3 @@ +package libc + +var __rsqrt_tab [128]uint16 = [128]uint16{uint16(46161), uint16(45808), uint16(45462), uint16(45124), uint16(44793), uint16(44470), uint16(44153), uint16(43843), uint16(43540), uint16(43243), uint16(42952), uint16(42666), uint16(42386), uint16(42112), uint16(41843), uint16(41579), uint16(41320), uint16(41066), uint16(40816), uint16(40571), uint16(40330), uint16(40093), uint16(39861), uint16(39633), uint16(39408), uint16(39187), uint16(38970), uint16(38757), uint16(38547), uint16(38340), uint16(38136), uint16(37936), uint16(37739), uint16(37545), uint16(37354), uint16(37166), uint16(36981), uint16(36798), uint16(36618), uint16(36441), uint16(36266), uint16(36094), uint16(35924), uint16(35756), uint16(35591), uint16(35428), uint16(35268), uint16(35109), uint16(34953), uint16(34798), uint16(34646), uint16(34496), uint16(34347), uint16(34201), uint16(34056), uint16(33913), uint16(33772), uint16(33633), uint16(33496), uint16(33360), uint16(33225), uint16(33093), uint16(32962), uint16(32832), uint16(65282), uint16(64782), uint16(64293), uint16(63815), uint16(63347), uint16(62890), uint16(62442), uint16(62004), uint16(61575), uint16(61155), uint16(60743), uint16(60339), uint16(59943), uint16(59555), uint16(59175), uint16(58802), uint16(58435), uint16(58076), uint16(57722), uint16(57376), uint16(57035), uint16(56701), uint16(56372), uint16(56049), uint16(55731), uint16(55419), uint16(55112), uint16(54810), uint16(54513), uint16(54221), uint16(53933), uint16(53650), uint16(53371), uint16(53097), uint16(52827), uint16(52561), uint16(52298), uint16(52040), uint16(51786), uint16(51535), uint16(51288), uint16(51044), uint16(50804), uint16(50567), uint16(50333), uint16(50103), uint16(49876), uint16(49652), uint16(49430), uint16(49212), uint16(48997), uint16(48784), uint16(48574), uint16(48367), uint16(48163), uint16(47961), uint16(47761), uint16(47564), uint16(47370), uint16(47178), uint16(46988), uint16(46800), uint16(46615), uint16(46432)} diff --git a/sqrtl.c.i.go b/sqrtl.c.i.go new file mode 100644 index 0000000..5000c0d --- /dev/null +++ b/sqrtl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Sqrtl(x float64) float64 { + return float64(Sqrt(float64(x))) +} diff --git a/tan.c.i.go b/tan.c.i.go new file mode 100644 index 0000000..35fff7b --- /dev/null +++ b/tan.c.i.go @@ -0,0 +1,61 @@ +package libc + +import unsafe "unsafe" + +func Tan(x float64) float64 { + var y [2]float64 + var ix uint32 + var n uint32 + for { + ix = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_18_tan{x})) >> int32(32)) + if true { + break + } + } + ix &= uint32(2147483647) + if ix <= uint32(1072243195) { + if ix < uint32(1044381696) { + for { + if 8 == 4 { + fp_force_evalf(float32(func() float64 { + if ix < uint32(1048576) { + return x / float64(1.329228e+36) + } else { + return x + float64(1.329228e+36) + } + }())) + } else if 8 == 8 { + fp_force_eval(func() float64 { + if ix < uint32(1048576) { + return x / float64(1.329228e+36) + } else { + return x + float64(1.329228e+36) + } + }()) + } else { + fp_force_evall(float64(func() float64 { + if ix < uint32(1048576) { + return x / float64(1.329228e+36) + } else { + return x + float64(1.329228e+36) + } + }())) + } + if true { + break + } + } + return x + } + return __tan(x, 0, int32(0)) + } + if ix >= uint32(2146435072) { + return x - x + } + n = uint32(__rem_pio2(x, (*float64)(unsafe.Pointer(&y)))) + return __tan(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(0))*8)), *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&y)))) + uintptr(int32(1))*8)), int32(n&uint32(1))) +} + +type _cgoz_18_tan struct { + _f float64 +} diff --git a/tanf.c.i.go b/tanf.c.i.go new file mode 100644 index 0000000..a612415 --- /dev/null +++ b/tanf.c.i.go @@ -0,0 +1,106 @@ +package libc + +import unsafe "unsafe" + +var t1pio2_cgo18_tanf float64 = float64(int32(1)) * 1.5707963267948966 +var t2pio2_cgo19_tanf float64 = float64(int32(2)) * 1.5707963267948966 +var t3pio2_cgo20_tanf float64 = float64(int32(3)) * 1.5707963267948966 +var t4pio2_cgo21_tanf float64 = float64(int32(4)) * 1.5707963267948966 + +func Tanf(x float32) float32 { + var y float64 + var ix uint32 + var n uint32 + var sign uint32 + for { + ix = *(*uint32)(unsafe.Pointer(&_cgoz_22_tanf{x})) + if true { + break + } + } + sign = ix >> int32(31) + ix &= uint32(2147483647) + if ix <= uint32(1061752794) { + if ix < uint32(964689920) { + for { + if 4 == 4 { + fp_force_evalf(func() float32 { + if ix < uint32(8388608) { + return x / 1.329228e+36 + } else { + return x + 1.329228e+36 + } + }()) + } else if 4 == 8 { + fp_force_eval(float64(func() float32 { + if ix < uint32(8388608) { + return x / 1.329228e+36 + } else { + return x + 1.329228e+36 + } + }())) + } else { + fp_force_evall(float64(func() float32 { + if ix < uint32(8388608) { + return x / 1.329228e+36 + } else { + return x + 1.329228e+36 + } + }())) + } + if true { + break + } + } + return x + } + return __tandf(float64(x), int32(0)) + } + if ix <= uint32(1081824209) { + if ix <= uint32(1075235811) { + return __tandf(func() float64 { + if sign != 0 { + return float64(x) + t1pio2_cgo18_tanf + } else { + return float64(x) - t1pio2_cgo18_tanf + } + }(), int32(1)) + } else { + return __tandf(func() float64 { + if sign != 0 { + return float64(x) + t2pio2_cgo19_tanf + } else { + return float64(x) - t2pio2_cgo19_tanf + } + }(), int32(0)) + } + } + if ix <= uint32(1088565717) { + if ix <= uint32(1085271519) { + return __tandf(func() float64 { + if sign != 0 { + return float64(x) + t3pio2_cgo20_tanf + } else { + return float64(x) - t3pio2_cgo20_tanf + } + }(), int32(1)) + } else { + return __tandf(func() float64 { + if sign != 0 { + return float64(x) + t4pio2_cgo21_tanf + } else { + return float64(x) - t4pio2_cgo21_tanf + } + }(), int32(0)) + } + } + if ix >= uint32(2139095040) { + return x - x + } + n = uint32(__rem_pio2f(x, &y)) + return __tandf(y, int32(n&uint32(1))) +} + +type _cgoz_22_tanf struct { + _f float32 +} diff --git a/tanh.c.i.go b/tanh.c.i.go new file mode 100644 index 0000000..b574b7e --- /dev/null +++ b/tanh.c.i.go @@ -0,0 +1,53 @@ +package libc + +import unsafe "unsafe" + +func Tanh(x float64) float64 { + type _cgoa_18_tanh struct { + f float64 + } + var u _cgoa_18_tanh + u.f = x + var w uint32 + var sign int32 + var t float64 + sign = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(63)) + *(*uint64)(unsafe.Pointer(&u)) &= 9223372036854775807 + x = u.f + w = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32)) + if w > uint32(1071748074) { + if w > uint32(1077149696) { + t = float64(int32(1)) - float64(int32(0))/x + } else { + t = Expm1(float64(int32(2)) * x) + t = float64(int32(1)) - float64(int32(2))/(t+float64(int32(2))) + } + } else if w > uint32(1070618798) { + t = Expm1(float64(int32(2)) * x) + t = t / (t + float64(int32(2))) + } else if w >= uint32(1048576) { + t = Expm1(float64(-2) * x) + t = -t / (t + float64(int32(2))) + } else { + for { + if 4 == 4 { + fp_force_evalf(float32(x)) + } else if 4 == 8 { + fp_force_eval(float64(float32(x))) + } else { + fp_force_evall(float64(float32(x))) + } + if true { + break + } + } + t = x + } + return func() float64 { + if sign != 0 { + return -t + } else { + return t + } + }() +} diff --git a/tanhf.c.i.go b/tanhf.c.i.go new file mode 100644 index 0000000..2175e24 --- /dev/null +++ b/tanhf.c.i.go @@ -0,0 +1,53 @@ +package libc + +import unsafe "unsafe" + +func Tanhf(x float32) float32 { + type _cgoa_18_tanhf struct { + f float32 + } + var u _cgoa_18_tanhf + u.f = x + var w uint32 + var sign int32 + var t float32 + sign = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(31)) + *(*uint32)(unsafe.Pointer(&u)) &= uint32(2147483647) + x = u.f + w = *(*uint32)(unsafe.Pointer(&u)) + if w > uint32(1057791828) { + if w > uint32(1092616192) { + t = float32(int32(1)) + float32(int32(0))/x + } else { + t = Expm1f(float32(int32(2)) * x) + t = float32(int32(1)) - float32(int32(2))/(t+float32(int32(2))) + } + } else if w > uint32(1048757624) { + t = Expm1f(float32(int32(2)) * x) + t = t / (t + float32(int32(2))) + } else if w >= uint32(8388608) { + t = Expm1f(float32(-2) * x) + t = -t / (t + float32(int32(2))) + } else { + for { + if 4 == 4 { + fp_force_evalf(x * x) + } else if 4 == 8 { + fp_force_eval(float64(x * x)) + } else { + fp_force_evall(float64(x * x)) + } + if true { + break + } + } + t = x + } + return func() float32 { + if sign != 0 { + return -t + } else { + return t + } + }() +} diff --git a/tanhl.c.i.go b/tanhl.c.i.go new file mode 100644 index 0000000..2e7996b --- /dev/null +++ b/tanhl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Tanhl(x float64) float64 { + return float64(Tanh(float64(x))) +} diff --git a/tanl.c.i.go b/tanl.c.i.go new file mode 100644 index 0000000..4886a5d --- /dev/null +++ b/tanl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Tanl(x float64) float64 { + return float64(Tan(float64(x))) +} diff --git a/tgammaf.c.i.go b/tgammaf.c.i.go new file mode 100644 index 0000000..f456a8b --- /dev/null +++ b/tgammaf.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Tgammaf(x float32) float32 { + return float32(Tgamma(float64(x))) +} diff --git a/tgammal.c.i.go b/tgammal.c.i.go new file mode 100644 index 0000000..2eb8992 --- /dev/null +++ b/tgammal.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Tgammal(x float64) float64 { + return float64(Tgamma(float64(x))) +} diff --git a/trunc.c.i.go b/trunc.c.i.go new file mode 100644 index 0000000..93c19b5 --- /dev/null +++ b/trunc.c.i.go @@ -0,0 +1,37 @@ +package libc + +import unsafe "unsafe" + +func Trunc(x float64) float64 { + type _cgoa_18_trunc struct { + f float64 + } + var u _cgoa_18_trunc + u.f = x + var e int32 = int32(*(*uint64)(unsafe.Pointer(&u))>>int32(52)&uint64(2047)) - int32(1023) + int32(12) + var m uint64 + if e >= 64 { + return x + } + if e < int32(12) { + e = int32(1) + } + m = 18446744073709551615 >> e + if *(*uint64)(unsafe.Pointer(&u))&m == uint64(0) { + return x + } + for { + if 8 == 4 { + fp_force_evalf(float32(x + float64(1.329228e+36))) + } else if 8 == 8 { + fp_force_eval(x + float64(1.329228e+36)) + } else { + fp_force_evall(float64(x + float64(1.329228e+36))) + } + if true { + break + } + } + *(*uint64)(unsafe.Pointer(&u)) &= ^m + return u.f +} diff --git a/truncf.c.i.go b/truncf.c.i.go new file mode 100644 index 0000000..38c745b --- /dev/null +++ b/truncf.c.i.go @@ -0,0 +1,37 @@ +package libc + +import unsafe "unsafe" + +func Truncf(x float32) float32 { + type _cgoa_18_truncf struct { + f float32 + } + var u _cgoa_18_truncf + u.f = x + var e int32 = int32(*(*uint32)(unsafe.Pointer(&u))>>int32(23)&uint32(255)) - int32(127) + int32(9) + var m uint32 + if e >= 32 { + return x + } + if e < int32(9) { + e = int32(1) + } + m = 4294967295 >> e + if *(*uint32)(unsafe.Pointer(&u))&m == uint32(0) { + return x + } + for { + if 4 == 4 { + fp_force_evalf(x + 1.329228e+36) + } else if 4 == 8 { + fp_force_eval(float64(x + 1.329228e+36)) + } else { + fp_force_evall(float64(x + 1.329228e+36)) + } + if true { + break + } + } + *(*uint32)(unsafe.Pointer(&u)) &= ^m + return u.f +} diff --git a/truncl.c.i.go b/truncl.c.i.go new file mode 100644 index 0000000..f37365d --- /dev/null +++ b/truncl.c.i.go @@ -0,0 +1,5 @@ +package libc + +func Truncl(x float64) float64 { + return float64(Trunc(float64(x))) +} diff --git a/x2g__cos.c.i.go b/x2g__cos.c.i.go new file mode 100644 index 0000000..07ff7eb --- /dev/null +++ b/x2g__cos.c.i.go @@ -0,0 +1,21 @@ +package libc + +var C1_cgo20___cos float64 = 0.041666666666666602 +var C2_cgo21___cos float64 = -0.001388888888887411 +var C3_cgo22___cos float64 = 2.4801587289476729e-5 +var C4_cgo23___cos float64 = -2.7557314351390663e-7 +var C5_cgo24___cos float64 = 2.0875723212981748e-9 +var C6_cgo25___cos float64 = -1.1359647557788195e-11 + +func __cos(x float64, y float64) float64 { + var hz float64 + var z float64 + var r float64 + var w float64 + z = x * x + w = z * z + r = z*(C1_cgo20___cos+z*(C2_cgo21___cos+z*C3_cgo22___cos)) + w*w*(C4_cgo23___cos+z*(C5_cgo24___cos+z*C6_cgo25___cos)) + hz = 0.5 * z + w = 1 - hz + return w + (1 - w - hz + (z*r - x*y)) +} diff --git a/x2g__cosdf.c.i.go b/x2g__cosdf.c.i.go new file mode 100644 index 0000000..46ede09 --- /dev/null +++ b/x2g__cosdf.c.i.go @@ -0,0 +1,16 @@ +package libc + +var C0_cgo18___cosdf float64 = -0.499999997251031 +var C1_cgo19___cosdf float64 = 0.041666623323739063 +var C2_cgo20___cosdf float64 = -0.0013886763774609929 +var C3_cgo21___cosdf float64 = 2.4390448796277409e-5 + +func __cosdf(x float64) float32 { + var r float64 + var w float64 + var z float64 + z = x * x + w = z * z + r = C2_cgo20___cosdf + z*C3_cgo21___cosdf + return float32(1 + z*C0_cgo18___cosdf + w*C1_cgo19___cosdf + w*z*r) +} diff --git a/x2g__expo2.c.i.go b/x2g__expo2.c.i.go new file mode 100644 index 0000000..c18fdbc --- /dev/null +++ b/x2g__expo2.c.i.go @@ -0,0 +1,22 @@ +package libc + +import unsafe "unsafe" + +const k_cgo18___expo2 int32 = int32(2043) + +var kln2_cgo19___expo2 float64 = 1416.0996898839683 + +func __expo2(x float64, sign float64) float64 { + var scale float64 + for { + scale = *(*float64)(unsafe.Pointer(&_cgoz_20___expo2{9205357638345293824})) + if true { + break + } + } + return Exp(x-kln2_cgo19___expo2) * (sign * scale) * scale +} + +type _cgoz_20___expo2 struct { + _i uint64 +} diff --git a/x2g__expo2f.c.i.go b/x2g__expo2f.c.i.go new file mode 100644 index 0000000..a0e5e98 --- /dev/null +++ b/x2g__expo2f.c.i.go @@ -0,0 +1,22 @@ +package libc + +import unsafe "unsafe" + +const k_cgo18___expo2f int32 = int32(235) + +var kln2_cgo19___expo2f float32 = 162.889587 + +func __expo2f(x float32, sign float32) float32 { + var scale float32 + for { + scale = *(*float32)(unsafe.Pointer(&_cgoz_20___expo2f{2046820352})) + if true { + break + } + } + return Expf(x-kln2_cgo19___expo2f) * (sign * scale) * scale +} + +type _cgoz_20___expo2f struct { + _i uint32 +} diff --git a/x2g__fpclassifyf.c.i.go b/x2g__fpclassifyf.c.i.go new file mode 100644 index 0000000..5ed997c --- /dev/null +++ b/x2g__fpclassifyf.c.i.go @@ -0,0 +1,31 @@ +package libc + +import unsafe "unsafe" + +func __fpclassifyf(x float32) int32 { + type _cgoa_18___fpclassifyf struct { + f float32 + } + var u _cgoa_18___fpclassifyf + u.f = x + var e int32 = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(23) & uint32(255)) + if !(e != 0) { + return func() int32 { + if *(*uint32)(unsafe.Pointer(&u))<> int32(63)) + ix = uint32(*(*uint64)(unsafe.Pointer(&u)) >> int32(32) & uint64(2147483647)) + if !(ix <= uint32(1074752122)) { + goto _cgol_1 + } + if !(ix&uint32(1048575) == uint32(598523)) { + goto _cgol_2 + } + goto medium +_cgol_2: + if ix <= uint32(1073928572) { + if !(sign != 0) { + z = x - pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z - pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) - pio2_1t_cgo22___rem_pio2 + return int32(1) + } else { + z = x + pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z + pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) + pio2_1t_cgo22___rem_pio2 + return -1 + } + } else if !(sign != 0) { + z = x - float64(int32(2))*pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z - float64(int32(2))*pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) - float64(int32(2))*pio2_1t_cgo22___rem_pio2 + return int32(2) + } else { + z = x + float64(int32(2))*pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z + float64(int32(2))*pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) + float64(int32(2))*pio2_1t_cgo22___rem_pio2 + return -2 + } +_cgol_1: + if !(ix <= uint32(1075594811)) { + goto _cgol_3 + } + if !(ix <= uint32(1075183036)) { + goto _cgol_5 + } + if !(ix == uint32(1074977148)) { + goto _cgol_6 + } + goto medium +_cgol_6: + if !(sign != 0) { + z = x - float64(int32(3))*pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z - float64(int32(3))*pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) - float64(int32(3))*pio2_1t_cgo22___rem_pio2 + return int32(3) + } else { + z = x + float64(int32(3))*pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z + float64(int32(3))*pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) + float64(int32(3))*pio2_1t_cgo22___rem_pio2 + return -3 + } + goto _cgol_4 +_cgol_5: + if !(ix == uint32(1075388923)) { + goto _cgol_7 + } + goto medium +_cgol_7: + if !(sign != 0) { + z = x - float64(int32(4))*pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z - float64(int32(4))*pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) - float64(int32(4))*pio2_1t_cgo22___rem_pio2 + return int32(4) + } else { + z = x + float64(int32(4))*pio2_1_cgo21___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = z + float64(int32(4))*pio2_1t_cgo22___rem_pio2 + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) + float64(int32(4))*pio2_1t_cgo22___rem_pio2 + return -4 + } +_cgol_4: + ; +_cgol_3: + if !(ix < uint32(1094263291)) { + goto _cgol_8 + } +medium: + fn = float64(x)*invpio2_cgo20___rem_pio2 + toint_cgo18___rem_pio2 - toint_cgo18___rem_pio2 + n = int32(fn) + r = x - fn*pio2_1_cgo21___rem_pio2 + w = fn * pio2_1t_cgo22___rem_pio2 + if func() int64 { + if r-w < -pio4_cgo19___rem_pio2 { + return 1 + } else { + return 0 + } + }() == int64(0) { + n-- + fn-- + r = x - fn*pio2_1_cgo21___rem_pio2 + w = fn * pio2_1t_cgo22___rem_pio2 + } else if func() int64 { + if r-w > pio4_cgo19___rem_pio2 { + return 1 + } else { + return 0 + } + }() == int64(0) { + n++ + fn++ + r = x - fn*pio2_1_cgo21___rem_pio2 + w = fn * pio2_1t_cgo22___rem_pio2 + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = r - w + u.f = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) + ey = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + ex = int32(ix >> int32(20)) + if ex-ey > int32(16) { + t = r + w = fn * pio2_2_cgo23___rem_pio2 + r = t - w + w = fn*pio2_2t_cgo24___rem_pio2 - (t - r - w) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = r - w + u.f = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) + ey = int32(*(*uint64)(unsafe.Pointer(&u)) >> int32(52) & uint64(2047)) + if ex-ey > int32(49) { + t = r + w = fn * pio2_3_cgo25___rem_pio2 + r = t - w + w = fn*pio2_3t_cgo26___rem_pio2 - (t - r - w) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = r - w + } + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = r - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) - w + return n +_cgol_8: + if ix >= uint32(2146435072) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = func() (_cgo_ret float64) { + _cgo_addr := &*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) + *_cgo_addr = x - x + return *_cgo_addr + }() + return int32(0) + } + u.f = x + *(*uint64)(unsafe.Pointer(&u)) &= 4503599627370495 + *(*uint64)(unsafe.Pointer(&u)) |= 4710765210229538816 + z = u.f + for i = int32(0); i < int32(2); i++ { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&tx)))) + uintptr(i)*8)) = float64(int32(z)) + z = (z - *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&tx)))) + uintptr(i)*8))) * 16777216 + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&tx)))) + uintptr(i)*8)) = z + for *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&tx)))) + uintptr(i)*8)) == 0 { + i-- + } + n = __rem_pio2_large((*float64)(unsafe.Pointer(&tx)), (*float64)(unsafe.Pointer(&ty)), int32(ix>>int32(20))-1046, i+int32(1), int32(1)) + if sign != 0 { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = -*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&ty)))) + uintptr(int32(0))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = -*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&ty)))) + uintptr(int32(1))*8)) + return -n + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&ty)))) + uintptr(int32(0))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&ty)))) + uintptr(int32(1))*8)) + return n +} diff --git a/x2g__rem_pio2_large.c.i.go b/x2g__rem_pio2_large.c.i.go new file mode 100644 index 0000000..a083dff --- /dev/null +++ b/x2g__rem_pio2_large.c.i.go @@ -0,0 +1,280 @@ +package libc + +import unsafe "unsafe" + +var init_jk_cgo18___rem_pio2_large [4]int32 = [4]int32{int32(3), int32(4), int32(4), int32(6)} +var ipio2_cgo19___rem_pio2_large [66]int32 = [66]int32{int32(10680707), int32(7228996), int32(1387004), int32(2578385), int32(16069853), int32(12639074), int32(9804092), int32(4427841), int32(16666979), int32(11263675), int32(12935607), int32(2387514), int32(4345298), int32(14681673), int32(3074569), int32(13734428), int32(16653803), int32(1880361), int32(10960616), int32(8533493), int32(3062596), int32(8710556), int32(7349940), int32(6258241), int32(3772886), int32(3769171), int32(3798172), int32(8675211), int32(12450088), int32(3874808), int32(9961438), int32(366607), int32(15675153), int32(9132554), int32(7151469), int32(3571407), int32(2607881), int32(12013382), int32(4155038), int32(6285869), int32(7677882), int32(13102053), int32(15825725), int32(473591), int32(9065106), int32(15363067), int32(6271263), int32(9264392), int32(5636912), int32(4652155), int32(7056368), int32(13614112), int32(10155062), int32(1944035), int32(9527646), int32(15080200), int32(6658437), int32(6231200), int32(6832269), int32(16767104), int32(5075751), int32(3212806), int32(1398474), int32(7579849), int32(6349435), int32(12618859)} +var PIo2_cgo20___rem_pio2_large [8]float64 = [8]float64{1.5707962512969971, 7.5497894158615964e-8, 5.3903025299577648e-15, 3.2820034158079129e-22, 1.2706557530806761e-29, 1.2293330898111133e-36, 2.7337005381646456e-44, 2.1674168387780482e-51} + +func __rem_pio2_large(x *float64, y *float64, e0 int32, nx int32, prec int32) int32 { + var jz int32 + var jx int32 + var jv int32 + var jp int32 + var jk int32 + var carry int32 + var n int32 + var iq [20]int32 + var i int32 + var j int32 + var k int32 + var m int32 + var q0 int32 + var ih int32 + var z float64 + var fw float64 + var f [20]float64 + var fq [20]float64 + var q [20]float64 + jk = *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&init_jk_cgo18___rem_pio2_large)))) + uintptr(prec)*4)) + jp = jk + jx = nx - int32(1) + jv = (e0 - int32(3)) / int32(24) + if jv < int32(0) { + jv = int32(0) + } + q0 = e0 - int32(24)*(jv+int32(1)) + j = jv - jx + m = jx + jk + for i = int32(0); i <= m; func() int32 { + i++ + return func() (_cgo_ret int32) { + _cgo_addr := &j + _cgo_ret = *_cgo_addr + *_cgo_addr++ + return + }() + }() { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&f)))) + uintptr(i)*8)) = func() float64 { + if j < int32(0) { + return 0 + } else { + return float64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&ipio2_cgo19___rem_pio2_large)))) + uintptr(j)*4))) + } + }() + } + for i = int32(0); i <= jk; i++ { + for func() float64 { + j = int32(0) + return func() (_cgo_ret float64) { + _cgo_addr := &fw + *_cgo_addr = float64(0) + return *_cgo_addr + }() + }(); j <= jx; j++ { + fw += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(x)) + uintptr(j)*8)) * *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&f)))) + uintptr(jx+i-j)*8)) + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&q)))) + uintptr(i)*8)) = fw + } + jz = jk +recompute: + for func() float64 { + func() int32 { + i = int32(0) + return func() (_cgo_ret int32) { + _cgo_addr := &j + *_cgo_addr = jz + return *_cgo_addr + }() + }() + return func() (_cgo_ret float64) { + _cgo_addr := &z + *_cgo_addr = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&q)))) + uintptr(jz)*8)) + return *_cgo_addr + }() + }(); j > int32(0); func() int32 { + i++ + return func() (_cgo_ret int32) { + _cgo_addr := &j + _cgo_ret = *_cgo_addr + *_cgo_addr-- + return + }() + }() { + fw = float64(int32(5.9604644775390625e-8 * z)) + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(i)*4)) = int32(z - 16777216*fw) + z = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&q)))) + uintptr(j-int32(1))*8)) + fw + } + z = Scalbn(z, q0) + z -= 8 * Floor(z*0.125) + n = int32(z) + z -= float64(n) + ih = int32(0) + if q0 > int32(0) { + i = *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz-int32(1))*4)) >> (int32(24) - q0) + n += i + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz-int32(1))*4)) -= i << (int32(24) - q0) + ih = *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz-int32(1))*4)) >> (int32(23) - q0) + } else if q0 == int32(0) { + ih = *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz-int32(1))*4)) >> int32(23) + } else if z >= 0.5 { + ih = int32(2) + } + if ih > int32(0) { + n += int32(1) + carry = int32(0) + for i = int32(0); i < jz; i++ { + j = *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(i)*4)) + if carry == int32(0) { + if j != int32(0) { + carry = int32(1) + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(i)*4)) = int32(16777216) - j + } + } else { + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(i)*4)) = int32(16777215) - j + } + } + if q0 > int32(0) { + switch q0 { + case int32(1): + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz-int32(1))*4)) &= int32(8388607) + break + case int32(2): + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz-int32(1))*4)) &= int32(4194303) + break + } + } + if ih == int32(2) { + z = 1 - z + if carry != int32(0) { + z -= Scalbn(1, q0) + } + } + } + if z == 0 { + j = int32(0) + for i = jz - int32(1); i >= jk; i-- { + j |= *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(i)*4)) + } + if j == int32(0) { + for k = int32(1); *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jk-k)*4)) == int32(0); k++ { + } + for i = jz + int32(1); i <= jz+k; i++ { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&f)))) + uintptr(jx+i)*8)) = float64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&ipio2_cgo19___rem_pio2_large)))) + uintptr(jv+i)*4))) + for func() float64 { + j = int32(0) + return func() (_cgo_ret float64) { + _cgo_addr := &fw + *_cgo_addr = float64(0) + return *_cgo_addr + }() + }(); j <= jx; j++ { + fw += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(x)) + uintptr(j)*8)) * *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&f)))) + uintptr(jx+i-j)*8)) + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&q)))) + uintptr(i)*8)) = fw + } + jz += k + goto recompute + } + } + if z == 0 { + jz -= int32(1) + q0 -= int32(24) + for *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz)*4)) == int32(0) { + jz-- + q0 -= int32(24) + } + } else { + z = Scalbn(z, -q0) + if z >= 16777216 { + fw = float64(int32(5.9604644775390625e-8 * z)) + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz)*4)) = int32(z - 16777216*fw) + jz += int32(1) + q0 += int32(24) + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz)*4)) = int32(fw) + } else { + *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(jz)*4)) = int32(z) + } + } + fw = Scalbn(1, q0) + for i = jz; i >= int32(0); i-- { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&q)))) + uintptr(i)*8)) = fw * float64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&iq)))) + uintptr(i)*4))) + fw *= float64(5.9604644775390625e-8) + } + for i = jz; i >= int32(0); i-- { + for func() int32 { + fw = float64(0) + return func() (_cgo_ret int32) { + _cgo_addr := &k + *_cgo_addr = int32(0) + return *_cgo_addr + }() + }(); k <= jp && k <= jz-i; k++ { + fw += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&PIo2_cgo20___rem_pio2_large)))) + uintptr(k)*8)) * *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&q)))) + uintptr(i+k)*8)) + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(jz-i)*8)) = fw + } + switch prec { + case int32(0): + fw = float64(0) + for i = jz; i >= int32(0); i-- { + fw += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = func() float64 { + if ih == int32(0) { + return fw + } else { + return -fw + } + }() + break + case int32(1): + fallthrough + case int32(2): + fw = float64(0) + for i = jz; i >= int32(0); i-- { + fw += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) + } + fw = float64(fw) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = func() float64 { + if ih == int32(0) { + return fw + } else { + return -fw + } + }() + fw = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(int32(0))*8)) - fw + for i = int32(1); i <= jz; i++ { + fw += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) + } + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = func() float64 { + if ih == int32(0) { + return fw + } else { + return -fw + } + }() + break + case int32(3): + for i = jz; i > int32(0); i-- { + fw = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i-int32(1))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i-int32(1))*8)) - fw + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i-int32(1))*8)) = fw + } + for i = jz; i > int32(1); i-- { + fw = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i-int32(1))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i-int32(1))*8)) - fw + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i-int32(1))*8)) = fw + } + for func() int32 { + fw = float64(0) + return func() (_cgo_ret int32) { + _cgo_addr := &i + *_cgo_addr = jz + return *_cgo_addr + }() + }(); i >= int32(2); i-- { + fw += *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(i)*8)) + } + if ih == int32(0) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(int32(0))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(int32(1))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(2))*8)) = fw + } else { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(0))*8)) = -*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(int32(0))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(1))*8)) = -*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&fq)))) + uintptr(int32(1))*8)) + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(y)) + uintptr(int32(2))*8)) = -fw + } + } + return n & int32(7) +} diff --git a/x2g__rem_pio2f.c.i.go b/x2g__rem_pio2f.c.i.go new file mode 100644 index 0000000..089817b --- /dev/null +++ b/x2g__rem_pio2f.c.i.go @@ -0,0 +1,67 @@ +package libc + +import unsafe "unsafe" + +var toint_cgo18___rem_pio2f float64 = 1.5 / 2.2204460492503131e-16 +var pio4_cgo19___rem_pio2f float64 = 0.78539818525314331 +var invpio2_cgo20___rem_pio2f float64 = 0.63661977236758138 +var pio2_1_cgo21___rem_pio2f float64 = 1.5707963109016418 +var pio2_1t_cgo22___rem_pio2f float64 = 1.5893254773528196e-8 + +func __rem_pio2f(x float32, y *float64) int32 { + type _cgoa_23___rem_pio2f struct { + f float32 + } + var u _cgoa_23___rem_pio2f + u.f = x + var tx [1]float64 + var ty [1]float64 + var fn float64 + var ix uint32 + var n int32 + var sign int32 + var e0 int32 + ix = *(*uint32)(unsafe.Pointer(&u)) & uint32(2147483647) + if ix < uint32(1305022427) { + fn = float64(x)*invpio2_cgo20___rem_pio2f + toint_cgo18___rem_pio2f - toint_cgo18___rem_pio2f + n = int32(fn) + *y = float64(x) - fn*pio2_1_cgo21___rem_pio2f - fn*pio2_1t_cgo22___rem_pio2f + if func() int64 { + if *y < -pio4_cgo19___rem_pio2f { + return 1 + } else { + return 0 + } + }() == int64(0) { + n-- + fn-- + *y = float64(x) - fn*pio2_1_cgo21___rem_pio2f - fn*pio2_1t_cgo22___rem_pio2f + } else if func() int64 { + if *y > pio4_cgo19___rem_pio2f { + return 1 + } else { + return 0 + } + }() == int64(0) { + n++ + fn++ + *y = float64(x) - fn*pio2_1_cgo21___rem_pio2f - fn*pio2_1t_cgo22___rem_pio2f + } + return n + } + if ix >= uint32(2139095040) { + *y = float64(x - x) + return int32(0) + } + sign = int32(*(*uint32)(unsafe.Pointer(&u)) >> int32(31)) + e0 = int32(ix>>int32(23) - uint32(150)) + *(*uint32)(unsafe.Pointer(&u)) = ix - uint32(e0<> int32(31)) +} diff --git a/x2g__sin.c.i.go b/x2g__sin.c.i.go new file mode 100644 index 0000000..f632a15 --- /dev/null +++ b/x2g__sin.c.i.go @@ -0,0 +1,25 @@ +package libc + +var S1_cgo18___sin float64 = -0.16666666666666632 +var S2_cgo19___sin float64 = 0.0083333333333224895 +var S3_cgo20___sin float64 = -1.9841269829857949e-4 +var S4_cgo21___sin float64 = 2.7557313707070068e-6 +var S5_cgo22___sin float64 = -2.5050760253406863e-8 +var S6_cgo23___sin float64 = 1.5896909952115501e-10 + +func __sin(x float64, y float64, iy int32) float64 { + var z float64 + var r float64 + var v float64 + var w float64 + z = x * x + w = z * z + r = S2_cgo19___sin + z*(S3_cgo20___sin+z*S4_cgo21___sin) + z*w*(S5_cgo22___sin+z*S6_cgo23___sin) + v = z * x + if iy == int32(0) { + return x + v*(S1_cgo18___sin+z*r) + } else { + return x - (z*(0.5*y-v*r) - y - v*S1_cgo18___sin) + } + return 0 +} diff --git a/x2g__sindf.c.i.go b/x2g__sindf.c.i.go new file mode 100644 index 0000000..add75b7 --- /dev/null +++ b/x2g__sindf.c.i.go @@ -0,0 +1,18 @@ +package libc + +var S1_cgo18___sindf float64 = -0.16666666641626524 +var S2_cgo19___sindf float64 = 0.0083333293858894632 +var S3_cgo20___sindf float64 = -1.9839334836096632e-4 +var S4_cgo21___sindf float64 = 2.7183114939898219e-6 + +func __sindf(x float64) float32 { + var r float64 + var s float64 + var w float64 + var z float64 + z = x * x + w = z * z + r = S3_cgo20___sindf + z*S4_cgo21___sindf + s = z * x + return float32(x + s*(S1_cgo18___sindf+z*S2_cgo19___sindf) + s*w*r) +} diff --git a/x2g__tan.c.i.go b/x2g__tan.c.i.go new file mode 100644 index 0000000..d310f2b --- /dev/null +++ b/x2g__tan.c.i.go @@ -0,0 +1,100 @@ +package libc + +import unsafe "unsafe" + +var T_cgo18___tan [13]float64 = [13]float64{0.33333333333333409, 0.13333333333320124, 0.053968253976226052, 0.021869488294859542, 0.0088632398235993, 0.0035920791075913124, 0.0014562094543252903, 5.880412408202641e-4, 2.4646313481846991e-4, 7.8179444293955709e-5, 7.1407249138260819e-5, -1.8558637485527546e-5, 2.5907305186363371e-5} +var pio4_cgo19___tan float64 = 0.78539816339744828 +var pio4lo_cgo20___tan float64 = 3.061616997868383e-17 + +func __tan(x float64, y float64, odd int32) float64 { + var z float64 + var r float64 + var v float64 + var w float64 + var s float64 + var a float64 + var w0 float64 + var a0 float64 + var hx uint32 + var big int32 + var sign int32 + for { + hx = uint32(*(*uint64)(unsafe.Pointer(&_cgoz_21___tan{x})) >> int32(32)) + if true { + break + } + } + big = func() int32 { + if hx&uint32(2147483647) >= uint32(1072010280) { + return 1 + } else { + return 0 + } + }() + if big != 0 { + sign = int32(hx >> int32(31)) + if sign != 0 { + x = -x + y = -y + } + x = pio4_cgo19___tan - x + (pio4lo_cgo20___tan - y) + y = float64(0) + } + z = x * x + w = z * z + r = *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(1))*8)) + w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(3))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(5))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(7))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(9))*8))+w**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(11))*8)))))) + v = z * (*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(2))*8)) + w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(4))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(6))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(8))*8))+w*(*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(10))*8))+w**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(12))*8))))))) + s = z * x + r = y + z*(s*(r+v)+y) + s**(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer((*float64)(unsafe.Pointer(&T_cgo18___tan)))) + uintptr(int32(0))*8)) + w = x + r + if big != 0 { + s = float64(int32(1) - int32(2)*odd) + v = s - 2*(x+(r-w*w/(w+s))) + return func() float64 { + if sign != 0 { + return -v + } else { + return v + } + }() + } + if !(odd != 0) { + return w + } + w0 = w + for { + w0 = *(*float64)(unsafe.Pointer(&_cgoz_22___tan{uint64(*(*uint64)(unsafe.Pointer(&_cgoz_23___tan{w0}))>>int32(32))<>int32(32))<