
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= z -1.1e+16)
(+ x (/ y 14.431876219268936))
(if (<= z 48.0)
(+
(/
(*
y
(+
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+16) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 48.0) {
tmp = ((y * ((z * (0.4917317610505968 + (z * 0.0692910599291889))) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.1d+16)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 48.0d0) then
tmp = ((y * ((z * (0.4917317610505968d0 + (z * 0.0692910599291889d0))) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
else
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+16) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 48.0) {
tmp = ((y * ((z * (0.4917317610505968 + (z * 0.0692910599291889))) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.1e+16: tmp = x + (y / 14.431876219268936) elif z <= 48.0: tmp = ((y * ((z * (0.4917317610505968 + (z * 0.0692910599291889))) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.1e+16) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 48.0) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.1e+16) tmp = x + (y / 14.431876219268936); elseif (z <= 48.0) tmp = ((y * ((z * (0.4917317610505968 + (z * 0.0692910599291889))) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.1e+16], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 48.0], N[(N[(N[(y * N[(N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 48:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -1.1e16Initial program 33.8%
associate-/l*43.6%
fma-def43.6%
fma-def43.6%
fma-def43.6%
Simplified43.6%
Taylor expanded in z around inf 99.9%
if -1.1e16 < z < 48Initial program 99.6%
if 48 < z Initial program 40.8%
associate-/l*49.0%
fma-def49.0%
fma-def49.0%
fma-def49.0%
Simplified49.0%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+290)
(fma
y
(/
(fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
(fma z (+ z 6.012459259764103) 3.350343815022304))
x)
(+ x (/ y 14.431876219268936))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * (0.4917317610505968 + (z * 0.0692910599291889))) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+290) {
tmp = fma(y, (fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, (z + 6.012459259764103), 3.350343815022304)), x);
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+290) tmp = fma(y, Float64(fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)), x); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+290], N[(y * N[(N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision] / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+290}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) < 4.9999999999999998e290Initial program 94.9%
+-commutative94.9%
associate-*r/99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
Simplified99.4%
if 4.9999999999999998e290 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) Initial program 0.2%
associate-/l*4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in z around inf 99.9%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+290)
(+
x
(/
y
(/
(fma (+ z 6.012459259764103) z 3.350343815022304)
(fma
(fma z 0.0692910599291889 0.4917317610505968)
z
0.279195317918525))))
(+ x (/ y 14.431876219268936))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * (0.4917317610505968 + (z * 0.0692910599291889))) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+290) {
tmp = x + (y / (fma((z + 6.012459259764103), z, 3.350343815022304) / fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525)));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+290) tmp = Float64(x + Float64(y / Float64(fma(Float64(z + 6.012459259764103), z, 3.350343815022304) / fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525)))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+290], N[(x + N[(y / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision] / N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+290}:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) < 4.9999999999999998e290Initial program 94.9%
associate-/l*99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
if 4.9999999999999998e290 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) Initial program 0.2%
associate-/l*4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in z around inf 99.9%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1 (* z (+ 0.4917317610505968 (* z 0.0692910599291889)))))
(if (<= (/ (* y (+ t_1 0.279195317918525)) t_0) 5e+290)
(+ x (* y (+ (/ t_1 t_0) (* 0.279195317918525 (/ 1.0 t_0)))))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = z * (0.4917317610505968 + (z * 0.0692910599291889));
double tmp;
if (((y * (t_1 + 0.279195317918525)) / t_0) <= 5e+290) {
tmp = x + (y * ((t_1 / t_0) + (0.279195317918525 * (1.0 / t_0))));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (z * (z + 6.012459259764103d0)) + 3.350343815022304d0
t_1 = z * (0.4917317610505968d0 + (z * 0.0692910599291889d0))
if (((y * (t_1 + 0.279195317918525d0)) / t_0) <= 5d+290) then
tmp = x + (y * ((t_1 / t_0) + (0.279195317918525d0 * (1.0d0 / t_0))))
else
tmp = x + (y / 14.431876219268936d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = z * (0.4917317610505968 + (z * 0.0692910599291889));
double tmp;
if (((y * (t_1 + 0.279195317918525)) / t_0) <= 5e+290) {
tmp = x + (y * ((t_1 / t_0) + (0.279195317918525 * (1.0 / t_0))));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304 t_1 = z * (0.4917317610505968 + (z * 0.0692910599291889)) tmp = 0 if ((y * (t_1 + 0.279195317918525)) / t_0) <= 5e+290: tmp = x + (y * ((t_1 / t_0) + (0.279195317918525 * (1.0 / t_0)))) else: tmp = x + (y / 14.431876219268936) return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) t_1 = Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))) tmp = 0.0 if (Float64(Float64(y * Float64(t_1 + 0.279195317918525)) / t_0) <= 5e+290) tmp = Float64(x + Float64(y * Float64(Float64(t_1 / t_0) + Float64(0.279195317918525 * Float64(1.0 / t_0))))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304; t_1 = z * (0.4917317610505968 + (z * 0.0692910599291889)); tmp = 0.0; if (((y * (t_1 + 0.279195317918525)) / t_0) <= 5e+290) tmp = x + (y * ((t_1 / t_0) + (0.279195317918525 * (1.0 / t_0)))); else tmp = x + (y / 14.431876219268936); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(t$95$1 + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+290], N[(x + N[(y * N[(N[(t$95$1 / t$95$0), $MachinePrecision] + N[(0.279195317918525 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\\
\mathbf{if}\;\frac{y \cdot \left(t_1 + 0.279195317918525\right)}{t_0} \leq 5 \cdot 10^{+290}:\\
\;\;\;\;x + y \cdot \left(\frac{t_1}{t_0} + 0.279195317918525 \cdot \frac{1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) < 4.9999999999999998e290Initial program 94.9%
+-commutative94.9%
associate-*r/99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in y around 0 99.0%
if 4.9999999999999998e290 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) Initial program 0.2%
associate-/l*4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in z around inf 99.9%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+
x
(/
y
(+
14.431876219268936
(/ (- (/ 101.23733352003822 z) 15.646356830292042) z))))
(if (<= z 6.3)
(+ x (/ y (+ (* z 0.39999999996247915) 12.000000000000014)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
} else if (z <= 6.3) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.5d0)) then
tmp = x + (y / (14.431876219268936d0 + (((101.23733352003822d0 / z) - 15.646356830292042d0) / z)))
else if (z <= 6.3d0) then
tmp = x + (y / ((z * 0.39999999996247915d0) + 12.000000000000014d0))
else
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
} else if (z <= 6.3) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))) elif z <= 6.3: tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)) else: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(101.23733352003822 / z) - 15.646356830292042) / z)))); elseif (z <= 6.3) tmp = Float64(x + Float64(y / Float64(Float64(z * 0.39999999996247915) + 12.000000000000014))); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))); elseif (z <= 6.3) tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)); else tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y / N[(14.431876219268936 + N[(N[(N[(101.23733352003822 / z), $MachinePrecision] - 15.646356830292042), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.3], N[(x + N[(y / N[(N[(z * 0.39999999996247915), $MachinePrecision] + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822}{z} - 15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 6.3:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -5.5Initial program 35.0%
associate-/l*44.6%
fma-def44.6%
fma-def44.6%
fma-def44.6%
Simplified44.6%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
unpow299.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
associate--l+99.6%
+-commutative99.6%
associate-/r*99.6%
sub-div99.6%
Applied egg-rr99.6%
if -5.5 < z < 6.29999999999999982Initial program 99.7%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.2%
if 6.29999999999999982 < z Initial program 40.8%
associate-/l*49.0%
fma-def49.0%
fma-def49.0%
fma-def49.0%
Simplified49.0%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 6.2))) (+ x (/ y 14.431876219268936)) (+ x (/ y (+ (* z 0.39999999996247915) 12.000000000000014)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.2)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.5d0)) .or. (.not. (z <= 6.2d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + (y / ((z * 0.39999999996247915d0) + 12.000000000000014d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.2)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 6.2): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 6.2)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(y / Float64(Float64(z * 0.39999999996247915) + 12.000000000000014))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 6.2))) tmp = x + (y / 14.431876219268936); else tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 6.2]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z * 0.39999999996247915), $MachinePrecision] + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 6.2\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 6.20000000000000018 < z Initial program 38.1%
associate-/l*47.0%
fma-def47.0%
fma-def47.0%
fma-def47.0%
Simplified47.0%
Taylor expanded in z around inf 99.1%
if -5.5 < z < 6.20000000000000018Initial program 99.7%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.2%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 6.2))) (+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))) (+ x (/ y (+ (* z 0.39999999996247915) 12.000000000000014)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.2)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.5d0)) .or. (.not. (z <= 6.2d0))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + (y / ((z * 0.39999999996247915d0) + 12.000000000000014d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.2)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 6.2): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 6.2)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(y / Float64(Float64(z * 0.39999999996247915) + 12.000000000000014))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 6.2))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 6.2]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z * 0.39999999996247915), $MachinePrecision] + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 6.2\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 6.20000000000000018 < z Initial program 38.1%
associate-/l*47.0%
fma-def47.0%
fma-def47.0%
fma-def47.0%
Simplified47.0%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -5.5 < z < 6.20000000000000018Initial program 99.7%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.2%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= y -1.7e+234)
(* y 0.08333333333333323)
(if (<= y -1.05e-29)
(* y 0.0692910599291889)
(if (<= y 1.45e+72) x (* y 0.08333333333333323)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.7e+234) {
tmp = y * 0.08333333333333323;
} else if (y <= -1.05e-29) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.45e+72) {
tmp = x;
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-1.7d+234)) then
tmp = y * 0.08333333333333323d0
else if (y <= (-1.05d-29)) then
tmp = y * 0.0692910599291889d0
else if (y <= 1.45d+72) then
tmp = x
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.7e+234) {
tmp = y * 0.08333333333333323;
} else if (y <= -1.05e-29) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.45e+72) {
tmp = x;
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.7e+234: tmp = y * 0.08333333333333323 elif y <= -1.05e-29: tmp = y * 0.0692910599291889 elif y <= 1.45e+72: tmp = x else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.7e+234) tmp = Float64(y * 0.08333333333333323); elseif (y <= -1.05e-29) tmp = Float64(y * 0.0692910599291889); elseif (y <= 1.45e+72) tmp = x; else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.7e+234) tmp = y * 0.08333333333333323; elseif (y <= -1.05e-29) tmp = y * 0.0692910599291889; elseif (y <= 1.45e+72) tmp = x; else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.7e+234], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, -1.05e-29], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[y, 1.45e+72], x, N[(y * 0.08333333333333323), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+234}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-29}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+72}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < -1.7e234 or 1.45000000000000009e72 < y Initial program 68.2%
associate-/l*73.4%
fma-def73.4%
fma-def73.4%
fma-def73.4%
Simplified73.4%
Taylor expanded in z around 0 67.8%
Taylor expanded in x around 0 57.1%
Taylor expanded in z around 0 62.3%
*-commutative62.3%
Simplified62.3%
if -1.7e234 < y < -1.04999999999999995e-29Initial program 54.2%
+-commutative54.2%
associate-*r/68.1%
fma-def68.1%
*-commutative68.1%
fma-def68.1%
fma-def68.2%
*-commutative68.2%
fma-def68.2%
Simplified68.2%
Taylor expanded in z around inf 76.9%
Taylor expanded in y around inf 56.4%
if -1.04999999999999995e-29 < y < 1.45000000000000009e72Initial program 75.9%
+-commutative75.9%
associate-*r/75.9%
fma-def75.9%
*-commutative75.9%
fma-def75.9%
fma-def75.9%
*-commutative75.9%
fma-def75.9%
Simplified75.9%
Taylor expanded in y around 0 75.9%
Final simplification68.3%
(FPCore (x y z)
:precision binary64
(if (<= y -8e+233)
(/ y 12.000000000000014)
(if (<= y -1.05e-29)
(* y 0.0692910599291889)
(if (<= y 1.15e+72) x (/ y 12.000000000000014)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -8e+233) {
tmp = y / 12.000000000000014;
} else if (y <= -1.05e-29) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.15e+72) {
tmp = x;
} else {
tmp = y / 12.000000000000014;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-8d+233)) then
tmp = y / 12.000000000000014d0
else if (y <= (-1.05d-29)) then
tmp = y * 0.0692910599291889d0
else if (y <= 1.15d+72) then
tmp = x
else
tmp = y / 12.000000000000014d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -8e+233) {
tmp = y / 12.000000000000014;
} else if (y <= -1.05e-29) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.15e+72) {
tmp = x;
} else {
tmp = y / 12.000000000000014;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -8e+233: tmp = y / 12.000000000000014 elif y <= -1.05e-29: tmp = y * 0.0692910599291889 elif y <= 1.15e+72: tmp = x else: tmp = y / 12.000000000000014 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -8e+233) tmp = Float64(y / 12.000000000000014); elseif (y <= -1.05e-29) tmp = Float64(y * 0.0692910599291889); elseif (y <= 1.15e+72) tmp = x; else tmp = Float64(y / 12.000000000000014); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -8e+233) tmp = y / 12.000000000000014; elseif (y <= -1.05e-29) tmp = y * 0.0692910599291889; elseif (y <= 1.15e+72) tmp = x; else tmp = y / 12.000000000000014; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -8e+233], N[(y / 12.000000000000014), $MachinePrecision], If[LessEqual[y, -1.05e-29], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[y, 1.15e+72], x, N[(y / 12.000000000000014), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+233}:\\
\;\;\;\;\frac{y}{12.000000000000014}\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-29}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+72}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if y < -7.99999999999999979e233 or 1.15e72 < y Initial program 68.2%
associate-/l*73.4%
fma-def73.4%
fma-def73.4%
fma-def73.4%
Simplified73.4%
Taylor expanded in z around 0 67.8%
Taylor expanded in x around 0 57.1%
Taylor expanded in z around 0 62.4%
if -7.99999999999999979e233 < y < -1.04999999999999995e-29Initial program 54.2%
+-commutative54.2%
associate-*r/68.1%
fma-def68.1%
*-commutative68.1%
fma-def68.1%
fma-def68.2%
*-commutative68.2%
fma-def68.2%
Simplified68.2%
Taylor expanded in z around inf 76.9%
Taylor expanded in y around inf 56.4%
if -1.04999999999999995e-29 < y < 1.15e72Initial program 75.9%
+-commutative75.9%
associate-*r/75.9%
fma-def75.9%
*-commutative75.9%
fma-def75.9%
fma-def75.9%
*-commutative75.9%
fma-def75.9%
Simplified75.9%
Taylor expanded in y around 0 75.9%
Final simplification68.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -4.3e+234) (not (<= y -3.1e+168))) (+ x (/ y 12.000000000000014)) (* y 0.0692910599291889)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.3e+234) || !(y <= -3.1e+168)) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-4.3d+234)) .or. (.not. (y <= (-3.1d+168)))) then
tmp = x + (y / 12.000000000000014d0)
else
tmp = y * 0.0692910599291889d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -4.3e+234) || !(y <= -3.1e+168)) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -4.3e+234) or not (y <= -3.1e+168): tmp = x + (y / 12.000000000000014) else: tmp = y * 0.0692910599291889 return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -4.3e+234) || !(y <= -3.1e+168)) tmp = Float64(x + Float64(y / 12.000000000000014)); else tmp = Float64(y * 0.0692910599291889); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -4.3e+234) || ~((y <= -3.1e+168))) tmp = x + (y / 12.000000000000014); else tmp = y * 0.0692910599291889; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.3e+234], N[Not[LessEqual[y, -3.1e+168]], $MachinePrecision]], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision], N[(y * 0.0692910599291889), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+234} \lor \neg \left(y \leq -3.1 \cdot 10^{+168}\right):\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if y < -4.2999999999999998e234 or -3.09999999999999996e168 < y Initial program 71.7%
associate-/l*73.5%
fma-def73.5%
fma-def73.5%
fma-def73.5%
Simplified73.5%
Taylor expanded in z around 0 81.3%
if -4.2999999999999998e234 < y < -3.09999999999999996e168Initial program 46.9%
+-commutative46.9%
associate-*r/74.4%
fma-def74.4%
*-commutative74.4%
fma-def74.4%
fma-def74.4%
*-commutative74.4%
fma-def74.4%
Simplified74.4%
Taylor expanded in z around inf 77.7%
Taylor expanded in y around inf 72.7%
Final simplification80.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.6))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.6)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.5d0)) .or. (.not. (z <= 5.6d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + (y / 12.000000000000014d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.6)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 5.6): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.6)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 5.6))) tmp = x + (y / 14.431876219268936); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.6]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5.6\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 5.5999999999999996 < z Initial program 38.1%
associate-/l*47.0%
fma-def47.0%
fma-def47.0%
fma-def47.0%
Simplified47.0%
Taylor expanded in z around inf 99.1%
if -5.5 < z < 5.5999999999999996Initial program 99.7%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 98.9%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (<= y -1.05e-29) (* y 0.0692910599291889) (if (<= y 1.3e+72) x (* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.05e-29) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.3e+72) {
tmp = x;
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-1.05d-29)) then
tmp = y * 0.0692910599291889d0
else if (y <= 1.3d+72) then
tmp = x
else
tmp = y * 0.0692910599291889d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.05e-29) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.3e+72) {
tmp = x;
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.05e-29: tmp = y * 0.0692910599291889 elif y <= 1.3e+72: tmp = x else: tmp = y * 0.0692910599291889 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.05e-29) tmp = Float64(y * 0.0692910599291889); elseif (y <= 1.3e+72) tmp = x; else tmp = Float64(y * 0.0692910599291889); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.05e-29) tmp = y * 0.0692910599291889; elseif (y <= 1.3e+72) tmp = x; else tmp = y * 0.0692910599291889; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.05e-29], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[y, 1.3e+72], x, N[(y * 0.0692910599291889), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-29}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+72}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if y < -1.04999999999999995e-29 or 1.29999999999999991e72 < y Initial program 61.9%
+-commutative61.9%
associate-*r/71.3%
fma-def71.3%
*-commutative71.3%
fma-def71.3%
fma-def71.3%
*-commutative71.3%
fma-def71.3%
Simplified71.3%
Taylor expanded in z around inf 65.0%
Taylor expanded in y around inf 49.0%
if -1.04999999999999995e-29 < y < 1.29999999999999991e72Initial program 75.9%
+-commutative75.9%
associate-*r/75.9%
fma-def75.9%
*-commutative75.9%
fma-def75.9%
fma-def75.9%
*-commutative75.9%
fma-def75.9%
Simplified75.9%
Taylor expanded in y around 0 75.9%
Final simplification63.3%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 69.4%
+-commutative69.4%
associate-*r/73.8%
fma-def73.8%
*-commutative73.8%
fma-def73.8%
fma-def73.8%
*-commutative73.8%
fma-def73.8%
Simplified73.8%
Taylor expanded in y around 0 48.4%
Final simplification48.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y)
(- (/ (* 0.40462203869992125 y) (* z z)) x))))
(if (< z -8120153.652456675)
t_0
(if (< z 6.576118972787377e+20)
(+
x
(*
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((0.07512208616047561d0 / z) + 0.0692910599291889d0) * y) - (((0.40462203869992125d0 * y) / (z * z)) - x)
if (z < (-8120153.652456675d0)) then
tmp = t_0
else if (z < 6.576118972787377d+20) then
tmp = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) * (1.0d0 / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x) tmp = 0 if z < -8120153.652456675: tmp = t_0 elif z < 6.576118972787377e+20: tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(0.07512208616047561 / z) + 0.0692910599291889) * y) - Float64(Float64(Float64(0.40462203869992125 * y) / Float64(z * z)) - x)) tmp = 0.0 if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * Float64(1.0 / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x); tmp = 0.0; if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(0.07512208616047561 / z), $MachinePrecision] + 0.0692910599291889), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(0.40462203869992125 * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -8120153.652456675], t$95$0, If[Less[z, 6.576118972787377e+20], N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\
\mathbf{if}\;z < -8120153.652456675:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\
\;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023230
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))