
(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 14 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
(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)
(+
x
(/
y
(/
(fma
(fma (fma (+ z 15.234687407) z 31.4690115749) z 11.9400905721)
z
0.607771387771)
(fma (fma (fma (fma z 3.13060547623 11.1667541262) z t) z a) z b))))
(+
x
(-
(-
(fma y 3.13060547623 (* (/ y z) (/ t z)))
(/ (* y 36.52704169880642) z))
(fma
98.5170599679272
(/ y (* z z))
(/ (* y -556.47806218377) (* z z)))))))
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 = x + (y / (fma(fma(fma((z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771) / fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b)));
} else {
tmp = x + ((fma(y, 3.13060547623, ((y / z) * (t / z))) - ((y * 36.52704169880642) / z)) - fma(98.5170599679272, (y / (z * z)), ((y * -556.47806218377) / (z * z))));
}
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 = Float64(x + Float64(y / Float64(fma(fma(fma(Float64(z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771) / fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b)))); else tmp = Float64(x + Float64(Float64(fma(y, 3.13060547623, Float64(Float64(y / z) * Float64(t / z))) - Float64(Float64(y * 36.52704169880642) / z)) - fma(98.5170599679272, Float64(y / Float64(z * z)), Float64(Float64(y * -556.47806218377) / Float64(z * z))))); 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[(x + N[(y / N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * 3.13060547623 + N[(N[(y / z), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(98.5170599679272 * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -556.47806218377), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\left(\mathsf{fma}\left(y, 3.13060547623, \frac{y}{z} \cdot \frac{t}{z}\right) - \frac{y \cdot 36.52704169880642}{z}\right) - \mathsf{fma}\left(98.5170599679272, \frac{y}{z \cdot z}, \frac{y \cdot -556.47806218377}{z \cdot z}\right)\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 93.8%
associate-/l*97.2%
fma-def97.3%
fma-def97.2%
fma-def97.2%
fma-def97.2%
fma-def97.2%
fma-def97.2%
fma-def97.2%
Simplified97.2%
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%
associate-*l/0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around -inf 89.2%
+-commutative89.2%
mul-1-neg89.2%
unsub-neg89.2%
*-commutative89.2%
fma-def89.2%
*-commutative89.2%
unpow289.2%
times-frac100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Final simplification98.2%
(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)
(+
x
(*
(/
y
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)))
(+
x
(-
(-
(fma y 3.13060547623 (* (/ y z) (/ t z)))
(/ (* y 36.52704169880642) z))
(fma
98.5170599679272
(/ y (* z z))
(/ (* y -556.47806218377) (* z z)))))))
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 = x + ((y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)) * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b));
} else {
tmp = x + ((fma(y, 3.13060547623, ((y / z) * (t / z))) - ((y * 36.52704169880642) / z)) - fma(98.5170599679272, (y / (z * z)), ((y * -556.47806218377) / (z * z))));
}
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 = Float64(x + Float64(Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)) * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b))); else tmp = Float64(x + Float64(Float64(fma(y, 3.13060547623, Float64(Float64(y / z) * Float64(t / z))) - Float64(Float64(y * 36.52704169880642) / z)) - fma(98.5170599679272, Float64(y / Float64(z * z)), Float64(Float64(y * -556.47806218377) / Float64(z * z))))); 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[(x + N[(N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * 3.13060547623 + N[(N[(y / z), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(98.5170599679272 * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -556.47806218377), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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:\\
\;\;\;\;x + \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)} \cdot \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)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\left(\mathsf{fma}\left(y, 3.13060547623, \frac{y}{z} \cdot \frac{t}{z}\right) - \frac{y \cdot 36.52704169880642}{z}\right) - \mathsf{fma}\left(98.5170599679272, \frac{y}{z \cdot z}, \frac{y \cdot -556.47806218377}{z \cdot z}\right)\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 93.8%
associate-*l/96.6%
*-commutative96.6%
fma-def96.6%
*-commutative96.6%
fma-def96.6%
*-commutative96.6%
fma-def96.6%
*-commutative96.6%
fma-def96.6%
Simplified96.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)) Initial program 0.0%
associate-*l/0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around -inf 89.2%
+-commutative89.2%
mul-1-neg89.2%
unsub-neg89.2%
*-commutative89.2%
fma-def89.2%
*-commutative89.2%
unpow289.2%
times-frac100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Final simplification97.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.5e+43) (not (<= z 5.3e+22)))
(+
x
(-
(-
(fma y 3.13060547623 (* (/ y z) (/ t z)))
(/ (* y 36.52704169880642) z))
(fma 98.5170599679272 (/ y (* z z)) (/ (* y -556.47806218377) (* z z)))))
(+
(/
(*
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 <= -2.5e+43) || !(z <= 5.3e+22)) {
tmp = x + ((fma(y, 3.13060547623, ((y / z) * (t / z))) - ((y * 36.52704169880642) / z)) - fma(98.5170599679272, (y / (z * z)), ((y * -556.47806218377) / (z * z))));
} 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 <= -2.5e+43) || !(z <= 5.3e+22)) tmp = Float64(x + Float64(Float64(fma(y, 3.13060547623, Float64(Float64(y / z) * Float64(t / z))) - Float64(Float64(y * 36.52704169880642) / z)) - fma(98.5170599679272, Float64(y / Float64(z * z)), Float64(Float64(y * -556.47806218377) / Float64(z * z))))); 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, -2.5e+43], N[Not[LessEqual[z, 5.3e+22]], $MachinePrecision]], N[(x + N[(N[(N[(y * 3.13060547623 + N[(N[(y / z), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(98.5170599679272 * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -556.47806218377), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -2.5 \cdot 10^{+43} \lor \neg \left(z \leq 5.3 \cdot 10^{+22}\right):\\
\;\;\;\;x + \left(\left(\mathsf{fma}\left(y, 3.13060547623, \frac{y}{z} \cdot \frac{t}{z}\right) - \frac{y \cdot 36.52704169880642}{z}\right) - \mathsf{fma}\left(98.5170599679272, \frac{y}{z \cdot z}, \frac{y \cdot -556.47806218377}{z \cdot z}\right)\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.5000000000000002e43 or 5.2999999999999998e22 < z Initial program 10.1%
associate-*l/13.6%
*-commutative13.6%
fma-def13.6%
*-commutative13.6%
fma-def13.6%
*-commutative13.6%
fma-def13.6%
*-commutative13.6%
fma-def13.6%
Simplified13.6%
Taylor expanded in z around -inf 89.3%
+-commutative89.3%
mul-1-neg89.3%
unsub-neg89.3%
*-commutative89.3%
fma-def89.3%
*-commutative89.3%
unpow289.3%
times-frac98.3%
distribute-rgt-out--98.3%
metadata-eval98.3%
+-commutative98.3%
fma-def98.3%
Simplified98.3%
if -2.5000000000000002e43 < z < 5.2999999999999998e22Initial program 97.7%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 INFINITY)
(+ t_1 x)
(+
x
(*
y
(/
1.0
(+
0.31942702700572795
(-
(/ 3.7269864963038164 z)
(/ (fma t 0.10203362558171805 3.241970391368047) (* z z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (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 tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1 + x;
} else {
tmp = x + (y * (1.0 / (0.31942702700572795 + ((3.7269864963038164 / z) - (fma(t, 0.10203362558171805, 3.241970391368047) / (z * z))))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = 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)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(y * Float64(1.0 / Float64(0.31942702700572795 + Float64(Float64(3.7269864963038164 / z) - Float64(fma(t, 0.10203362558171805, 3.241970391368047) / Float64(z * z))))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, Infinity], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y * N[(1.0 / N[(0.31942702700572795 + N[(N[(3.7269864963038164 / z), $MachinePrecision] - N[(N[(t * 0.10203362558171805 + 3.241970391368047), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{1}{0.31942702700572795 + \left(\frac{3.7269864963038164}{z} - \frac{\mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z \cdot z}\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 93.8%
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%
associate-/l*0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around inf 97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
associate-*r/97.9%
metadata-eval97.9%
+-commutative97.9%
*-commutative97.9%
fma-def97.9%
unpow297.9%
Simplified97.9%
div-inv97.9%
Applied egg-rr97.9%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 INFINITY) (+ t_1 x) (+ x (/ y 0.31942702700572795)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (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 tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1 + x;
} else {
tmp = x + (y / 0.31942702700572795);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (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 tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1 + x;
} else {
tmp = x + (y / 0.31942702700572795);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) tmp = 0 if t_1 <= math.inf: tmp = t_1 + x else: tmp = x + (y / 0.31942702700572795) return tmp
function code(x, y, z, t, a, b) t_1 = 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)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(y / 0.31942702700572795)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771); tmp = 0.0; if (t_1 <= Inf) tmp = t_1 + x; else tmp = x + (y / 0.31942702700572795); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, Infinity], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\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 93.8%
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%
associate-/l*0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around inf 97.9%
Final simplification95.3%
(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 (+ x (/ y 0.31942702700572795))))
(if (<= z -2.6e+122)
t_2
(if (<= z -3.2e+41)
(+ x (/ (* y (/ t z)) z))
(if (<= z -47000000000000.0)
(+ x (/ (+ (* a (* y z)) (* y b)) t_1))
(if (<= z 9.5e+26)
(+
x
(/ (* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262))))))) t_1))
t_2))))))
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 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_2;
} else if (z <= -3.2e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= -47000000000000.0) {
tmp = x + (((a * (y * z)) + (y * b)) / t_1);
} else if (z <= 9.5e+26) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1);
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0
t_2 = x + (y / 0.31942702700572795d0)
if (z <= (-2.6d+122)) then
tmp = t_2
else if (z <= (-3.2d+41)) then
tmp = x + ((y * (t / z)) / z)
else if (z <= (-47000000000000.0d0)) then
tmp = x + (((a * (y * z)) + (y * b)) / t_1)
else if (z <= 9.5d+26) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / t_1)
else
tmp = t_2
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 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
double t_2 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_2;
} else if (z <= -3.2e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= -47000000000000.0) {
tmp = x + (((a * (y * z)) + (y * b)) / t_1);
} else if (z <= 9.5e+26) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1);
} else {
tmp = t_2;
}
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 = x + (y / 0.31942702700572795) tmp = 0 if z <= -2.6e+122: tmp = t_2 elif z <= -3.2e+41: tmp = x + ((y * (t / z)) / z) elif z <= -47000000000000.0: tmp = x + (((a * (y * z)) + (y * b)) / t_1) elif z <= 9.5e+26: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1) else: tmp = t_2 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(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -2.6e+122) tmp = t_2; elseif (z <= -3.2e+41) tmp = Float64(x + Float64(Float64(y * Float64(t / z)) / z)); elseif (z <= -47000000000000.0) tmp = Float64(x + Float64(Float64(Float64(a * Float64(y * z)) + Float64(y * b)) / t_1)); elseif (z <= 9.5e+26) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / t_1)); else tmp = t_2; 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 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -2.6e+122) tmp = t_2; elseif (z <= -3.2e+41) tmp = x + ((y * (t / z)) / z); elseif (z <= -47000000000000.0) tmp = x + (((a * (y * z)) + (y * b)) / t_1); elseif (z <= 9.5e+26) tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1); else tmp = t_2; 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[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+122], t$95$2, If[LessEqual[z, -3.2e+41], N[(x + N[(N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -47000000000000.0], N[(x + N[(N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+26], 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] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\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 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+122}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y \cdot \frac{t}{z}}{z}\\
\mathbf{elif}\;z \leq -47000000000000:\\
\;\;\;\;x + \frac{a \cdot \left(y \cdot z\right) + y \cdot b}{t_1}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.60000000000000007e122 or 9.50000000000000054e26 < z Initial program 4.3%
associate-/l*5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
Simplified5.3%
Taylor expanded in z around inf 98.9%
if -2.60000000000000007e122 < z < -3.2000000000000001e41Initial program 42.5%
Taylor expanded in t around inf 65.2%
*-commutative65.2%
associate-*l*48.0%
unpow248.0%
associate-*l*48.0%
Simplified48.0%
Taylor expanded in z around inf 82.6%
*-commutative82.6%
unpow282.6%
times-frac82.7%
Simplified82.7%
associate-*l/88.1%
Applied egg-rr88.1%
if -3.2000000000000001e41 < z < -4.7e13Initial program 75.0%
Taylor expanded in z around 0 75.2%
if -4.7e13 < z < 9.50000000000000054e26Initial program 99.0%
Taylor expanded in z around 0 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -2.6e+122)
t_1
(if (<= z -3.5e+41)
(+ x (/ (* y (/ t z)) z))
(if (<= z -11200000000000.0)
(+
x
(/
(+ (* a (* y z)) (* y b))
(+
(*
z
(+
(* z (+ (* z (+ z 15.234687407)) 31.4690115749))
11.9400905721))
0.607771387771)))
(if (<= z 1.05e+27)
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+
0.607771387771
(* z (+ 11.9400905721 (* z (+ 31.4690115749 (* z z))))))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -3.5e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= -11200000000000.0) {
tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} else if (z <= 1.05e+27) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z)))))));
} 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 + (y / 0.31942702700572795d0)
if (z <= (-2.6d+122)) then
tmp = t_1
else if (z <= (-3.5d+41)) then
tmp = x + ((y * (t / z)) / z)
else if (z <= (-11200000000000.0d0)) then
tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
else if (z <= 1.05d+27) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * z)))))))
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 + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -3.5e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= -11200000000000.0) {
tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} else if (z <= 1.05e+27) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -2.6e+122: tmp = t_1 elif z <= -3.5e+41: tmp = x + ((y * (t / z)) / z) elif z <= -11200000000000.0: tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) elif z <= 1.05e+27: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -2.6e+122) tmp = t_1; elseif (z <= -3.5e+41) tmp = Float64(x + Float64(Float64(y * Float64(t / z)) / z)); elseif (z <= -11200000000000.0) tmp = Float64(x + Float64(Float64(Float64(a * Float64(y * z)) + Float64(y * b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))); elseif (z <= 1.05e+27) 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 * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * z)))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -2.6e+122) tmp = t_1; elseif (z <= -3.5e+41) tmp = x + ((y * (t / z)) / z); elseif (z <= -11200000000000.0) tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); elseif (z <= 1.05e+27) tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+122], t$95$1, If[LessEqual[z, -3.5e+41], N[(x + N[(N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -11200000000000.0], N[(x + N[(N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 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]), $MachinePrecision], If[LessEqual[z, 1.05e+27], 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 * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y \cdot \frac{t}{z}}{z}\\
\mathbf{elif}\;z \leq -11200000000000:\\
\;\;\;\;x + \frac{a \cdot \left(y \cdot z\right) + y \cdot b}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+27}:\\
\;\;\;\;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 \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot z\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.60000000000000007e122 or 1.04999999999999997e27 < z Initial program 4.3%
associate-/l*5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
Simplified5.3%
Taylor expanded in z around inf 98.9%
if -2.60000000000000007e122 < z < -3.4999999999999999e41Initial program 42.5%
Taylor expanded in t around inf 65.2%
*-commutative65.2%
associate-*l*48.0%
unpow248.0%
associate-*l*48.0%
Simplified48.0%
Taylor expanded in z around inf 82.6%
*-commutative82.6%
unpow282.6%
times-frac82.7%
Simplified82.7%
associate-*l/88.1%
Applied egg-rr88.1%
if -3.4999999999999999e41 < z < -1.12e13Initial program 75.0%
Taylor expanded in z around 0 75.2%
if -1.12e13 < z < 1.04999999999999997e27Initial program 99.0%
Taylor expanded in z around 0 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in z around inf 98.3%
unpow298.3%
Simplified98.3%
Final simplification97.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -2.6e+122)
t_1
(if (<= z -3.6e+41)
(+ x (/ (* y (/ t z)) z))
(if (<= z 1.95e+26)
(+
x
(/
(+ (* a (* y z)) (* y b))
(+
(*
z
(+
(* z (+ (* z (+ z 15.234687407)) 31.4690115749))
11.9400905721))
0.607771387771)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -3.6e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= 1.95e+26) {
tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} 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 + (y / 0.31942702700572795d0)
if (z <= (-2.6d+122)) then
tmp = t_1
else if (z <= (-3.6d+41)) then
tmp = x + ((y * (t / z)) / z)
else if (z <= 1.95d+26) then
tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
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 + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -3.6e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= 1.95e+26) {
tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -2.6e+122: tmp = t_1 elif z <= -3.6e+41: tmp = x + ((y * (t / z)) / z) elif z <= 1.95e+26: tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -2.6e+122) tmp = t_1; elseif (z <= -3.6e+41) tmp = Float64(x + Float64(Float64(y * Float64(t / z)) / z)); elseif (z <= 1.95e+26) tmp = Float64(x + Float64(Float64(Float64(a * Float64(y * z)) + Float64(y * b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -2.6e+122) tmp = t_1; elseif (z <= -3.6e+41) tmp = x + ((y * (t / z)) / z); elseif (z <= 1.95e+26) tmp = x + (((a * (y * z)) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+122], t$95$1, If[LessEqual[z, -3.6e+41], N[(x + N[(N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+26], N[(x + N[(N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 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]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y \cdot \frac{t}{z}}{z}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{a \cdot \left(y \cdot z\right) + y \cdot b}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.60000000000000007e122 or 1.95e26 < z Initial program 4.3%
associate-/l*5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
Simplified5.3%
Taylor expanded in z around inf 98.9%
if -2.60000000000000007e122 < z < -3.60000000000000025e41Initial program 42.5%
Taylor expanded in t around inf 65.2%
*-commutative65.2%
associate-*l*48.0%
unpow248.0%
associate-*l*48.0%
Simplified48.0%
Taylor expanded in z around inf 82.6%
*-commutative82.6%
unpow282.6%
times-frac82.7%
Simplified82.7%
associate-*l/88.1%
Applied egg-rr88.1%
if -3.60000000000000025e41 < z < 1.95e26Initial program 97.7%
Taylor expanded in z around 0 92.2%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -2.6e+122)
t_1
(if (<= z -5.4e+41)
(+ x (/ (* y (/ t z)) z))
(if (<= z 7.8e+25)
(+
x
(* y (+ (* b 1.6453555072203998) (* 1.6453555072203998 (* z a)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -5.4e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= 7.8e+25) {
tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a))));
} 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 + (y / 0.31942702700572795d0)
if (z <= (-2.6d+122)) then
tmp = t_1
else if (z <= (-5.4d+41)) then
tmp = x + ((y * (t / z)) / z)
else if (z <= 7.8d+25) then
tmp = x + (y * ((b * 1.6453555072203998d0) + (1.6453555072203998d0 * (z * a))))
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 + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -5.4e+41) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= 7.8e+25) {
tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -2.6e+122: tmp = t_1 elif z <= -5.4e+41: tmp = x + ((y * (t / z)) / z) elif z <= 7.8e+25: tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -2.6e+122) tmp = t_1; elseif (z <= -5.4e+41) tmp = Float64(x + Float64(Float64(y * Float64(t / z)) / z)); elseif (z <= 7.8e+25) tmp = Float64(x + Float64(y * Float64(Float64(b * 1.6453555072203998) + Float64(1.6453555072203998 * Float64(z * a))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -2.6e+122) tmp = t_1; elseif (z <= -5.4e+41) tmp = x + ((y * (t / z)) / z); elseif (z <= 7.8e+25) tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+122], t$95$1, If[LessEqual[z, -5.4e+41], N[(x + N[(N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+25], N[(x + N[(y * N[(N[(b * 1.6453555072203998), $MachinePrecision] + N[(1.6453555072203998 * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y \cdot \frac{t}{z}}{z}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + 1.6453555072203998 \cdot \left(z \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.60000000000000007e122 or 7.8000000000000004e25 < z Initial program 4.3%
associate-/l*5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
Simplified5.3%
Taylor expanded in z around inf 98.9%
if -2.60000000000000007e122 < z < -5.39999999999999999e41Initial program 42.5%
Taylor expanded in t around inf 65.2%
*-commutative65.2%
associate-*l*48.0%
unpow248.0%
associate-*l*48.0%
Simplified48.0%
Taylor expanded in z around inf 82.6%
*-commutative82.6%
unpow282.6%
times-frac82.7%
Simplified82.7%
associate-*l/88.1%
Applied egg-rr88.1%
if -5.39999999999999999e41 < z < 7.8000000000000004e25Initial program 97.7%
associate-*l/98.2%
*-commutative98.2%
fma-def98.3%
*-commutative98.3%
fma-def98.3%
*-commutative98.3%
fma-def98.3%
*-commutative98.3%
fma-def98.3%
Simplified98.3%
Taylor expanded in z around 0 79.0%
Taylor expanded in y around 0 89.6%
Taylor expanded in a around inf 89.7%
*-commutative89.7%
*-commutative89.7%
Simplified89.7%
Final simplification93.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -2.6e+122)
t_1
(if (<= z -2.2e+45)
(+ x (/ (* y (/ t z)) z))
(if (<= z -4.2e-7)
(+ x (* (* a (* y z)) 1.6453555072203998))
(if (<= z 1.3e+21) (+ x (* (* y b) 1.6453555072203998)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -2.2e+45) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= -4.2e-7) {
tmp = x + ((a * (y * z)) * 1.6453555072203998);
} else if (z <= 1.3e+21) {
tmp = x + ((y * b) * 1.6453555072203998);
} 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 + (y / 0.31942702700572795d0)
if (z <= (-2.6d+122)) then
tmp = t_1
else if (z <= (-2.2d+45)) then
tmp = x + ((y * (t / z)) / z)
else if (z <= (-4.2d-7)) then
tmp = x + ((a * (y * z)) * 1.6453555072203998d0)
else if (z <= 1.3d+21) then
tmp = x + ((y * b) * 1.6453555072203998d0)
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 + (y / 0.31942702700572795);
double tmp;
if (z <= -2.6e+122) {
tmp = t_1;
} else if (z <= -2.2e+45) {
tmp = x + ((y * (t / z)) / z);
} else if (z <= -4.2e-7) {
tmp = x + ((a * (y * z)) * 1.6453555072203998);
} else if (z <= 1.3e+21) {
tmp = x + ((y * b) * 1.6453555072203998);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -2.6e+122: tmp = t_1 elif z <= -2.2e+45: tmp = x + ((y * (t / z)) / z) elif z <= -4.2e-7: tmp = x + ((a * (y * z)) * 1.6453555072203998) elif z <= 1.3e+21: tmp = x + ((y * b) * 1.6453555072203998) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -2.6e+122) tmp = t_1; elseif (z <= -2.2e+45) tmp = Float64(x + Float64(Float64(y * Float64(t / z)) / z)); elseif (z <= -4.2e-7) tmp = Float64(x + Float64(Float64(a * Float64(y * z)) * 1.6453555072203998)); elseif (z <= 1.3e+21) tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -2.6e+122) tmp = t_1; elseif (z <= -2.2e+45) tmp = x + ((y * (t / z)) / z); elseif (z <= -4.2e-7) tmp = x + ((a * (y * z)) * 1.6453555072203998); elseif (z <= 1.3e+21) tmp = x + ((y * b) * 1.6453555072203998); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+122], t$95$1, If[LessEqual[z, -2.2e+45], N[(x + N[(N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-7], N[(x + N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+21], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{+45}:\\
\;\;\;\;x + \frac{y \cdot \frac{t}{z}}{z}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-7}:\\
\;\;\;\;x + \left(a \cdot \left(y \cdot z\right)\right) \cdot 1.6453555072203998\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+21}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.60000000000000007e122 or 1.3e21 < z Initial program 4.3%
associate-/l*5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
fma-def5.3%
Simplified5.3%
Taylor expanded in z around inf 98.9%
if -2.60000000000000007e122 < z < -2.2e45Initial program 45.1%
Taylor expanded in t around inf 63.0%
*-commutative63.0%
associate-*l*44.8%
unpow244.8%
associate-*l*44.8%
Simplified44.8%
Taylor expanded in z around inf 81.6%
*-commutative81.6%
unpow281.6%
times-frac81.6%
Simplified81.6%
associate-*l/87.4%
Applied egg-rr87.4%
if -2.2e45 < z < -4.2e-7Initial program 72.7%
associate-*l/90.6%
*-commutative90.6%
fma-def90.6%
*-commutative90.6%
fma-def90.6%
*-commutative90.6%
fma-def90.6%
*-commutative90.6%
fma-def90.6%
Simplified90.5%
Taylor expanded in z around 0 47.1%
Taylor expanded in y around 0 46.8%
Taylor expanded in b around 0 56.3%
if -4.2e-7 < z < 1.3e21Initial program 99.0%
associate-*l/98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
Simplified98.9%
Taylor expanded in z around 0 81.6%
*-commutative81.6%
Simplified81.6%
Final simplification87.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1920.0) (not (<= z 1.62e+22))) (+ x (/ y 0.31942702700572795)) (+ x (* (* y b) 1.6453555072203998))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1920.0) || !(z <= 1.62e+22)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * b) * 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 <= (-1920.0d0)) .or. (.not. (z <= 1.62d+22))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * b) * 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 <= -1920.0) || !(z <= 1.62e+22)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * b) * 1.6453555072203998);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1920.0) or not (z <= 1.62e+22): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * b) * 1.6453555072203998) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1920.0) || !(z <= 1.62e+22)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1920.0) || ~((z <= 1.62e+22))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * b) * 1.6453555072203998); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1920.0], N[Not[LessEqual[z, 1.62e+22]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1920 \lor \neg \left(z \leq 1.62 \cdot 10^{+22}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\end{array}
\end{array}
if z < -1920 or 1.62e22 < z Initial program 15.9%
associate-/l*19.9%
fma-def19.9%
fma-def19.9%
fma-def19.9%
fma-def19.9%
fma-def19.9%
fma-def19.9%
fma-def19.9%
Simplified19.9%
Taylor expanded in z around inf 89.6%
if -1920 < z < 1.62e22Initial program 99.0%
associate-*l/98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
Simplified98.9%
Taylor expanded in z around 0 81.6%
*-commutative81.6%
Simplified81.6%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -7200.0)
(+ x (/ y (+ 0.31942702700572795 (/ 3.7269864963038164 z))))
(if (<= z 9.2e+22)
(+ x (* (* y b) 1.6453555072203998))
(+ x (/ y 0.31942702700572795)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7200.0) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 9.2e+22) {
tmp = x + ((y * b) * 1.6453555072203998);
} else {
tmp = x + (y / 0.31942702700572795);
}
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 <= (-7200.0d0)) then
tmp = x + (y / (0.31942702700572795d0 + (3.7269864963038164d0 / z)))
else if (z <= 9.2d+22) then
tmp = x + ((y * b) * 1.6453555072203998d0)
else
tmp = x + (y / 0.31942702700572795d0)
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 <= -7200.0) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 9.2e+22) {
tmp = x + ((y * b) * 1.6453555072203998);
} else {
tmp = x + (y / 0.31942702700572795);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7200.0: tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))) elif z <= 9.2e+22: tmp = x + ((y * b) * 1.6453555072203998) else: tmp = x + (y / 0.31942702700572795) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7200.0) tmp = Float64(x + Float64(y / Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)))); elseif (z <= 9.2e+22) tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998)); else tmp = Float64(x + Float64(y / 0.31942702700572795)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7200.0) tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))); elseif (z <= 9.2e+22) tmp = x + ((y * b) * 1.6453555072203998); else tmp = x + (y / 0.31942702700572795); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7200.0], N[(x + N[(y / N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+22], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7200:\\
\;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+22}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\end{array}
\end{array}
if z < -7200Initial program 23.8%
associate-/l*29.8%
fma-def29.8%
fma-def29.8%
fma-def29.8%
fma-def29.8%
fma-def29.8%
fma-def29.8%
fma-def29.8%
Simplified29.8%
Taylor expanded in z around inf 82.1%
associate-*r/82.1%
metadata-eval82.1%
Simplified82.1%
if -7200 < z < 9.2000000000000008e22Initial program 99.0%
associate-*l/98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
Simplified98.9%
Taylor expanded in z around 0 81.6%
*-commutative81.6%
Simplified81.6%
if 9.2000000000000008e22 < z Initial program 7.1%
associate-/l*8.8%
fma-def8.8%
fma-def8.8%
fma-def8.8%
fma-def8.8%
fma-def8.8%
fma-def8.8%
fma-def8.8%
Simplified8.8%
Taylor expanded in z around inf 98.3%
Final simplification85.4%
(FPCore (x y z t a b) :precision binary64 (+ x (/ y 0.31942702700572795)))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y / 0.31942702700572795);
}
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 / 0.31942702700572795d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y / 0.31942702700572795);
}
def code(x, y, z, t, a, b): return x + (y / 0.31942702700572795)
function code(x, y, z, t, a, b) return Float64(x + Float64(y / 0.31942702700572795)) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y / 0.31942702700572795); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{0.31942702700572795}
\end{array}
Initial program 59.7%
associate-/l*61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
Simplified61.9%
Taylor expanded in z around inf 62.7%
Final simplification62.7%
(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 59.7%
associate-/l*61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
fma-def61.9%
Simplified61.9%
Taylor expanded in z around inf 62.7%
Taylor expanded in x around inf 47.6%
Final simplification47.6%
(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 2023290
(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))))