
(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
(let* ((t_0 (- (* y 0.14677053705526136) (* y 0.14954831483277858)))
(t_1 (+ (* y 0.024873069133884835) (* t_0 1.794579777993345))))
(if (<= z -5.8e+19)
(+ x (/ y 14.431876219268936))
(if (<= z 0.235)
(+
x
(-
(+
(* y 0.08333333333333323)
(- (* z t_0) (* (pow z 2.0) (- t_1 (* y 0.020681775887746497)))))
(*
(pow z 3.0)
(+
(* 0.29847682960661837 t_0)
(* 1.794579777993345 (- (* y 0.020681775887746497) t_1))))))
(+
x
(/
y
(-
(+ 14.431876219268936 (/ 101.23733352003822 (pow z 2.0)))
(/ 15.646356830292042 z))))))))
double code(double x, double y, double z) {
double t_0 = (y * 0.14677053705526136) - (y * 0.14954831483277858);
double t_1 = (y * 0.024873069133884835) + (t_0 * 1.794579777993345);
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (((y * 0.08333333333333323) + ((z * t_0) - (pow(z, 2.0) * (t_1 - (y * 0.020681775887746497))))) - (pow(z, 3.0) * ((0.29847682960661837 * t_0) + (1.794579777993345 * ((y * 0.020681775887746497) - t_1)))));
} else {
tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / pow(z, 2.0))) - (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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (y * 0.14677053705526136d0) - (y * 0.14954831483277858d0)
t_1 = (y * 0.024873069133884835d0) + (t_0 * 1.794579777993345d0)
if (z <= (-5.8d+19)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 0.235d0) then
tmp = x + (((y * 0.08333333333333323d0) + ((z * t_0) - ((z ** 2.0d0) * (t_1 - (y * 0.020681775887746497d0))))) - ((z ** 3.0d0) * ((0.29847682960661837d0 * t_0) + (1.794579777993345d0 * ((y * 0.020681775887746497d0) - t_1)))))
else
tmp = x + (y / ((14.431876219268936d0 + (101.23733352003822d0 / (z ** 2.0d0))) - (15.646356830292042d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (y * 0.14677053705526136) - (y * 0.14954831483277858);
double t_1 = (y * 0.024873069133884835) + (t_0 * 1.794579777993345);
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (((y * 0.08333333333333323) + ((z * t_0) - (Math.pow(z, 2.0) * (t_1 - (y * 0.020681775887746497))))) - (Math.pow(z, 3.0) * ((0.29847682960661837 * t_0) + (1.794579777993345 * ((y * 0.020681775887746497) - t_1)))));
} else {
tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / Math.pow(z, 2.0))) - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): t_0 = (y * 0.14677053705526136) - (y * 0.14954831483277858) t_1 = (y * 0.024873069133884835) + (t_0 * 1.794579777993345) tmp = 0 if z <= -5.8e+19: tmp = x + (y / 14.431876219268936) elif z <= 0.235: tmp = x + (((y * 0.08333333333333323) + ((z * t_0) - (math.pow(z, 2.0) * (t_1 - (y * 0.020681775887746497))))) - (math.pow(z, 3.0) * ((0.29847682960661837 * t_0) + (1.794579777993345 * ((y * 0.020681775887746497) - t_1))))) else: tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / math.pow(z, 2.0))) - (15.646356830292042 / z))) return tmp
function code(x, y, z) t_0 = Float64(Float64(y * 0.14677053705526136) - Float64(y * 0.14954831483277858)) t_1 = Float64(Float64(y * 0.024873069133884835) + Float64(t_0 * 1.794579777993345)) tmp = 0.0 if (z <= -5.8e+19) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 0.235) tmp = Float64(x + Float64(Float64(Float64(y * 0.08333333333333323) + Float64(Float64(z * t_0) - Float64((z ^ 2.0) * Float64(t_1 - Float64(y * 0.020681775887746497))))) - Float64((z ^ 3.0) * Float64(Float64(0.29847682960661837 * t_0) + Float64(1.794579777993345 * Float64(Float64(y * 0.020681775887746497) - t_1)))))); else tmp = Float64(x + Float64(y / Float64(Float64(14.431876219268936 + Float64(101.23733352003822 / (z ^ 2.0))) - Float64(15.646356830292042 / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y * 0.14677053705526136) - (y * 0.14954831483277858); t_1 = (y * 0.024873069133884835) + (t_0 * 1.794579777993345); tmp = 0.0; if (z <= -5.8e+19) tmp = x + (y / 14.431876219268936); elseif (z <= 0.235) tmp = x + (((y * 0.08333333333333323) + ((z * t_0) - ((z ^ 2.0) * (t_1 - (y * 0.020681775887746497))))) - ((z ^ 3.0) * ((0.29847682960661837 * t_0) + (1.794579777993345 * ((y * 0.020681775887746497) - t_1))))); else tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / (z ^ 2.0))) - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * 0.14677053705526136), $MachinePrecision] - N[(y * 0.14954831483277858), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y * 0.024873069133884835), $MachinePrecision] + N[(t$95$0 * 1.794579777993345), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+19], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.235], N[(x + N[(N[(N[(y * 0.08333333333333323), $MachinePrecision] + N[(N[(z * t$95$0), $MachinePrecision] - N[(N[Power[z, 2.0], $MachinePrecision] * N[(t$95$1 - N[(y * 0.020681775887746497), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[z, 3.0], $MachinePrecision] * N[(N[(0.29847682960661837 * t$95$0), $MachinePrecision] + N[(1.794579777993345 * N[(N[(y * 0.020681775887746497), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(14.431876219268936 + N[(101.23733352003822 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot 0.14677053705526136 - y \cdot 0.14954831483277858\\
t_1 := y \cdot 0.024873069133884835 + t\_0 \cdot 1.794579777993345\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 0.235:\\
\;\;\;\;x + \left(\left(y \cdot 0.08333333333333323 + \left(z \cdot t\_0 - {z}^{2} \cdot \left(t\_1 - y \cdot 0.020681775887746497\right)\right)\right) - {z}^{3} \cdot \left(0.29847682960661837 \cdot t\_0 + 1.794579777993345 \cdot \left(y \cdot 0.020681775887746497 - t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\left(14.431876219268936 + \frac{101.23733352003822}{{z}^{2}}\right) - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -5.8e19Initial program 34.9%
+-commutative34.9%
*-commutative34.9%
associate-/l*50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
fma-undefine50.6%
fma-undefine50.6%
*-commutative50.6%
fma-define50.6%
fma-undefine50.6%
*-commutative50.6%
associate-*r/34.9%
associate-*l/50.6%
clear-num50.6%
associate-*l/50.8%
*-un-lft-identity50.8%
*-commutative50.8%
fma-undefine50.8%
fma-define50.8%
*-commutative50.8%
fma-undefine50.8%
Applied egg-rr50.8%
Taylor expanded in z around inf 100.0%
if -5.8e19 < z < 0.23499999999999999Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
if 0.23499999999999999 < z Initial program 47.4%
+-commutative47.4%
*-commutative47.4%
associate-/l*61.8%
fma-define61.8%
*-commutative61.8%
fma-define61.8%
fma-define61.8%
*-commutative61.8%
fma-define61.8%
Simplified61.8%
fma-undefine61.8%
fma-undefine61.8%
*-commutative61.8%
fma-define61.8%
fma-undefine61.8%
*-commutative61.8%
associate-*r/47.4%
associate-*l/64.0%
clear-num64.0%
associate-*l/64.0%
*-un-lft-identity64.0%
*-commutative64.0%
fma-undefine64.0%
fma-define64.0%
*-commutative64.0%
fma-undefine64.0%
Applied egg-rr64.0%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
1e+299)
(+
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)) <= 1e+299) {
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)) <= 1e+299) 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], 1e+299], 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 10^{+299}:\\
\;\;\;\;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 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) < 1.0000000000000001e299Initial program 95.3%
remove-double-neg95.3%
distribute-lft-neg-out95.3%
distribute-neg-frac95.3%
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 1.0000000000000001e299 < (/.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 1.3%
+-commutative1.3%
*-commutative1.3%
associate-/l*18.3%
fma-define18.3%
*-commutative18.3%
fma-define18.3%
fma-define18.3%
*-commutative18.3%
fma-define18.3%
Simplified18.3%
fma-undefine18.3%
fma-undefine18.3%
*-commutative18.3%
fma-define18.3%
fma-undefine18.3%
*-commutative18.3%
associate-*r/1.3%
associate-*l/18.3%
clear-num18.3%
associate-*l/18.3%
*-un-lft-identity18.3%
*-commutative18.3%
fma-undefine18.3%
fma-define18.3%
*-commutative18.3%
fma-undefine18.3%
Applied egg-rr18.3%
Taylor expanded in z around inf 99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.65e+34) (not (<= z 1.62e+22)))
(+ x (/ y 14.431876219268936))
(+
x
(/
(*
y
(+
0.279195317918525
(+ (* 0.0692910599291889 (pow z 2.0)) (* z 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.65e+34) || !(z <= 1.62e+22)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + ((y * (0.279195317918525 + ((0.0692910599291889 * pow(z, 2.0)) + (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 <= (-1.65d+34)) .or. (.not. (z <= 1.62d+22))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + ((y * (0.279195317918525d0 + ((0.0692910599291889d0 * (z ** 2.0d0)) + (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 <= -1.65e+34) || !(z <= 1.62e+22)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + ((y * (0.279195317918525 + ((0.0692910599291889 * Math.pow(z, 2.0)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.65e+34) or not (z <= 1.62e+22): tmp = x + (y / 14.431876219268936) else: tmp = x + ((y * (0.279195317918525 + ((0.0692910599291889 * math.pow(z, 2.0)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.65e+34) || !(z <= 1.62e+22)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(Float64(y * Float64(0.279195317918525 + Float64(Float64(0.0692910599291889 * (z ^ 2.0)) + 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 <= -1.65e+34) || ~((z <= 1.62e+22))) tmp = x + (y / 14.431876219268936); else tmp = x + ((y * (0.279195317918525 + ((0.0692910599291889 * (z ^ 2.0)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.65e+34], N[Not[LessEqual[z, 1.62e+22]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(0.279195317918525 + N[(N[(0.0692910599291889 * N[Power[z, 2.0], $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 -1.65 \cdot 10^{+34} \lor \neg \left(z \leq 1.62 \cdot 10^{+22}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.279195317918525 + \left(0.0692910599291889 \cdot {z}^{2} + z \cdot 0.4917317610505968\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\end{array}
\end{array}
if z < -1.64999999999999994e34 or 1.62e22 < z Initial program 33.5%
+-commutative33.5%
*-commutative33.5%
associate-/l*50.5%
fma-define50.5%
*-commutative50.5%
fma-define50.5%
fma-define50.5%
*-commutative50.5%
fma-define50.5%
Simplified50.5%
fma-undefine50.5%
fma-undefine50.5%
*-commutative50.5%
fma-define50.5%
fma-undefine50.5%
*-commutative50.5%
associate-*r/33.5%
associate-*l/51.7%
clear-num51.7%
associate-*l/51.8%
*-un-lft-identity51.8%
*-commutative51.8%
fma-undefine51.8%
fma-define51.8%
*-commutative51.8%
fma-undefine51.8%
Applied egg-rr51.8%
Taylor expanded in z around inf 100.0%
if -1.64999999999999994e34 < z < 1.62e22Initial program 99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in y around 0 99.7%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -7e+66)
(+ x (/ y 14.431876219268936))
(if (<= z 0.235)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+
x
(/
y
(-
(+ 14.431876219268936 (/ 101.23733352003822 (pow z 2.0)))
(/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -7e+66) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / pow(z, 2.0))) - (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 <= (-7d+66)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 0.235d0) then
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
else
tmp = x + (y / ((14.431876219268936d0 + (101.23733352003822d0 / (z ** 2.0d0))) - (15.646356830292042d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -7e+66) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / Math.pow(z, 2.0))) - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -7e+66: tmp = x + (y / 14.431876219268936) elif z <= 0.235: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / math.pow(z, 2.0))) - (15.646356830292042 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -7e+66) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 0.235) 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(Float64(14.431876219268936 + Float64(101.23733352003822 / (z ^ 2.0))) - Float64(15.646356830292042 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -7e+66) tmp = x + (y / 14.431876219268936); elseif (z <= 0.235) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + (y / ((14.431876219268936 + (101.23733352003822 / (z ^ 2.0))) - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -7e+66], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.235], 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[(N[(14.431876219268936 + N[(101.23733352003822 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+66}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 0.235:\\
\;\;\;\;\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}{\left(14.431876219268936 + \frac{101.23733352003822}{{z}^{2}}\right) - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -6.9999999999999994e66Initial program 23.1%
+-commutative23.1%
*-commutative23.1%
associate-/l*41.8%
fma-define41.8%
*-commutative41.8%
fma-define41.8%
fma-define41.8%
*-commutative41.8%
fma-define41.8%
Simplified41.8%
fma-undefine41.8%
fma-undefine41.8%
*-commutative41.8%
fma-define41.8%
fma-undefine41.8%
*-commutative41.8%
associate-*r/23.1%
associate-*l/41.8%
clear-num41.8%
associate-*l/41.9%
*-un-lft-identity41.9%
*-commutative41.9%
fma-undefine41.9%
fma-define41.9%
*-commutative41.9%
fma-undefine41.9%
Applied egg-rr41.9%
Taylor expanded in z around inf 100.0%
if -6.9999999999999994e66 < z < 0.23499999999999999Initial program 99.7%
if 0.23499999999999999 < z Initial program 47.4%
+-commutative47.4%
*-commutative47.4%
associate-/l*61.8%
fma-define61.8%
*-commutative61.8%
fma-define61.8%
fma-define61.8%
*-commutative61.8%
fma-define61.8%
Simplified61.8%
fma-undefine61.8%
fma-undefine61.8%
*-commutative61.8%
fma-define61.8%
fma-undefine61.8%
*-commutative61.8%
associate-*r/47.4%
associate-*l/64.0%
clear-num64.0%
associate-*l/64.0%
*-un-lft-identity64.0%
*-commutative64.0%
fma-undefine64.0%
fma-define64.0%
*-commutative64.0%
fma-undefine64.0%
Applied egg-rr64.0%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -7e+66) (not (<= z 3700000000000.0)))
(+ x (/ y 14.431876219268936))
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7e+66) || !(z <= 3700000000000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + 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 ((z <= (-7d+66)) .or. (.not. (z <= 3700000000000.0d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7e+66) || !(z <= 3700000000000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7e+66) or not (z <= 3700000000000.0): tmp = x + (y / 14.431876219268936) else: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7e+66) || !(z <= 3700000000000.0)) tmp = Float64(x + Float64(y / 14.431876219268936)); else 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); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7e+66) || ~((z <= 3700000000000.0))) tmp = x + (y / 14.431876219268936); else tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7e+66], N[Not[LessEqual[z, 3700000000000.0]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+66} \lor \neg \left(z \leq 3700000000000\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;\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\\
\end{array}
\end{array}
if z < -6.9999999999999994e66 or 3.7e12 < z Initial program 32.1%
+-commutative32.1%
*-commutative32.1%
associate-/l*49.5%
fma-define49.5%
*-commutative49.5%
fma-define49.5%
fma-define49.5%
*-commutative49.5%
fma-define49.5%
Simplified49.5%
fma-undefine49.5%
fma-undefine49.5%
*-commutative49.5%
fma-define49.5%
fma-undefine49.5%
*-commutative49.5%
associate-*r/32.1%
associate-*l/50.8%
clear-num50.8%
associate-*l/50.8%
*-un-lft-identity50.8%
*-commutative50.8%
fma-undefine50.8%
fma-define50.8%
*-commutative50.8%
fma-undefine50.8%
Applied egg-rr50.8%
Taylor expanded in z around inf 99.9%
if -6.9999999999999994e66 < z < 3.7e12Initial program 99.7%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.2e+124) (and (not (<= y 2.2e+149)) (<= y 3.2e+235))) (* y 0.08333333333333323) (+ x (* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.2e+124) || (!(y <= 2.2e+149) && (y <= 3.2e+235))) {
tmp = y * 0.08333333333333323;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-3.2d+124)) .or. (.not. (y <= 2.2d+149)) .and. (y <= 3.2d+235)) then
tmp = y * 0.08333333333333323d0
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -3.2e+124) || (!(y <= 2.2e+149) && (y <= 3.2e+235))) {
tmp = y * 0.08333333333333323;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.2e+124) or (not (y <= 2.2e+149) and (y <= 3.2e+235)): tmp = y * 0.08333333333333323 else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.2e+124) || (!(y <= 2.2e+149) && (y <= 3.2e+235))) tmp = Float64(y * 0.08333333333333323); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -3.2e+124) || (~((y <= 2.2e+149)) && (y <= 3.2e+235))) tmp = y * 0.08333333333333323; else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.2e+124], And[N[Not[LessEqual[y, 2.2e+149]], $MachinePrecision], LessEqual[y, 3.2e+235]]], N[(y * 0.08333333333333323), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+124} \lor \neg \left(y \leq 2.2 \cdot 10^{+149}\right) \land y \leq 3.2 \cdot 10^{+235}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if y < -3.19999999999999993e124 or 2.2e149 < y < 3.20000000000000006e235Initial program 69.2%
+-commutative69.2%
*-commutative69.2%
associate-/l*86.4%
fma-define86.4%
*-commutative86.4%
fma-define86.4%
fma-define86.4%
*-commutative86.4%
fma-define86.4%
Simplified86.4%
Taylor expanded in z around 0 78.1%
+-commutative78.1%
fma-define78.1%
Simplified78.1%
Taylor expanded in y around inf 69.4%
if -3.19999999999999993e124 < y < 2.2e149 or 3.20000000000000006e235 < y Initial program 74.4%
+-commutative74.4%
*-commutative74.4%
associate-/l*78.4%
fma-define78.4%
*-commutative78.4%
fma-define78.4%
fma-define78.4%
*-commutative78.4%
fma-define78.4%
Simplified78.4%
Taylor expanded in z around inf 86.0%
+-commutative86.0%
Simplified86.0%
Final simplification82.5%
(FPCore (x y z)
:precision binary64
(if (<= z -5.8e+19)
(+ x (/ y 14.431876219268936))
(if (<= z 0.235)
(+ x (/ y 12.000000000000014))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.8d+19)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 0.235d0) then
tmp = x + (y / 12.000000000000014d0)
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.8e+19: tmp = x + (y / 14.431876219268936) elif z <= 0.235: tmp = x + (y / 12.000000000000014) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.8e+19) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 0.235) tmp = Float64(x + Float64(y / 12.000000000000014)); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.8e+19) tmp = x + (y / 14.431876219268936); elseif (z <= 0.235) tmp = x + (y / 12.000000000000014); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.8e+19], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.235], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 0.235:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.8e19Initial program 34.9%
+-commutative34.9%
*-commutative34.9%
associate-/l*50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
fma-undefine50.6%
fma-undefine50.6%
*-commutative50.6%
fma-define50.6%
fma-undefine50.6%
*-commutative50.6%
associate-*r/34.9%
associate-*l/50.6%
clear-num50.6%
associate-*l/50.8%
*-un-lft-identity50.8%
*-commutative50.8%
fma-undefine50.8%
fma-define50.8%
*-commutative50.8%
fma-undefine50.8%
Applied egg-rr50.8%
Taylor expanded in z around inf 100.0%
if -5.8e19 < z < 0.23499999999999999Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
fma-undefine99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
associate-*r/99.6%
associate-*l/99.8%
clear-num99.1%
associate-*l/99.4%
*-un-lft-identity99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 98.6%
if 0.23499999999999999 < z Initial program 47.4%
remove-double-neg47.4%
distribute-lft-neg-out47.4%
distribute-neg-frac47.4%
associate-/l*64.0%
distribute-lft-neg-in64.0%
remove-double-neg64.0%
fma-define64.0%
fma-define64.0%
fma-define64.0%
Simplified64.0%
Taylor expanded in z around inf 99.3%
associate-*r/99.3%
metadata-eval99.3%
Simplified99.3%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= z -5.8e+19)
(+ x (/ y 14.431876219268936))
(if (<= z 0.235)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.8d+19)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 0.235d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.8e+19: tmp = x + (y / 14.431876219268936) elif z <= 0.235: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.8e+19) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 0.235) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.8e+19) tmp = x + (y / 14.431876219268936); elseif (z <= 0.235) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.8e+19], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.235], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 0.235:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.8e19Initial program 34.9%
+-commutative34.9%
*-commutative34.9%
associate-/l*50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
fma-undefine50.6%
fma-undefine50.6%
*-commutative50.6%
fma-define50.6%
fma-undefine50.6%
*-commutative50.6%
associate-*r/34.9%
associate-*l/50.6%
clear-num50.6%
associate-*l/50.8%
*-un-lft-identity50.8%
*-commutative50.8%
fma-undefine50.8%
fma-define50.8%
*-commutative50.8%
fma-undefine50.8%
Applied egg-rr50.8%
Taylor expanded in z around inf 100.0%
if -5.8e19 < z < 0.23499999999999999Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around 0 99.1%
if 0.23499999999999999 < z Initial program 47.4%
remove-double-neg47.4%
distribute-lft-neg-out47.4%
distribute-neg-frac47.4%
associate-/l*64.0%
distribute-lft-neg-in64.0%
remove-double-neg64.0%
fma-define64.0%
fma-define64.0%
fma-define64.0%
Simplified64.0%
Taylor expanded in z around inf 99.3%
associate-*r/99.3%
metadata-eval99.3%
Simplified99.3%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= z -5.8e+19)
(+ x (/ y 14.431876219268936))
(if (<= z 0.235)
(+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.8d+19)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 0.235d0) then
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.8e+19) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 0.235) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.8e+19: tmp = x + (y / 14.431876219268936) elif z <= 0.235: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.8e+19) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 0.235) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.8e+19) tmp = x + (y / 14.431876219268936); elseif (z <= 0.235) tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.8e+19], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.235], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 0.235:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.8e19Initial program 34.9%
+-commutative34.9%
*-commutative34.9%
associate-/l*50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
fma-undefine50.6%
fma-undefine50.6%
*-commutative50.6%
fma-define50.6%
fma-undefine50.6%
*-commutative50.6%
associate-*r/34.9%
associate-*l/50.6%
clear-num50.6%
associate-*l/50.8%
*-un-lft-identity50.8%
*-commutative50.8%
fma-undefine50.8%
fma-define50.8%
*-commutative50.8%
fma-undefine50.8%
Applied egg-rr50.8%
Taylor expanded in z around inf 100.0%
if -5.8e19 < z < 0.23499999999999999Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
fma-undefine99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
associate-*r/99.6%
associate-*l/99.8%
clear-num99.1%
associate-*l/99.4%
*-un-lft-identity99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 99.2%
*-commutative99.2%
Simplified99.2%
if 0.23499999999999999 < z Initial program 47.4%
remove-double-neg47.4%
distribute-lft-neg-out47.4%
distribute-neg-frac47.4%
associate-/l*64.0%
distribute-lft-neg-in64.0%
remove-double-neg64.0%
fma-define64.0%
fma-define64.0%
fma-define64.0%
Simplified64.0%
Taylor expanded in z around inf 99.3%
associate-*r/99.3%
metadata-eval99.3%
Simplified99.3%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.8e+19) (not (<= z 0.235))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+19) || !(z <= 0.235)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.8d+19)) .or. (.not. (z <= 0.235d0))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+19) || !(z <= 0.235)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.8e+19) or not (z <= 0.235): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.8e+19) || !(z <= 0.235)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.8e+19) || ~((z <= 0.235))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.8e+19], N[Not[LessEqual[z, 0.235]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+19} \lor \neg \left(z \leq 0.235\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.8e19 or 0.23499999999999999 < z Initial program 41.0%
+-commutative41.0%
*-commutative41.0%
associate-/l*56.1%
fma-define56.1%
*-commutative56.1%
fma-define56.1%
fma-define56.1%
*-commutative56.1%
fma-define56.1%
Simplified56.1%
Taylor expanded in z around inf 99.0%
+-commutative99.0%
Simplified99.0%
if -5.8e19 < z < 0.23499999999999999Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in z around 0 98.5%
+-commutative98.5%
Simplified98.5%
Final simplification98.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.8e+19) (not (<= z 0.235))) (+ x (* y 0.0692910599291889)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+19) || !(z <= 0.235)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.8d+19)) .or. (.not. (z <= 0.235d0))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + (y / 12.000000000000014d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+19) || !(z <= 0.235)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.8e+19) or not (z <= 0.235): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.8e+19) || !(z <= 0.235)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.8e+19) || ~((z <= 0.235))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.8e+19], N[Not[LessEqual[z, 0.235]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+19} \lor \neg \left(z \leq 0.235\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.8e19 or 0.23499999999999999 < z Initial program 41.0%
+-commutative41.0%
*-commutative41.0%
associate-/l*56.1%
fma-define56.1%
*-commutative56.1%
fma-define56.1%
fma-define56.1%
*-commutative56.1%
fma-define56.1%
Simplified56.1%
Taylor expanded in z around inf 99.0%
+-commutative99.0%
Simplified99.0%
if -5.8e19 < z < 0.23499999999999999Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
fma-undefine99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
associate-*r/99.6%
associate-*l/99.8%
clear-num99.1%
associate-*l/99.4%
*-un-lft-identity99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 98.6%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.8e+19) (not (<= z 0.235))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+19) || !(z <= 0.235)) {
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.8d+19)) .or. (.not. (z <= 0.235d0))) 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.8e+19) || !(z <= 0.235)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.8e+19) or not (z <= 0.235): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.8e+19) || !(z <= 0.235)) 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.8e+19) || ~((z <= 0.235))) 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.8e+19], N[Not[LessEqual[z, 0.235]], $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.8 \cdot 10^{+19} \lor \neg \left(z \leq 0.235\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.8e19 or 0.23499999999999999 < z Initial program 41.0%
+-commutative41.0%
*-commutative41.0%
associate-/l*56.1%
fma-define56.1%
*-commutative56.1%
fma-define56.1%
fma-define56.1%
*-commutative56.1%
fma-define56.1%
Simplified56.1%
fma-undefine56.1%
fma-undefine56.1%
*-commutative56.1%
fma-define56.1%
fma-undefine56.1%
*-commutative56.1%
associate-*r/41.0%
associate-*l/57.1%
clear-num57.1%
associate-*l/57.2%
*-un-lft-identity57.2%
*-commutative57.2%
fma-undefine57.2%
fma-define57.2%
*-commutative57.2%
fma-undefine57.2%
Applied egg-rr57.2%
Taylor expanded in z around inf 99.4%
if -5.8e19 < z < 0.23499999999999999Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
fma-undefine99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
associate-*r/99.6%
associate-*l/99.8%
clear-num99.1%
associate-*l/99.4%
*-un-lft-identity99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 98.6%
Final simplification98.9%
(FPCore (x y z) :precision binary64 (if (<= x -2.1e-143) x (if (<= x 2.3e-77) (* y 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e-143) {
tmp = x;
} else if (x <= 2.3e-77) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.1d-143)) then
tmp = x
else if (x <= 2.3d-77) then
tmp = y * 0.08333333333333323d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e-143) {
tmp = x;
} else if (x <= 2.3e-77) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.1e-143: tmp = x elif x <= 2.3e-77: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.1e-143) tmp = x; elseif (x <= 2.3e-77) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.1e-143) tmp = x; elseif (x <= 2.3e-77) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.1e-143], x, If[LessEqual[x, 2.3e-77], N[(y * 0.08333333333333323), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-143}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-77}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.1000000000000001e-143 or 2.29999999999999999e-77 < x Initial program 72.5%
+-commutative72.5%
*-commutative72.5%
associate-/l*79.8%
fma-define79.8%
*-commutative79.8%
fma-define79.8%
fma-define79.8%
*-commutative79.8%
fma-define79.8%
Simplified79.8%
Taylor expanded in y around 0 75.4%
if -2.1000000000000001e-143 < x < 2.29999999999999999e-77Initial program 74.7%
+-commutative74.7%
*-commutative74.7%
associate-/l*80.5%
fma-define80.6%
*-commutative80.6%
fma-define80.6%
fma-define80.6%
*-commutative80.6%
fma-define80.6%
Simplified80.6%
Taylor expanded in z around 0 67.3%
+-commutative67.3%
fma-define67.3%
Simplified67.3%
Taylor expanded in y around inf 60.9%
Final simplification70.0%
(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 73.3%
+-commutative73.3%
*-commutative73.3%
associate-/l*80.1%
fma-define80.1%
*-commutative80.1%
fma-define80.1%
fma-define80.1%
*-commutative80.1%
fma-define80.1%
Simplified80.1%
Taylor expanded in y around 0 50.9%
Final simplification50.9%
(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 2024053
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(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))))