
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
2e+303)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+ 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)) <= 2e+303) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} 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)) <= 2e+303) tmp = Float64(x + Float64(y * Float64(fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304)))); 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], 2e+303], N[(x + N[(y * N[(N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $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 2 \cdot 10^{+303}:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 2e303Initial program 96.4%
remove-double-neg96.4%
distribute-lft-neg-out96.4%
distribute-neg-frac96.4%
associate-/l*99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
if 2e303 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.7%
remove-double-neg0.7%
distribute-lft-neg-out0.7%
distribute-neg-frac0.7%
associate-/l*13.8%
distribute-lft-neg-in13.8%
remove-double-neg13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
fma-define13.8%
clear-num13.8%
un-div-inv13.9%
*-commutative13.9%
fma-undefine13.9%
fma-define13.9%
fma-define13.9%
*-commutative13.9%
fma-undefine13.9%
fma-define13.9%
Applied egg-rr13.9%
Taylor expanded in z around inf 100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (or (<= z -125000000000.0) (not (<= z 550.0)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(+
x
(/
(*
y
(+
0.279195317918525
(+ (* z (* z 0.0692910599291889)) (* z 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -125000000000.0) || !(z <= 550.0)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
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 <= (-125000000000.0d0)) .or. (.not. (z <= 550.0d0))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + ((y * (0.279195317918525d0 + ((z * (z * 0.0692910599291889d0)) + (z * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -125000000000.0) || !(z <= 550.0)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -125000000000.0) or not (z <= 550.0): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -125000000000.0) || !(z <= 550.0)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(Float64(y * Float64(0.279195317918525 + Float64(Float64(z * Float64(z * 0.0692910599291889)) + Float64(z * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -125000000000.0) || ~((z <= 550.0))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -125000000000.0], N[Not[LessEqual[z, 550.0]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(0.279195317918525 + N[(N[(z * N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision] + N[(z * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -125000000000 \lor \neg \left(z \leq 550\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.279195317918525 + \left(z \cdot \left(z \cdot 0.0692910599291889\right) + z \cdot 0.4917317610505968\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\end{array}
\end{array}
if z < -1.25e11 or 550 < z Initial program 32.5%
remove-double-neg32.5%
distribute-lft-neg-out32.5%
distribute-neg-frac32.5%
associate-/l*45.4%
distribute-lft-neg-in45.4%
remove-double-neg45.4%
fma-define45.4%
fma-define45.4%
fma-define45.4%
Simplified45.4%
fma-define45.4%
clear-num45.4%
un-div-inv45.4%
*-commutative45.4%
fma-undefine45.4%
fma-define45.4%
fma-define45.4%
*-commutative45.4%
fma-undefine45.4%
fma-define45.4%
Applied egg-rr45.4%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
if -1.25e11 < z < 550Initial program 99.6%
*-commutative99.6%
distribute-rgt-in99.6%
Applied egg-rr99.6%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -3.05e+16)
(+ x (/ y 14.431876219268936))
(if (<= z 550.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 <= -3.05e+16) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 550.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 <= (-3.05d+16)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 550.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 <= -3.05e+16) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 550.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 <= -3.05e+16: tmp = x + (y / 14.431876219268936) elif z <= 550.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 <= -3.05e+16) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 550.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 <= -3.05e+16) tmp = x + (y / 14.431876219268936); elseif (z <= 550.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, -3.05e+16], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 550.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 -3.05 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 550:\\
\;\;\;\;\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 < -3.05e16Initial program 31.1%
remove-double-neg31.1%
distribute-lft-neg-out31.1%
distribute-neg-frac31.1%
associate-/l*41.4%
distribute-lft-neg-in41.4%
remove-double-neg41.4%
fma-define41.4%
fma-define41.4%
fma-define41.4%
Simplified41.4%
fma-define41.4%
clear-num41.4%
un-div-inv41.4%
*-commutative41.4%
fma-undefine41.4%
fma-define41.4%
fma-define41.4%
*-commutative41.4%
fma-undefine41.4%
fma-define41.4%
Applied egg-rr41.4%
Taylor expanded in z around inf 100.0%
if -3.05e16 < z < 550Initial program 99.6%
if 550 < z Initial program 30.6%
remove-double-neg30.6%
distribute-lft-neg-out30.6%
distribute-neg-frac30.6%
associate-/l*47.2%
distribute-lft-neg-in47.2%
remove-double-neg47.2%
fma-define47.2%
fma-define47.2%
fma-define47.2%
Simplified47.2%
fma-define47.2%
clear-num47.2%
un-div-inv47.2%
*-commutative47.2%
fma-undefine47.2%
fma-define47.2%
fma-define47.2%
*-commutative47.2%
fma-undefine47.2%
fma-define47.2%
Applied egg-rr47.2%
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 1.65e-10)))
(+
x
(/
y
(+
14.431876219268936
(/
(-
(/ (+ 101.23733352003822 (/ -655.3980091051341 z)) z)
15.646356830292042)
z))))
(+
x
(/
y
(+
12.000000000000014
(* z (+ 0.39999999996247915 (* z -0.10095235035524991))))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
}
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.65d-10))) then
tmp = x + (y / (14.431876219268936d0 + ((((101.23733352003822d0 + ((-655.3980091051341d0) / z)) / z) - 15.646356830292042d0) / z)))
else
tmp = x + (y / (12.000000000000014d0 + (z * (0.39999999996247915d0 + (z * (-0.10095235035524991d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.65e-10): tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z))) else: tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.65e-10)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(Float64(101.23733352003822 + Float64(-655.3980091051341 / z)) / z) - 15.646356830292042) / z)))); else tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * Float64(0.39999999996247915 + Float64(z * -0.10095235035524991)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.65e-10))) tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z))); else tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.65e-10]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 + N[(N[(N[(N[(101.23733352003822 + N[(-655.3980091051341 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 15.646356830292042), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(12.000000000000014 + N[(z * N[(0.39999999996247915 + N[(z * -0.10095235035524991), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.65 \cdot 10^{-10}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822 + \frac{-655.3980091051341}{z}}{z} - 15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot \left(0.39999999996247915 + z \cdot -0.10095235035524991\right)}\\
\end{array}
\end{array}
if z < -5.5 or 1.65e-10 < z Initial program 35.6%
remove-double-neg35.6%
distribute-lft-neg-out35.6%
distribute-neg-frac35.6%
associate-/l*47.9%
distribute-lft-neg-in47.9%
remove-double-neg47.9%
fma-define47.9%
fma-define47.9%
fma-define47.9%
Simplified47.9%
fma-define47.9%
clear-num47.9%
un-div-inv47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
fma-define47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
Applied egg-rr47.9%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
if -5.5 < z < 1.65e-10Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
fma-define99.9%
clear-num99.0%
un-div-inv99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
fma-define99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5) (not (<= z 1.65e-10)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(+
x
(/
y
(+
12.000000000000014
(* z (+ 0.39999999996247915 (* z -0.10095235035524991))))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
}
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.65d-10))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + (y / (12.000000000000014d0 + (z * (0.39999999996247915d0 + (z * (-0.10095235035524991d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.65e-10): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.65e-10)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * Float64(0.39999999996247915 + Float64(z * -0.10095235035524991)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.65e-10))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.65e-10]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(12.000000000000014 + N[(z * N[(0.39999999996247915 + N[(z * -0.10095235035524991), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.65 \cdot 10^{-10}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot \left(0.39999999996247915 + z \cdot -0.10095235035524991\right)}\\
\end{array}
\end{array}
if z < -5.5 or 1.65e-10 < z Initial program 35.6%
remove-double-neg35.6%
distribute-lft-neg-out35.6%
distribute-neg-frac35.6%
associate-/l*47.9%
distribute-lft-neg-in47.9%
remove-double-neg47.9%
fma-define47.9%
fma-define47.9%
fma-define47.9%
Simplified47.9%
fma-define47.9%
clear-num47.9%
un-div-inv47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
fma-define47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
Applied egg-rr47.9%
Taylor expanded in z around inf 99.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
if -5.5 < z < 1.65e-10Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
fma-define99.9%
clear-num99.0%
un-div-inv99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
fma-define99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.65e-10))) (+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))) (+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
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.65d-10))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.65e-10): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.65e-10)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.65e-10))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.65e-10]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.65 \cdot 10^{-10}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\end{array}
\end{array}
if z < -5.5 or 1.65e-10 < z Initial program 35.6%
remove-double-neg35.6%
distribute-lft-neg-out35.6%
distribute-neg-frac35.6%
associate-/l*47.9%
distribute-lft-neg-in47.9%
remove-double-neg47.9%
fma-define47.9%
fma-define47.9%
fma-define47.9%
Simplified47.9%
fma-define47.9%
clear-num47.9%
un-div-inv47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
fma-define47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
Applied egg-rr47.9%
Taylor expanded in z around inf 99.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
if -5.5 < z < 1.65e-10Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
fma-define99.9%
clear-num99.0%
un-div-inv99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
fma-define99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 99.9%
*-commutative99.9%
Simplified99.9%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.65e-10))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
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.65d-10))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.65e-10): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.65e-10)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.65e-10))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.65e-10]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.65 \cdot 10^{-10}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\end{array}
\end{array}
if z < -5.5 or 1.65e-10 < z Initial program 35.6%
remove-double-neg35.6%
distribute-lft-neg-out35.6%
distribute-neg-frac35.6%
associate-/l*47.9%
distribute-lft-neg-in47.9%
remove-double-neg47.9%
fma-define47.9%
fma-define47.9%
fma-define47.9%
Simplified47.9%
Taylor expanded in z around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
if -5.5 < z < 1.65e-10Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
fma-define99.9%
clear-num99.0%
un-div-inv99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
fma-define99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 99.9%
*-commutative99.9%
Simplified99.9%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.65e-10))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
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.65d-10))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.65e-10): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.65e-10)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.65e-10))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.65e-10]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.65 \cdot 10^{-10}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\end{array}
\end{array}
if z < -5.5 or 1.65e-10 < z Initial program 35.6%
remove-double-neg35.6%
distribute-lft-neg-out35.6%
distribute-neg-frac35.6%
associate-/l*47.9%
distribute-lft-neg-in47.9%
remove-double-neg47.9%
fma-define47.9%
fma-define47.9%
fma-define47.9%
Simplified47.9%
Taylor expanded in z around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
if -5.5 < z < 1.65e-10Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
*-commutative99.9%
Simplified99.9%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.65e-10))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} 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.65d-10))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
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.65e-10)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.65e-10): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.65e-10)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); 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.65e-10))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); 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.65e-10]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $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.65 \cdot 10^{-10}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 1.65e-10 < z Initial program 35.6%
remove-double-neg35.6%
distribute-lft-neg-out35.6%
distribute-neg-frac35.6%
associate-/l*47.9%
distribute-lft-neg-in47.9%
remove-double-neg47.9%
fma-define47.9%
fma-define47.9%
fma-define47.9%
Simplified47.9%
Taylor expanded in z around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
if -5.5 < z < 1.65e-10Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
fma-define99.9%
clear-num99.0%
un-div-inv99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
fma-define99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 99.5%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.65e-10))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.65e-10)) {
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.65d-10))) 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.65e-10)) {
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.65e-10): 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.65e-10)) 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.65e-10))) 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.65e-10]], $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.65 \cdot 10^{-10}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 1.65e-10 < z Initial program 35.6%
remove-double-neg35.6%
distribute-lft-neg-out35.6%
distribute-neg-frac35.6%
associate-/l*47.9%
distribute-lft-neg-in47.9%
remove-double-neg47.9%
fma-define47.9%
fma-define47.9%
fma-define47.9%
Simplified47.9%
fma-define47.9%
clear-num47.9%
un-div-inv47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
fma-define47.9%
*-commutative47.9%
fma-undefine47.9%
fma-define47.9%
Applied egg-rr47.9%
Taylor expanded in z around inf 98.2%
if -5.5 < z < 1.65e-10Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
fma-define99.9%
clear-num99.0%
un-div-inv99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
fma-define99.3%
*-commutative99.3%
fma-undefine99.3%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 99.5%
Final simplification98.9%
(FPCore (x y z) :precision binary64 (if (<= x -1.8e-190) x (if (<= x 3.2e-28) (/ y 14.431876219268936) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.8e-190) {
tmp = x;
} else if (x <= 3.2e-28) {
tmp = y / 14.431876219268936;
} 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 <= (-1.8d-190)) then
tmp = x
else if (x <= 3.2d-28) then
tmp = y / 14.431876219268936d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.8e-190) {
tmp = x;
} else if (x <= 3.2e-28) {
tmp = y / 14.431876219268936;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.8e-190: tmp = x elif x <= 3.2e-28: tmp = y / 14.431876219268936 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.8e-190) tmp = x; elseif (x <= 3.2e-28) tmp = Float64(y / 14.431876219268936); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.8e-190) tmp = x; elseif (x <= 3.2e-28) tmp = y / 14.431876219268936; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.8e-190], x, If[LessEqual[x, 3.2e-28], N[(y / 14.431876219268936), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-190}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-28}:\\
\;\;\;\;\frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.80000000000000003e-190 or 3.19999999999999982e-28 < x Initial program 66.0%
+-commutative66.0%
*-commutative66.0%
associate-/l*72.1%
fma-define72.1%
*-commutative72.1%
fma-define72.1%
fma-define72.1%
*-commutative72.1%
fma-define72.1%
Simplified72.1%
Taylor expanded in y around 0 66.8%
if -1.80000000000000003e-190 < x < 3.19999999999999982e-28Initial program 68.6%
remove-double-neg68.6%
distribute-lft-neg-out68.6%
distribute-neg-frac68.6%
associate-/l*75.6%
distribute-lft-neg-in75.6%
remove-double-neg75.6%
fma-define75.6%
fma-define75.6%
fma-define75.6%
Simplified75.6%
fma-define75.6%
clear-num74.9%
un-div-inv75.1%
*-commutative75.1%
fma-undefine75.1%
fma-define75.1%
fma-define75.1%
*-commutative75.1%
fma-undefine75.1%
fma-define75.1%
Applied egg-rr75.1%
Taylor expanded in z around inf 54.4%
associate-*r/54.4%
metadata-eval54.4%
Simplified54.4%
Taylor expanded in x around 0 45.8%
associate-*r/45.8%
metadata-eval45.8%
Simplified45.8%
Taylor expanded in z around inf 52.7%
(FPCore (x y z) :precision binary64 (if (<= z -2.3e+83) (/ y 14.431876219268936) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.3e+83) {
tmp = 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 <= (-2.3d+83)) then
tmp = 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 <= -2.3e+83) {
tmp = y / 14.431876219268936;
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.3e+83: tmp = y / 14.431876219268936 else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.3e+83) tmp = 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 <= -2.3e+83) tmp = y / 14.431876219268936; else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.3e+83], N[(y / 14.431876219268936), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+83}:\\
\;\;\;\;\frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -2.29999999999999995e83Initial program 15.8%
remove-double-neg15.8%
distribute-lft-neg-out15.8%
distribute-neg-frac15.8%
associate-/l*26.8%
distribute-lft-neg-in26.8%
remove-double-neg26.8%
fma-define26.8%
fma-define26.8%
fma-define26.8%
Simplified26.8%
fma-define26.8%
clear-num26.8%
un-div-inv26.7%
*-commutative26.7%
fma-undefine26.7%
fma-define26.7%
fma-define26.7%
*-commutative26.7%
fma-undefine26.7%
fma-define26.7%
Applied egg-rr26.7%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 60.8%
associate-*r/60.8%
metadata-eval60.8%
Simplified60.8%
Taylor expanded in z around inf 60.8%
if -2.29999999999999995e83 < z Initial program 79.9%
remove-double-neg79.9%
distribute-lft-neg-out79.9%
distribute-neg-frac79.9%
associate-/l*85.1%
distribute-lft-neg-in85.1%
remove-double-neg85.1%
fma-define85.1%
fma-define85.1%
fma-define85.1%
Simplified85.1%
fma-define85.1%
clear-num84.6%
un-div-inv84.8%
*-commutative84.8%
fma-undefine84.8%
fma-define84.8%
fma-define84.8%
*-commutative84.8%
fma-undefine84.8%
fma-define84.8%
Applied egg-rr84.8%
Taylor expanded in z around 0 86.8%
(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 66.9%
+-commutative66.9%
*-commutative66.9%
associate-/l*72.8%
fma-define72.8%
*-commutative72.8%
fma-define72.8%
fma-define72.8%
*-commutative72.8%
fma-define72.8%
Simplified72.8%
Taylor expanded in y around 0 49.1%
(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 2024181
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< z -324806146098267/40000000) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)) (if (< z 657611897278737700000) (+ x (* (* y (+ (* (+ (* z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (/ 1 (+ (* (+ z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)))) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))