
(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 15 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 -1850000.0)
(+
x
(/
y
(+
14.431876219268936
(/ (- (/ 101.23733352003822 z) 15.646356830292042) z))))
(if (<= z 1850000000.0)
(+
x
(/
(*
y
(+
0.279195317918525
(*
z
(+ 0.4917317610505968 (pow (cbrt (* z 0.0692910599291889)) 3.0)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1850000.0) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
} else if (z <= 1850000000.0) {
tmp = x + ((y * (0.279195317918525 + (z * (0.4917317610505968 + pow(cbrt((z * 0.0692910599291889)), 3.0))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1850000.0) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
} else if (z <= 1850000000.0) {
tmp = x + ((y * (0.279195317918525 + (z * (0.4917317610505968 + Math.pow(Math.cbrt((z * 0.0692910599291889)), 3.0))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -1850000.0) tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(101.23733352003822 / z) - 15.646356830292042) / z)))); elseif (z <= 1850000000.0) tmp = Float64(x + Float64(Float64(y * Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + (cbrt(Float64(z * 0.0692910599291889)) ^ 3.0))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -1850000.0], 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, 1850000000.0], N[(x + N[(N[(y * N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[Power[N[Power[N[(z * 0.0692910599291889), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1850000:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822}{z} - 15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 1850000000:\\
\;\;\;\;x + \frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + {\left(\sqrt[3]{z \cdot 0.0692910599291889}\right)}^{3}\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if z < -1.85e6Initial program 46.2%
associate-/l*55.3%
fma-def55.3%
fma-def55.3%
fma-def55.3%
Simplified55.3%
Taylor expanded in z around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
associate-/r*99.9%
sub-div99.9%
Applied egg-rr99.9%
if -1.85e6 < z < 1.85e9Initial program 99.6%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
if 1.85e9 < z Initial program 22.1%
associate-/l*37.5%
fma-def37.5%
fma-def37.5%
fma-def37.5%
Simplified37.5%
Taylor expanded in z around inf 99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+305)
(+
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 * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) {
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(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) 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[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+305], 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(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+305}:\\
\;\;\;\;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)) < 5.00000000000000009e305Initial program 95.4%
associate-/l*99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
if 5.00000000000000009e305 < (/.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.7%
associate-/l*10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
Simplified10.7%
Taylor expanded in z around inf 99.9%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+305)
(+
x
(*
(/ y (fma z (+ z 6.012459259764103) 3.350343815022304))
(fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)))
(+ x (/ y 14.431876219268936))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) {
tmp = x + ((y / fma(z, (z + 6.012459259764103), 3.350343815022304)) * fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 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(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) tmp = Float64(x + Float64(Float64(y / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)) * fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 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[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+305], N[(x + N[(N[(y / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] * N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $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(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+305}:\\
\;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)} \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 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)) < 5.00000000000000009e305Initial program 95.4%
associate-*l/99.2%
*-commutative99.2%
fma-def99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
Simplified99.2%
if 5.00000000000000009e305 < (/.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.7%
associate-/l*10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
Simplified10.7%
Taylor expanded in z around inf 99.9%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= z -560000.0)
(+
x
(/
y
(+
14.431876219268936
(/ (- (/ 101.23733352003822 z) 15.646356830292042) z))))
(if (<= z 1850000000.0)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -560000.0) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
} else if (z <= 1850000000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} 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) :: tmp
if (z <= (-560000.0d0)) then
tmp = x + (y / (14.431876219268936d0 + (((101.23733352003822d0 / z) - 15.646356830292042d0) / z)))
else if (z <= 1850000000.0d0) then
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
else
tmp = x + (y / 14.431876219268936d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -560000.0) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
} else if (z <= 1850000000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -560000.0: tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))) elif z <= 1850000000.0: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + (y / 14.431876219268936) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -560000.0) tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(101.23733352003822 / z) - 15.646356830292042) / z)))); elseif (z <= 1850000000.0) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -560000.0) tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))); elseif (z <= 1850000000.0) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + (y / 14.431876219268936); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -560000.0], 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, 1850000000.0], N[(N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $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 / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -560000:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822}{z} - 15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 1850000000:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if z < -5.6e5Initial program 46.2%
associate-/l*55.3%
fma-def55.3%
fma-def55.3%
fma-def55.3%
Simplified55.3%
Taylor expanded in z around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
associate-/r*99.9%
sub-div99.9%
Applied egg-rr99.9%
if -5.6e5 < z < 1.85e9Initial program 99.6%
if 1.85e9 < z Initial program 22.1%
associate-/l*37.5%
fma-def37.5%
fma-def37.5%
fma-def37.5%
Simplified37.5%
Taylor expanded in z around inf 99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5) (not (<= z 1.7e-15)))
(+
x
(/
y
(+
14.431876219268936
(/ (- (/ 101.23733352003822 z) 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 <= 1.7e-15)) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 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 <= 1.7d-15))) then
tmp = x + (y / (14.431876219268936d0 + (((101.23733352003822d0 / z) - 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 <= 1.7e-15)) {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 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 <= 1.7e-15): tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 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 <= 1.7e-15)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(101.23733352003822 / z) - 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 <= 1.7e-15))) tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 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, 1.7e-15]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 + N[(N[(N[(101.23733352003822 / z), $MachinePrecision] - 15.646356830292042), $MachinePrecision] / 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 1.7 \cdot 10^{-15}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822}{z} - 15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 1.7e-15 < z Initial program 37.4%
associate-/l*49.0%
fma-def49.0%
fma-def49.0%
fma-def49.0%
Simplified49.0%
Taylor expanded in z around inf 99.1%
associate--l+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
associate-/r*99.1%
sub-div99.1%
Applied egg-rr99.1%
if -5.5 < z < 1.7e-15Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.3%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+
x
(/
y
(+
(+ 14.431876219268936 (/ 101.23733352003822 (* z z)))
(/ -15.646356830292042 z))))
(if (<= z 1.7e-15)
(+ x (/ y (+ (* z 0.39999999996247915) 12.000000000000014)))
(+
x
(/
y
(+
14.431876219268936
(/ (- (/ 101.23733352003822 z) 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 * z))) + (-15.646356830292042 / z)));
} else if (z <= 1.7e-15) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} else {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 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 * z))) + ((-15.646356830292042d0) / z)))
else if (z <= 1.7d-15) then
tmp = x + (y / ((z * 0.39999999996247915d0) + 12.000000000000014d0))
else
tmp = x + (y / (14.431876219268936d0 + (((101.23733352003822d0 / z) - 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 * z))) + (-15.646356830292042 / z)));
} else if (z <= 1.7e-15) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} else {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / (z * z))) + (-15.646356830292042 / z))) elif z <= 1.7e-15: tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)) else: tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y / Float64(Float64(14.431876219268936 + Float64(101.23733352003822 / Float64(z * z))) + Float64(-15.646356830292042 / z)))); elseif (z <= 1.7e-15) tmp = Float64(x + Float64(y / Float64(Float64(z * 0.39999999996247915) + 12.000000000000014))); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(101.23733352003822 / z) - 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 * z))) + (-15.646356830292042 / z))); elseif (z <= 1.7e-15) tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)); else tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y / N[(N[(14.431876219268936 + N[(101.23733352003822 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-15], N[(x + N[(y / N[(N[(z * 0.39999999996247915), $MachinePrecision] + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 + N[(N[(N[(101.23733352003822 / z), $MachinePrecision] - 15.646356830292042), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \frac{y}{\left(14.431876219268936 + \frac{101.23733352003822}{z \cdot z}\right) + \frac{-15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-15}:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822}{z} - 15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -5.5Initial program 47.9%
associate-/l*56.7%
fma-def56.7%
fma-def56.7%
fma-def56.7%
Simplified56.7%
Taylor expanded in z around inf 99.2%
associate--l+99.2%
associate-*r/99.2%
metadata-eval99.2%
unpow299.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
associate-/r*99.2%
sub-div99.2%
Applied egg-rr99.2%
Taylor expanded in y around 0 99.2%
cancel-sign-sub-inv99.2%
associate-*r/99.2%
metadata-eval99.2%
unpow299.2%
metadata-eval99.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
if -5.5 < z < 1.7e-15Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.3%
if 1.7e-15 < z Initial program 26.8%
associate-/l*41.3%
fma-def41.3%
fma-def41.3%
fma-def41.3%
Simplified41.3%
Taylor expanded in z around inf 99.1%
associate--l+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
associate-/r*99.1%
sub-div99.1%
Applied egg-rr99.1%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.7e-15))) (+ 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 <= 1.7e-15)) {
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 <= 1.7d-15))) 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 <= 1.7e-15)) {
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 <= 1.7e-15): 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 <= 1.7e-15)) 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 <= 1.7e-15))) 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, 1.7e-15]], $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 1.7 \cdot 10^{-15}\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 1.7e-15 < z Initial program 37.4%
associate-/l*49.0%
fma-def49.0%
fma-def49.0%
fma-def49.0%
Simplified49.0%
Taylor expanded in z around inf 98.5%
if -5.5 < z < 1.7e-15Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.3%
Final simplification98.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.7e-15))) (+ 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 <= 1.7e-15)) {
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 <= 1.7d-15))) 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 <= 1.7e-15)) {
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 <= 1.7e-15): 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 <= 1.7e-15)) 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 <= 1.7e-15))) 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, 1.7e-15]], $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 1.7 \cdot 10^{-15}\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 1.7e-15 < z Initial program 37.4%
associate-/l*49.0%
fma-def49.0%
fma-def49.0%
fma-def49.0%
Simplified49.0%
Taylor expanded in z around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
if -5.5 < z < 1.7e-15Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.3%
Final simplification99.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.7e-15))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.7e-15)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (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 ((z <= (-5.5d0)) .or. (.not. (z <= 1.7d-15))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.7e-15)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.7e-15): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.7e-15)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.7e-15))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.7e-15]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.7 \cdot 10^{-15}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 1.7e-15 < z Initial program 37.4%
associate-*l/48.3%
*-commutative48.3%
fma-def48.3%
*-commutative48.3%
fma-def48.3%
fma-def48.3%
Simplified48.3%
Taylor expanded in z around inf 98.2%
*-commutative98.2%
Simplified98.2%
if -5.5 < z < 1.7e-15Initial program 99.6%
associate-*l/99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around 0 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification98.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.7e-15))) (+ x (* y 0.0692910599291889)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.7e-15)) {
tmp = x + (y * 0.0692910599291889);
} 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 <= 1.7d-15))) then
tmp = x + (y * 0.0692910599291889d0)
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 <= 1.7e-15)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.7e-15): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.7e-15)) tmp = Float64(x + Float64(y * 0.0692910599291889)); 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 <= 1.7e-15))) tmp = x + (y * 0.0692910599291889); 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, 1.7e-15]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $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 1.7 \cdot 10^{-15}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 1.7e-15 < z Initial program 37.4%
associate-*l/48.3%
*-commutative48.3%
fma-def48.3%
*-commutative48.3%
fma-def48.3%
fma-def48.3%
Simplified48.3%
Taylor expanded in z around inf 98.2%
*-commutative98.2%
Simplified98.2%
if -5.5 < z < 1.7e-15Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.0%
Final simplification98.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.7e-15))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.7e-15)) {
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 <= 1.7d-15))) 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 <= 1.7e-15)) {
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 <= 1.7e-15): 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 <= 1.7e-15)) 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 <= 1.7e-15))) 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, 1.7e-15]], $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 1.7 \cdot 10^{-15}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 1.7e-15 < z Initial program 37.4%
associate-/l*49.0%
fma-def49.0%
fma-def49.0%
fma-def49.0%
Simplified49.0%
Taylor expanded in z around inf 98.5%
if -5.5 < z < 1.7e-15Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.0%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (<= x -9e-97) x (if (<= x 4.9e+47) (* y 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -9e-97) {
tmp = x;
} else if (x <= 4.9e+47) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
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 (x <= (-9d-97)) then
tmp = x
else if (x <= 4.9d+47) then
tmp = y * 0.08333333333333323d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -9e-97) {
tmp = x;
} else if (x <= 4.9e+47) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -9e-97: tmp = x elif x <= 4.9e+47: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -9e-97) tmp = x; elseif (x <= 4.9e+47) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -9e-97) tmp = x; elseif (x <= 4.9e+47) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -9e-97], x, If[LessEqual[x, 4.9e+47], N[(y * 0.08333333333333323), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{-97}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{+47}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.0000000000000002e-97 or 4.9000000000000003e47 < x Initial program 66.4%
associate-/l*73.3%
fma-def73.3%
fma-def73.3%
fma-def73.3%
Simplified73.3%
Taylor expanded in z around 0 88.3%
Taylor expanded in x around inf 77.8%
if -9.0000000000000002e-97 < x < 4.9000000000000003e47Initial program 69.9%
associate-/l*74.2%
fma-def74.2%
fma-def74.2%
fma-def74.2%
Simplified74.2%
Taylor expanded in z around 0 69.7%
Taylor expanded in x around 0 69.6%
Taylor expanded in y around inf 50.7%
Final simplification65.1%
(FPCore (x y z) :precision binary64 (if (<= x -4e-97) x (if (<= x 4.9e+47) (/ y 12.000000000000014) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -4e-97) {
tmp = x;
} else if (x <= 4.9e+47) {
tmp = y / 12.000000000000014;
} else {
tmp = x;
}
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 (x <= (-4d-97)) then
tmp = x
else if (x <= 4.9d+47) then
tmp = y / 12.000000000000014d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -4e-97) {
tmp = x;
} else if (x <= 4.9e+47) {
tmp = y / 12.000000000000014;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4e-97: tmp = x elif x <= 4.9e+47: tmp = y / 12.000000000000014 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4e-97) tmp = x; elseif (x <= 4.9e+47) tmp = Float64(y / 12.000000000000014); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4e-97) tmp = x; elseif (x <= 4.9e+47) tmp = y / 12.000000000000014; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4e-97], x, If[LessEqual[x, 4.9e+47], N[(y / 12.000000000000014), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{-97}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{+47}:\\
\;\;\;\;\frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.00000000000000014e-97 or 4.9000000000000003e47 < x Initial program 66.4%
associate-/l*73.3%
fma-def73.3%
fma-def73.3%
fma-def73.3%
Simplified73.3%
Taylor expanded in z around 0 88.3%
Taylor expanded in x around inf 77.8%
if -4.00000000000000014e-97 < x < 4.9000000000000003e47Initial program 69.9%
associate-/l*74.2%
fma-def74.2%
fma-def74.2%
fma-def74.2%
Simplified74.2%
Taylor expanded in z around 0 63.5%
Taylor expanded in x around 0 44.5%
Taylor expanded in z around 0 50.8%
Final simplification65.1%
(FPCore (x y z) :precision binary64 (if (<= y -8e+239) (* y 0.08333333333333323) (+ x (* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if (y <= -8e+239) {
tmp = y * 0.08333333333333323;
} else {
tmp = x + (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 <= (-8d+239)) then
tmp = y * 0.08333333333333323d0
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -8e+239) {
tmp = y * 0.08333333333333323;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -8e+239: tmp = y * 0.08333333333333323 else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -8e+239) tmp = Float64(y * 0.08333333333333323); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -8e+239) tmp = y * 0.08333333333333323; else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -8e+239], N[(y * 0.08333333333333323), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+239}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if y < -7.99999999999999993e239Initial program 78.4%
associate-/l*84.7%
fma-def84.7%
fma-def84.7%
fma-def84.7%
Simplified84.7%
Taylor expanded in z around 0 83.2%
Taylor expanded in x around 0 83.2%
Taylor expanded in y around inf 76.0%
if -7.99999999999999993e239 < y Initial program 67.4%
associate-*l/72.9%
*-commutative72.9%
fma-def72.9%
*-commutative72.9%
fma-def72.9%
fma-def72.9%
Simplified72.9%
Taylor expanded in z around inf 81.5%
*-commutative81.5%
Simplified81.5%
Final simplification81.2%
(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 68.0%
associate-/l*73.8%
fma-def73.8%
fma-def73.8%
fma-def73.8%
Simplified73.8%
Taylor expanded in z around 0 79.6%
Taylor expanded in x around inf 51.3%
Final simplification51.3%
(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 2023274
(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))))