
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.4) (not (<= z 5.1e-8)))
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.4d0)) .or. (.not. (z <= 5.1d-8))) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4) or not (z <= 5.1e-8): tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) else: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4) || !(z <= 5.1e-8)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.4) || ~((z <= 5.1e-8))) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); else tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.4], N[Not[LessEqual[z, 5.1e-8]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \lor \neg \left(z \leq 5.1 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5.10000000000000001e-8 < z Initial program 44.9%
remove-double-neg44.9%
associate-/l*54.8%
distribute-rgt-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-rgt-neg-in54.8%
remove-double-neg54.8%
fma-define54.8%
fma-define54.8%
fma-define54.8%
Simplified54.8%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
sub-neg99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
if -5.4000000000000004 < z < 5.10000000000000001e-8Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-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.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+305)
(+
x
(*
y
(/
(fma
(/
(- 0.24180012482592123 (* (pow z 2.0) 0.004801250986110448))
(- 0.4917317610505968 (* z 0.0692910599291889)))
z
0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+ x (* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) {
tmp = x + (y * (fma(((0.24180012482592123 - (pow(z, 2.0) * 0.004801250986110448)) / (0.4917317610505968 - (z * 0.0692910599291889))), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) tmp = Float64(x + Float64(y * Float64(fma(Float64(Float64(0.24180012482592123 - Float64((z ^ 2.0) * 0.004801250986110448)) / Float64(0.4917317610505968 - Float64(z * 0.0692910599291889))), 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_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+305], N[(x + N[(y * N[(N[(N[(N[(0.24180012482592123 - N[(N[Power[z, 2.0], $MachinePrecision] * 0.004801250986110448), $MachinePrecision]), $MachinePrecision] / N[(0.4917317610505968 - N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+305}:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\frac{0.24180012482592123 - {z}^{2} \cdot 0.004801250986110448}{0.4917317610505968 - z \cdot 0.0692910599291889}, 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 #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 5.00000000000000009e305Initial program 98.2%
remove-double-neg98.2%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
fma-define99.8%
+-commutative99.8%
flip-+99.8%
metadata-eval99.8%
swap-sqr99.7%
pow299.7%
metadata-eval99.8%
Applied egg-rr99.8%
if 5.00000000000000009e305 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.9%
+-commutative0.9%
*-commutative0.9%
associate-/l*15.6%
fma-define15.6%
*-commutative15.6%
fma-define15.6%
fma-define15.6%
*-commutative15.6%
fma-define15.6%
Simplified15.6%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
Simplified99.7%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+305)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+ x (* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+305) tmp = Float64(x + Float64(y * Float64(fma(fma(z, 0.0692910599291889, 0.4917317610505968), 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_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+305], N[(x + N[(y * N[(N[(N[(z * 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 * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+305}:\\
\;\;\;\;x + 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 + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 5.00000000000000009e305Initial program 98.2%
remove-double-neg98.2%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
if 5.00000000000000009e305 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.9%
+-commutative0.9%
*-commutative0.9%
associate-/l*15.6%
fma-define15.6%
*-commutative15.6%
fma-define15.6%
fma-define15.6%
*-commutative15.6%
fma-define15.6%
Simplified15.6%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
Simplified99.7%
Final simplification99.8%
(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 (<= t_0 5e+305) (+ t_0 x) (+ x (* y 0.0692910599291889)))))
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 <= 5e+305) {
tmp = t_0 + x;
} 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) :: t_0
real(8) :: tmp
t_0 = (y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)
if (t_0 <= 5d+305) then
tmp = t_0 + x
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
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 <= 5e+305) {
tmp = t_0 + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
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 <= 5e+305: tmp = t_0 + x else: tmp = x + (y * 0.0692910599291889) 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 <= 5e+305) tmp = Float64(t_0 + x); else tmp = Float64(x + Float64(y * 0.0692910599291889)); 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 <= 5e+305) tmp = t_0 + x; else tmp = x + (y * 0.0692910599291889); 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[LessEqual[t$95$0, 5e+305], N[(t$95$0 + x), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $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 5 \cdot 10^{+305}:\\
\;\;\;\;t\_0 + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 5.00000000000000009e305Initial program 98.2%
if 5.00000000000000009e305 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.9%
+-commutative0.9%
*-commutative0.9%
associate-/l*15.6%
fma-define15.6%
*-commutative15.6%
fma-define15.6%
fma-define15.6%
*-commutative15.6%
fma-define15.6%
Simplified15.6%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
Simplified99.7%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(if (<= y -1.25e+146)
(* y 0.08333333333333323)
(if (<= y -2.05e+77)
(* y 0.0692910599291889)
(if (or (<= y -1.05e+20) (not (<= y 1750.0)))
(* y 0.08333333333333323)
x))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.25e+146) {
tmp = y * 0.08333333333333323;
} else if (y <= -2.05e+77) {
tmp = y * 0.0692910599291889;
} else if ((y <= -1.05e+20) || !(y <= 1750.0)) {
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 (y <= (-1.25d+146)) then
tmp = y * 0.08333333333333323d0
else if (y <= (-2.05d+77)) then
tmp = y * 0.0692910599291889d0
else if ((y <= (-1.05d+20)) .or. (.not. (y <= 1750.0d0))) 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 (y <= -1.25e+146) {
tmp = y * 0.08333333333333323;
} else if (y <= -2.05e+77) {
tmp = y * 0.0692910599291889;
} else if ((y <= -1.05e+20) || !(y <= 1750.0)) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.25e+146: tmp = y * 0.08333333333333323 elif y <= -2.05e+77: tmp = y * 0.0692910599291889 elif (y <= -1.05e+20) or not (y <= 1750.0): tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.25e+146) tmp = Float64(y * 0.08333333333333323); elseif (y <= -2.05e+77) tmp = Float64(y * 0.0692910599291889); elseif ((y <= -1.05e+20) || !(y <= 1750.0)) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.25e+146) tmp = y * 0.08333333333333323; elseif (y <= -2.05e+77) tmp = y * 0.0692910599291889; elseif ((y <= -1.05e+20) || ~((y <= 1750.0))) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.25e+146], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, -2.05e+77], N[(y * 0.0692910599291889), $MachinePrecision], If[Or[LessEqual[y, -1.05e+20], N[Not[LessEqual[y, 1750.0]], $MachinePrecision]], N[(y * 0.08333333333333323), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+146}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{+77}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{+20} \lor \neg \left(y \leq 1750\right):\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.25e146 or -2.05e77 < y < -1.05e20 or 1750 < y Initial program 66.8%
+-commutative66.8%
*-commutative66.8%
associate-/l*78.3%
fma-define78.3%
*-commutative78.3%
fma-define78.3%
fma-define78.3%
*-commutative78.3%
fma-define78.3%
Simplified78.3%
Taylor expanded in z around 0 73.2%
+-commutative73.2%
Simplified73.2%
Taylor expanded in y around inf 55.2%
if -1.25e146 < y < -2.05e77Initial program 49.7%
+-commutative49.7%
*-commutative49.7%
associate-/l*49.7%
fma-define49.7%
*-commutative49.7%
fma-define49.7%
fma-define49.7%
*-commutative49.7%
fma-define49.7%
Simplified49.7%
Taylor expanded in z around inf 86.7%
+-commutative86.7%
fma-define86.7%
Simplified86.7%
Taylor expanded in y around inf 62.3%
*-commutative62.3%
Simplified62.3%
if -1.05e20 < y < 1750Initial program 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*76.3%
fma-define76.4%
*-commutative76.4%
fma-define76.4%
fma-define76.4%
*-commutative76.4%
fma-define76.4%
Simplified76.4%
Taylor expanded in y around 0 79.3%
Final simplification67.9%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.4) (not (<= z 5.1e-8)))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.4d0)) .or. (.not. (z <= 5.1d-8))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4) or not (z <= 5.1e-8): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4) || !(z <= 5.1e-8)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.4) || ~((z <= 5.1e-8))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.4], N[Not[LessEqual[z, 5.1e-8]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \lor \neg \left(z \leq 5.1 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5.10000000000000001e-8 < z Initial program 44.9%
remove-double-neg44.9%
associate-/l*54.8%
distribute-rgt-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-rgt-neg-in54.8%
remove-double-neg54.8%
fma-define54.8%
fma-define54.8%
fma-define54.8%
Simplified54.8%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -5.4000000000000004 < z < 5.10000000000000001e-8Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-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.8%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.4) (not (<= z 5.1e-8))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (+ (* y 0.08333333333333323) (* z (* y -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.4d0)) .or. (.not. (z <= 5.1d-8))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + ((y * 0.08333333333333323d0) + (z * (y * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4) or not (z <= 5.1e-8): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4) || !(z <= 5.1e-8)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(Float64(y * 0.08333333333333323) + Float64(z * Float64(y * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.4) || ~((z <= 5.1e-8))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.4], N[Not[LessEqual[z, 5.1e-8]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 0.08333333333333323), $MachinePrecision] + N[(z * N[(y * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \lor \neg \left(z \leq 5.1 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.08333333333333323 + z \cdot \left(y \cdot -0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5.10000000000000001e-8 < z Initial program 44.9%
remove-double-neg44.9%
associate-/l*54.8%
distribute-rgt-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-rgt-neg-in54.8%
remove-double-neg54.8%
fma-define54.8%
fma-define54.8%
fma-define54.8%
Simplified54.8%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -5.4000000000000004 < z < 5.10000000000000001e-8Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-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.8%
Taylor expanded in y around 0 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.4) (not (<= z 5.1e-8))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.4d0)) .or. (.not. (z <= 5.1d-8))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4) or not (z <= 5.1e-8): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4) || !(z <= 5.1e-8)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.4) || ~((z <= 5.1e-8))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.4], N[Not[LessEqual[z, 5.1e-8]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \lor \neg \left(z \leq 5.1 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5.10000000000000001e-8 < z Initial program 44.9%
remove-double-neg44.9%
associate-/l*54.8%
distribute-rgt-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-rgt-neg-in54.8%
remove-double-neg54.8%
fma-define54.8%
fma-define54.8%
fma-define54.8%
Simplified54.8%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -5.4000000000000004 < z < 5.10000000000000001e-8Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-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.8%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.4) (not (<= z 5.1e-8))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} 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.4d0)) .or. (.not. (z <= 5.1d-8))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
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.4) || !(z <= 5.1e-8)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4) or not (z <= 5.1e-8): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4) || !(z <= 5.1e-8)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); 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.4) || ~((z <= 5.1e-8))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.4], N[Not[LessEqual[z, 5.1e-8]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \lor \neg \left(z \leq 5.1 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5.10000000000000001e-8 < z Initial program 44.9%
remove-double-neg44.9%
associate-/l*54.8%
distribute-rgt-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-lft-neg-in54.8%
distribute-rgt-neg-in54.8%
remove-double-neg54.8%
fma-define54.8%
fma-define54.8%
fma-define54.8%
Simplified54.8%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -5.4000000000000004 < z < 5.10000000000000001e-8Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around 0 98.9%
+-commutative98.9%
Simplified98.9%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.4) (not (<= z 5.1e-8))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.1e-8)) {
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.4d0)) .or. (.not. (z <= 5.1d-8))) 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.4) || !(z <= 5.1e-8)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4) or not (z <= 5.1e-8): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4) || !(z <= 5.1e-8)) 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.4) || ~((z <= 5.1e-8))) 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.4], N[Not[LessEqual[z, 5.1e-8]], $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.4 \lor \neg \left(z \leq 5.1 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5.10000000000000001e-8 < z Initial program 44.9%
+-commutative44.9%
*-commutative44.9%
associate-/l*53.3%
fma-define53.3%
*-commutative53.3%
fma-define53.3%
fma-define53.3%
*-commutative53.3%
fma-define53.3%
Simplified53.3%
Taylor expanded in z around inf 99.0%
+-commutative99.0%
Simplified99.0%
if -5.4000000000000004 < z < 5.10000000000000001e-8Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around 0 98.9%
+-commutative98.9%
Simplified98.9%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.1e-59) (not (<= z 1.7e-239))) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.1e-59) || !(z <= 1.7e-239)) {
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 <= (-1.1d-59)) .or. (.not. (z <= 1.7d-239))) 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 <= -1.1e-59) || !(z <= 1.7e-239)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.1e-59) or not (z <= 1.7e-239): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.1e-59) || !(z <= 1.7e-239)) 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 <= -1.1e-59) || ~((z <= 1.7e-239))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.1e-59], N[Not[LessEqual[z, 1.7e-239]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-59} \lor \neg \left(z \leq 1.7 \cdot 10^{-239}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -1.0999999999999999e-59 or 1.7e-239 < z Initial program 63.1%
+-commutative63.1%
*-commutative63.1%
associate-/l*68.7%
fma-define68.8%
*-commutative68.8%
fma-define68.8%
fma-define68.8%
*-commutative68.8%
fma-define68.8%
Simplified68.8%
Taylor expanded in z around inf 88.6%
+-commutative88.6%
Simplified88.6%
if -1.0999999999999999e-59 < z < 1.7e-239Initial program 99.4%
+-commutative99.4%
*-commutative99.4%
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 99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 73.4%
Final simplification85.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.8e+23) (not (<= y 8200.0))) (* y 0.08333333333333323) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.8e+23) || !(y <= 8200.0)) {
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 ((y <= (-2.8d+23)) .or. (.not. (y <= 8200.0d0))) 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 ((y <= -2.8e+23) || !(y <= 8200.0)) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.8e+23) or not (y <= 8200.0): tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.8e+23) || !(y <= 8200.0)) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.8e+23) || ~((y <= 8200.0))) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.8e+23], N[Not[LessEqual[y, 8200.0]], $MachinePrecision]], N[(y * 0.08333333333333323), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+23} \lor \neg \left(y \leq 8200\right):\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.8e23 or 8200 < y Initial program 65.2%
+-commutative65.2%
*-commutative65.2%
associate-/l*75.6%
fma-define75.6%
*-commutative75.6%
fma-define75.6%
fma-define75.6%
*-commutative75.6%
fma-define75.6%
Simplified75.6%
Taylor expanded in z around 0 71.2%
+-commutative71.2%
Simplified71.2%
Taylor expanded in y around inf 52.5%
if -2.8e23 < y < 8200Initial program 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*76.3%
fma-define76.4%
*-commutative76.4%
fma-define76.4%
fma-define76.4%
*-commutative76.4%
fma-define76.4%
Simplified76.4%
Taylor expanded in y around 0 79.3%
Final simplification66.2%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 71.6%
+-commutative71.6%
*-commutative71.6%
associate-/l*76.0%
fma-define76.0%
*-commutative76.0%
fma-define76.0%
fma-define76.0%
*-commutative76.0%
fma-define76.0%
Simplified76.0%
Taylor expanded in y around 0 51.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y)
(- (/ (* 0.40462203869992125 y) (* z z)) x))))
(if (< z -8120153.652456675)
t_0
(if (< z 6.576118972787377e+20)
(+
x
(*
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((0.07512208616047561d0 / z) + 0.0692910599291889d0) * y) - (((0.40462203869992125d0 * y) / (z * z)) - x)
if (z < (-8120153.652456675d0)) then
tmp = t_0
else if (z < 6.576118972787377d+20) then
tmp = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) * (1.0d0 / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x) tmp = 0 if z < -8120153.652456675: tmp = t_0 elif z < 6.576118972787377e+20: tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(0.07512208616047561 / z) + 0.0692910599291889) * y) - Float64(Float64(Float64(0.40462203869992125 * y) / Float64(z * z)) - x)) tmp = 0.0 if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * Float64(1.0 / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x); tmp = 0.0; if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(0.07512208616047561 / z), $MachinePrecision] + 0.0692910599291889), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(0.40462203869992125 * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -8120153.652456675], t$95$0, If[Less[z, 6.576118972787377e+20], N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\
\mathbf{if}\;z < -8120153.652456675:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\
\;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024110
(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))))