
(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 12 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
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ 3.241970391368047 (* z z))))))
(if (<= z -1.9e+51)
(fma y 3.13060547623 x)
(if (<= z 0.00068)
(+
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
x)
(+
x
(+
(/ y t_1)
(* 0.10203362558171805 (* (/ y (* z z)) (/ t (pow t_1 2.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z)));
double tmp;
if (z <= -1.9e+51) {
tmp = fma(y, 3.13060547623, x);
} else if (z <= 0.00068) {
tmp = ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
} else {
tmp = x + ((y / t_1) + (0.10203362558171805 * ((y / (z * z)) * (t / pow(t_1, 2.0)))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(3.241970391368047 / Float64(z * z)))) tmp = 0.0 if (z <= -1.9e+51) tmp = fma(y, 3.13060547623, x); elseif (z <= 0.00068) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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(Float64(y / t_1) + Float64(0.10203362558171805 * Float64(Float64(y / Float64(z * z)) * Float64(t / (t_1 ^ 2.0)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+51], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 0.00068], N[(N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(N[(y / t$95$1), $MachinePrecision] + N[(0.10203362558171805 * N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(t / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047}{z \cdot z}\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;z \leq 0.00068:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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 + \left(\frac{y}{t_1} + 0.10203362558171805 \cdot \left(\frac{y}{z \cdot z} \cdot \frac{t}{{t_1}^{2}}\right)\right)\\
\end{array}
\end{array}
if z < -1.8999999999999999e51Initial program 2.2%
associate-/l*4.2%
fma-def4.2%
fma-def4.2%
fma-def4.2%
fma-def4.2%
fma-def4.2%
fma-def4.2%
fma-def4.2%
Simplified4.2%
Taylor expanded in z around inf 99.6%
Taylor expanded in x around 0 99.6%
*-commutative99.6%
fma-def99.6%
Simplified99.6%
if -1.8999999999999999e51 < z < 6.8e-4Initial program 99.1%
if 6.8e-4 < z Initial program 20.7%
associate-/l*23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
Simplified23.4%
Taylor expanded in z around inf 85.8%
associate-*r/85.8%
metadata-eval85.8%
mul-1-neg85.8%
*-commutative85.8%
unpow285.8%
Simplified85.8%
Taylor expanded in t around 0 83.2%
associate--l+83.2%
associate-*r/83.2%
metadata-eval83.2%
associate-*r/83.2%
metadata-eval83.2%
unpow283.2%
times-frac95.0%
unpow295.0%
Simplified95.0%
Final simplification98.1%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
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))))
(fma y 3.13060547623 x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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 = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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 = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(y * 3.13060547623 + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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}:\\
\;\;\;\;\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 94.6%
associate-/l*96.8%
fma-def96.8%
fma-def96.8%
fma-def96.8%
fma-def96.8%
fma-def96.8%
fma-def96.8%
fma-def96.8%
Simplified96.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 99.9%
Taylor expanded in x around 0 99.9%
*-commutative99.9%
fma-def99.9%
Simplified99.9%
Final simplification97.9%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
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)))
(fma y 3.13060547623 x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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 = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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 = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(y * 3.13060547623 + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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}:\\
\;\;\;\;\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 94.6%
associate-*l/96.7%
*-commutative96.7%
fma-def96.7%
*-commutative96.7%
fma-def96.7%
*-commutative96.7%
fma-def96.7%
*-commutative96.7%
fma-def96.7%
Simplified96.7%
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 99.9%
Taylor expanded in x around 0 99.9%
*-commutative99.9%
fma-def99.9%
Simplified99.9%
Final simplification97.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 INFINITY) (+ t_1 x) (fma y 3.13060547623 x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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 = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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 = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(y * 3.13060547623 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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}:\\
\;\;\;\;\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 94.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%
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 99.9%
Taylor expanded in x around 0 99.9%
*-commutative99.9%
fma-def99.9%
Simplified99.9%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
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 * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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 * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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 * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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 * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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 94.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%
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 99.9%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -3.9e+21)
t_1
(if (<= z 1.46e-32)
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
0.607771387771))
(if (<= z 4e+52)
(+
x
(/
y
(/
(+
(*
z
(+
(* z (+ (* z (+ z 15.234687407)) 31.4690115749))
11.9400905721))
0.607771387771)
(*
z
(+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623))))))))))
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 <= -3.9e+21) {
tmp = t_1;
} else if (z <= 1.46e-32) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771);
} else if (z <= 4e+52) {
tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))))));
} 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 <= (-3.9d+21)) then
tmp = t_1
else if (z <= 1.46d-32) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / 0.607771387771d0)
else if (z <= 4d+52) then
tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0) / (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0)))))))))
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 <= -3.9e+21) {
tmp = t_1;
} else if (z <= 1.46e-32) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771);
} else if (z <= 4e+52) {
tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -3.9e+21: tmp = t_1 elif z <= 1.46e-32: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771) elif z <= 4e+52: tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) 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 <= -3.9e+21) tmp = t_1; elseif (z <= 1.46e-32) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / 0.607771387771)); elseif (z <= 4e+52) tmp = Float64(x + Float64(y / Float64(Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623)))))))))); 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 <= -3.9e+21) tmp = t_1; elseif (z <= 1.46e-32) tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771); elseif (z <= 4e+52) tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))); 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, -3.9e+21], t$95$1, If[LessEqual[z, 1.46e-32], 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] / 0.607771387771), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+52], N[(x + N[(y / N[(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] / N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $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 -3.9 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{-32}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{y}{\frac{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}{z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.9e21 or 4e52 < z Initial program 8.6%
associate-/l*10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
Simplified10.3%
Taylor expanded in z around inf 98.0%
if -3.9e21 < z < 1.4600000000000001e-32Initial program 99.1%
Taylor expanded in z around 0 96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in z around 0 96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in z around 0 98.7%
if 1.4600000000000001e-32 < z < 4e52Initial program 84.9%
associate-/l*89.7%
fma-def89.7%
fma-def89.7%
fma-def89.7%
fma-def89.7%
fma-def89.7%
fma-def89.7%
fma-def89.7%
Simplified89.7%
Taylor expanded in b around 0 86.7%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -3.9e+22) (not (<= z 3.7e+46)))
(+ x (/ y 0.31942702700572795))
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e+22) || !(z <= 3.7e+46)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771);
}
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 <= (-3.9d+22)) .or. (.not. (z <= 3.7d+46))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / 0.607771387771d0)
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 <= -3.9e+22) || !(z <= 3.7e+46)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.9e+22) or not (z <= 3.7e+46): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.9e+22) || !(z <= 3.7e+46)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / 0.607771387771)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.9e+22) || ~((z <= 3.7e+46))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.9e+22], N[Not[LessEqual[z, 3.7e+46]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], 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] / 0.607771387771), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+22} \lor \neg \left(z \leq 3.7 \cdot 10^{+46}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771}\\
\end{array}
\end{array}
if z < -3.90000000000000021e22 or 3.6999999999999999e46 < z Initial program 8.6%
associate-/l*10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
Simplified10.3%
Taylor expanded in z around inf 98.0%
if -3.90000000000000021e22 < z < 3.6999999999999999e46Initial program 97.3%
Taylor expanded in z around 0 92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in z around 0 92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in z around 0 94.2%
Final simplification95.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -9.5e+29) (not (<= z 410000000000.0)))
(+ x (/ y 0.31942702700572795))
(+
x
(+ (* 1.6453555072203998 (* a (* y z))) (* 1.6453555072203998 (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e+29) || !(z <= 410000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((1.6453555072203998 * (a * (y * z))) + (1.6453555072203998 * (y * b)));
}
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 <= (-9.5d+29)) .or. (.not. (z <= 410000000000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((1.6453555072203998d0 * (a * (y * z))) + (1.6453555072203998d0 * (y * b)))
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 <= -9.5e+29) || !(z <= 410000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((1.6453555072203998 * (a * (y * z))) + (1.6453555072203998 * (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.5e+29) or not (z <= 410000000000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((1.6453555072203998 * (a * (y * z))) + (1.6453555072203998 * (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.5e+29) || !(z <= 410000000000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(1.6453555072203998 * Float64(a * Float64(y * z))) + Float64(1.6453555072203998 * Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.5e+29) || ~((z <= 410000000000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((1.6453555072203998 * (a * (y * z))) + (1.6453555072203998 * (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.5e+29], N[Not[LessEqual[z, 410000000000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(1.6453555072203998 * N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+29} \lor \neg \left(z \leq 410000000000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \left(1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right) + 1.6453555072203998 \cdot \left(y \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -9.5000000000000003e29 or 4.1e11 < z Initial program 14.1%
associate-/l*16.5%
fma-def16.5%
fma-def16.5%
fma-def16.5%
fma-def16.5%
fma-def16.4%
fma-def16.4%
fma-def16.4%
Simplified16.4%
Taylor expanded in z around inf 93.0%
if -9.5000000000000003e29 < z < 4.1e11Initial program 98.4%
associate-*l/99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
Simplified99.0%
Taylor expanded in z around 0 81.3%
Taylor expanded in a around inf 88.4%
Final simplification90.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -12.5)
(+ x (/ y (+ (/ 3.7269864963038164 z) 0.31942702700572795)))
(if (<= z 8.5e+42)
(+ x (/ (* y (+ b (* z a))) (+ 0.607771387771 (* z 11.9400905721))))
(+ x (/ y 0.31942702700572795)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -12.5) {
tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795));
} else if (z <= 8.5e+42) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} 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 <= (-12.5d0)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + 0.31942702700572795d0))
else if (z <= 8.5d+42) then
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * 11.9400905721d0)))
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 <= -12.5) {
tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795));
} else if (z <= 8.5e+42) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y / 0.31942702700572795);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -12.5: tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795)) elif z <= 8.5e+42: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y / 0.31942702700572795) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -12.5) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + 0.31942702700572795))); elseif (z <= 8.5e+42) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); 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 <= -12.5) tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795)); elseif (z <= 8.5e+42) tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y / 0.31942702700572795); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -12.5], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + 0.31942702700572795), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+42], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12.5:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+42}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\end{array}
\end{array}
if z < -12.5Initial program 16.5%
associate-/l*19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
Simplified19.6%
Taylor expanded in z around inf 92.7%
associate-*r/92.7%
metadata-eval92.7%
Simplified92.7%
if -12.5 < z < 8.5000000000000003e42Initial program 97.8%
Taylor expanded in z around 0 95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in z around 0 86.2%
+-commutative86.2%
associate-*r*82.4%
*-commutative82.4%
associate-*r*87.5%
distribute-lft-out88.9%
*-commutative88.9%
Simplified88.9%
if 8.5000000000000003e42 < z Initial program 8.9%
associate-/l*10.6%
fma-def10.6%
fma-def10.6%
fma-def10.6%
fma-def10.6%
fma-def10.6%
fma-def10.6%
fma-def10.6%
Simplified10.6%
Taylor expanded in z around inf 94.9%
Final simplification91.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e+36) (not (<= z 8.5e+42))) (+ x (/ y 0.31942702700572795)) (+ x (* 1.6453555072203998 (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e+36) || !(z <= 8.5e+42)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
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 <= (-6d+36)) .or. (.not. (z <= 8.5d+42))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + (1.6453555072203998d0 * (y * b))
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 <= -6e+36) || !(z <= 8.5e+42)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e+36) or not (z <= 8.5e+42): tmp = x + (y / 0.31942702700572795) else: tmp = x + (1.6453555072203998 * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e+36) || !(z <= 8.5e+42)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e+36) || ~((z <= 8.5e+42))) tmp = x + (y / 0.31942702700572795); else tmp = x + (1.6453555072203998 * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e+36], N[Not[LessEqual[z, 8.5e+42]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+36} \lor \neg \left(z \leq 8.5 \cdot 10^{+42}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\
\end{array}
\end{array}
if z < -6e36 or 8.5000000000000003e42 < z Initial program 6.8%
associate-/l*8.6%
fma-def8.6%
fma-def8.6%
fma-def8.6%
fma-def8.6%
fma-def8.6%
fma-def8.6%
fma-def8.6%
Simplified8.6%
Taylor expanded in z around inf 97.0%
if -6e36 < z < 8.5000000000000003e42Initial program 97.3%
associate-*l/98.4%
*-commutative98.4%
fma-def98.4%
*-commutative98.4%
fma-def98.4%
*-commutative98.4%
fma-def98.4%
*-commutative98.4%
fma-def98.4%
Simplified98.4%
Taylor expanded in z around 0 77.2%
Final simplification85.3%
(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 60.2%
associate-/l*61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
Simplified61.6%
Taylor expanded in z around inf 65.5%
Final simplification65.5%
(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 60.2%
associate-/l*61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
fma-def61.6%
Simplified61.6%
Taylor expanded in z around inf 65.5%
Taylor expanded in x around inf 49.3%
Final simplification49.3%
(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 2023221
(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))))