
(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 14 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.8e+66)
(+ x (/ y 14.431876219268936))
(if (<= z 390000000.0)
(+
x
(/
(+
(* 0.4917317610505968 (* y z))
(+ (* y 0.279195317918525) (* 0.0692910599291889 (* z (* y z)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.8e+66) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 390000000.0) {
tmp = x + (((0.4917317610505968 * (y * z)) + ((y * 0.279195317918525) + (0.0692910599291889 * (z * (y * z))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} 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.8d+66)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 390000000.0d0) then
tmp = x + (((0.4917317610505968d0 * (y * z)) + ((y * 0.279195317918525d0) + (0.0692910599291889d0 * (z * (y * z))))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
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.8e+66) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 390000000.0) {
tmp = x + (((0.4917317610505968 * (y * z)) + ((y * 0.279195317918525) + (0.0692910599291889 * (z * (y * z))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.8e+66: tmp = x + (y / 14.431876219268936) elif z <= 390000000.0: tmp = x + (((0.4917317610505968 * (y * z)) + ((y * 0.279195317918525) + (0.0692910599291889 * (z * (y * z))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) else: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.8e+66) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 390000000.0) tmp = Float64(x + Float64(Float64(Float64(0.4917317610505968 * Float64(y * z)) + Float64(Float64(y * 0.279195317918525) + Float64(0.0692910599291889 * Float64(z * Float64(y * z))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); 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.8e+66) tmp = x + (y / 14.431876219268936); elseif (z <= 390000000.0) tmp = x + (((0.4917317610505968 * (y * z)) + ((y * 0.279195317918525) + (0.0692910599291889 * (z * (y * z))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); else tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.8e+66], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 390000000.0], N[(x + N[(N[(N[(0.4917317610505968 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(0.0692910599291889 * N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $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 -1.8 \cdot 10^{+66}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 390000000:\\
\;\;\;\;x + \frac{0.4917317610505968 \cdot \left(y \cdot z\right) + \left(y \cdot 0.279195317918525 + 0.0692910599291889 \cdot \left(z \cdot \left(y \cdot z\right)\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -1.8e66Initial program 25.6%
associate-/l*40.2%
fma-def40.2%
fma-def40.2%
fma-def40.2%
Simplified40.2%
Taylor expanded in z around inf 100.0%
if -1.8e66 < z < 3.9e8Initial program 99.7%
Taylor expanded in z around 0 99.7%
pow199.7%
unpow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
Simplified99.7%
if 3.9e8 < z Initial program 39.7%
associate-/l*47.9%
fma-def47.9%
fma-def47.9%
fma-def47.9%
Simplified47.9%
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 (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
1e+295)
(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 * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 1e+295) {
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(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 1e+295) 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[(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], 1e+295], 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(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 10^{+295}:\\
\;\;\;\;\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)) < 9.9999999999999998e294Initial program 96.6%
+-commutative96.6%
associate-*r/99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
if 9.9999999999999998e294 < (/.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.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
Simplified10.3%
Taylor expanded in z around inf 100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1 (* z (+ (* z 0.0692910599291889) 0.4917317610505968))))
(if (<= (/ (* y (+ t_1 0.279195317918525)) t_0) 1e+295)
(+ x (* y (+ (/ 0.279195317918525 t_0) (/ t_1 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 * ((z * 0.0692910599291889) + 0.4917317610505968);
double tmp;
if (((y * (t_1 + 0.279195317918525)) / t_0) <= 1e+295) {
tmp = x + (y * ((0.279195317918525 / t_0) + (t_1 / 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 * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)
if (((y * (t_1 + 0.279195317918525d0)) / t_0) <= 1d+295) then
tmp = x + (y * ((0.279195317918525d0 / t_0) + (t_1 / 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 * ((z * 0.0692910599291889) + 0.4917317610505968);
double tmp;
if (((y * (t_1 + 0.279195317918525)) / t_0) <= 1e+295) {
tmp = x + (y * ((0.279195317918525 / t_0) + (t_1 / 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 * ((z * 0.0692910599291889) + 0.4917317610505968) tmp = 0 if ((y * (t_1 + 0.279195317918525)) / t_0) <= 1e+295: tmp = x + (y * ((0.279195317918525 / t_0) + (t_1 / 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(Float64(z * 0.0692910599291889) + 0.4917317610505968)) tmp = 0.0 if (Float64(Float64(y * Float64(t_1 + 0.279195317918525)) / t_0) <= 1e+295) tmp = Float64(x + Float64(y * Float64(Float64(0.279195317918525 / t_0) + Float64(t_1 / 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 * ((z * 0.0692910599291889) + 0.4917317610505968); tmp = 0.0; if (((y * (t_1 + 0.279195317918525)) / t_0) <= 1e+295) tmp = x + (y * ((0.279195317918525 / t_0) + (t_1 / 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[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(t$95$1 + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+295], N[(x + N[(y * N[(N[(0.279195317918525 / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $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(z \cdot 0.0692910599291889 + 0.4917317610505968\right)\\
\mathbf{if}\;\frac{y \cdot \left(t_1 + 0.279195317918525\right)}{t_0} \leq 10^{+295}:\\
\;\;\;\;x + y \cdot \left(\frac{0.279195317918525}{t_0} + \frac{t_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)) < 9.9999999999999998e294Initial program 96.6%
+-commutative96.6%
associate-*r/99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around 0 99.2%
un-div-inv99.7%
*-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
if 9.9999999999999998e294 < (/.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.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
Simplified10.3%
Taylor expanded in z around inf 100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1 (+ (* z 0.0692910599291889) 0.4917317610505968)))
(if (<= (/ (* y (+ (* z t_1) 0.279195317918525)) t_0) 1e+295)
(+ x (* y (+ (/ t_1 (/ t_0 z)) (/ 0.279195317918525 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.0692910599291889) + 0.4917317610505968;
double tmp;
if (((y * ((z * t_1) + 0.279195317918525)) / t_0) <= 1e+295) {
tmp = x + (y * ((t_1 / (t_0 / z)) + (0.279195317918525 / 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.0692910599291889d0) + 0.4917317610505968d0
if (((y * ((z * t_1) + 0.279195317918525d0)) / t_0) <= 1d+295) then
tmp = x + (y * ((t_1 / (t_0 / z)) + (0.279195317918525d0 / 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.0692910599291889) + 0.4917317610505968;
double tmp;
if (((y * ((z * t_1) + 0.279195317918525)) / t_0) <= 1e+295) {
tmp = x + (y * ((t_1 / (t_0 / z)) + (0.279195317918525 / 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.0692910599291889) + 0.4917317610505968 tmp = 0 if ((y * ((z * t_1) + 0.279195317918525)) / t_0) <= 1e+295: tmp = x + (y * ((t_1 / (t_0 / z)) + (0.279195317918525 / 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(Float64(z * 0.0692910599291889) + 0.4917317610505968) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * t_1) + 0.279195317918525)) / t_0) <= 1e+295) tmp = Float64(x + Float64(y * Float64(Float64(t_1 / Float64(t_0 / z)) + Float64(0.279195317918525 / 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.0692910599291889) + 0.4917317610505968; tmp = 0.0; if (((y * ((z * t_1) + 0.279195317918525)) / t_0) <= 1e+295) tmp = x + (y * ((t_1 / (t_0 / z)) + (0.279195317918525 / 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[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(N[(z * t$95$1), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+295], N[(x + N[(y * N[(N[(t$95$1 / N[(t$95$0 / z), $MachinePrecision]), $MachinePrecision] + N[(0.279195317918525 / t$95$0), $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 0.0692910599291889 + 0.4917317610505968\\
\mathbf{if}\;\frac{y \cdot \left(z \cdot t_1 + 0.279195317918525\right)}{t_0} \leq 10^{+295}:\\
\;\;\;\;x + y \cdot \left(\frac{t_1}{\frac{t_0}{z}} + \frac{0.279195317918525}{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)) < 9.9999999999999998e294Initial program 96.6%
+-commutative96.6%
associate-*r/99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around 0 99.2%
*-un-lft-identity99.2%
associate-/l*99.2%
*-commutative99.2%
*-commutative99.2%
+-commutative99.2%
Applied egg-rr99.2%
un-div-inv99.7%
*-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
if 9.9999999999999998e294 < (/.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.3%
fma-def10.3%
fma-def10.3%
fma-def10.3%
Simplified10.3%
Taylor expanded in z around inf 100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -1.8e+66)
(+ x (/ y 14.431876219268936))
(if (<= z 2000000000.0)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
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.8e+66) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 2000000000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 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.8d+66)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 2000000000.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 - (15.646356830292042d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.8e+66) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 2000000000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 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.8e+66: tmp = x + (y / 14.431876219268936) elif z <= 2000000000.0: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 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.8e+66) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 2000000000.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 / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.8e+66) tmp = x + (y / 14.431876219268936); elseif (z <= 2000000000.0) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 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.8e+66], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2000000000.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 / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+66}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 2000000000:\\
\;\;\;\;\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 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -1.8e66Initial program 25.6%
associate-/l*40.2%
fma-def40.2%
fma-def40.2%
fma-def40.2%
Simplified40.2%
Taylor expanded in z around inf 100.0%
if -1.8e66 < z < 2e9Initial program 99.7%
if 2e9 < z Initial program 39.7%
associate-/l*47.9%
fma-def47.9%
fma-def47.9%
fma-def47.9%
Simplified47.9%
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 (or (<= z -5.5) (not (<= z 6.2)))
(+
x
(/
y
(+
14.431876219268936
(+ (/ 101.23733352003822 (* z 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 <= 6.2)) {
tmp = x + (y / (14.431876219268936 + ((101.23733352003822 / (z * 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 <= 6.2d0))) then
tmp = x + (y / (14.431876219268936d0 + ((101.23733352003822d0 / (z * 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 <= 6.2)) {
tmp = x + (y / (14.431876219268936 + ((101.23733352003822 / (z * 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 <= 6.2): tmp = x + (y / (14.431876219268936 + ((101.23733352003822 / (z * 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 <= 6.2)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(101.23733352003822 / Float64(z * z)) + 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 + ((101.23733352003822 / (z * 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, 6.2]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 + N[(N[(101.23733352003822 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(-15.646356830292042 / z), $MachinePrecision]), $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 + \left(\frac{101.23733352003822}{z \cdot z} + \frac{-15.646356830292042}{z}\right)}\\
\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 39.1%
associate-/l*49.3%
fma-def49.3%
fma-def49.3%
fma-def49.3%
Simplified49.3%
Taylor expanded in z around inf 99.9%
associate--l+99.9%
sub-neg99.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
if -5.5 < z < 6.20000000000000018Initial program 99.7%
associate-/l*99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in z around 0 98.9%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 6.0))) (+ 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.0)) {
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.0d0))) 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.0)) {
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.0): 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.0)) 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.0))) 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.0]], $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\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 < z Initial program 39.1%
associate-/l*49.3%
fma-def49.3%
fma-def49.3%
fma-def49.3%
Simplified49.3%
Taylor expanded in z around inf 99.1%
if -5.5 < z < 6Initial program 99.7%
associate-/l*99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in z around 0 98.9%
Final simplification99.0%
(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 39.1%
associate-/l*49.3%
fma-def49.3%
fma-def49.3%
fma-def49.3%
Simplified49.3%
Taylor expanded in z around inf 99.7%
associate-*r/99.7%
metadata-eval99.7%
Simplified99.7%
if -5.5 < z < 6.20000000000000018Initial program 99.7%
associate-/l*99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in z around 0 98.9%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= y -7.5e+255)
(* y 0.08333333333333323)
(if (<= y -3.6e+135)
(* y 0.0692910599291889)
(if (<= y -50000000.0)
(* y 0.08333333333333323)
(if (<= y 5.6e+147) x (* y 0.08333333333333323))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -7.5e+255) {
tmp = y * 0.08333333333333323;
} else if (y <= -3.6e+135) {
tmp = y * 0.0692910599291889;
} else if (y <= -50000000.0) {
tmp = y * 0.08333333333333323;
} else if (y <= 5.6e+147) {
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 <= (-7.5d+255)) then
tmp = y * 0.08333333333333323d0
else if (y <= (-3.6d+135)) then
tmp = y * 0.0692910599291889d0
else if (y <= (-50000000.0d0)) then
tmp = y * 0.08333333333333323d0
else if (y <= 5.6d+147) 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 <= -7.5e+255) {
tmp = y * 0.08333333333333323;
} else if (y <= -3.6e+135) {
tmp = y * 0.0692910599291889;
} else if (y <= -50000000.0) {
tmp = y * 0.08333333333333323;
} else if (y <= 5.6e+147) {
tmp = x;
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -7.5e+255: tmp = y * 0.08333333333333323 elif y <= -3.6e+135: tmp = y * 0.0692910599291889 elif y <= -50000000.0: tmp = y * 0.08333333333333323 elif y <= 5.6e+147: tmp = x else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -7.5e+255) tmp = Float64(y * 0.08333333333333323); elseif (y <= -3.6e+135) tmp = Float64(y * 0.0692910599291889); elseif (y <= -50000000.0) tmp = Float64(y * 0.08333333333333323); elseif (y <= 5.6e+147) tmp = x; else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -7.5e+255) tmp = y * 0.08333333333333323; elseif (y <= -3.6e+135) tmp = y * 0.0692910599291889; elseif (y <= -50000000.0) tmp = y * 0.08333333333333323; elseif (y <= 5.6e+147) tmp = x; else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -7.5e+255], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, -3.6e+135], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[y, -50000000.0], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, 5.6e+147], x, N[(y * 0.08333333333333323), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+255}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{+135}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq -50000000:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+147}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < -7.5000000000000002e255 or -3.5999999999999998e135 < y < -5e7 or 5.6000000000000002e147 < y Initial program 74.9%
associate-/l*84.4%
fma-def84.4%
fma-def84.4%
fma-def84.4%
Simplified84.4%
Taylor expanded in z around 0 68.5%
Taylor expanded in x around 0 57.9%
Taylor expanded in z around 0 63.2%
div-inv63.1%
metadata-eval63.1%
Applied egg-rr63.1%
if -7.5000000000000002e255 < y < -3.5999999999999998e135Initial program 38.9%
+-commutative38.9%
associate-*r/53.4%
fma-def53.5%
*-commutative53.5%
fma-def53.5%
fma-def53.5%
*-commutative53.5%
fma-def53.5%
Simplified53.5%
Taylor expanded in z around inf 72.4%
Taylor expanded in y around inf 64.8%
associate-*r/64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in z around inf 68.7%
if -5e7 < y < 5.6000000000000002e147Initial program 75.4%
+-commutative75.4%
associate-*r/76.0%
fma-def76.0%
*-commutative76.0%
fma-def76.0%
fma-def76.0%
*-commutative76.0%
fma-def76.0%
Simplified76.0%
Taylor expanded in y around 0 75.2%
Final simplification71.0%
(FPCore (x y z)
:precision binary64
(if (<= y -1.1e+256)
(* y 0.08333333333333323)
(if (<= y -1.16e+135)
(* y 0.0692910599291889)
(if (<= y -95.0)
(* y 0.08333333333333323)
(if (<= y 5.5e+147) x (/ y 12.000000000000014))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.1e+256) {
tmp = y * 0.08333333333333323;
} else if (y <= -1.16e+135) {
tmp = y * 0.0692910599291889;
} else if (y <= -95.0) {
tmp = y * 0.08333333333333323;
} else if (y <= 5.5e+147) {
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 <= (-1.1d+256)) then
tmp = y * 0.08333333333333323d0
else if (y <= (-1.16d+135)) then
tmp = y * 0.0692910599291889d0
else if (y <= (-95.0d0)) then
tmp = y * 0.08333333333333323d0
else if (y <= 5.5d+147) 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 <= -1.1e+256) {
tmp = y * 0.08333333333333323;
} else if (y <= -1.16e+135) {
tmp = y * 0.0692910599291889;
} else if (y <= -95.0) {
tmp = y * 0.08333333333333323;
} else if (y <= 5.5e+147) {
tmp = x;
} else {
tmp = y / 12.000000000000014;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.1e+256: tmp = y * 0.08333333333333323 elif y <= -1.16e+135: tmp = y * 0.0692910599291889 elif y <= -95.0: tmp = y * 0.08333333333333323 elif y <= 5.5e+147: tmp = x else: tmp = y / 12.000000000000014 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.1e+256) tmp = Float64(y * 0.08333333333333323); elseif (y <= -1.16e+135) tmp = Float64(y * 0.0692910599291889); elseif (y <= -95.0) tmp = Float64(y * 0.08333333333333323); elseif (y <= 5.5e+147) tmp = x; else tmp = Float64(y / 12.000000000000014); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.1e+256) tmp = y * 0.08333333333333323; elseif (y <= -1.16e+135) tmp = y * 0.0692910599291889; elseif (y <= -95.0) tmp = y * 0.08333333333333323; elseif (y <= 5.5e+147) tmp = x; else tmp = y / 12.000000000000014; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.1e+256], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, -1.16e+135], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[y, -95.0], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, 5.5e+147], x, N[(y / 12.000000000000014), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+256}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq -1.16 \cdot 10^{+135}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq -95:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+147}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if y < -1.1e256 or -1.16000000000000005e135 < y < -95Initial program 83.7%
associate-/l*89.4%
fma-def89.4%
fma-def89.4%
fma-def89.4%
Simplified89.4%
Taylor expanded in z around 0 81.9%
Taylor expanded in x around 0 69.0%
Taylor expanded in z around 0 70.9%
div-inv71.0%
metadata-eval71.0%
Applied egg-rr71.0%
if -1.1e256 < y < -1.16000000000000005e135Initial program 38.9%
+-commutative38.9%
associate-*r/53.4%
fma-def53.5%
*-commutative53.5%
fma-def53.5%
fma-def53.5%
*-commutative53.5%
fma-def53.5%
Simplified53.5%
Taylor expanded in z around inf 72.4%
Taylor expanded in y around inf 64.8%
associate-*r/64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in z around inf 68.7%
if -95 < y < 5.4999999999999997e147Initial program 75.4%
+-commutative75.4%
associate-*r/76.0%
fma-def76.0%
*-commutative76.0%
fma-def76.0%
fma-def76.0%
*-commutative76.0%
fma-def76.0%
Simplified76.0%
Taylor expanded in y around 0 75.2%
if 5.4999999999999997e147 < y Initial program 68.7%
associate-/l*80.9%
fma-def80.9%
fma-def80.9%
fma-def80.9%
Simplified80.9%
Taylor expanded in z around 0 59.1%
Taylor expanded in x around 0 50.0%
Taylor expanded in z around 0 57.7%
Final simplification71.0%
(FPCore (x y z) :precision binary64 (if (or (<= z 2.4e+14) (not (<= z 2.8e+230))) (+ x (/ y 12.000000000000014)) (* y 0.0692910599291889)))
double code(double x, double y, double z) {
double tmp;
if ((z <= 2.4e+14) || !(z <= 2.8e+230)) {
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 ((z <= 2.4d+14) .or. (.not. (z <= 2.8d+230))) 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 ((z <= 2.4e+14) || !(z <= 2.8e+230)) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= 2.4e+14) or not (z <= 2.8e+230): tmp = x + (y / 12.000000000000014) else: tmp = y * 0.0692910599291889 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= 2.4e+14) || !(z <= 2.8e+230)) 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 ((z <= 2.4e+14) || ~((z <= 2.8e+230))) tmp = x + (y / 12.000000000000014); else tmp = y * 0.0692910599291889; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, 2.4e+14], N[Not[LessEqual[z, 2.8e+230]], $MachinePrecision]], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision], N[(y * 0.0692910599291889), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.4 \cdot 10^{+14} \lor \neg \left(z \leq 2.8 \cdot 10^{+230}\right):\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < 2.4e14 or 2.8000000000000002e230 < z Initial program 75.0%
associate-/l*78.3%
fma-def78.3%
fma-def78.3%
fma-def78.3%
Simplified78.3%
Taylor expanded in z around 0 85.8%
if 2.4e14 < z < 2.8000000000000002e230Initial program 51.9%
+-commutative51.9%
associate-*r/63.6%
fma-def63.6%
*-commutative63.6%
fma-def63.6%
fma-def63.7%
*-commutative63.7%
fma-def63.7%
Simplified63.7%
Taylor expanded in z around inf 99.3%
Taylor expanded in y around inf 67.8%
associate-*r/67.8%
metadata-eval67.8%
Simplified67.8%
Taylor expanded in z around inf 67.5%
Final simplification83.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.8))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.8)) {
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.8d0))) 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.8)) {
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.8): 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.8)) 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.8))) 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.8]], $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.8\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 5.79999999999999982 < z Initial program 39.1%
associate-/l*49.3%
fma-def49.3%
fma-def49.3%
fma-def49.3%
Simplified49.3%
Taylor expanded in z around inf 99.1%
if -5.5 < z < 5.79999999999999982Initial program 99.7%
associate-/l*99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in z around 0 98.3%
Final simplification98.7%
(FPCore (x y z) :precision binary64 (if (<= x -2.1e-94) x (if (<= x 4.15e-47) (* y 0.0692910599291889) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e-94) {
tmp = x;
} else if (x <= 4.15e-47) {
tmp = y * 0.0692910599291889;
} 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 <= (-2.1d-94)) then
tmp = x
else if (x <= 4.15d-47) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e-94) {
tmp = x;
} else if (x <= 4.15e-47) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.1e-94: tmp = x elif x <= 4.15e-47: tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.1e-94) tmp = x; elseif (x <= 4.15e-47) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.1e-94) tmp = x; elseif (x <= 4.15e-47) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.1e-94], x, If[LessEqual[x, 4.15e-47], N[(y * 0.0692910599291889), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-94}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.15 \cdot 10^{-47}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.1000000000000001e-94 or 4.1499999999999998e-47 < x Initial program 75.3%
+-commutative75.3%
associate-*r/79.6%
fma-def79.6%
*-commutative79.6%
fma-def79.6%
fma-def79.6%
*-commutative79.6%
fma-def79.6%
Simplified79.6%
Taylor expanded in y around 0 73.9%
if -2.1000000000000001e-94 < x < 4.1499999999999998e-47Initial program 66.0%
+-commutative66.0%
associate-*r/71.4%
fma-def71.4%
*-commutative71.4%
fma-def71.4%
fma-def71.4%
*-commutative71.4%
fma-def71.5%
Simplified71.5%
Taylor expanded in z around inf 55.5%
Taylor expanded in y around inf 48.5%
associate-*r/48.5%
metadata-eval48.5%
Simplified48.5%
Taylor expanded in z around inf 54.8%
Final simplification66.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 71.5%
+-commutative71.5%
associate-*r/76.3%
fma-def76.3%
*-commutative76.3%
fma-def76.3%
fma-def76.3%
*-commutative76.3%
fma-def76.3%
Simplified76.3%
Taylor expanded in y around 0 50.0%
Final simplification50.0%
(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 2023192
(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))))