
(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 12 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) INFINITY)
(+ (/ y (/ t_0 t_1)) x)
(+ 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) <= ((double) INFINITY)) {
tmp = (y / (t_0 / t_1)) + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
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) <= Double.POSITIVE_INFINITY) {
tmp = (y / (t_0 / t_1)) + x;
} 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) <= math.inf: tmp = (y / (t_0 / t_1)) + x 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) <= Inf) tmp = Float64(Float64(y / Float64(t_0 / t_1)) + x); 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) <= Inf) tmp = (y / (t_0 / t_1)) + x; 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], Infinity], N[(N[(y / N[(t$95$0 / t$95$1), $MachinePrecision]), $MachinePrecision] + x), $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 \infty:\\
\;\;\;\;\frac{y}{\frac{t\_0}{t\_1}} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < +inf.0Initial program 94.4%
+-commutativeN/A
+-lowering-+.f64N/A
Applied egg-rr99.4%
if +inf.0 < (/.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.0%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification99.5%
(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) INFINITY)
(+ 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) <= ((double) INFINITY)) {
tmp = x + (t_1 * (y / t_0));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
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) <= Double.POSITIVE_INFINITY) {
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) <= math.inf: 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) <= Inf) 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) <= Inf) 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], Infinity], 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 \infty:\\
\;\;\;\;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))) < +inf.0Initial program 94.4%
*-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.9%
Applied egg-rr98.9%
if +inf.0 < (/.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.0%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (* y 0.0692910599291889))))
(if (<= z -5.4)
(+
t_0
(/ (- (/ (* y -0.4046220386999212) z) (* y -0.07512208616047561)) z))
(if (<= z 4.1)
(+
x
(+
(* z (+ (* y -0.00277777777751721) (* z (* y 0.0007936505811533442))))
(* 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.4) {
tmp = t_0 + ((((y * -0.4046220386999212) / z) - (y * -0.07512208616047561)) / z);
} else if (z <= 4.1) {
tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (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.4d0)) then
tmp = t_0 + ((((y * (-0.4046220386999212d0)) / z) - (y * (-0.07512208616047561d0))) / z)
else if (z <= 4.1d0) then
tmp = x + ((z * ((y * (-0.00277777777751721d0)) + (z * (y * 0.0007936505811533442d0)))) + (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.4) {
tmp = t_0 + ((((y * -0.4046220386999212) / z) - (y * -0.07512208616047561)) / z);
} else if (z <= 4.1) {
tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (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.4: tmp = t_0 + ((((y * -0.4046220386999212) / z) - (y * -0.07512208616047561)) / z) elif z <= 4.1: tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (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.4) tmp = Float64(t_0 + Float64(Float64(Float64(Float64(y * -0.4046220386999212) / z) - Float64(y * -0.07512208616047561)) / z)); elseif (z <= 4.1) tmp = Float64(x + Float64(Float64(z * Float64(Float64(y * -0.00277777777751721) + Float64(z * Float64(y * 0.0007936505811533442)))) + 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.4) tmp = t_0 + ((((y * -0.4046220386999212) / z) - (y * -0.07512208616047561)) / z); elseif (z <= 4.1) tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (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.4], N[(t$95$0 + N[(N[(N[(N[(y * -0.4046220386999212), $MachinePrecision] / z), $MachinePrecision] - N[(y * -0.07512208616047561), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1], N[(x + N[(N[(z * N[(N[(y * -0.00277777777751721), $MachinePrecision] + N[(z * N[(y * 0.0007936505811533442), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot 0.0692910599291889\\
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;t\_0 + \frac{\frac{y \cdot -0.4046220386999212}{z} - y \cdot -0.07512208616047561}{z}\\
\mathbf{elif}\;z \leq 4.1:\\
\;\;\;\;x + \left(z \cdot \left(y \cdot -0.00277777777751721 + z \cdot \left(y \cdot 0.0007936505811533442\right)\right) + y \cdot 0.08333333333333323\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 39.4%
Taylor expanded in z around -inf
Simplified98.0%
if -5.4000000000000004 < z < 4.0999999999999996Initial program 99.7%
Taylor expanded in z around 0
Simplified99.4%
if 4.0999999999999996 < z Initial program 41.5%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= z -5.4)
(- x (* y (- (/ -0.07512208616047561 z) 0.0692910599291889)))
(if (<= z 4.4)
(+
x
(+
(* z (+ (* y -0.00277777777751721) (* z (* y 0.0007936505811533442))))
(* y 0.08333333333333323)))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 4.4) {
tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (y * 0.08333333333333323));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.4d0)) then
tmp = x - (y * (((-0.07512208616047561d0) / z) - 0.0692910599291889d0))
else if (z <= 4.4d0) then
tmp = x + ((z * ((y * (-0.00277777777751721d0)) + (z * (y * 0.0007936505811533442d0)))) + (y * 0.08333333333333323d0))
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 4.4) {
tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (y * 0.08333333333333323));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.4: tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)) elif z <= 4.4: tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (y * 0.08333333333333323)) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.4) tmp = Float64(x - Float64(y * Float64(Float64(-0.07512208616047561 / z) - 0.0692910599291889))); elseif (z <= 4.4) tmp = Float64(x + Float64(Float64(z * Float64(Float64(y * -0.00277777777751721) + Float64(z * Float64(y * 0.0007936505811533442)))) + Float64(y * 0.08333333333333323))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.4) tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)); elseif (z <= 4.4) tmp = x + ((z * ((y * -0.00277777777751721) + (z * (y * 0.0007936505811533442)))) + (y * 0.08333333333333323)); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(x - N[(y * N[(N[(-0.07512208616047561 / z), $MachinePrecision] - 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4], N[(x + N[(N[(z * N[(N[(y * -0.00277777777751721), $MachinePrecision] + N[(z * N[(y * 0.0007936505811533442), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;x - y \cdot \left(\frac{-0.07512208616047561}{z} - 0.0692910599291889\right)\\
\mathbf{elif}\;z \leq 4.4:\\
\;\;\;\;x + \left(z \cdot \left(y \cdot -0.00277777777751721 + z \cdot \left(y \cdot 0.0007936505811533442\right)\right) + y \cdot 0.08333333333333323\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 39.4%
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.7%
if -5.4000000000000004 < z < 4.4000000000000004Initial program 99.7%
Taylor expanded in z around 0
Simplified99.4%
if 4.4000000000000004 < z Initial program 41.5%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= z -5.4)
(- x (* y (- (/ -0.07512208616047561 z) 0.0692910599291889)))
(if (<= z 5.0)
(+ (* y 0.08333333333333323) (+ x (* z (* y -0.00277777777751721))))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 5.0) {
tmp = (y * 0.08333333333333323) + (x + (z * (y * -0.00277777777751721)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.4d0)) then
tmp = x - (y * (((-0.07512208616047561d0) / z) - 0.0692910599291889d0))
else if (z <= 5.0d0) then
tmp = (y * 0.08333333333333323d0) + (x + (z * (y * (-0.00277777777751721d0))))
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 5.0) {
tmp = (y * 0.08333333333333323) + (x + (z * (y * -0.00277777777751721)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.4: tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)) elif z <= 5.0: tmp = (y * 0.08333333333333323) + (x + (z * (y * -0.00277777777751721))) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.4) tmp = Float64(x - Float64(y * Float64(Float64(-0.07512208616047561 / z) - 0.0692910599291889))); elseif (z <= 5.0) tmp = Float64(Float64(y * 0.08333333333333323) + Float64(x + Float64(z * Float64(y * -0.00277777777751721)))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.4) tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)); elseif (z <= 5.0) tmp = (y * 0.08333333333333323) + (x + (z * (y * -0.00277777777751721))); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(x - N[(y * N[(N[(-0.07512208616047561 / z), $MachinePrecision] - 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(N[(y * 0.08333333333333323), $MachinePrecision] + N[(x + N[(z * N[(y * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;x - y \cdot \left(\frac{-0.07512208616047561}{z} - 0.0692910599291889\right)\\
\mathbf{elif}\;z \leq 5:\\
\;\;\;\;y \cdot 0.08333333333333323 + \left(x + z \cdot \left(y \cdot -0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 39.4%
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.7%
if -5.4000000000000004 < z < 5Initial program 99.7%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Applied egg-rr99.4%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
metadata-eval99.2%
Simplified99.2%
if 5 < z Initial program 41.5%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (<= z -5.4)
(- x (* y (- (/ -0.07512208616047561 z) 0.0692910599291889)))
(if (<= z 5.0)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 5.0) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.4d0)) then
tmp = x - (y * (((-0.07512208616047561d0) / z) - 0.0692910599291889d0))
else if (z <= 5.0d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889));
} else if (z <= 5.0) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.4: tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)) elif z <= 5.0: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.4) tmp = Float64(x - Float64(y * Float64(Float64(-0.07512208616047561 / z) - 0.0692910599291889))); elseif (z <= 5.0) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.4) tmp = x - (y * ((-0.07512208616047561 / z) - 0.0692910599291889)); elseif (z <= 5.0) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(x - N[(y * N[(N[(-0.07512208616047561 / z), $MachinePrecision] - 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;x - y \cdot \left(\frac{-0.07512208616047561}{z} - 0.0692910599291889\right)\\
\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 39.4%
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.7%
if -5.4000000000000004 < z < 5Initial 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.2%
Simplified99.2%
if 5 < z Initial program 41.5%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (* y 0.0692910599291889))))
(if (<= z -5.4)
t_0
(if (<= z 5.0)
(+ 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.4) {
tmp = t_0;
} else if (z <= 5.0) {
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.4d0)) then
tmp = t_0
else if (z <= 5.0d0) 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.4) {
tmp = t_0;
} else if (z <= 5.0) {
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.4: tmp = t_0 elif z <= 5.0: 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.4) tmp = t_0; elseif (z <= 5.0) 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.4) tmp = t_0; elseif (z <= 5.0) 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.4], t$95$0, If[LessEqual[z, 5.0], 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.4:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5 < z Initial program 40.4%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.3%
Simplified98.3%
if -5.4000000000000004 < z < 5Initial 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.2%
Simplified99.2%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ x (* y 0.0692910599291889)))) (if (<= z -5.4) t_0 (if (<= z 6.0) (+ 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.4) {
tmp = t_0;
} else if (z <= 6.0) {
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.4d0)) then
tmp = t_0
else if (z <= 6.0d0) 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.4) {
tmp = t_0;
} else if (z <= 6.0) {
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.4: tmp = t_0 elif z <= 6.0: 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.4) tmp = t_0; elseif (z <= 6.0) 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.4) tmp = t_0; elseif (z <= 6.0) 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.4], t$95$0, If[LessEqual[z, 6.0], 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.4:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 6:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 6 < z Initial program 40.4%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.3%
Simplified98.3%
if -5.4000000000000004 < z < 6Initial program 99.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.8%
Simplified98.8%
(FPCore (x y z) :precision binary64 (if (<= x -2.9e-120) x (if (<= x 3.9e-59) (* y 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.9e-120) {
tmp = x;
} else if (x <= 3.9e-59) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.9d-120)) then
tmp = x
else if (x <= 3.9d-59) then
tmp = y * 0.08333333333333323d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.9e-120) {
tmp = x;
} else if (x <= 3.9e-59) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.9e-120: tmp = x elif x <= 3.9e-59: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.9e-120) tmp = x; elseif (x <= 3.9e-59) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.9e-120) tmp = x; elseif (x <= 3.9e-59) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.9e-120], x, If[LessEqual[x, 3.9e-59], N[(y * 0.08333333333333323), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{-120}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-59}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.9e-120 or 3.90000000000000019e-59 < x Initial program 68.9%
Taylor expanded in x around inf
Simplified73.4%
if -2.9e-120 < x < 3.90000000000000019e-59Initial program 77.4%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6471.1%
Simplified71.1%
Taylor expanded in x around 0
*-lowering-*.f6457.5%
Simplified57.5%
Final simplification67.8%
(FPCore (x y z) :precision binary64 (if (<= x -2.1e-39) x (if (<= x 4.9e-17) (* y 0.0692910599291889) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e-39) {
tmp = x;
} else if (x <= 4.9e-17) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.1d-39)) then
tmp = x
else if (x <= 4.9d-17) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e-39) {
tmp = x;
} else if (x <= 4.9e-17) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.1e-39: tmp = x elif x <= 4.9e-17: tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.1e-39) tmp = x; elseif (x <= 4.9e-17) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.1e-39) tmp = x; elseif (x <= 4.9e-17) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.1e-39], x, If[LessEqual[x, 4.9e-17], N[(y * 0.0692910599291889), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{-17}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.09999999999999993e-39 or 4.90000000000000012e-17 < x Initial program 69.2%
Taylor expanded in x around inf
Simplified78.6%
if -2.09999999999999993e-39 < x < 4.90000000000000012e-17Initial program 75.4%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.6%
Simplified62.6%
Taylor expanded in x around 0
*-lowering-*.f6446.5%
Simplified46.5%
Final simplification64.7%
(FPCore (x y z) :precision binary64 (if (<= y 8e+239) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if (y <= 8e+239) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 8d+239) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 8e+239) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 8e+239: tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if (y <= 8e+239) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 8e+239) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 8e+239], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{+239}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < 7.99999999999999993e239Initial program 70.9%
Taylor expanded in z around inf
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6480.7%
Simplified80.7%
if 7.99999999999999993e239 < y Initial program 91.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6479.7%
Simplified79.7%
Taylor expanded in x around 0
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification80.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 71.9%
Taylor expanded in x around inf
Simplified52.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y)
(- (/ (* 0.40462203869992125 y) (* z z)) x))))
(if (< z -8120153.652456675)
t_0
(if (< z 6.576118972787377e+20)
(+
x
(*
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((0.07512208616047561d0 / z) + 0.0692910599291889d0) * y) - (((0.40462203869992125d0 * y) / (z * z)) - x)
if (z < (-8120153.652456675d0)) then
tmp = t_0
else if (z < 6.576118972787377d+20) then
tmp = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) * (1.0d0 / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x) tmp = 0 if z < -8120153.652456675: tmp = t_0 elif z < 6.576118972787377e+20: tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(0.07512208616047561 / z) + 0.0692910599291889) * y) - Float64(Float64(Float64(0.40462203869992125 * y) / Float64(z * z)) - x)) tmp = 0.0 if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * Float64(1.0 / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x); tmp = 0.0; if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(0.07512208616047561 / z), $MachinePrecision] + 0.0692910599291889), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(0.40462203869992125 * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -8120153.652456675], t$95$0, If[Less[z, 6.576118972787377e+20], N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\
\mathbf{if}\;z < -8120153.652456675:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\
\;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024158
(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))))