
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ y (pow z 2.0))))
(if (<= z -21500000.0)
(fma
y
(-
(+
3.13060547623
(+ (/ 457.9610022158428 (pow z 2.0)) (/ t (pow z 2.0))))
(/ 36.52704169880642 z))
x)
(if (<= z 2.95e+16)
(+
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
x)
(+
(- x (/ (* y 36.52704169880642) z))
(-
(fma y 3.13060547623 (* t t_1))
(fma
98.5170599679272
t_1
(/ (* y -556.47806218377) (pow z 2.0)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y / pow(z, 2.0);
double tmp;
if (z <= -21500000.0) {
tmp = fma(y, ((3.13060547623 + ((457.9610022158428 / pow(z, 2.0)) + (t / pow(z, 2.0)))) - (36.52704169880642 / z)), x);
} else if (z <= 2.95e+16) {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
} else {
tmp = (x - ((y * 36.52704169880642) / z)) + (fma(y, 3.13060547623, (t * t_1)) - fma(98.5170599679272, t_1, ((y * -556.47806218377) / pow(z, 2.0))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y / (z ^ 2.0)) tmp = 0.0 if (z <= -21500000.0) tmp = fma(y, Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 / (z ^ 2.0)) + Float64(t / (z ^ 2.0)))) - Float64(36.52704169880642 / z)), x); elseif (z <= 2.95e+16) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x); else tmp = Float64(Float64(x - Float64(Float64(y * 36.52704169880642) / z)) + Float64(fma(y, 3.13060547623, Float64(t * t_1)) - fma(98.5170599679272, t_1, Float64(Float64(y * -556.47806218377) / (z ^ 2.0))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -21500000.0], N[(y * N[(N[(3.13060547623 + N[(N[(457.9610022158428 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.95e+16], N[(N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(N[(y * 3.13060547623 + N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(98.5170599679272 * t$95$1 + N[(N[(y * -556.47806218377), $MachinePrecision] / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{{z}^{2}}\\
\mathbf{if}\;z \leq -21500000:\\
\;\;\;\;\mathsf{fma}\left(y, \left(3.13060547623 + \left(\frac{457.9610022158428}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{36.52704169880642}{z}, x\right)\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{+16}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} + x\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y \cdot 36.52704169880642}{z}\right) + \left(\mathsf{fma}\left(y, 3.13060547623, t \cdot t\_1\right) - \mathsf{fma}\left(98.5170599679272, t\_1, \frac{y \cdot -556.47806218377}{{z}^{2}}\right)\right)\\
\end{array}
\end{array}
if z < -2.15e7Initial program 11.7%
Simplified19.1%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
if -2.15e7 < z < 2.95e16Initial program 99.8%
if 2.95e16 < z Initial program 16.6%
Simplified20.4%
Taylor expanded in z around -inf 83.8%
associate-+r+83.8%
associate--l+83.8%
mul-1-neg83.8%
unsub-neg83.8%
distribute-rgt-out--83.8%
metadata-eval83.8%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
INFINITY)
(fma
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
(/
y
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
x)
(fma
y
(-
(+ 3.13060547623 (+ (/ 457.9610022158428 (pow z 2.0)) (/ t (pow z 2.0))))
(/ 36.52704169880642 z))
x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= ((double) INFINITY)) {
tmp = fma(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), (y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
} else {
tmp = fma(y, ((3.13060547623 + ((457.9610022158428 / pow(z, 2.0)) + (t / pow(z, 2.0)))) - (36.52704169880642 / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= Inf) tmp = fma(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x); else tmp = fma(y, Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 / (z ^ 2.0)) + Float64(t / (z ^ 2.0)))) - Float64(36.52704169880642 / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] * N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(N[(3.13060547623 + N[(N[(457.9610022158428 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right), \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(3.13060547623 + \left(\frac{457.9610022158428}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 94.3%
Simplified98.0%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification98.7%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
INFINITY)
(fma
y
(/
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
x)
(fma
y
(-
(+ 3.13060547623 (+ (/ 457.9610022158428 (pow z 2.0)) (/ t (pow z 2.0))))
(/ 36.52704169880642 z))
x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
} else {
tmp = fma(y, ((3.13060547623 + ((457.9610022158428 / pow(z, 2.0)) + (t / pow(z, 2.0)))) - (36.52704169880642 / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= Inf) tmp = fma(y, Float64(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x); else tmp = fma(y, Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 / (z ^ 2.0)) + Float64(t / (z ^ 2.0)))) - Float64(36.52704169880642 / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(N[(3.13060547623 + N[(N[(457.9610022158428 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(3.13060547623 + \left(\frac{457.9610022158428}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 94.3%
Simplified98.0%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification98.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -21500000.0) (not (<= z 2.95e+16)))
(fma
y
(-
(+ 3.13060547623 (+ (/ 457.9610022158428 (pow z 2.0)) (/ t (pow z 2.0))))
(/ 36.52704169880642 z))
x)
(+
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -21500000.0) || !(z <= 2.95e+16)) {
tmp = fma(y, ((3.13060547623 + ((457.9610022158428 / pow(z, 2.0)) + (t / pow(z, 2.0)))) - (36.52704169880642 / z)), x);
} else {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -21500000.0) || !(z <= 2.95e+16)) tmp = fma(y, Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 / (z ^ 2.0)) + Float64(t / (z ^ 2.0)))) - Float64(36.52704169880642 / z)), x); else tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -21500000.0], N[Not[LessEqual[z, 2.95e+16]], $MachinePrecision]], N[(y * N[(N[(3.13060547623 + N[(N[(457.9610022158428 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -21500000 \lor \neg \left(z \leq 2.95 \cdot 10^{+16}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \left(3.13060547623 + \left(\frac{457.9610022158428}{{z}^{2}} + \frac{t}{{z}^{2}}\right)\right) - \frac{36.52704169880642}{z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} + x\\
\end{array}
\end{array}
if z < -2.15e7 or 2.95e16 < z Initial program 13.9%
Simplified19.7%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -2.15e7 < z < 2.95e16Initial program 99.8%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
(t_2
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a)))
(t_3 (/ (* y (+ t_2 b)) t_1)))
(if (<= t_3 (- INFINITY))
(* y (+ (/ b t_1) (/ t_2 t_1)))
(if (<= t_3 INFINITY) (+ t_3 x) (fma y 3.13060547623 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
double t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double t_3 = (y * (t_2 + b)) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = y * ((b / t_1) + (t_2 / t_1));
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3 + x;
} else {
tmp = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) t_2 = Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) t_3 = Float64(Float64(y * Float64(t_2 + b)) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(b / t_1) + Float64(t_2 / t_1))); elseif (t_3 <= Inf) tmp = Float64(t_3 + x); else tmp = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * N[(t$95$2 + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(y * N[(N[(b / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(t$95$3 + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771\\
t_2 := z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right)\\
t_3 := \frac{y \cdot \left(t\_2 + b\right)}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{b}{t\_1} + \frac{t\_2}{t\_1}\right)\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3 + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < -inf.0Initial program 72.3%
Simplified91.8%
Taylor expanded in y around inf 91.6%
if -inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 97.9%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 97.0%
Final simplification97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
(t_2
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a)))
(t_3 (/ (* y (+ t_2 b)) t_1)))
(if (<= t_3 (- INFINITY))
(* y (+ (/ b t_1) (/ t_2 t_1)))
(if (<= t_3 INFINITY) (+ t_3 x) (+ x (* y 3.13060547623))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
double t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double t_3 = (y * (t_2 + b)) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = y * ((b / t_1) + (t_2 / t_1));
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3 + x;
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
double t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double t_3 = (y * (t_2 + b)) / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((b / t_1) + (t_2 / t_1));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3 + x;
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771 t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a) t_3 = (y * (t_2 + b)) / t_1 tmp = 0 if t_3 <= -math.inf: tmp = y * ((b / t_1) + (t_2 / t_1)) elif t_3 <= math.inf: tmp = t_3 + x else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) t_2 = Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) t_3 = Float64(Float64(y * Float64(t_2 + b)) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(b / t_1) + Float64(t_2 / t_1))); elseif (t_3 <= Inf) tmp = Float64(t_3 + x); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771; t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a); t_3 = (y * (t_2 + b)) / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = y * ((b / t_1) + (t_2 / t_1)); elseif (t_3 <= Inf) tmp = t_3 + x; else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * N[(t$95$2 + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(y * N[(N[(b / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(t$95$3 + x), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771\\
t_2 := z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right)\\
t_3 := \frac{y \cdot \left(t\_2 + b\right)}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{b}{t\_1} + \frac{t\_2}{t\_1}\right)\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3 + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < -inf.0Initial program 72.3%
Simplified91.8%
Taylor expanded in y around inf 91.6%
if -inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 97.9%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 97.0%
+-commutative97.0%
*-commutative97.0%
Simplified97.0%
Final simplification97.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -21500000.0)
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z)))
(if (<= z 8e+73)
(+
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
x)
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -21500000.0) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 8e+73) {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-21500000.0d0)) then
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
else if (z <= 8d+73) then
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0)) + x
else
tmp = x + (y * 3.13060547623d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -21500000.0) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 8e+73) {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -21500000.0: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) elif z <= 8e+73: tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -21500000.0) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 8e+73) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -21500000.0) tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); elseif (z <= 8e+73) tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x; else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -21500000.0], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+73], N[(N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -21500000:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+73}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -2.15e7Initial program 11.7%
Taylor expanded in z around -inf 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
*-commutative94.2%
distribute-rgt-out--94.2%
metadata-eval94.2%
Simplified94.2%
if -2.15e7 < z < 7.99999999999999986e73Initial program 98.0%
if 7.99999999999999986e73 < z Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 97.6%
+-commutative97.6%
*-commutative97.6%
Simplified97.6%
Final simplification97.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -22.5)
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z)))
(if (<= z 3.3e+15)
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+ 0.607771387771 (* z 11.9400905721))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -22.5) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 3.3e+15) {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-22.5d0)) then
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
else if (z <= 3.3d+15) then
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y * 3.13060547623d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -22.5) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 3.3e+15) {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -22.5: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) elif z <= 3.3e+15: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -22.5) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 3.3e+15) tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -22.5) tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); elseif (z <= 3.3e+15) tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -22.5], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+15], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -22.5:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+15}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -22.5Initial program 13.1%
Taylor expanded in z around -inf 92.8%
+-commutative92.8%
mul-1-neg92.8%
unsub-neg92.8%
*-commutative92.8%
distribute-rgt-out--92.8%
metadata-eval92.8%
Simplified92.8%
if -22.5 < z < 3.3e15Initial program 99.8%
Taylor expanded in z around 0 97.8%
*-commutative97.8%
Simplified97.8%
if 3.3e15 < z Initial program 16.6%
Simplified20.4%
Taylor expanded in z around inf 92.3%
+-commutative92.3%
*-commutative92.3%
Simplified92.3%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -22.5)
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z)))
(if (<= z 2.5e+16)
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+ 0.607771387771 (* z 11.9400905721))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -22.5) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 2.5e+16) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-22.5d0)) then
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
else if (z <= 2.5d+16) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y * 3.13060547623d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -22.5) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 2.5e+16) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -22.5: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) elif z <= 2.5e+16: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -22.5) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 2.5e+16) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -22.5) tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); elseif (z <= 2.5e+16) tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -22.5], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+16], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -22.5:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -22.5Initial program 13.1%
Taylor expanded in z around -inf 92.8%
+-commutative92.8%
mul-1-neg92.8%
unsub-neg92.8%
*-commutative92.8%
distribute-rgt-out--92.8%
metadata-eval92.8%
Simplified92.8%
if -22.5 < z < 2.5e16Initial program 99.8%
Taylor expanded in z around 0 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in z around 0 97.7%
*-commutative97.7%
Simplified97.7%
if 2.5e16 < z Initial program 16.6%
Simplified20.4%
Taylor expanded in z around inf 92.3%
+-commutative92.3%
*-commutative92.3%
Simplified92.3%
Final simplification95.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2200000.0)
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z)))
(if (<= z 16600000000000.0)
(+
x
(+ (* 1.6453555072203998 (* y b)) (* 1.6453555072203998 (* a (* y z)))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2200000.0) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 16600000000000.0) {
tmp = x + ((1.6453555072203998 * (y * b)) + (1.6453555072203998 * (a * (y * z))));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2200000.0d0)) then
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
else if (z <= 16600000000000.0d0) then
tmp = x + ((1.6453555072203998d0 * (y * b)) + (1.6453555072203998d0 * (a * (y * z))))
else
tmp = x + (y * 3.13060547623d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2200000.0) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 16600000000000.0) {
tmp = x + ((1.6453555072203998 * (y * b)) + (1.6453555072203998 * (a * (y * z))));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2200000.0: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) elif z <= 16600000000000.0: tmp = x + ((1.6453555072203998 * (y * b)) + (1.6453555072203998 * (a * (y * z)))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2200000.0) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 16600000000000.0) tmp = Float64(x + Float64(Float64(1.6453555072203998 * Float64(y * b)) + Float64(1.6453555072203998 * Float64(a * Float64(y * z))))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2200000.0) tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); elseif (z <= 16600000000000.0) tmp = x + ((1.6453555072203998 * (y * b)) + (1.6453555072203998 * (a * (y * z)))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2200000.0], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 16600000000000.0], N[(x + N[(N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(1.6453555072203998 * N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2200000:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 16600000000000:\\
\;\;\;\;x + \left(1.6453555072203998 \cdot \left(y \cdot b\right) + 1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -2.2e6Initial program 11.7%
Taylor expanded in z around -inf 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
*-commutative94.2%
distribute-rgt-out--94.2%
metadata-eval94.2%
Simplified94.2%
if -2.2e6 < z < 1.66e13Initial program 99.8%
Simplified99.8%
Taylor expanded in z around 0 95.2%
Taylor expanded in z around 0 84.2%
Taylor expanded in a around inf 89.2%
*-commutative89.2%
Simplified89.2%
if 1.66e13 < z Initial program 16.6%
Simplified20.4%
Taylor expanded in z around inf 92.3%
+-commutative92.3%
*-commutative92.3%
Simplified92.3%
Final simplification91.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6500000.0) (not (<= z 5.2e+14))) (+ x (* y 3.13060547623)) (+ x (* b (* y 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6500000.0) || !(z <= 5.2e+14)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * (y * 1.6453555072203998));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6500000.0d0)) .or. (.not. (z <= 5.2d+14))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (b * (y * 1.6453555072203998d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6500000.0) || !(z <= 5.2e+14)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * (y * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6500000.0) or not (z <= 5.2e+14): tmp = x + (y * 3.13060547623) else: tmp = x + (b * (y * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6500000.0) || !(z <= 5.2e+14)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(b * Float64(y * 1.6453555072203998))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6500000.0) || ~((z <= 5.2e+14))) tmp = x + (y * 3.13060547623); else tmp = x + (b * (y * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6500000.0], N[Not[LessEqual[z, 5.2e+14]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6500000 \lor \neg \left(z \leq 5.2 \cdot 10^{+14}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -6.5e6 or 5.2e14 < z Initial program 13.9%
Simplified19.7%
Taylor expanded in z around inf 93.1%
+-commutative93.1%
*-commutative93.1%
Simplified93.1%
if -6.5e6 < z < 5.2e14Initial program 99.8%
Taylor expanded in z around 0 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in z around 0 82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in z around 0 82.1%
*-commutative82.1%
associate-*l*82.2%
Simplified82.2%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -15500000.0)
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z)))
(if (<= z 19000000000000.0)
(+ x (* b (* y 1.6453555072203998)))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -15500000.0) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 19000000000000.0) {
tmp = x + (b * (y * 1.6453555072203998));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-15500000.0d0)) then
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
else if (z <= 19000000000000.0d0) then
tmp = x + (b * (y * 1.6453555072203998d0))
else
tmp = x + (y * 3.13060547623d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -15500000.0) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 19000000000000.0) {
tmp = x + (b * (y * 1.6453555072203998));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -15500000.0: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) elif z <= 19000000000000.0: tmp = x + (b * (y * 1.6453555072203998)) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -15500000.0) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 19000000000000.0) tmp = Float64(x + Float64(b * Float64(y * 1.6453555072203998))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -15500000.0) tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); elseif (z <= 19000000000000.0) tmp = x + (b * (y * 1.6453555072203998)); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -15500000.0], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 19000000000000.0], N[(x + N[(b * N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -15500000:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 19000000000000:\\
\;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -1.55e7Initial program 11.7%
Taylor expanded in z around -inf 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
*-commutative94.2%
distribute-rgt-out--94.2%
metadata-eval94.2%
Simplified94.2%
if -1.55e7 < z < 1.9e13Initial program 99.8%
Taylor expanded in z around 0 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in z around 0 82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in z around 0 82.1%
*-commutative82.1%
associate-*l*82.2%
Simplified82.2%
if 1.9e13 < z Initial program 16.6%
Simplified20.4%
Taylor expanded in z around inf 92.3%
+-commutative92.3%
*-commutative92.3%
Simplified92.3%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.9e+164) (not (<= y 1.45e+162))) (* y 3.13060547623) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.9e+164) || !(y <= 1.45e+162)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-8.9d+164)) .or. (.not. (y <= 1.45d+162))) then
tmp = y * 3.13060547623d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.9e+164) || !(y <= 1.45e+162)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.9e+164) or not (y <= 1.45e+162): tmp = y * 3.13060547623 else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.9e+164) || !(y <= 1.45e+162)) tmp = Float64(y * 3.13060547623); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.9e+164) || ~((y <= 1.45e+162))) tmp = y * 3.13060547623; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.9e+164], N[Not[LessEqual[y, 1.45e+162]], $MachinePrecision]], N[(y * 3.13060547623), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.9 \cdot 10^{+164} \lor \neg \left(y \leq 1.45 \cdot 10^{+162}\right):\\
\;\;\;\;y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.8999999999999999e164 or 1.45000000000000003e162 < y Initial program 61.4%
Simplified66.4%
Taylor expanded in z around inf 45.7%
Taylor expanded in y around inf 39.8%
*-commutative39.8%
Simplified39.8%
if -8.8999999999999999e164 < y < 1.45000000000000003e162Initial program 62.6%
Simplified64.1%
Taylor expanded in y around 0 64.6%
Final simplification57.6%
(FPCore (x y z t a b) :precision binary64 (+ x (* y 3.13060547623)))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + (y * 3.13060547623d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
def code(x, y, z, t, a, b): return x + (y * 3.13060547623)
function code(x, y, z, t, a, b) return Float64(x + Float64(y * 3.13060547623)) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y * 3.13060547623); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 3.13060547623
\end{array}
Initial program 62.2%
Simplified64.7%
Taylor expanded in z around inf 66.1%
+-commutative66.1%
*-commutative66.1%
Simplified66.1%
Final simplification66.1%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 62.2%
Simplified64.7%
Taylor expanded in y around 0 49.5%
Final simplification49.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(*
(+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z)))
(/ y 1.0)))))
(if (< z -6.499344996252632e+53)
t_1
(if (< z 7.066965436914287e+59)
(+
x
(/
y
(/
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((3.13060547623d0 - (36.527041698806414d0 / z)) + (t / (z * z))) * (y / 1.0d0))
if (z < (-6.499344996252632d+53)) then
tmp = t_1
else if (z < 7.066965436914287d+59) then
tmp = x + (y / ((((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0) / ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)) tmp = 0 if z < -6.499344996252632e+53: tmp = t_1 elif z < 7.066965436914287e+59: tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(3.13060547623 - Float64(36.527041698806414 / z)) + Float64(t / Float64(z * z))) * Float64(y / 1.0))) tmp = 0.0 if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = Float64(x + Float64(y / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)); tmp = 0.0; if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(N[(3.13060547623 - N[(36.527041698806414 / z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -6.499344996252632e+53], t$95$1, If[Less[z, 7.066965436914287e+59], N[(x + N[(y / N[(N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\
\mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 7.066965436914287 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024052
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:herbie-target
(if (< z -6.499344996252632e+53) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0))) (if (< z 7.066965436914287e+59) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771) (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)))) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0)))))
(+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))