
(FPCore (x y z t a) :precision binary64 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) * z) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a): return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a)))) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) * z) / sqrt(((z * z) - (t * a))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) * z) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a): return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a)))) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) * z) / sqrt(((z * z) - (t * a))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= z -1e+139) (* y (- x)) (if (<= z 2.05e+108) (/ (* z (* y x)) (sqrt (- (* z z) (* t a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+139) {
tmp = y * -x;
} else if (z <= 2.05e+108) {
tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1d+139)) then
tmp = y * -x
else if (z <= 2.05d+108) then
tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+139) {
tmp = y * -x;
} else if (z <= 2.05e+108) {
tmp = (z * (y * x)) / Math.sqrt(((z * z) - (t * a)));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+139: tmp = y * -x elif z <= 2.05e+108: tmp = (z * (y * x)) / math.sqrt(((z * z) - (t * a))) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+139) tmp = Float64(y * Float64(-x)); elseif (z <= 2.05e+108) tmp = Float64(Float64(z * Float64(y * x)) / sqrt(Float64(Float64(z * z) - Float64(t * a)))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+139) tmp = y * -x; elseif (z <= 2.05e+108) tmp = (z * (y * x)) / sqrt(((z * z) - (t * a))); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+139], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.05e+108], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.00000000000000003e139Initial program 17.6%
associate-*l*15.2%
associate-*r/15.3%
*-commutative15.3%
associate-/l*12.0%
Simplified12.0%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
if -1.00000000000000003e139 < z < 2.05e108Initial program 85.5%
if 2.05e108 < z Initial program 28.6%
associate-*l*28.0%
associate-*r/30.1%
*-commutative30.1%
associate-/l*25.6%
Simplified25.6%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.3e+148) (* y (- x)) (if (<= z 1.55e+50) (* x (/ z (/ (sqrt (- (* z z) (* t a))) y))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e+148) {
tmp = y * -x;
} else if (z <= 1.55e+50) {
tmp = x * (z / (sqrt(((z * z) - (t * a))) / y));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.3d+148)) then
tmp = y * -x
else if (z <= 1.55d+50) then
tmp = x * (z / (sqrt(((z * z) - (t * a))) / y))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e+148) {
tmp = y * -x;
} else if (z <= 1.55e+50) {
tmp = x * (z / (Math.sqrt(((z * z) - (t * a))) / y));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e+148: tmp = y * -x elif z <= 1.55e+50: tmp = x * (z / (math.sqrt(((z * z) - (t * a))) / y)) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e+148) tmp = Float64(y * Float64(-x)); elseif (z <= 1.55e+50) tmp = Float64(x * Float64(z / Float64(sqrt(Float64(Float64(z * z) - Float64(t * a))) / y))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.3e+148) tmp = y * -x; elseif (z <= 1.55e+50) tmp = x * (z / (sqrt(((z * z) - (t * a))) / y)); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+148], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.55e+50], N[(x * N[(z / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+148}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.3e148Initial program 14.0%
associate-*l*11.5%
associate-*r/11.6%
*-commutative11.6%
associate-/l*12.4%
Simplified12.4%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
if -1.3e148 < z < 1.55000000000000001e50Initial program 84.8%
associate-*l*87.8%
associate-*r/88.6%
*-commutative88.6%
associate-/l*82.8%
Simplified82.8%
if 1.55000000000000001e50 < z Initial program 38.5%
associate-*l*38.0%
associate-*r/39.8%
*-commutative39.8%
associate-/l*35.9%
Simplified35.9%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
Simplified98.6%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.7e+124) (* y (- x)) (if (<= z 9.8e+107) (/ (* x (* z y)) (sqrt (- (* z z) (* t a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.7e+124) {
tmp = y * -x;
} else if (z <= 9.8e+107) {
tmp = (x * (z * y)) / sqrt(((z * z) - (t * a)));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.7d+124)) then
tmp = y * -x
else if (z <= 9.8d+107) then
tmp = (x * (z * y)) / sqrt(((z * z) - (t * a)))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.7e+124) {
tmp = y * -x;
} else if (z <= 9.8e+107) {
tmp = (x * (z * y)) / Math.sqrt(((z * z) - (t * a)));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.7e+124: tmp = y * -x elif z <= 9.8e+107: tmp = (x * (z * y)) / math.sqrt(((z * z) - (t * a))) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.7e+124) tmp = Float64(y * Float64(-x)); elseif (z <= 9.8e+107) tmp = Float64(Float64(x * Float64(z * y)) / sqrt(Float64(Float64(z * z) - Float64(t * a)))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.7e+124) tmp = y * -x; elseif (z <= 9.8e+107) tmp = (x * (z * y)) / sqrt(((z * z) - (t * a))); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.7e+124], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.8e+107], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+124}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+107}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -3.70000000000000008e124Initial program 20.9%
associate-*l*18.6%
associate-*r/18.8%
*-commutative18.8%
associate-/l*15.6%
Simplified15.6%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
if -3.70000000000000008e124 < z < 9.8000000000000003e107Initial program 85.3%
associate-/l*85.3%
*-commutative85.3%
associate-/l*85.3%
associate-*l*82.2%
Simplified82.2%
Taylor expanded in y around 0 88.3%
if 9.8000000000000003e107 < z Initial program 28.6%
associate-*l*28.0%
associate-*r/30.1%
*-commutative30.1%
associate-/l*25.6%
Simplified25.6%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification93.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.6e+77) (* y (- x)) (if (<= z 9.2e+107) (/ (* y (* z x)) (sqrt (- (* z z) (* t a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.6e+77) {
tmp = y * -x;
} else if (z <= 9.2e+107) {
tmp = (y * (z * x)) / sqrt(((z * z) - (t * a)));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7.6d+77)) then
tmp = y * -x
else if (z <= 9.2d+107) then
tmp = (y * (z * x)) / sqrt(((z * z) - (t * a)))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.6e+77) {
tmp = y * -x;
} else if (z <= 9.2e+107) {
tmp = (y * (z * x)) / Math.sqrt(((z * z) - (t * a)));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.6e+77: tmp = y * -x elif z <= 9.2e+107: tmp = (y * (z * x)) / math.sqrt(((z * z) - (t * a))) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.6e+77) tmp = Float64(y * Float64(-x)); elseif (z <= 9.2e+107) tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(Float64(z * z) - Float64(t * a)))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.6e+77) tmp = y * -x; elseif (z <= 9.2e+107) tmp = (y * (z * x)) / sqrt(((z * z) - (t * a))); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.6e+77], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.2e+107], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+77}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+107}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -7.6000000000000002e77Initial program 32.0%
associate-*l*30.0%
associate-*r/30.2%
*-commutative30.2%
associate-/l*24.2%
Simplified24.2%
Taylor expanded in z around -inf 98.4%
mul-1-neg98.4%
*-commutative98.4%
distribute-rgt-neg-in98.4%
Simplified98.4%
if -7.6000000000000002e77 < z < 9.2000000000000001e107Initial program 84.5%
associate-/l*84.5%
*-commutative84.5%
associate-/l*84.5%
associate-*l*81.9%
Simplified81.9%
if 9.2000000000000001e107 < z Initial program 28.6%
associate-*l*28.0%
associate-*r/30.1%
*-commutative30.1%
associate-/l*25.6%
Simplified25.6%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification89.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.24e-60)
(/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x)))
(if (<= z 1.1e-113)
(* x (/ z (/ (sqrt (* t (- a))) y)))
(* x (* y (/ z (+ z (* 0.5 (* t (/ a z))))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.24e-60) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else if (z <= 1.1e-113) {
tmp = x * (z / (sqrt((t * -a)) / y));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.24d-60)) then
tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
else if (z <= 1.1d-113) then
tmp = x * (z / (sqrt((t * -a)) / y))
else
tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.24e-60) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else if (z <= 1.1e-113) {
tmp = x * (z / (Math.sqrt((t * -a)) / y));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.24e-60: tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)) elif z <= 1.1e-113: tmp = x * (z / (math.sqrt((t * -a)) / y)) else: tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.24e-60) tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x))); elseif (z <= 1.1e-113) tmp = Float64(x * Float64(z / Float64(sqrt(Float64(t * Float64(-a))) / y))); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.24e-60) tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)); elseif (z <= 1.1e-113) tmp = x * (z / (sqrt((t * -a)) / y)); else tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.24e-60], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-113], N[(x * N[(z / N[(N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.24 \cdot 10^{-60}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-113}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\
\end{array}
\end{array}
if z < -1.23999999999999998e-60Initial program 48.1%
Taylor expanded in z around -inf 81.4%
neg-mul-181.4%
+-commutative81.4%
unsub-neg81.4%
Simplified81.4%
Taylor expanded in x around 0 76.3%
associate-/l*78.5%
associate-*r/79.8%
*-commutative79.8%
Simplified79.8%
clear-num78.9%
inv-pow78.9%
associate-/r*90.7%
div-sub90.7%
pow190.7%
pow190.7%
pow-div90.7%
metadata-eval90.7%
metadata-eval90.7%
Applied egg-rr90.7%
unpow-190.7%
associate-/l/92.1%
sub-neg92.1%
metadata-eval92.1%
Simplified92.1%
if -1.23999999999999998e-60 < z < 1.10000000000000002e-113Initial program 77.1%
associate-*l*83.9%
associate-*r/83.1%
*-commutative83.1%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in z around 0 72.0%
mul-1-neg72.0%
*-commutative72.0%
distribute-rgt-neg-in72.0%
Simplified72.0%
if 1.10000000000000002e-113 < z Initial program 57.2%
associate-*l*55.9%
associate-*r/58.1%
*-commutative58.1%
associate-/l*55.5%
Simplified55.5%
Taylor expanded in z around -inf 19.4%
fma-def19.4%
associate-/l*19.4%
Simplified19.4%
associate-/r/19.1%
fma-udef19.1%
neg-mul-119.1%
add-sqr-sqrt0.0%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-prod89.6%
add-sqr-sqrt90.0%
associate-/r/90.0%
Applied egg-rr90.0%
Final simplification85.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.4e-60)
(/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x)))
(if (<= z 6.4e-114)
(* (* z x) (/ y (sqrt (* t (- a)))))
(* x (* y (/ z (+ z (* 0.5 (* t (/ a z))))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.4e-60) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else if (z <= 6.4e-114) {
tmp = (z * x) * (y / sqrt((t * -a)));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.4d-60)) then
tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
else if (z <= 6.4d-114) then
tmp = (z * x) * (y / sqrt((t * -a)))
else
tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.4e-60) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else if (z <= 6.4e-114) {
tmp = (z * x) * (y / Math.sqrt((t * -a)));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.4e-60: tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)) elif z <= 6.4e-114: tmp = (z * x) * (y / math.sqrt((t * -a))) else: tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.4e-60) tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x))); elseif (z <= 6.4e-114) tmp = Float64(Float64(z * x) * Float64(y / sqrt(Float64(t * Float64(-a))))); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.4e-60) tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)); elseif (z <= 6.4e-114) tmp = (z * x) * (y / sqrt((t * -a))); else tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.4e-60], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-114], N[(N[(z * x), $MachinePrecision] * N[(y / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-114}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{\sqrt{t \cdot \left(-a\right)}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\
\end{array}
\end{array}
if z < -6.4000000000000003e-60Initial program 48.1%
Taylor expanded in z around -inf 81.4%
neg-mul-181.4%
+-commutative81.4%
unsub-neg81.4%
Simplified81.4%
Taylor expanded in x around 0 76.3%
associate-/l*78.5%
associate-*r/79.8%
*-commutative79.8%
Simplified79.8%
clear-num78.9%
inv-pow78.9%
associate-/r*90.7%
div-sub90.7%
pow190.7%
pow190.7%
pow-div90.7%
metadata-eval90.7%
metadata-eval90.7%
Applied egg-rr90.7%
unpow-190.7%
associate-/l/92.1%
sub-neg92.1%
metadata-eval92.1%
Simplified92.1%
if -6.4000000000000003e-60 < z < 6.4000000000000003e-114Initial program 77.1%
associate-*l*83.9%
*-commutative83.9%
associate-*l*77.2%
associate-*r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in z around 0 68.4%
mul-1-neg72.0%
*-commutative72.0%
distribute-rgt-neg-in72.0%
Simplified68.4%
if 6.4000000000000003e-114 < z Initial program 57.2%
associate-*l*55.9%
associate-*r/58.1%
*-commutative58.1%
associate-/l*55.5%
Simplified55.5%
Taylor expanded in z around -inf 19.4%
fma-def19.4%
associate-/l*19.4%
Simplified19.4%
associate-/r/19.1%
fma-udef19.1%
neg-mul-119.1%
add-sqr-sqrt0.0%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-prod89.6%
add-sqr-sqrt90.0%
associate-/r/90.0%
Applied egg-rr90.0%
Final simplification83.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e-54)
(/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x)))
(if (<= z 6e-120)
(/ (* y (* z x)) (sqrt (* t (- a))))
(* x (* y (/ z (+ z (* 0.5 (* t (/ a z))))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-54) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else if (z <= 6e-120) {
tmp = (y * (z * x)) / sqrt((t * -a));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5d-54)) then
tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
else if (z <= 6d-120) then
tmp = (y * (z * x)) / sqrt((t * -a))
else
tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-54) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else if (z <= 6e-120) {
tmp = (y * (z * x)) / Math.sqrt((t * -a));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e-54: tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)) elif z <= 6e-120: tmp = (y * (z * x)) / math.sqrt((t * -a)) else: tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e-54) tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x))); elseif (z <= 6e-120) tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(t * Float64(-a)))); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e-54) tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)); elseif (z <= 6e-120) tmp = (y * (z * x)) / sqrt((t * -a)); else tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-54], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-120], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-54}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-120}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{t \cdot \left(-a\right)}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\
\end{array}
\end{array}
if z < -5.00000000000000015e-54Initial program 48.1%
Taylor expanded in z around -inf 81.4%
neg-mul-181.4%
+-commutative81.4%
unsub-neg81.4%
Simplified81.4%
Taylor expanded in x around 0 76.3%
associate-/l*78.5%
associate-*r/79.8%
*-commutative79.8%
Simplified79.8%
clear-num78.9%
inv-pow78.9%
associate-/r*90.7%
div-sub90.7%
pow190.7%
pow190.7%
pow-div90.7%
metadata-eval90.7%
metadata-eval90.7%
Applied egg-rr90.7%
unpow-190.7%
associate-/l/92.1%
sub-neg92.1%
metadata-eval92.1%
Simplified92.1%
if -5.00000000000000015e-54 < z < 6.00000000000000022e-120Initial program 77.1%
associate-/l*75.9%
*-commutative75.9%
associate-/l*77.1%
associate-*l*77.2%
Simplified77.2%
Taylor expanded in z around 0 70.9%
mul-1-neg72.0%
*-commutative72.0%
distribute-rgt-neg-in72.0%
Simplified70.9%
if 6.00000000000000022e-120 < z Initial program 57.2%
associate-*l*55.9%
associate-*r/58.1%
*-commutative58.1%
associate-/l*55.5%
Simplified55.5%
Taylor expanded in z around -inf 19.4%
fma-def19.4%
associate-/l*19.4%
Simplified19.4%
associate-/r/19.1%
fma-udef19.1%
neg-mul-119.1%
add-sqr-sqrt0.0%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-prod89.6%
add-sqr-sqrt90.0%
associate-/r/90.0%
Applied egg-rr90.0%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1e-292) (/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x))) (* x (* y (/ z (+ z (* 0.5 (* t (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-292) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1d-292)) then
tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
else
tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-292) {
tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e-292: tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)) else: tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e-292) tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x))); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e-292) tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x)); else tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e-292], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-292}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\
\end{array}
\end{array}
if z < -1.0000000000000001e-292Initial program 58.5%
Taylor expanded in z around -inf 67.7%
neg-mul-167.7%
+-commutative67.7%
unsub-neg67.7%
Simplified67.7%
Taylor expanded in x around 0 64.2%
associate-/l*65.7%
associate-*r/66.5%
*-commutative66.5%
Simplified66.5%
clear-num65.9%
inv-pow65.9%
associate-/r*73.8%
div-sub73.8%
pow173.8%
pow173.8%
pow-div73.8%
metadata-eval73.8%
metadata-eval73.8%
Applied egg-rr73.8%
unpow-173.7%
associate-/l/74.7%
sub-neg74.7%
metadata-eval74.7%
Simplified74.7%
if -1.0000000000000001e-292 < z Initial program 62.5%
associate-*l*65.0%
associate-*r/65.4%
*-commutative65.4%
associate-/l*62.2%
Simplified62.2%
Taylor expanded in z around -inf 27.5%
fma-def27.5%
associate-/l*27.5%
Simplified27.5%
associate-/r/27.3%
fma-udef27.3%
neg-mul-127.3%
add-sqr-sqrt0.8%
sqrt-unprod49.1%
sqr-neg49.1%
sqrt-prod78.8%
add-sqr-sqrt79.9%
associate-/r/79.9%
Applied egg-rr79.9%
Final simplification77.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e-155) (* y (- x)) (if (<= z 7.5e-209) (* x (/ z (* 0.5 (* (/ t z) (/ a y))))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-155) {
tmp = y * -x;
} else if (z <= 7.5e-209) {
tmp = x * (z / (0.5 * ((t / z) * (a / y))));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.5d-155)) then
tmp = y * -x
else if (z <= 7.5d-209) then
tmp = x * (z / (0.5d0 * ((t / z) * (a / y))))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-155) {
tmp = y * -x;
} else if (z <= 7.5e-209) {
tmp = x * (z / (0.5 * ((t / z) * (a / y))));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e-155: tmp = y * -x elif z <= 7.5e-209: tmp = x * (z / (0.5 * ((t / z) * (a / y)))) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e-155) tmp = Float64(y * Float64(-x)); elseif (z <= 7.5e-209) tmp = Float64(x * Float64(z / Float64(0.5 * Float64(Float64(t / z) * Float64(a / y))))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e-155) tmp = y * -x; elseif (z <= 7.5e-209) tmp = x * (z / (0.5 * ((t / z) * (a / y)))); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e-155], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 7.5e-209], N[(x * N[(z / N[(0.5 * N[(N[(t / z), $MachinePrecision] * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-155}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-209}:\\
\;\;\;\;x \cdot \frac{z}{0.5 \cdot \left(\frac{t}{z} \cdot \frac{a}{y}\right)}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -6.5e-155Initial program 55.5%
associate-*l*55.2%
associate-*r/56.8%
*-commutative56.8%
associate-/l*52.0%
Simplified52.0%
Taylor expanded in z around -inf 81.1%
mul-1-neg81.1%
*-commutative81.1%
distribute-rgt-neg-in81.1%
Simplified81.1%
if -6.5e-155 < z < 7.49999999999999965e-209Initial program 77.7%
associate-*l*83.2%
associate-*r/80.2%
*-commutative80.2%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in z around -inf 45.9%
fma-def45.9%
associate-/l*46.0%
Simplified46.0%
Taylor expanded in z around 0 43.9%
times-frac45.7%
Simplified45.7%
if 7.49999999999999965e-209 < z Initial program 57.5%
associate-*l*58.1%
associate-*r/60.2%
*-commutative60.2%
associate-/l*57.9%
Simplified57.9%
Taylor expanded in z around inf 85.4%
*-commutative85.4%
Simplified85.4%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.5e-155) (* y (- x)) (* x (* y (/ z (+ z (* 0.5 (* t (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e-155) {
tmp = y * -x;
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7.5d-155)) then
tmp = y * -x
else
tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e-155) {
tmp = y * -x;
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e-155: tmp = y * -x else: tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e-155) tmp = Float64(y * Float64(-x)); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.5e-155) tmp = y * -x; else tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e-155], N[(y * (-x)), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-155}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\
\end{array}
\end{array}
if z < -7.5000000000000006e-155Initial program 55.5%
associate-*l*55.2%
associate-*r/56.8%
*-commutative56.8%
associate-/l*52.0%
Simplified52.0%
Taylor expanded in z around -inf 81.1%
mul-1-neg81.1%
*-commutative81.1%
distribute-rgt-neg-in81.1%
Simplified81.1%
if -7.5000000000000006e-155 < z Initial program 63.8%
associate-*l*65.9%
associate-*r/66.4%
*-commutative66.4%
associate-/l*62.6%
Simplified62.6%
Taylor expanded in z around -inf 28.8%
fma-def28.8%
associate-/l*28.8%
Simplified28.8%
associate-/r/28.6%
fma-udef28.6%
neg-mul-128.6%
add-sqr-sqrt5.8%
sqrt-unprod47.4%
sqr-neg47.4%
sqrt-prod67.8%
add-sqr-sqrt73.9%
associate-/r/73.9%
Applied egg-rr73.9%
Final simplification76.7%
(FPCore (x y z t a) :precision binary64 (if (<= z 5e-210) (/ x (/ (+ -1.0 (/ 0.5 (/ z (* a (/ t z))))) y)) (* x (* y (/ z (+ z (* 0.5 (* t (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 5e-210) {
tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y);
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= 5d-210) then
tmp = x / (((-1.0d0) + (0.5d0 / (z / (a * (t / z))))) / y)
else
tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 5e-210) {
tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y);
} else {
tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 5e-210: tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y) else: tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 5e-210) tmp = Float64(x / Float64(Float64(-1.0 + Float64(0.5 / Float64(z / Float64(a * Float64(t / z))))) / y)); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 5e-210) tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y); else tmp = x * (y * (z / (z + (0.5 * (t * (a / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 5e-210], N[(x / N[(N[(-1.0 + N[(0.5 / N[(z / N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5 \cdot 10^{-210}:\\
\;\;\;\;\frac{x}{\frac{-1 + \frac{0.5}{\frac{z}{a \cdot \frac{t}{z}}}}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\
\end{array}
\end{array}
if z < 5.0000000000000002e-210Initial program 62.6%
Taylor expanded in z around -inf 64.9%
neg-mul-164.9%
+-commutative64.9%
unsub-neg64.9%
Simplified64.9%
Taylor expanded in x around 0 62.0%
associate-/l*63.2%
associate-*r/63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in y around 0 63.2%
associate-*r/63.9%
rem-square-sqrt55.4%
times-frac57.3%
associate-*l/61.8%
associate-*r/61.7%
rem-square-sqrt70.4%
div-sub70.4%
*-lft-identity70.4%
associate-*l/70.4%
lft-mult-inverse70.4%
sub-neg70.4%
associate-/l*70.4%
metadata-eval70.4%
Simplified70.4%
if 5.0000000000000002e-210 < z Initial program 57.9%
associate-*l*58.4%
associate-*r/60.5%
*-commutative60.5%
associate-/l*58.2%
Simplified58.2%
Taylor expanded in z around -inf 21.7%
fma-def21.7%
associate-/l*21.7%
Simplified21.7%
associate-/r/21.5%
fma-udef21.5%
neg-mul-121.5%
add-sqr-sqrt0.0%
sqrt-unprod48.5%
sqr-neg48.5%
sqrt-prod86.3%
add-sqr-sqrt86.6%
associate-/r/86.6%
Applied egg-rr86.6%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e-292) (* y (- x)) (if (<= z 3.6e-209) (* (* z x) (/ y z)) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-292) {
tmp = y * -x;
} else if (z <= 3.6e-209) {
tmp = (z * x) * (y / z);
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.5d-292)) then
tmp = y * -x
else if (z <= 3.6d-209) then
tmp = (z * x) * (y / z)
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-292) {
tmp = y * -x;
} else if (z <= 3.6e-209) {
tmp = (z * x) * (y / z);
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e-292: tmp = y * -x elif z <= 3.6e-209: tmp = (z * x) * (y / z) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e-292) tmp = Float64(y * Float64(-x)); elseif (z <= 3.6e-209) tmp = Float64(Float64(z * x) * Float64(y / z)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e-292) tmp = y * -x; elseif (z <= 3.6e-209) tmp = (z * x) * (y / z); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e-292], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.6e-209], N[(N[(z * x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-292}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-209}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -6.4999999999999997e-292Initial program 58.5%
associate-*l*58.2%
associate-*r/59.6%
*-commutative59.6%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in z around -inf 71.1%
mul-1-neg71.1%
*-commutative71.1%
distribute-rgt-neg-in71.1%
Simplified71.1%
if -6.4999999999999997e-292 < z < 3.60000000000000016e-209Initial program 82.4%
associate-*l*92.5%
*-commutative92.5%
associate-*l*89.2%
associate-*r/82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 38.8%
if 3.60000000000000016e-209 < z Initial program 57.5%
associate-*l*58.1%
associate-*r/60.2%
*-commutative60.2%
associate-/l*57.9%
Simplified57.9%
Taylor expanded in z around inf 85.4%
*-commutative85.4%
Simplified85.4%
Final simplification73.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e-263) (* y (- x)) (if (<= z 6.5e-140) (/ (* x (* z y)) z) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e-263) {
tmp = y * -x;
} else if (z <= 6.5e-140) {
tmp = (x * (z * y)) / z;
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.15d-263)) then
tmp = y * -x
else if (z <= 6.5d-140) then
tmp = (x * (z * y)) / z
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e-263) {
tmp = y * -x;
} else if (z <= 6.5e-140) {
tmp = (x * (z * y)) / z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e-263: tmp = y * -x elif z <= 6.5e-140: tmp = (x * (z * y)) / z else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e-263) tmp = Float64(y * Float64(-x)); elseif (z <= 6.5e-140) tmp = Float64(Float64(x * Float64(z * y)) / z); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e-263) tmp = y * -x; elseif (z <= 6.5e-140) tmp = (x * (z * y)) / z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e-263], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 6.5e-140], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-263}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-140}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.15000000000000001e-263Initial program 57.6%
associate-*l*58.2%
associate-*r/59.6%
*-commutative59.6%
associate-/l*54.6%
Simplified54.6%
Taylor expanded in z around -inf 73.3%
mul-1-neg73.3%
*-commutative73.3%
distribute-rgt-neg-in73.3%
Simplified73.3%
if -1.15000000000000001e-263 < z < 6.4999999999999995e-140Initial program 76.0%
associate-/l*72.2%
*-commutative72.2%
associate-/l*76.0%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in y around 0 80.3%
Taylor expanded in z around inf 51.1%
if 6.4999999999999995e-140 < z Initial program 57.5%
associate-*l*58.0%
associate-*r/60.2%
*-commutative60.2%
associate-/l*57.7%
Simplified57.7%
Taylor expanded in z around inf 86.3%
*-commutative86.3%
Simplified86.3%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.7e-307) (* y (- x)) (/ 1.0 (/ (/ 1.0 x) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e-307) {
tmp = y * -x;
} else {
tmp = 1.0 / ((1.0 / x) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.7d-307)) then
tmp = y * -x
else
tmp = 1.0d0 / ((1.0d0 / x) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e-307) {
tmp = y * -x;
} else {
tmp = 1.0 / ((1.0 / x) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.7e-307: tmp = y * -x else: tmp = 1.0 / ((1.0 / x) / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.7e-307) tmp = Float64(y * Float64(-x)); else tmp = Float64(1.0 / Float64(Float64(1.0 / x) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.7e-307) tmp = y * -x; else tmp = 1.0 / ((1.0 / x) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.7e-307], N[(y * (-x)), $MachinePrecision], N[(1.0 / N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-307}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{x}}{y}}\\
\end{array}
\end{array}
if z < -2.69999999999999985e-307Initial program 58.7%
associate-*l*59.2%
associate-*r/60.0%
*-commutative60.0%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in z around -inf 69.5%
mul-1-neg69.5%
*-commutative69.5%
distribute-rgt-neg-in69.5%
Simplified69.5%
if -2.69999999999999985e-307 < z Initial program 62.4%
associate-*l*64.2%
associate-*r/65.2%
*-commutative65.2%
associate-/l*62.0%
Simplified62.0%
associate-*r/58.0%
clear-num57.9%
associate-/r*60.0%
associate-*r*62.3%
*-commutative62.3%
pow262.3%
*-commutative62.3%
*-commutative62.3%
Applied egg-rr62.3%
Taylor expanded in z around inf 74.2%
associate-/r*74.0%
Simplified74.0%
Final simplification71.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -5e-310) (* y (- x)) (* y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-310) {
tmp = y * -x;
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5d-310)) then
tmp = y * -x
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-310) {
tmp = y * -x;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e-310: tmp = y * -x else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e-310) tmp = Float64(y * Float64(-x)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e-310) tmp = y * -x; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-310], N[(y * (-x)), $MachinePrecision], N[(y * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -4.999999999999985e-310Initial program 58.7%
associate-*l*59.2%
associate-*r/60.0%
*-commutative60.0%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in z around -inf 69.5%
mul-1-neg69.5%
*-commutative69.5%
distribute-rgt-neg-in69.5%
Simplified69.5%
if -4.999999999999985e-310 < z Initial program 62.4%
associate-*l*64.2%
associate-*r/65.2%
*-commutative65.2%
associate-/l*62.0%
Simplified62.0%
Taylor expanded in z around inf 73.9%
*-commutative73.9%
Simplified73.9%
Final simplification71.8%
(FPCore (x y z t a) :precision binary64 (* y x))
double code(double x, double y, double z, double t, double a) {
return y * x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = y * x
end function
public static double code(double x, double y, double z, double t, double a) {
return y * x;
}
def code(x, y, z, t, a): return y * x
function code(x, y, z, t, a) return Float64(y * x) end
function tmp = code(x, y, z, t, a) tmp = y * x; end
code[x_, y_, z_, t_, a_] := N[(y * x), $MachinePrecision]
\begin{array}{l}
\\
y \cdot x
\end{array}
Initial program 60.6%
associate-*l*61.8%
associate-*r/62.7%
*-commutative62.7%
associate-/l*58.5%
Simplified58.5%
Taylor expanded in z around inf 43.9%
*-commutative43.9%
Simplified43.9%
Final simplification43.9%
(FPCore (x y z t a)
:precision binary64
(if (< z -3.1921305903852764e+46)
(- (* y x))
(if (< z 5.976268120920894e+90)
(/ (* x z) (/ (sqrt (- (* z z) (* a t))) y))
(* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z < -3.1921305903852764e+46) {
tmp = -(y * x);
} else if (z < 5.976268120920894e+90) {
tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y);
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z < (-3.1921305903852764d+46)) then
tmp = -(y * x)
else if (z < 5.976268120920894d+90) then
tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y)
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z < -3.1921305903852764e+46) {
tmp = -(y * x);
} else if (z < 5.976268120920894e+90) {
tmp = (x * z) / (Math.sqrt(((z * z) - (a * t))) / y);
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z < -3.1921305903852764e+46: tmp = -(y * x) elif z < 5.976268120920894e+90: tmp = (x * z) / (math.sqrt(((z * z) - (a * t))) / y) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z < -3.1921305903852764e+46) tmp = Float64(-Float64(y * x)); elseif (z < 5.976268120920894e+90) tmp = Float64(Float64(x * z) / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / y)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z < -3.1921305903852764e+46) tmp = -(y * x); elseif (z < 5.976268120920894e+90) tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Less[z, -3.1921305903852764e+46], (-N[(y * x), $MachinePrecision]), If[Less[z, 5.976268120920894e+90], N[(N[(x * z), $MachinePrecision] / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z < 5.976268120920894 \cdot 10^{+90}:\\
\;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
herbie shell --seed 2023318
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))