
(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.5) (not (<= z 4e-6)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4e-6)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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.5d0)) .or. (.not. (z <= 4d-6))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / 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.5) || !(z <= 4e-6)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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.5) or not (z <= 4e-6): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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.5) || !(z <= 4e-6)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / 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.5) || ~((z <= 4e-6))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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.5], N[Not[LessEqual[z, 4e-6]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / 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.5 \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\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.5 or 3.99999999999999982e-6 < z Initial program 37.4%
remove-double-neg37.4%
associate-/l*49.8%
distribute-rgt-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-rgt-neg-in49.8%
remove-double-neg49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
Simplified49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
associate-/l*37.4%
clear-num37.4%
*-commutative37.4%
fma-undefine37.4%
*-commutative37.4%
fma-define37.4%
*-commutative37.4%
fma-undefine37.4%
Applied egg-rr37.4%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -5.5 < z < 3.99999999999999982e-6Initial program 99.7%
remove-double-neg99.7%
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.9%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
1e+301)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 1e+301) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 1e+301) 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 / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 1e+301], 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 / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 10^{+301}:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\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))) < 1.00000000000000005e301Initial program 93.8%
remove-double-neg93.8%
associate-/l*99.7%
distribute-rgt-neg-in99.7%
distribute-lft-neg-in99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
remove-double-neg99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
if 1.00000000000000005e301 < (/.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.5%
remove-double-neg0.5%
associate-/l*6.2%
distribute-rgt-neg-in6.2%
distribute-lft-neg-in6.2%
distribute-lft-neg-in6.2%
distribute-rgt-neg-in6.2%
remove-double-neg6.2%
fma-define6.2%
fma-define6.2%
fma-define6.2%
Simplified6.2%
fma-define6.2%
fma-define6.2%
fma-define6.2%
associate-/l*0.5%
clear-num0.5%
*-commutative0.5%
fma-undefine0.5%
*-commutative0.5%
fma-define0.5%
*-commutative0.5%
fma-undefine0.5%
Applied egg-rr0.5%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
t_0)
1e+301)
(fma (fma z (* z 0.0692910599291889) 0.279195317918525) (/ y t_0) x)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0) <= 1e+301) {
tmp = fma(fma(z, (z * 0.0692910599291889), 0.279195317918525), (y / t_0), x);
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0) <= 1e+301) tmp = fma(fma(z, Float64(z * 0.0692910599291889), 0.279195317918525), Float64(y / t_0), x); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+301], N[(N[(z * N[(z * 0.0692910599291889), $MachinePrecision] + 0.279195317918525), $MachinePrecision] * N[(y / t$95$0), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{t\_0} \leq 10^{+301}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot 0.0692910599291889, 0.279195317918525\right), \frac{y}{t\_0}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\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))) < 1.00000000000000005e301Initial program 93.8%
+-commutative93.8%
*-commutative93.8%
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 inf 98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in y around 0 98.8%
if 1.00000000000000005e301 < (/.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.5%
remove-double-neg0.5%
associate-/l*6.2%
distribute-rgt-neg-in6.2%
distribute-lft-neg-in6.2%
distribute-lft-neg-in6.2%
distribute-rgt-neg-in6.2%
remove-double-neg6.2%
fma-define6.2%
fma-define6.2%
fma-define6.2%
Simplified6.2%
fma-define6.2%
fma-define6.2%
fma-define6.2%
associate-/l*0.5%
clear-num0.5%
*-commutative0.5%
fma-undefine0.5%
*-commutative0.5%
fma-define0.5%
*-commutative0.5%
fma-undefine0.5%
Applied egg-rr0.5%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (or (<= y -1.4e+122)
(and (not (<= y 2.9e-7))
(or (<= y 430000000.0) (not (<= y 4.8e+69)))))
(* y 0.08333333333333323)
x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.4e+122) || (!(y <= 2.9e-7) && ((y <= 430000000.0) || !(y <= 4.8e+69)))) {
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.4d+122)) .or. (.not. (y <= 2.9d-7)) .and. (y <= 430000000.0d0) .or. (.not. (y <= 4.8d+69))) 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.4e+122) || (!(y <= 2.9e-7) && ((y <= 430000000.0) || !(y <= 4.8e+69)))) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.4e+122) or (not (y <= 2.9e-7) and ((y <= 430000000.0) or not (y <= 4.8e+69))): tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.4e+122) || (!(y <= 2.9e-7) && ((y <= 430000000.0) || !(y <= 4.8e+69)))) 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.4e+122) || (~((y <= 2.9e-7)) && ((y <= 430000000.0) || ~((y <= 4.8e+69))))) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.4e+122], And[N[Not[LessEqual[y, 2.9e-7]], $MachinePrecision], Or[LessEqual[y, 430000000.0], N[Not[LessEqual[y, 4.8e+69]], $MachinePrecision]]]], N[(y * 0.08333333333333323), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+122} \lor \neg \left(y \leq 2.9 \cdot 10^{-7}\right) \land \left(y \leq 430000000 \lor \neg \left(y \leq 4.8 \cdot 10^{+69}\right)\right):\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.4e122 or 2.8999999999999998e-7 < y < 4.3e8 or 4.8000000000000003e69 < y Initial program 60.9%
+-commutative60.9%
*-commutative60.9%
associate-/l*72.1%
fma-define72.1%
*-commutative72.1%
fma-define72.1%
fma-define72.1%
*-commutative72.1%
fma-define72.1%
Simplified72.1%
Taylor expanded in z around 0 67.3%
+-commutative67.3%
Simplified67.3%
Taylor expanded in y around inf 57.8%
if -1.4e122 < y < 2.8999999999999998e-7 or 4.3e8 < y < 4.8000000000000003e69Initial program 75.8%
+-commutative75.8%
*-commutative75.8%
associate-/l*78.6%
fma-define78.6%
*-commutative78.6%
fma-define78.6%
fma-define78.6%
*-commutative78.6%
fma-define78.6%
Simplified78.6%
Taylor expanded in y around 0 77.6%
Final simplification70.6%
(FPCore (x y z)
:precision binary64
(if (<= y -5e+192)
(* y 0.0692910599291889)
(if (or (<= y 2.9e-7) (and (not (<= y 540000000.0)) (<= y 1.05e+73)))
x
(* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if (y <= -5e+192) {
tmp = y * 0.0692910599291889;
} else if ((y <= 2.9e-7) || (!(y <= 540000000.0) && (y <= 1.05e+73))) {
tmp = x;
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-5d+192)) then
tmp = y * 0.0692910599291889d0
else if ((y <= 2.9d-7) .or. (.not. (y <= 540000000.0d0)) .and. (y <= 1.05d+73)) then
tmp = x
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -5e+192) {
tmp = y * 0.0692910599291889;
} else if ((y <= 2.9e-7) || (!(y <= 540000000.0) && (y <= 1.05e+73))) {
tmp = x;
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -5e+192: tmp = y * 0.0692910599291889 elif (y <= 2.9e-7) or (not (y <= 540000000.0) and (y <= 1.05e+73)): tmp = x else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -5e+192) tmp = Float64(y * 0.0692910599291889); elseif ((y <= 2.9e-7) || (!(y <= 540000000.0) && (y <= 1.05e+73))) tmp = x; else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -5e+192) tmp = y * 0.0692910599291889; elseif ((y <= 2.9e-7) || (~((y <= 540000000.0)) && (y <= 1.05e+73))) tmp = x; else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -5e+192], N[(y * 0.0692910599291889), $MachinePrecision], If[Or[LessEqual[y, 2.9e-7], And[N[Not[LessEqual[y, 540000000.0]], $MachinePrecision], LessEqual[y, 1.05e+73]]], x, N[(y * 0.08333333333333323), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+192}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-7} \lor \neg \left(y \leq 540000000\right) \land y \leq 1.05 \cdot 10^{+73}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < -5.00000000000000033e192Initial program 40.6%
+-commutative40.6%
*-commutative40.6%
associate-/l*63.7%
fma-define63.7%
*-commutative63.7%
fma-define63.7%
fma-define63.7%
*-commutative63.7%
fma-define63.7%
Simplified63.7%
Taylor expanded in z around inf 74.3%
+-commutative74.3%
Simplified74.3%
Taylor expanded in y around inf 67.3%
*-commutative67.3%
Simplified67.3%
if -5.00000000000000033e192 < y < 2.8999999999999998e-7 or 5.4e8 < y < 1.0500000000000001e73Initial program 77.0%
+-commutative77.0%
*-commutative77.0%
associate-/l*79.7%
fma-define79.7%
*-commutative79.7%
fma-define79.7%
fma-define79.7%
*-commutative79.7%
fma-define79.7%
Simplified79.7%
Taylor expanded in y around 0 75.5%
if 2.8999999999999998e-7 < y < 5.4e8 or 1.0500000000000001e73 < y Initial program 65.0%
+-commutative65.0%
*-commutative65.0%
associate-/l*71.8%
fma-define71.8%
*-commutative71.8%
fma-define71.8%
fma-define71.8%
*-commutative71.8%
fma-define71.8%
Simplified71.8%
Taylor expanded in z around 0 71.6%
+-commutative71.6%
Simplified71.6%
Taylor expanded in y around inf 64.9%
Final simplification72.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 4e-6))) (+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))) (+ x (+ (* y 0.08333333333333323) (* z (* y -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4e-6)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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.5d0)) .or. (.not. (z <= 4d-6))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / 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.5) || !(z <= 4e-6)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 4e-6): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + ((y * 0.08333333333333323) + (z * (y * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 4e-6)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / 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.5) || ~((z <= 4e-6))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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.5], N[Not[LessEqual[z, 4e-6]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / 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.5 \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.08333333333333323 + z \cdot \left(y \cdot -0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -5.5 or 3.99999999999999982e-6 < z Initial program 37.4%
remove-double-neg37.4%
associate-/l*49.8%
distribute-rgt-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-rgt-neg-in49.8%
remove-double-neg49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
Simplified49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
associate-/l*37.4%
clear-num37.4%
*-commutative37.4%
fma-undefine37.4%
*-commutative37.4%
fma-define37.4%
*-commutative37.4%
fma-undefine37.4%
Applied egg-rr37.4%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -5.5 < z < 3.99999999999999982e-6Initial program 99.7%
remove-double-neg99.7%
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.7%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 4e-6))) (+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))) (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4e-6)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.5d0)) .or. (.not. (z <= 4d-6))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4e-6)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 4e-6): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 4e-6)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 4e-6))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 4e-6]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\end{array}
\end{array}
if z < -5.5 or 3.99999999999999982e-6 < z Initial program 37.4%
remove-double-neg37.4%
associate-/l*49.8%
distribute-rgt-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-rgt-neg-in49.8%
remove-double-neg49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
Simplified49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
associate-/l*37.4%
clear-num37.4%
*-commutative37.4%
fma-undefine37.4%
*-commutative37.4%
fma-define37.4%
*-commutative37.4%
fma-undefine37.4%
Applied egg-rr37.4%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -5.5 < z < 3.99999999999999982e-6Initial program 99.7%
remove-double-neg99.7%
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.7%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (/ 1.0 (/ 14.431876219268936 y)))
(if (<= z 4e-6)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 4e-6) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.5d0)) then
tmp = x + (1.0d0 / (14.431876219268936d0 / y))
else if (z <= 4d-6) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 4e-6) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (1.0 / (14.431876219268936 / y)) elif z <= 4e-6: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); elseif (z <= 4e-6) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (1.0 / (14.431876219268936 / y)); elseif (z <= 4e-6) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-6], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-6}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 35.8%
remove-double-neg35.8%
associate-/l*50.6%
distribute-rgt-neg-in50.6%
distribute-lft-neg-in50.6%
distribute-lft-neg-in50.6%
distribute-rgt-neg-in50.6%
remove-double-neg50.6%
fma-define50.6%
fma-define50.6%
fma-define50.6%
Simplified50.6%
fma-define50.6%
fma-define50.6%
fma-define50.6%
associate-/l*35.8%
clear-num35.8%
*-commutative35.8%
fma-undefine35.8%
*-commutative35.8%
fma-define35.8%
*-commutative35.8%
fma-undefine35.8%
Applied egg-rr35.8%
Taylor expanded in z around inf 99.9%
if -5.5 < z < 3.99999999999999982e-6Initial program 99.7%
remove-double-neg99.7%
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.7%
if 3.99999999999999982e-6 < z Initial program 39.1%
remove-double-neg39.1%
associate-/l*48.9%
distribute-rgt-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-rgt-neg-in48.9%
remove-double-neg48.9%
fma-define48.9%
fma-define48.9%
fma-define48.9%
Simplified48.9%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (/ 1.0 (/ 14.431876219268936 y)))
(if (<= z 4e-6)
(+ x (* y 0.08333333333333323))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 4e-6) {
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 <= (-5.5d0)) then
tmp = x + (1.0d0 / (14.431876219268936d0 / y))
else if (z <= 4d-6) 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 <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 4e-6) {
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 <= -5.5: tmp = x + (1.0 / (14.431876219268936 / y)) elif z <= 4e-6: 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 <= -5.5) tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); elseif (z <= 4e-6) 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 <= -5.5) tmp = x + (1.0 / (14.431876219268936 / y)); elseif (z <= 4e-6) 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, -5.5], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-6], 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 -5.5:\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-6}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 35.8%
remove-double-neg35.8%
associate-/l*50.6%
distribute-rgt-neg-in50.6%
distribute-lft-neg-in50.6%
distribute-lft-neg-in50.6%
distribute-rgt-neg-in50.6%
remove-double-neg50.6%
fma-define50.6%
fma-define50.6%
fma-define50.6%
Simplified50.6%
fma-define50.6%
fma-define50.6%
fma-define50.6%
associate-/l*35.8%
clear-num35.8%
*-commutative35.8%
fma-undefine35.8%
*-commutative35.8%
fma-define35.8%
*-commutative35.8%
fma-undefine35.8%
Applied egg-rr35.8%
Taylor expanded in z around inf 99.9%
if -5.5 < z < 3.99999999999999982e-6Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
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 99.1%
+-commutative99.1%
Simplified99.1%
if 3.99999999999999982e-6 < z Initial program 39.1%
remove-double-neg39.1%
associate-/l*48.9%
distribute-rgt-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-rgt-neg-in48.9%
remove-double-neg48.9%
fma-define48.9%
fma-define48.9%
fma-define48.9%
Simplified48.9%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 4e-6))) (+ x (/ 1.0 (/ 14.431876219268936 y))) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4e-6)) {
tmp = x + (1.0 / (14.431876219268936 / y));
} 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.5d0)) .or. (.not. (z <= 4d-6))) then
tmp = x + (1.0d0 / (14.431876219268936d0 / y))
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.5) || !(z <= 4e-6)) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 4e-6): tmp = x + (1.0 / (14.431876219268936 / y)) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 4e-6)) tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); 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.5) || ~((z <= 4e-6))) tmp = x + (1.0 / (14.431876219268936 / y)); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 4e-6]], $MachinePrecision]], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 3.99999999999999982e-6 < z Initial program 37.4%
remove-double-neg37.4%
associate-/l*49.8%
distribute-rgt-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-lft-neg-in49.8%
distribute-rgt-neg-in49.8%
remove-double-neg49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
Simplified49.8%
fma-define49.8%
fma-define49.8%
fma-define49.8%
associate-/l*37.4%
clear-num37.4%
*-commutative37.4%
fma-undefine37.4%
*-commutative37.4%
fma-define37.4%
*-commutative37.4%
fma-undefine37.4%
Applied egg-rr37.4%
Taylor expanded in z around inf 99.6%
if -5.5 < z < 3.99999999999999982e-6Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
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 99.1%
+-commutative99.1%
Simplified99.1%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 4e-6))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4e-6)) {
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.5d0)) .or. (.not. (z <= 4d-6))) 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.5) || !(z <= 4e-6)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 4e-6): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 4e-6)) 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.5) || ~((z <= 4e-6))) 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.5], N[Not[LessEqual[z, 4e-6]], $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.5 \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 3.99999999999999982e-6 < z Initial program 37.4%
+-commutative37.4%
*-commutative37.4%
associate-/l*49.8%
fma-define49.8%
*-commutative49.8%
fma-define49.8%
fma-define49.8%
*-commutative49.8%
fma-define49.8%
Simplified49.8%
Taylor expanded in z around inf 99.5%
+-commutative99.5%
Simplified99.5%
if -5.5 < z < 3.99999999999999982e-6Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
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 99.1%
+-commutative99.1%
Simplified99.1%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (<= y 1.85e+210) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.85e+210) {
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 (y <= 1.85d+210) 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 (y <= 1.85e+210) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 1.85e+210: tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if (y <= 1.85e+210) 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 (y <= 1.85e+210) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 1.85e+210], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.85 \cdot 10^{+210}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < 1.84999999999999999e210Initial program 70.0%
+-commutative70.0%
*-commutative70.0%
associate-/l*75.2%
fma-define75.2%
*-commutative75.2%
fma-define75.2%
fma-define75.2%
*-commutative75.2%
fma-define75.2%
Simplified75.2%
Taylor expanded in z around inf 83.9%
+-commutative83.9%
Simplified83.9%
if 1.84999999999999999e210 < y Initial program 75.5%
+-commutative75.5%
*-commutative75.5%
associate-/l*87.1%
fma-define87.1%
*-commutative87.1%
fma-define87.1%
fma-define87.1%
*-commutative87.1%
fma-define87.1%
Simplified87.1%
Taylor expanded in z around 0 80.2%
+-commutative80.2%
Simplified80.2%
Taylor expanded in y around inf 80.2%
Final simplification83.6%
(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 70.5%
+-commutative70.5%
*-commutative70.5%
associate-/l*76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
Simplified76.3%
Taylor expanded in y around 0 54.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 2024108
(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))))