
(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 11 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 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
t_0)))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+303)))
(+ x (* y 0.0692910599291889))
(+
x
(/
(+
(* y (* z (fma z 0.0692910599291889 0.4917317610505968)))
(* y 0.279195317918525))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0;
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+303)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (((y * (z * fma(z, 0.0692910599291889, 0.4917317610505968))) + (y * 0.279195317918525)) / t_0);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+303)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(Float64(Float64(y * Float64(z * fma(z, 0.0692910599291889, 0.4917317610505968))) + Float64(y * 0.279195317918525)) / t_0)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+303]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := \frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{t\_0}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+303}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)\right) + y \cdot 0.279195317918525}{t\_0}\\
\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)) < -inf.0 or 2e303 < (/.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.2%
+-commutative1.2%
*-commutative1.2%
associate-/l*18.0%
fma-define18.0%
*-commutative18.0%
fma-define18.0%
fma-define18.0%
*-commutative18.0%
fma-define18.0%
Simplified18.0%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
Simplified99.6%
if -inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) < 2e303Initial program 99.7%
add-sqr-sqrt46.0%
sqrt-unprod94.4%
swap-sqr93.8%
pow293.8%
metadata-eval93.8%
Applied egg-rr93.8%
distribute-rgt-in93.8%
*-commutative93.8%
sqrt-prod93.8%
fma-define93.8%
unpow293.8%
sqrt-prod46.1%
add-sqr-sqrt99.7%
metadata-eval99.7%
*-commutative99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z 0.0692910599291889) 0.4917317610505968)))
(if (<=
(/
(* y (+ (* z t_0) 0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
INFINITY)
(+
x
(*
y
(/
(fma t_0 z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double t_0 = (z * 0.0692910599291889) + 0.4917317610505968;
double tmp;
if (((y * ((z * t_0) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= ((double) INFINITY)) {
tmp = x + (y * (fma(t_0, z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * t_0) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= Inf) tmp = Float64(x + Float64(y * Float64(fma(t_0, z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304)))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(N[(z * t$95$0), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(y * N[(N[(t$95$0 * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot 0.0692910599291889 + 0.4917317610505968\\
\mathbf{if}\;\frac{y \cdot \left(z \cdot t\_0 + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq \infty:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(t\_0, z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\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)) < +inf.0Initial program 92.3%
remove-double-neg92.3%
distribute-lft-neg-out92.3%
distribute-neg-frac92.3%
associate-/l*99.7%
distribute-lft-neg-in99.7%
remove-double-neg99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
fma-define99.7%
Applied egg-rr99.7%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) Initial program 0.0%
+-commutative0.0%
*-commutative0.0%
associate-/l*0.0%
fma-define0.0%
*-commutative0.0%
fma-define0.0%
fma-define0.0%
*-commutative0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))))
(if (or (<= t_0 (- INFINITY)) (not (<= t_0 2e+303)))
(+ x (* y 0.0692910599291889))
(+ t_0 x))))
double code(double x, double y, double z) {
double t_0 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304);
double tmp;
if ((t_0 <= -((double) INFINITY)) || !(t_0 <= 2e+303)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = t_0 + x;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304);
double tmp;
if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= 2e+303)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = t_0 + x;
}
return tmp;
}
def code(x, y, z): t_0 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304) tmp = 0 if (t_0 <= -math.inf) or not (t_0 <= 2e+303): tmp = x + (y * 0.0692910599291889) else: tmp = t_0 + x return tmp
function code(x, y, z) t_0 = Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) tmp = 0.0 if ((t_0 <= Float64(-Inf)) || !(t_0 <= 2e+303)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(t_0 + x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304); tmp = 0.0; if ((t_0 <= -Inf) || ~((t_0 <= 2e+303))) tmp = x + (y * 0.0692910599291889); else tmp = t_0 + x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, 2e+303]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t\_0 \leq -\infty \lor \neg \left(t\_0 \leq 2 \cdot 10^{+303}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;t\_0 + x\\
\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)) < -inf.0 or 2e303 < (/.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.2%
+-commutative1.2%
*-commutative1.2%
associate-/l*18.0%
fma-define18.0%
*-commutative18.0%
fma-define18.0%
fma-define18.0%
*-commutative18.0%
fma-define18.0%
Simplified18.0%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
Simplified99.6%
if -inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) < 2e303Initial program 99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (or (<= z -6.2e-174)
(not
(or (<= z -2.15e-271) (and (not (<= z 4e-178)) (<= z 2.4e-101)))))
(+ x (* y 0.0692910599291889))
(* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6.2e-174) || !((z <= -2.15e-271) || (!(z <= 4e-178) && (z <= 2.4e-101)))) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-6.2d-174)) .or. (.not. (z <= (-2.15d-271)) .or. (.not. (z <= 4d-178)) .and. (z <= 2.4d-101))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6.2e-174) || !((z <= -2.15e-271) || (!(z <= 4e-178) && (z <= 2.4e-101)))) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6.2e-174) or not ((z <= -2.15e-271) or (not (z <= 4e-178) and (z <= 2.4e-101))): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6.2e-174) || !((z <= -2.15e-271) || (!(z <= 4e-178) && (z <= 2.4e-101)))) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6.2e-174) || ~(((z <= -2.15e-271) || (~((z <= 4e-178)) && (z <= 2.4e-101))))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6.2e-174], N[Not[Or[LessEqual[z, -2.15e-271], And[N[Not[LessEqual[z, 4e-178]], $MachinePrecision], LessEqual[z, 2.4e-101]]]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-174} \lor \neg \left(z \leq -2.15 \cdot 10^{-271} \lor \neg \left(z \leq 4 \cdot 10^{-178}\right) \land z \leq 2.4 \cdot 10^{-101}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -6.1999999999999998e-174 or -2.15e-271 < z < 3.9999999999999998e-178 or 2.4e-101 < z Initial program 60.8%
+-commutative60.8%
*-commutative60.8%
associate-/l*65.1%
fma-define65.1%
*-commutative65.1%
fma-define65.1%
fma-define65.1%
*-commutative65.1%
fma-define65.1%
Simplified65.1%
Taylor expanded in z around inf 88.7%
+-commutative88.7%
Simplified88.7%
if -6.1999999999999998e-174 < z < -2.15e-271 or 3.9999999999999998e-178 < z < 2.4e-101Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.5%
fma-define99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
*-commutative99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in z around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 79.8%
Final simplification87.1%
(FPCore (x y z)
:precision binary64
(if (<= x -2.4e-117)
x
(if (<= x 2.95e-307)
(* y 0.08333333333333323)
(if (<= x 8.5e-249)
(* y 0.0692910599291889)
(if (<= x 8.2e-85) (* y 0.08333333333333323) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.4e-117) {
tmp = x;
} else if (x <= 2.95e-307) {
tmp = y * 0.08333333333333323;
} else if (x <= 8.5e-249) {
tmp = y * 0.0692910599291889;
} else if (x <= 8.2e-85) {
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.4d-117)) then
tmp = x
else if (x <= 2.95d-307) then
tmp = y * 0.08333333333333323d0
else if (x <= 8.5d-249) then
tmp = y * 0.0692910599291889d0
else if (x <= 8.2d-85) 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.4e-117) {
tmp = x;
} else if (x <= 2.95e-307) {
tmp = y * 0.08333333333333323;
} else if (x <= 8.5e-249) {
tmp = y * 0.0692910599291889;
} else if (x <= 8.2e-85) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.4e-117: tmp = x elif x <= 2.95e-307: tmp = y * 0.08333333333333323 elif x <= 8.5e-249: tmp = y * 0.0692910599291889 elif x <= 8.2e-85: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.4e-117) tmp = x; elseif (x <= 2.95e-307) tmp = Float64(y * 0.08333333333333323); elseif (x <= 8.5e-249) tmp = Float64(y * 0.0692910599291889); elseif (x <= 8.2e-85) 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.4e-117) tmp = x; elseif (x <= 2.95e-307) tmp = y * 0.08333333333333323; elseif (x <= 8.5e-249) tmp = y * 0.0692910599291889; elseif (x <= 8.2e-85) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.4e-117], x, If[LessEqual[x, 2.95e-307], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[x, 8.5e-249], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[x, 8.2e-85], N[(y * 0.08333333333333323), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-117}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.95 \cdot 10^{-307}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-249}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-85}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.40000000000000014e-117 or 8.19999999999999987e-85 < x Initial program 66.3%
+-commutative66.3%
*-commutative66.3%
associate-/l*69.9%
fma-define69.9%
*-commutative69.9%
fma-define69.9%
fma-define69.9%
*-commutative69.9%
fma-define69.9%
Simplified69.9%
Taylor expanded in y around 0 67.4%
if -2.40000000000000014e-117 < x < 2.94999999999999998e-307 or 8.4999999999999995e-249 < x < 8.19999999999999987e-85Initial program 73.8%
+-commutative73.8%
*-commutative73.8%
associate-/l*78.1%
fma-define78.1%
*-commutative78.1%
fma-define78.1%
fma-define78.1%
*-commutative78.1%
fma-define78.1%
Simplified78.1%
Taylor expanded in z around 0 76.8%
+-commutative76.8%
Simplified76.8%
Taylor expanded in y around inf 63.6%
if 2.94999999999999998e-307 < x < 8.4999999999999995e-249Initial program 61.9%
+-commutative61.9%
*-commutative61.9%
associate-/l*61.6%
fma-define61.6%
*-commutative61.6%
fma-define61.6%
fma-define61.6%
*-commutative61.6%
fma-define61.6%
Simplified61.6%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
Simplified77.5%
Taylor expanded in y around inf 77.5%
Final simplification67.2%
(FPCore (x y z)
:precision binary64
(if (<= z -6e+25)
(+ x (* y 0.0692910599291889))
(if (<= z 0.23)
(+ x (+ (* y 0.08333333333333323) (* z (* y -0.00277777777751721))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -6e+25) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 0.23) {
tmp = x + ((y * 0.08333333333333323) + (z * (y * -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 <= (-6d+25)) then
tmp = x + (y * 0.0692910599291889d0)
else if (z <= 0.23d0) then
tmp = x + ((y * 0.08333333333333323d0) + (z * (y * (-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 <= -6e+25) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 0.23) {
tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -6e+25: tmp = x + (y * 0.0692910599291889) elif z <= 0.23: tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -6e+25) tmp = Float64(x + Float64(y * 0.0692910599291889)); elseif (z <= 0.23) tmp = Float64(x + Float64(Float64(y * 0.08333333333333323) + Float64(z * Float64(y * -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 <= -6e+25) tmp = x + (y * 0.0692910599291889); elseif (z <= 0.23) tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -6e+25], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.23], N[(x + N[(N[(y * 0.08333333333333323), $MachinePrecision] + N[(z * N[(y * -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 -6 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 0.23:\\
\;\;\;\;x + \left(y \cdot 0.08333333333333323 + z \cdot \left(y \cdot -0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -6.00000000000000011e25Initial program 39.3%
+-commutative39.3%
*-commutative39.3%
associate-/l*43.5%
fma-define43.5%
*-commutative43.5%
fma-define43.5%
fma-define43.5%
*-commutative43.5%
fma-define43.5%
Simplified43.5%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
Simplified99.6%
if -6.00000000000000011e25 < z < 0.23000000000000001Initial 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.0%
Taylor expanded in y around 0 99.0%
*-commutative99.0%
Simplified99.0%
if 0.23000000000000001 < z Initial program 37.2%
remove-double-neg37.2%
distribute-lft-neg-out37.2%
distribute-neg-frac37.2%
associate-/l*49.8%
distribute-lft-neg-in49.8%
remove-double-neg49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
Simplified49.8%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -6e+25)
(+ x (* y 0.0692910599291889))
(if (<= z 0.23)
(+ x (* y 0.08333333333333323))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -6e+25) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 0.23) {
tmp = x + (y * 0.08333333333333323);
} 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 <= (-6d+25)) then
tmp = x + (y * 0.0692910599291889d0)
else if (z <= 0.23d0) then
tmp = x + (y * 0.08333333333333323d0)
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 <= -6e+25) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 0.23) {
tmp = x + (y * 0.08333333333333323);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -6e+25: tmp = x + (y * 0.0692910599291889) elif z <= 0.23: tmp = x + (y * 0.08333333333333323) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -6e+25) tmp = Float64(x + Float64(y * 0.0692910599291889)); elseif (z <= 0.23) tmp = Float64(x + Float64(y * 0.08333333333333323)); 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 <= -6e+25) tmp = x + (y * 0.0692910599291889); elseif (z <= 0.23) tmp = x + (y * 0.08333333333333323); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -6e+25], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.23], N[(x + N[(y * 0.08333333333333323), $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 -6 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 0.23:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -6.00000000000000011e25Initial program 39.3%
+-commutative39.3%
*-commutative39.3%
associate-/l*43.5%
fma-define43.5%
*-commutative43.5%
fma-define43.5%
fma-define43.5%
*-commutative43.5%
fma-define43.5%
Simplified43.5%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
Simplified99.6%
if -6.00000000000000011e25 < z < 0.23000000000000001Initial 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.1%
+-commutative98.1%
Simplified98.1%
if 0.23000000000000001 < z Initial program 37.2%
remove-double-neg37.2%
distribute-lft-neg-out37.2%
distribute-neg-frac37.2%
associate-/l*49.8%
distribute-lft-neg-in49.8%
remove-double-neg49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
Simplified49.8%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(if (<= z -6e+25)
(+ x (* y 0.0692910599291889))
(if (<= z 0.23)
(+ 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 <= -6e+25) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 0.23) {
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 <= (-6d+25)) then
tmp = x + (y * 0.0692910599291889d0)
else if (z <= 0.23d0) 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 <= -6e+25) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 0.23) {
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 <= -6e+25: tmp = x + (y * 0.0692910599291889) elif z <= 0.23: 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 <= -6e+25) tmp = Float64(x + Float64(y * 0.0692910599291889)); elseif (z <= 0.23) 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 <= -6e+25) tmp = x + (y * 0.0692910599291889); elseif (z <= 0.23) 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, -6e+25], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.23], 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 -6 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 0.23:\\
\;\;\;\;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 < -6.00000000000000011e25Initial program 39.3%
+-commutative39.3%
*-commutative39.3%
associate-/l*43.5%
fma-define43.5%
*-commutative43.5%
fma-define43.5%
fma-define43.5%
*-commutative43.5%
fma-define43.5%
Simplified43.5%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
Simplified99.6%
if -6.00000000000000011e25 < z < 0.23000000000000001Initial 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 98.9%
if 0.23000000000000001 < z Initial program 37.2%
remove-double-neg37.2%
distribute-lft-neg-out37.2%
distribute-neg-frac37.2%
associate-/l*49.8%
distribute-lft-neg-in49.8%
remove-double-neg49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
Simplified49.8%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -6e+25) (not (<= z 0.23))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6e+25) || !(z <= 0.23)) {
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 <= (-6d+25)) .or. (.not. (z <= 0.23d0))) 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 <= -6e+25) || !(z <= 0.23)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6e+25) or not (z <= 0.23): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6e+25) || !(z <= 0.23)) 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 <= -6e+25) || ~((z <= 0.23))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6e+25], N[Not[LessEqual[z, 0.23]], $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 -6 \cdot 10^{+25} \lor \neg \left(z \leq 0.23\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -6.00000000000000011e25 or 0.23000000000000001 < z Initial program 38.3%
+-commutative38.3%
*-commutative38.3%
associate-/l*45.1%
fma-define45.1%
*-commutative45.1%
fma-define45.1%
fma-define45.1%
*-commutative45.1%
fma-define45.1%
Simplified45.1%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
Simplified99.6%
if -6.00000000000000011e25 < z < 0.23000000000000001Initial 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.1%
+-commutative98.1%
Simplified98.1%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= y -6.8e+96) (not (<= y 3.2e+86))) (* y 0.0692910599291889) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6.8e+96) || !(y <= 3.2e+86)) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-6.8d+96)) .or. (.not. (y <= 3.2d+86))) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -6.8e+96) || !(y <= 3.2e+86)) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6.8e+96) or not (y <= 3.2e+86): tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6.8e+96) || !(y <= 3.2e+86)) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6.8e+96) || ~((y <= 3.2e+86))) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.8e+96], N[Not[LessEqual[y, 3.2e+86]], $MachinePrecision]], N[(y * 0.0692910599291889), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+96} \lor \neg \left(y \leq 3.2 \cdot 10^{+86}\right):\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.8000000000000002e96 or 3.2e86 < y Initial program 54.4%
+-commutative54.4%
*-commutative54.4%
associate-/l*68.0%
fma-define68.0%
*-commutative68.0%
fma-define68.0%
fma-define68.0%
*-commutative68.0%
fma-define68.0%
Simplified68.0%
Taylor expanded in z around inf 68.6%
+-commutative68.6%
Simplified68.6%
Taylor expanded in y around inf 53.7%
if -6.8000000000000002e96 < y < 3.2e86Initial program 75.6%
+-commutative75.6%
*-commutative75.6%
associate-/l*73.3%
fma-define73.3%
*-commutative73.3%
fma-define73.3%
fma-define73.3%
*-commutative73.3%
fma-define73.3%
Simplified73.3%
Taylor expanded in y around 0 70.3%
Final simplification64.1%
(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 67.8%
+-commutative67.8%
*-commutative67.8%
associate-/l*71.3%
fma-define71.3%
*-commutative71.3%
fma-define71.3%
fma-define71.3%
*-commutative71.3%
fma-define71.3%
Simplified71.3%
Taylor expanded in y around 0 50.6%
Final simplification50.6%
(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 2024052
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))