
(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
(let* ((t_0 (+ 3.350343815022304 (* z (+ z 6.012459259764103))))
(t_1
(+
0.279195317918525
(* z (+ (* z 0.0692910599291889) 0.4917317610505968)))))
(if (<= (/ (* y t_1) t_0) 1e+304)
(/ 1.0 (/ 1.0 (+ x (/ y (/ t_0 t_1)))))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double t_0 = 3.350343815022304 + (z * (z + 6.012459259764103));
double t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968));
double tmp;
if (((y * t_1) / t_0) <= 1e+304) {
tmp = 1.0 / (1.0 / (x + (y / (t_0 / t_1))));
} 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) :: t_1
real(8) :: tmp
t_0 = 3.350343815022304d0 + (z * (z + 6.012459259764103d0))
t_1 = 0.279195317918525d0 + (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0))
if (((y * t_1) / t_0) <= 1d+304) then
tmp = 1.0d0 / (1.0d0 / (x + (y / (t_0 / t_1))))
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 = 3.350343815022304 + (z * (z + 6.012459259764103));
double t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968));
double tmp;
if (((y * t_1) / t_0) <= 1e+304) {
tmp = 1.0 / (1.0 / (x + (y / (t_0 / t_1))));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): t_0 = 3.350343815022304 + (z * (z + 6.012459259764103)) t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968)) tmp = 0 if ((y * t_1) / t_0) <= 1e+304: tmp = 1.0 / (1.0 / (x + (y / (t_0 / t_1)))) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) t_0 = Float64(3.350343815022304 + Float64(z * Float64(z + 6.012459259764103))) t_1 = Float64(0.279195317918525 + Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968))) tmp = 0.0 if (Float64(Float64(y * t_1) / t_0) <= 1e+304) tmp = Float64(1.0 / Float64(1.0 / Float64(x + Float64(y / Float64(t_0 / t_1))))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 3.350343815022304 + (z * (z + 6.012459259764103)); t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968)); tmp = 0.0; if (((y * t_1) / t_0) <= 1e+304) tmp = 1.0 / (1.0 / (x + (y / (t_0 / t_1)))); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(3.350343815022304 + N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.279195317918525 + N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+304], N[(1.0 / N[(1.0 / N[(x + N[(y / N[(t$95$0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3.350343815022304 + z \cdot \left(z + 6.012459259764103\right)\\
t_1 := 0.279195317918525 + z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)\\
\mathbf{if}\;\frac{y \cdot t\_1}{t\_0} \leq 10^{+304}:\\
\;\;\;\;\frac{1}{\frac{1}{x + \frac{y}{\frac{t\_0}{t\_1}}}}\\
\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))) < 9.9999999999999994e303Initial program 95.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr99.3%
if 9.9999999999999994e303 < (/.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%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 3.350343815022304 (* z (+ z 6.012459259764103))))
(t_1
(+
0.279195317918525
(* z (+ (* z 0.0692910599291889) 0.4917317610505968)))))
(if (<= (/ (* y t_1) t_0) 1e+304)
(+ x (* t_1 (/ y t_0)))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double t_0 = 3.350343815022304 + (z * (z + 6.012459259764103));
double t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968));
double tmp;
if (((y * t_1) / t_0) <= 1e+304) {
tmp = x + (t_1 * (y / t_0));
} 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) :: t_1
real(8) :: tmp
t_0 = 3.350343815022304d0 + (z * (z + 6.012459259764103d0))
t_1 = 0.279195317918525d0 + (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0))
if (((y * t_1) / t_0) <= 1d+304) then
tmp = x + (t_1 * (y / t_0))
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 = 3.350343815022304 + (z * (z + 6.012459259764103));
double t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968));
double tmp;
if (((y * t_1) / t_0) <= 1e+304) {
tmp = x + (t_1 * (y / t_0));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): t_0 = 3.350343815022304 + (z * (z + 6.012459259764103)) t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968)) tmp = 0 if ((y * t_1) / t_0) <= 1e+304: tmp = x + (t_1 * (y / t_0)) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) t_0 = Float64(3.350343815022304 + Float64(z * Float64(z + 6.012459259764103))) t_1 = Float64(0.279195317918525 + Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968))) tmp = 0.0 if (Float64(Float64(y * t_1) / t_0) <= 1e+304) tmp = Float64(x + Float64(t_1 * Float64(y / t_0))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 3.350343815022304 + (z * (z + 6.012459259764103)); t_1 = 0.279195317918525 + (z * ((z * 0.0692910599291889) + 0.4917317610505968)); tmp = 0.0; if (((y * t_1) / t_0) <= 1e+304) tmp = x + (t_1 * (y / t_0)); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(3.350343815022304 + N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.279195317918525 + N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+304], N[(x + N[(t$95$1 * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3.350343815022304 + z \cdot \left(z + 6.012459259764103\right)\\
t_1 := 0.279195317918525 + z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)\\
\mathbf{if}\;\frac{y \cdot t\_1}{t\_0} \leq 10^{+304}:\\
\;\;\;\;x + t\_1 \cdot \frac{y}{t\_0}\\
\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))) < 9.9999999999999994e303Initial program 95.7%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6498.0%
Applied egg-rr98.0%
if 9.9999999999999994e303 < (/.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%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification98.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(+ x (* y 0.0692910599291889))
(/
(- (* y -0.07512208616047561) (/ (* y -0.4046220386999212) z))
z))))
(if (<= z -5.5)
t_0
(if (<= z 4.5)
(+
x
(+
(* y 0.08333333333333323)
(*
z
(+ (* y -0.00277777777751721) (* z (* y 0.0007936505811533442))))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (x + (y * 0.0692910599291889)) - (((y * -0.07512208616047561) - ((y * -0.4046220386999212) / z)) / z);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 4.5) {
tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))));
} 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 = (x + (y * 0.0692910599291889d0)) - (((y * (-0.07512208616047561d0)) - ((y * (-0.4046220386999212d0)) / z)) / z)
if (z <= (-5.5d0)) then
tmp = t_0
else if (z <= 4.5d0) then
tmp = x + ((y * 0.08333333333333323d0) + (z * ((y * (-0.00277777777751721d0)) + (z * (y * 0.0007936505811533442d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + (y * 0.0692910599291889)) - (((y * -0.07512208616047561) - ((y * -0.4046220386999212) / z)) / z);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 4.5) {
tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + (y * 0.0692910599291889)) - (((y * -0.07512208616047561) - ((y * -0.4046220386999212) / z)) / z) tmp = 0 if z <= -5.5: tmp = t_0 elif z <= 4.5: tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442))))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + Float64(y * 0.0692910599291889)) - Float64(Float64(Float64(y * -0.07512208616047561) - Float64(Float64(y * -0.4046220386999212) / z)) / z)) tmp = 0.0 if (z <= -5.5) tmp = t_0; elseif (z <= 4.5) tmp = Float64(x + Float64(Float64(y * 0.08333333333333323) + Float64(z * Float64(Float64(y * -0.00277777777751721) + Float64(z * Float64(y * 0.0007936505811533442)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + (y * 0.0692910599291889)) - (((y * -0.07512208616047561) - ((y * -0.4046220386999212) / z)) / z); tmp = 0.0; if (z <= -5.5) tmp = t_0; elseif (z <= 4.5) tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442))))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y * -0.07512208616047561), $MachinePrecision] - N[(N[(y * -0.4046220386999212), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5], t$95$0, If[LessEqual[z, 4.5], N[(x + N[(N[(y * 0.08333333333333323), $MachinePrecision] + N[(z * N[(N[(y * -0.00277777777751721), $MachinePrecision] + N[(z * N[(y * 0.0007936505811533442), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x + y \cdot 0.0692910599291889\right) - \frac{y \cdot -0.07512208616047561 - \frac{y \cdot -0.4046220386999212}{z}}{z}\\
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 4.5:\\
\;\;\;\;x + \left(y \cdot 0.08333333333333323 + z \cdot \left(y \cdot -0.00277777777751721 + z \cdot \left(y \cdot 0.0007936505811533442\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.5 or 4.5 < z Initial program 34.2%
Taylor expanded in z around -inf
Simplified98.0%
if -5.5 < z < 4.5Initial program 99.7%
Taylor expanded in z around 0
Simplified99.4%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(- x (* y (- (/ -0.07512208616047561 z) 0.0692910599291889)))
(if (<= z 0.16)
(+
x
(+
(* y 0.08333333333333323)
(* z (+ (* y -0.00277777777751721) (* z (* y 0.0007936505811533442))))))
(+ (* y 0.0692910599291889) (- x (/ (* y -0.07512208616047561) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 0.16) {
tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))));
} else {
tmp = (y * 0.0692910599291889) + (x - ((y * -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 - (y * (((-0.07512208616047561d0) / z) - 0.0692910599291889d0))
else if (z <= 0.16d0) then
tmp = x + ((y * 0.08333333333333323d0) + (z * ((y * (-0.00277777777751721d0)) + (z * (y * 0.0007936505811533442d0)))))
else
tmp = (y * 0.0692910599291889d0) + (x - ((y * (-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 - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 0.16) {
tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))));
} else {
tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)) elif z <= 0.16: tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442))))) else: tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x - Float64(y * Float64(Float64(-0.07512208616047561 / z) - 0.0692910599291889))); elseif (z <= 0.16) tmp = Float64(x + Float64(Float64(y * 0.08333333333333323) + Float64(z * Float64(Float64(y * -0.00277777777751721) + Float64(z * Float64(y * 0.0007936505811533442)))))); else tmp = Float64(Float64(y * 0.0692910599291889) + Float64(x - Float64(Float64(y * -0.07512208616047561) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)); elseif (z <= 0.16) tmp = x + ((y * 0.08333333333333323) + (z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442))))); else tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x - N[(y * N[(N[(-0.07512208616047561 / z), $MachinePrecision] - 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.16], N[(x + N[(N[(y * 0.08333333333333323), $MachinePrecision] + N[(z * N[(N[(y * -0.00277777777751721), $MachinePrecision] + N[(z * N[(y * 0.0007936505811533442), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 0.0692910599291889), $MachinePrecision] + N[(x - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x - y \cdot \left(\frac{-0.07512208616047561}{z} - 0.0692910599291889\right)\\
\mathbf{elif}\;z \leq 0.16:\\
\;\;\;\;x + \left(y \cdot 0.08333333333333323 + z \cdot \left(y \cdot -0.00277777777751721 + z \cdot \left(y \cdot 0.0007936505811533442\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.0692910599291889 + \left(x - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 32.3%
Taylor expanded in z around inf
associate--l+N/A
associate--l+N/A
+-commutativeN/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
*-commutativeN/A
distribute-rgt-out--N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
+-lowering-+.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
Simplified98.2%
if -5.5 < z < 0.160000000000000003Initial program 99.7%
Taylor expanded in z around 0
Simplified99.4%
if 0.160000000000000003 < z Initial program 36.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6442.7%
Applied egg-rr42.7%
Taylor expanded in z around inf
associate--l+N/A
associate--l+N/A
+-commutativeN/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
*-commutativeN/A
distribute-rgt-out--N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
Simplified97.5%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(- x (* y (- (/ -0.07512208616047561 z) 0.0692910599291889)))
(if (<= z 0.16)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
(+ (* y 0.0692910599291889) (- x (/ (* y -0.07512208616047561) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 0.16) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = (y * 0.0692910599291889) + (x - ((y * -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 - (y * (((-0.07512208616047561d0) / z) - 0.0692910599291889d0))
else if (z <= 0.16d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = (y * 0.0692910599291889d0) + (x - ((y * (-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 - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 0.16) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)) elif z <= 0.16: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x - Float64(y * Float64(Float64(-0.07512208616047561 / z) - 0.0692910599291889))); elseif (z <= 0.16) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = Float64(Float64(y * 0.0692910599291889) + Float64(x - Float64(Float64(y * -0.07512208616047561) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)); elseif (z <= 0.16) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x - N[(y * N[(N[(-0.07512208616047561 / z), $MachinePrecision] - 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.16], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 0.0692910599291889), $MachinePrecision] + N[(x - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x - y \cdot \left(\frac{-0.07512208616047561}{z} - 0.0692910599291889\right)\\
\mathbf{elif}\;z \leq 0.16:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.0692910599291889 + \left(x - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 32.3%
Taylor expanded in z around inf
associate--l+N/A
associate--l+N/A
+-commutativeN/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
*-commutativeN/A
distribute-rgt-out--N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
+-lowering-+.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
Simplified98.2%
if -5.5 < z < 0.160000000000000003Initial program 99.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
distribute-rgt-out--N/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval99.4%
Simplified99.4%
if 0.160000000000000003 < z Initial program 36.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6442.7%
Applied egg-rr42.7%
Taylor expanded in z around inf
associate--l+N/A
associate--l+N/A
+-commutativeN/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
*-commutativeN/A
distribute-rgt-out--N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
Simplified97.5%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- x (* y (- (/ -0.07512208616047561 z) 0.0692910599291889)))))
(if (<= z -5.5)
t_0
(if (<= z 0.16)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
t_0))))
double code(double x, double y, double z) {
double t_0 = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} 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 = x - (y * (((-0.07512208616047561d0) / z) - 0.0692910599291889d0))
if (z <= (-5.5d0)) then
tmp = t_0
else if (z <= 0.16d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)) tmp = 0 if z <= -5.5: tmp = t_0 elif z <= 0.16: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x - Float64(y * Float64(Float64(-0.07512208616047561 / z) - 0.0692910599291889))) tmp = 0.0 if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)); tmp = 0.0; if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x - N[(y * N[(N[(-0.07512208616047561 / z), $MachinePrecision] - 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5], t$95$0, If[LessEqual[z, 0.16], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x - y \cdot \left(\frac{-0.07512208616047561}{z} - 0.0692910599291889\right)\\
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 0.16:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.5 or 0.160000000000000003 < z Initial program 34.8%
Taylor expanded in z around inf
associate--l+N/A
associate--l+N/A
+-commutativeN/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
*-commutativeN/A
distribute-rgt-out--N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
+-lowering-+.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
Simplified97.8%
if -5.5 < z < 0.160000000000000003Initial program 99.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
distribute-rgt-out--N/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval99.4%
Simplified99.4%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (* y 0.0692910599291889))))
(if (<= z -5.5)
t_0
(if (<= z 0.16)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
t_0))))
double code(double x, double y, double z) {
double t_0 = x + (y * 0.0692910599291889);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} 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 = x + (y * 0.0692910599291889d0)
if (z <= (-5.5d0)) then
tmp = t_0
else if (z <= 0.16d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y * 0.0692910599291889);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y * 0.0692910599291889) tmp = 0 if z <= -5.5: tmp = t_0 elif z <= 0.16: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y * 0.0692910599291889)) tmp = 0.0 if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y * 0.0692910599291889); tmp = 0.0; if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5], t$95$0, If[LessEqual[z, 0.16], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot 0.0692910599291889\\
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 0.16:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.5 or 0.160000000000000003 < z Initial program 34.8%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6497.6%
Simplified97.6%
if -5.5 < z < 0.160000000000000003Initial program 99.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
distribute-rgt-out--N/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval99.4%
Simplified99.4%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (* y 0.0692910599291889))))
(if (<= z -5.5)
t_0
(if (<= z 0.16) (+ x (/ 1.0 (/ 12.000000000000014 y))) t_0))))
double code(double x, double y, double z) {
double t_0 = x + (y * 0.0692910599291889);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (1.0 / (12.000000000000014 / y));
} 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 = x + (y * 0.0692910599291889d0)
if (z <= (-5.5d0)) then
tmp = t_0
else if (z <= 0.16d0) then
tmp = x + (1.0d0 / (12.000000000000014d0 / y))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y * 0.0692910599291889);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (1.0 / (12.000000000000014 / y));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y * 0.0692910599291889) tmp = 0 if z <= -5.5: tmp = t_0 elif z <= 0.16: tmp = x + (1.0 / (12.000000000000014 / y)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y * 0.0692910599291889)) tmp = 0.0 if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = Float64(x + Float64(1.0 / Float64(12.000000000000014 / y))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y * 0.0692910599291889); tmp = 0.0; if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = x + (1.0 / (12.000000000000014 / y)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5], t$95$0, If[LessEqual[z, 0.16], N[(x + N[(1.0 / N[(12.000000000000014 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot 0.0692910599291889\\
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 0.16:\\
\;\;\;\;x + \frac{1}{\frac{12.000000000000014}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.5 or 0.160000000000000003 < z Initial program 34.8%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6497.6%
Simplified97.6%
if -5.5 < z < 0.160000000000000003Initial program 99.7%
Taylor expanded in z around 0
*-commutativeN/A
*-lowering-*.f6498.7%
Simplified98.7%
Taylor expanded in z around 0
Simplified98.9%
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval99.0%
Applied egg-rr99.0%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ x (* y 0.0692910599291889)))) (if (<= z -5.5) t_0 (if (<= z 0.16) (+ x (* y 0.08333333333333323)) t_0))))
double code(double x, double y, double z) {
double t_0 = x + (y * 0.0692910599291889);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (y * 0.08333333333333323);
} 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 = x + (y * 0.0692910599291889d0)
if (z <= (-5.5d0)) then
tmp = t_0
else if (z <= 0.16d0) then
tmp = x + (y * 0.08333333333333323d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y * 0.0692910599291889);
double tmp;
if (z <= -5.5) {
tmp = t_0;
} else if (z <= 0.16) {
tmp = x + (y * 0.08333333333333323);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y * 0.0692910599291889) tmp = 0 if z <= -5.5: tmp = t_0 elif z <= 0.16: tmp = x + (y * 0.08333333333333323) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y * 0.0692910599291889)) tmp = 0.0 if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = Float64(x + Float64(y * 0.08333333333333323)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y * 0.0692910599291889); tmp = 0.0; if (z <= -5.5) tmp = t_0; elseif (z <= 0.16) tmp = x + (y * 0.08333333333333323); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5], t$95$0, If[LessEqual[z, 0.16], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot 0.0692910599291889\\
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 0.16:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.5 or 0.160000000000000003 < z Initial program 34.8%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6497.6%
Simplified97.6%
if -5.5 < z < 0.160000000000000003Initial program 99.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.0%
Simplified99.0%
(FPCore (x y z) :precision binary64 (if (<= y -8.5e-32) (* y 0.08333333333333323) (if (<= y 53000000.0) x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if (y <= -8.5e-32) {
tmp = y * 0.08333333333333323;
} else if (y <= 53000000.0) {
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 <= (-8.5d-32)) then
tmp = y * 0.08333333333333323d0
else if (y <= 53000000.0d0) 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 <= -8.5e-32) {
tmp = y * 0.08333333333333323;
} else if (y <= 53000000.0) {
tmp = x;
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -8.5e-32: tmp = y * 0.08333333333333323 elif y <= 53000000.0: tmp = x else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -8.5e-32) tmp = Float64(y * 0.08333333333333323); elseif (y <= 53000000.0) tmp = x; else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -8.5e-32) tmp = y * 0.08333333333333323; elseif (y <= 53000000.0) tmp = x; else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -8.5e-32], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, 53000000.0], x, N[(y * 0.08333333333333323), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-32}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq 53000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < -8.5000000000000003e-32 or 5.3e7 < y Initial program 67.2%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1%
Simplified70.1%
Taylor expanded in x around 0
*-lowering-*.f6450.3%
Simplified50.3%
if -8.5000000000000003e-32 < y < 5.3e7Initial program 74.9%
Taylor expanded in x around inf
Simplified80.3%
Final simplification64.4%
(FPCore (x y z) :precision binary64 (if (<= y -5.8e+88) (* y 0.0692910599291889) (if (<= y 1.1e+86) x (* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if (y <= -5.8e+88) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.1e+86) {
tmp = x;
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-5.8d+88)) then
tmp = y * 0.0692910599291889d0
else if (y <= 1.1d+86) then
tmp = x
else
tmp = y * 0.0692910599291889d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -5.8e+88) {
tmp = y * 0.0692910599291889;
} else if (y <= 1.1e+86) {
tmp = x;
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -5.8e+88: tmp = y * 0.0692910599291889 elif y <= 1.1e+86: tmp = x else: tmp = y * 0.0692910599291889 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -5.8e+88) tmp = Float64(y * 0.0692910599291889); elseif (y <= 1.1e+86) tmp = x; else tmp = Float64(y * 0.0692910599291889); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -5.8e+88) tmp = y * 0.0692910599291889; elseif (y <= 1.1e+86) tmp = x; else tmp = y * 0.0692910599291889; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -5.8e+88], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[y, 1.1e+86], x, N[(y * 0.0692910599291889), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+88}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+86}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if y < -5.7999999999999999e88 or 1.10000000000000002e86 < y Initial program 63.0%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6463.4%
Simplified63.4%
Taylor expanded in x around 0
*-lowering-*.f6449.9%
Simplified49.9%
if -5.7999999999999999e88 < y < 1.10000000000000002e86Initial program 76.2%
Taylor expanded in x around inf
Simplified72.8%
Final simplification63.5%
(FPCore (x y z) :precision binary64 (+ x (* y 0.0692910599291889)))
double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
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 * 0.0692910599291889d0)
end function
public static double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
def code(x, y, z): return x + (y * 0.0692910599291889)
function code(x, y, z) return Float64(x + Float64(y * 0.0692910599291889)) end
function tmp = code(x, y, z) tmp = x + (y * 0.0692910599291889); end
code[x_, y_, z_] := N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 0.0692910599291889
\end{array}
Initial program 70.8%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6477.7%
Simplified77.7%
(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.8%
Taylor expanded in x around inf
Simplified49.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 2024160
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< z -324806146098267/40000000) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)) (if (< z 657611897278737700000) (+ x (* (* y (+ (* (+ (* z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (/ 1 (+ (* (+ z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)))) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))