
(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 15 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 -2e+113)
(* y (- x))
(if (<= z 1.29e+121)
(* (/ z (sqrt (- (pow z 2.0) (* t a)))) (* y x))
(* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+113) {
tmp = y * -x;
} else if (z <= 1.29e+121) {
tmp = (z / sqrt((pow(z, 2.0) - (t * a)))) * (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 <= (-2d+113)) then
tmp = y * -x
else if (z <= 1.29d+121) then
tmp = (z / sqrt(((z ** 2.0d0) - (t * a)))) * (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 <= -2e+113) {
tmp = y * -x;
} else if (z <= 1.29e+121) {
tmp = (z / Math.sqrt((Math.pow(z, 2.0) - (t * a)))) * (y * x);
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+113: tmp = y * -x elif z <= 1.29e+121: tmp = (z / math.sqrt((math.pow(z, 2.0) - (t * a)))) * (y * x) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+113) tmp = Float64(y * Float64(-x)); elseif (z <= 1.29e+121) tmp = Float64(Float64(z / sqrt(Float64((z ^ 2.0) - Float64(t * a)))) * Float64(y * x)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2e+113) tmp = y * -x; elseif (z <= 1.29e+121) tmp = (z / sqrt(((z ^ 2.0) - (t * a)))) * (y * x); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+113], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.29e+121], N[(N[(z / N[Sqrt[N[(N[Power[z, 2.0], $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+113}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.29 \cdot 10^{+121}:\\
\;\;\;\;\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot \left(y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -2e113Initial program 33.3%
associate-*l*33.1%
associate-*r/35.2%
*-commutative35.2%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in z around -inf 94.3%
mul-1-neg94.3%
*-commutative94.3%
distribute-rgt-neg-in94.3%
Simplified94.3%
if -2e113 < z < 1.29000000000000005e121Initial program 79.9%
associate-/l*84.3%
*-commutative84.3%
associate-/l*79.9%
associate-*l*82.2%
Simplified82.2%
*-commutative82.2%
associate-/l*82.6%
associate-*r/81.0%
*-commutative81.0%
associate-/r/82.2%
associate-*l*84.3%
pow284.3%
Applied egg-rr84.3%
if 1.29000000000000005e121 < z Initial program 19.4%
associate-*l*19.1%
associate-*r/22.8%
*-commutative22.8%
associate-/l*21.8%
Simplified21.8%
Taylor expanded in z around inf 96.5%
*-commutative96.5%
Simplified96.5%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.6e+108) (* y (- x)) (if (<= z 2.15e+66) (* 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 <= -4.6e+108) {
tmp = y * -x;
} else if (z <= 2.15e+66) {
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 <= (-4.6d+108)) then
tmp = y * -x
else if (z <= 2.15d+66) 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 <= -4.6e+108) {
tmp = y * -x;
} else if (z <= 2.15e+66) {
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 <= -4.6e+108: tmp = y * -x elif z <= 2.15e+66: 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 <= -4.6e+108) tmp = Float64(y * Float64(-x)); elseif (z <= 2.15e+66) 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 <= -4.6e+108) tmp = y * -x; elseif (z <= 2.15e+66) 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, -4.6e+108], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.15e+66], 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 -4.6 \cdot 10^{+108}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+66}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -4.5999999999999998e108Initial program 33.3%
associate-*l*33.1%
associate-*r/35.2%
*-commutative35.2%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in z around -inf 94.3%
mul-1-neg94.3%
*-commutative94.3%
distribute-rgt-neg-in94.3%
Simplified94.3%
if -4.5999999999999998e108 < z < 2.15000000000000013e66Initial program 80.6%
associate-*l*76.6%
associate-*r/78.9%
*-commutative78.9%
associate-/l*81.2%
Simplified81.2%
if 2.15000000000000013e66 < z Initial program 29.8%
associate-*l*29.5%
associate-*r/35.3%
*-commutative35.3%
associate-/l*33.1%
Simplified33.1%
Taylor expanded in z around inf 94.3%
*-commutative94.3%
Simplified94.3%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+70) (* y (- x)) (if (<= z 1e+70) (* (/ y (sqrt (- (* z z) (* t a)))) (* z x)) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+70) {
tmp = y * -x;
} else if (z <= 1e+70) {
tmp = (y / sqrt(((z * z) - (t * a)))) * (z * 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 <= (-2.15d+70)) then
tmp = y * -x
else if (z <= 1d+70) then
tmp = (y / sqrt(((z * z) - (t * a)))) * (z * 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 <= -2.15e+70) {
tmp = y * -x;
} else if (z <= 1e+70) {
tmp = (y / Math.sqrt(((z * z) - (t * a)))) * (z * x);
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+70: tmp = y * -x elif z <= 1e+70: tmp = (y / math.sqrt(((z * z) - (t * a)))) * (z * x) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+70) tmp = Float64(y * Float64(-x)); elseif (z <= 1e+70) tmp = Float64(Float64(y / sqrt(Float64(Float64(z * z) - Float64(t * a)))) * Float64(z * x)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.15e+70) tmp = y * -x; elseif (z <= 1e+70) tmp = (y / sqrt(((z * z) - (t * a)))) * (z * x); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+70], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1e+70], N[(N[(y / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z * x), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 10^{+70}:\\
\;\;\;\;\frac{y}{\sqrt{z \cdot z - t \cdot a}} \cdot \left(z \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -2.15e70Initial program 46.6%
associate-*l*45.0%
associate-*r/50.5%
*-commutative50.5%
associate-/l*53.5%
Simplified53.5%
Taylor expanded in z around -inf 93.7%
mul-1-neg93.7%
*-commutative93.7%
distribute-rgt-neg-in93.7%
Simplified93.7%
if -2.15e70 < z < 1.00000000000000007e70Initial program 80.6%
associate-*l*76.8%
*-commutative76.8%
associate-*l*84.4%
associate-*r/82.9%
*-commutative82.9%
Simplified82.9%
if 1.00000000000000007e70 < z Initial program 29.8%
associate-*l*29.5%
associate-*r/35.3%
*-commutative35.3%
associate-/l*33.1%
Simplified33.1%
Taylor expanded in z around inf 94.3%
*-commutative94.3%
Simplified94.3%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.85e-29)
(* y (- x))
(if (<= z 8.4e-196)
(* x (/ z (/ (sqrt (* t (- a))) y)))
(/ (* y x) (/ (- (* 0.5 (/ (* t a) z)) z) (- z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e-29) {
tmp = y * -x;
} else if (z <= 8.4e-196) {
tmp = x * (z / (sqrt((t * -a)) / y));
} else {
tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -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.85d-29)) then
tmp = y * -x
else if (z <= 8.4d-196) then
tmp = x * (z / (sqrt((t * -a)) / y))
else
tmp = (y * x) / (((0.5d0 * ((t * a) / z)) - z) / -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.85e-29) {
tmp = y * -x;
} else if (z <= 8.4e-196) {
tmp = x * (z / (Math.sqrt((t * -a)) / y));
} else {
tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.85e-29: tmp = y * -x elif z <= 8.4e-196: tmp = x * (z / (math.sqrt((t * -a)) / y)) else: tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.85e-29) tmp = Float64(y * Float64(-x)); elseif (z <= 8.4e-196) tmp = Float64(x * Float64(z / Float64(sqrt(Float64(t * Float64(-a))) / y))); else tmp = Float64(Float64(y * x) / Float64(Float64(Float64(0.5 * Float64(Float64(t * a) / z)) - z) / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.85e-29) tmp = y * -x; elseif (z <= 8.4e-196) tmp = x * (z / (sqrt((t * -a)) / y)); else tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e-29], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8.4e-196], N[(x * N[(z / N[(N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(N[(N[(0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{-29}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-196}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{-z}}\\
\end{array}
\end{array}
if z < -1.8499999999999999e-29Initial program 56.2%
associate-*l*54.8%
associate-*r/59.5%
*-commutative59.5%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around -inf 92.6%
mul-1-neg92.6%
*-commutative92.6%
distribute-rgt-neg-in92.6%
Simplified92.6%
if -1.8499999999999999e-29 < z < 8.39999999999999953e-196Initial program 69.0%
associate-*l*67.7%
associate-*r/67.7%
*-commutative67.7%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in z around 0 63.1%
associate-*r*63.1%
neg-mul-163.1%
Simplified63.1%
if 8.39999999999999953e-196 < z Initial program 55.7%
associate-*l*52.2%
*-commutative52.2%
associate-*l*56.2%
associate-*r/55.7%
*-commutative55.7%
Simplified55.7%
Taylor expanded in z around inf 70.2%
associate-*l/67.7%
frac-2neg67.7%
associate-*r*72.1%
distribute-rgt-neg-in72.1%
+-commutative72.1%
fma-def72.1%
associate-/l*73.0%
Applied egg-rr73.0%
associate-/l*85.7%
*-commutative85.7%
fma-udef85.7%
distribute-neg-in85.7%
unsub-neg85.7%
distribute-lft-neg-in85.7%
metadata-eval85.7%
associate-/l*84.8%
Simplified84.8%
Final simplification82.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e-40)
(* y (- x))
(if (<= z 9.5e-196)
(* (* z x) (/ y (sqrt (* t (- a)))))
(/ (* y x) (/ (- (* 0.5 (/ (* t a) z)) z) (- z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e-40) {
tmp = y * -x;
} else if (z <= 9.5e-196) {
tmp = (z * x) * (y / sqrt((t * -a)));
} else {
tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -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 <= (-6d-40)) then
tmp = y * -x
else if (z <= 9.5d-196) then
tmp = (z * x) * (y / sqrt((t * -a)))
else
tmp = (y * x) / (((0.5d0 * ((t * a) / z)) - z) / -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 <= -6e-40) {
tmp = y * -x;
} else if (z <= 9.5e-196) {
tmp = (z * x) * (y / Math.sqrt((t * -a)));
} else {
tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e-40: tmp = y * -x elif z <= 9.5e-196: tmp = (z * x) * (y / math.sqrt((t * -a))) else: tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e-40) tmp = Float64(y * Float64(-x)); elseif (z <= 9.5e-196) tmp = Float64(Float64(z * x) * Float64(y / sqrt(Float64(t * Float64(-a))))); else tmp = Float64(Float64(y * x) / Float64(Float64(Float64(0.5 * Float64(Float64(t * a) / z)) - z) / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e-40) tmp = y * -x; elseif (z <= 9.5e-196) tmp = (z * x) * (y / sqrt((t * -a))); else tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e-40], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.5e-196], N[(N[(z * x), $MachinePrecision] * N[(y / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(N[(N[(0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-40}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-196}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{\sqrt{t \cdot \left(-a\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{-z}}\\
\end{array}
\end{array}
if z < -6.00000000000000039e-40Initial program 56.2%
associate-*l*54.8%
associate-*r/59.5%
*-commutative59.5%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around -inf 92.6%
mul-1-neg92.6%
*-commutative92.6%
distribute-rgt-neg-in92.6%
Simplified92.6%
if -6.00000000000000039e-40 < z < 9.50000000000000032e-196Initial program 69.0%
associate-*l*67.7%
*-commutative67.7%
associate-*l*76.1%
associate-*r/74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in z around 0 68.7%
associate-*r*63.1%
neg-mul-163.1%
Simplified68.7%
if 9.50000000000000032e-196 < z Initial program 55.7%
associate-*l*52.2%
*-commutative52.2%
associate-*l*56.2%
associate-*r/55.7%
*-commutative55.7%
Simplified55.7%
Taylor expanded in z around inf 70.2%
associate-*l/67.7%
frac-2neg67.7%
associate-*r*72.1%
distribute-rgt-neg-in72.1%
+-commutative72.1%
fma-def72.1%
associate-/l*73.0%
Applied egg-rr73.0%
associate-/l*85.7%
*-commutative85.7%
fma-udef85.7%
distribute-neg-in85.7%
unsub-neg85.7%
distribute-lft-neg-in85.7%
metadata-eval85.7%
associate-/l*84.8%
Simplified84.8%
Final simplification83.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.5e-40)
(* y (- x))
(if (<= z 9.5e-196)
(/ (* y (* z x)) (sqrt (* t (- a))))
(/ (* y x) (/ (- (* 0.5 (/ (* t a) z)) z) (- z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-40) {
tmp = y * -x;
} else if (z <= 9.5e-196) {
tmp = (y * (z * x)) / sqrt((t * -a));
} else {
tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -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.5d-40)) then
tmp = y * -x
else if (z <= 9.5d-196) then
tmp = (y * (z * x)) / sqrt((t * -a))
else
tmp = (y * x) / (((0.5d0 * ((t * a) / z)) - z) / -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.5e-40) {
tmp = y * -x;
} else if (z <= 9.5e-196) {
tmp = (y * (z * x)) / Math.sqrt((t * -a));
} else {
tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e-40: tmp = y * -x elif z <= 9.5e-196: tmp = (y * (z * x)) / math.sqrt((t * -a)) else: tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e-40) tmp = Float64(y * Float64(-x)); elseif (z <= 9.5e-196) tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(t * Float64(-a)))); else tmp = Float64(Float64(y * x) / Float64(Float64(Float64(0.5 * Float64(Float64(t * a) / z)) - z) / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e-40) tmp = y * -x; elseif (z <= 9.5e-196) tmp = (y * (z * x)) / sqrt((t * -a)); else tmp = (y * x) / (((0.5 * ((t * a) / z)) - z) / -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e-40], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.5e-196], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(N[(N[(0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-40}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-196}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{t \cdot \left(-a\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{-z}}\\
\end{array}
\end{array}
if z < -6.4999999999999999e-40Initial program 56.2%
associate-*l*54.8%
associate-*r/59.5%
*-commutative59.5%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around -inf 92.6%
mul-1-neg92.6%
*-commutative92.6%
distribute-rgt-neg-in92.6%
Simplified92.6%
if -6.4999999999999999e-40 < z < 9.50000000000000032e-196Initial program 69.0%
associate-/l*69.2%
*-commutative69.2%
associate-/l*69.0%
associate-*l*76.1%
Simplified76.1%
Taylor expanded in z around 0 70.7%
associate-*r*63.1%
neg-mul-163.1%
Simplified70.7%
if 9.50000000000000032e-196 < z Initial program 55.7%
associate-*l*52.2%
*-commutative52.2%
associate-*l*56.2%
associate-*r/55.7%
*-commutative55.7%
Simplified55.7%
Taylor expanded in z around inf 70.2%
associate-*l/67.7%
frac-2neg67.7%
associate-*r*72.1%
distribute-rgt-neg-in72.1%
+-commutative72.1%
fma-def72.1%
associate-/l*73.0%
Applied egg-rr73.0%
associate-/l*85.7%
*-commutative85.7%
fma-udef85.7%
distribute-neg-in85.7%
unsub-neg85.7%
distribute-lft-neg-in85.7%
metadata-eval85.7%
associate-/l*84.8%
Simplified84.8%
Final simplification84.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* t a) z)))
(if (<= z -8e+108)
(* y (- x))
(if (<= z -1e-306)
(* x (/ z (/ (- (* 0.5 t_1) z) y)))
(if (<= z 5.3e+67) (* x (/ z (/ (+ z (* t_1 -0.5)) y))) (* y x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t * a) / z;
double tmp;
if (z <= -8e+108) {
tmp = y * -x;
} else if (z <= -1e-306) {
tmp = x * (z / (((0.5 * t_1) - z) / y));
} else if (z <= 5.3e+67) {
tmp = x * (z / ((z + (t_1 * -0.5)) / 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) :: t_1
real(8) :: tmp
t_1 = (t * a) / z
if (z <= (-8d+108)) then
tmp = y * -x
else if (z <= (-1d-306)) then
tmp = x * (z / (((0.5d0 * t_1) - z) / y))
else if (z <= 5.3d+67) then
tmp = x * (z / ((z + (t_1 * (-0.5d0))) / 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 t_1 = (t * a) / z;
double tmp;
if (z <= -8e+108) {
tmp = y * -x;
} else if (z <= -1e-306) {
tmp = x * (z / (((0.5 * t_1) - z) / y));
} else if (z <= 5.3e+67) {
tmp = x * (z / ((z + (t_1 * -0.5)) / y));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t * a) / z tmp = 0 if z <= -8e+108: tmp = y * -x elif z <= -1e-306: tmp = x * (z / (((0.5 * t_1) - z) / y)) elif z <= 5.3e+67: tmp = x * (z / ((z + (t_1 * -0.5)) / y)) else: tmp = y * x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t * a) / z) tmp = 0.0 if (z <= -8e+108) tmp = Float64(y * Float64(-x)); elseif (z <= -1e-306) tmp = Float64(x * Float64(z / Float64(Float64(Float64(0.5 * t_1) - z) / y))); elseif (z <= 5.3e+67) tmp = Float64(x * Float64(z / Float64(Float64(z + Float64(t_1 * -0.5)) / y))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t * a) / z; tmp = 0.0; if (z <= -8e+108) tmp = y * -x; elseif (z <= -1e-306) tmp = x * (z / (((0.5 * t_1) - z) / y)); elseif (z <= 5.3e+67) tmp = x * (z / ((z + (t_1 * -0.5)) / y)); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -8e+108], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -1e-306], N[(x * N[(z / N[(N[(N[(0.5 * t$95$1), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+67], N[(x * N[(z / N[(N[(z + N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot a}{z}\\
\mathbf{if}\;z \leq -8 \cdot 10^{+108}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-306}:\\
\;\;\;\;x \cdot \frac{z}{\frac{0.5 \cdot t_1 - z}{y}}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+67}:\\
\;\;\;\;x \cdot \frac{z}{\frac{z + t_1 \cdot -0.5}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -8.0000000000000003e108Initial program 33.3%
associate-*l*33.1%
associate-*r/35.2%
*-commutative35.2%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in z around -inf 94.3%
mul-1-neg94.3%
*-commutative94.3%
distribute-rgt-neg-in94.3%
Simplified94.3%
if -8.0000000000000003e108 < z < -1.00000000000000003e-306Initial program 78.5%
associate-*l*74.5%
associate-*r/78.4%
*-commutative78.4%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in z around -inf 69.0%
neg-mul-169.0%
+-commutative69.0%
unsub-neg69.0%
Simplified69.0%
if -1.00000000000000003e-306 < z < 5.3e67Initial program 82.7%
associate-*l*78.8%
associate-*r/79.4%
*-commutative79.4%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in z around inf 64.1%
if 5.3e67 < z Initial program 29.8%
associate-*l*29.5%
associate-*r/35.3%
*-commutative35.3%
associate-/l*33.1%
Simplified33.1%
Taylor expanded in z around inf 94.3%
*-commutative94.3%
Simplified94.3%
Final simplification78.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* t a) z)))
(if (<= z -2.9e+109)
(* y (- x))
(if (<= z -2e-310)
(* x (* z (/ y (- (* 0.5 t_1) z))))
(if (<= z 6.6e+68) (* x (/ z (/ (+ z (* t_1 -0.5)) y))) (* y x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t * a) / z;
double tmp;
if (z <= -2.9e+109) {
tmp = y * -x;
} else if (z <= -2e-310) {
tmp = x * (z * (y / ((0.5 * t_1) - z)));
} else if (z <= 6.6e+68) {
tmp = x * (z / ((z + (t_1 * -0.5)) / 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) :: t_1
real(8) :: tmp
t_1 = (t * a) / z
if (z <= (-2.9d+109)) then
tmp = y * -x
else if (z <= (-2d-310)) then
tmp = x * (z * (y / ((0.5d0 * t_1) - z)))
else if (z <= 6.6d+68) then
tmp = x * (z / ((z + (t_1 * (-0.5d0))) / 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 t_1 = (t * a) / z;
double tmp;
if (z <= -2.9e+109) {
tmp = y * -x;
} else if (z <= -2e-310) {
tmp = x * (z * (y / ((0.5 * t_1) - z)));
} else if (z <= 6.6e+68) {
tmp = x * (z / ((z + (t_1 * -0.5)) / y));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t * a) / z tmp = 0 if z <= -2.9e+109: tmp = y * -x elif z <= -2e-310: tmp = x * (z * (y / ((0.5 * t_1) - z))) elif z <= 6.6e+68: tmp = x * (z / ((z + (t_1 * -0.5)) / y)) else: tmp = y * x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t * a) / z) tmp = 0.0 if (z <= -2.9e+109) tmp = Float64(y * Float64(-x)); elseif (z <= -2e-310) tmp = Float64(x * Float64(z * Float64(y / Float64(Float64(0.5 * t_1) - z)))); elseif (z <= 6.6e+68) tmp = Float64(x * Float64(z / Float64(Float64(z + Float64(t_1 * -0.5)) / y))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t * a) / z; tmp = 0.0; if (z <= -2.9e+109) tmp = y * -x; elseif (z <= -2e-310) tmp = x * (z * (y / ((0.5 * t_1) - z))); elseif (z <= 6.6e+68) tmp = x * (z / ((z + (t_1 * -0.5)) / y)); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.9e+109], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -2e-310], N[(x * N[(z * N[(y / N[(N[(0.5 * t$95$1), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+68], N[(x * N[(z / N[(N[(z + N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot a}{z}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+109}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-310}:\\
\;\;\;\;x \cdot \left(z \cdot \frac{y}{0.5 \cdot t_1 - z}\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \frac{z}{\frac{z + t_1 \cdot -0.5}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -2.9e109Initial program 33.3%
associate-*l*33.1%
associate-*r/35.2%
*-commutative35.2%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in z around -inf 94.3%
mul-1-neg94.3%
*-commutative94.3%
distribute-rgt-neg-in94.3%
Simplified94.3%
if -2.9e109 < z < -1.999999999999994e-310Initial program 78.5%
associate-/l*83.6%
*-commutative83.6%
associate-/l*78.5%
associate-*l*78.5%
Simplified78.5%
*-commutative78.5%
associate-/l*80.1%
associate-*r/79.0%
*-commutative79.0%
div-inv78.3%
clear-num78.4%
pow278.4%
Applied egg-rr78.4%
Taylor expanded in z around -inf 69.0%
neg-mul-169.0%
+-commutative69.0%
metadata-eval69.0%
associate-/l*69.0%
distribute-lft-neg-in69.0%
unsub-neg69.0%
distribute-lft-neg-in69.0%
metadata-eval69.0%
associate-/l*69.0%
Simplified69.0%
if -1.999999999999994e-310 < z < 6.6000000000000001e68Initial program 82.7%
associate-*l*78.8%
associate-*r/79.4%
*-commutative79.4%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in z around inf 64.1%
if 6.6000000000000001e68 < z Initial program 29.8%
associate-*l*29.5%
associate-*r/35.3%
*-commutative35.3%
associate-/l*33.1%
Simplified33.1%
Taylor expanded in z around inf 94.3%
*-commutative94.3%
Simplified94.3%
Final simplification78.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* 0.5 (/ (* t a) z)) z)))
(if (<= z -2.9e+109)
(* y (- x))
(if (<= z 4.8e-240) (* x (* z (/ y t_1))) (/ (* y x) (/ t_1 (- z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (0.5 * ((t * a) / z)) - z;
double tmp;
if (z <= -2.9e+109) {
tmp = y * -x;
} else if (z <= 4.8e-240) {
tmp = x * (z * (y / t_1));
} else {
tmp = (y * x) / (t_1 / -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) :: t_1
real(8) :: tmp
t_1 = (0.5d0 * ((t * a) / z)) - z
if (z <= (-2.9d+109)) then
tmp = y * -x
else if (z <= 4.8d-240) then
tmp = x * (z * (y / t_1))
else
tmp = (y * x) / (t_1 / -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (0.5 * ((t * a) / z)) - z;
double tmp;
if (z <= -2.9e+109) {
tmp = y * -x;
} else if (z <= 4.8e-240) {
tmp = x * (z * (y / t_1));
} else {
tmp = (y * x) / (t_1 / -z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (0.5 * ((t * a) / z)) - z tmp = 0 if z <= -2.9e+109: tmp = y * -x elif z <= 4.8e-240: tmp = x * (z * (y / t_1)) else: tmp = (y * x) / (t_1 / -z) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(0.5 * Float64(Float64(t * a) / z)) - z) tmp = 0.0 if (z <= -2.9e+109) tmp = Float64(y * Float64(-x)); elseif (z <= 4.8e-240) tmp = Float64(x * Float64(z * Float64(y / t_1))); else tmp = Float64(Float64(y * x) / Float64(t_1 / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (0.5 * ((t * a) / z)) - z; tmp = 0.0; if (z <= -2.9e+109) tmp = y * -x; elseif (z <= 4.8e-240) tmp = x * (z * (y / t_1)); else tmp = (y * x) / (t_1 / -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[z, -2.9e+109], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 4.8e-240], N[(x * N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(t$95$1 / (-z)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.5 \cdot \frac{t \cdot a}{z} - z\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+109}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-240}:\\
\;\;\;\;x \cdot \left(z \cdot \frac{y}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{t_1}{-z}}\\
\end{array}
\end{array}
if z < -2.9e109Initial program 33.3%
associate-*l*33.1%
associate-*r/35.2%
*-commutative35.2%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in z around -inf 94.3%
mul-1-neg94.3%
*-commutative94.3%
distribute-rgt-neg-in94.3%
Simplified94.3%
if -2.9e109 < z < 4.7999999999999999e-240Initial program 77.7%
associate-/l*82.3%
*-commutative82.3%
associate-/l*77.7%
associate-*l*80.1%
Simplified80.1%
*-commutative80.1%
associate-/l*81.6%
associate-*r/79.4%
*-commutative79.4%
div-inv78.7%
clear-num78.8%
pow278.8%
Applied egg-rr78.8%
Taylor expanded in z around -inf 66.4%
neg-mul-166.4%
+-commutative66.4%
metadata-eval66.4%
associate-/l*66.4%
distribute-lft-neg-in66.4%
unsub-neg66.4%
distribute-lft-neg-in66.4%
metadata-eval66.4%
associate-/l*66.4%
Simplified66.4%
if 4.7999999999999999e-240 < z Initial program 56.9%
associate-*l*54.3%
*-commutative54.3%
associate-*l*58.1%
associate-*r/57.8%
*-commutative57.8%
Simplified57.8%
Taylor expanded in z around inf 66.9%
associate-*l/64.6%
frac-2neg64.6%
associate-*r*68.7%
distribute-rgt-neg-in68.7%
+-commutative68.7%
fma-def68.7%
associate-/l*69.5%
Applied egg-rr69.5%
associate-/l*81.8%
*-commutative81.8%
fma-udef81.8%
distribute-neg-in81.8%
unsub-neg81.8%
distribute-lft-neg-in81.8%
metadata-eval81.8%
associate-/l*81.0%
Simplified81.0%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.6e-193)
(* y (- x))
(if (<= z 1.35e+59)
(* x (/ z (/ (+ z (* (/ (* t a) z) -0.5)) y)))
(* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e-193) {
tmp = y * -x;
} else if (z <= 1.35e+59) {
tmp = x * (z / ((z + (((t * a) / z) * -0.5)) / 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 <= (-2.6d-193)) then
tmp = y * -x
else if (z <= 1.35d+59) then
tmp = x * (z / ((z + (((t * a) / z) * (-0.5d0))) / 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 <= -2.6e-193) {
tmp = y * -x;
} else if (z <= 1.35e+59) {
tmp = x * (z / ((z + (((t * a) / z) * -0.5)) / y));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e-193: tmp = y * -x elif z <= 1.35e+59: tmp = x * (z / ((z + (((t * a) / z) * -0.5)) / y)) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e-193) tmp = Float64(y * Float64(-x)); elseif (z <= 1.35e+59) tmp = Float64(x * Float64(z / Float64(Float64(z + Float64(Float64(Float64(t * a) / z) * -0.5)) / y))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e-193) tmp = y * -x; elseif (z <= 1.35e+59) tmp = x * (z / ((z + (((t * a) / z) * -0.5)) / y)); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e-193], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.35e+59], N[(x * N[(z / N[(N[(z + N[(N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-193}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+59}:\\
\;\;\;\;x \cdot \frac{z}{\frac{z + \frac{t \cdot a}{z} \cdot -0.5}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -2.60000000000000008e-193Initial program 60.4%
associate-*l*56.8%
associate-*r/60.3%
*-commutative60.3%
associate-/l*62.2%
Simplified62.2%
Taylor expanded in z around -inf 80.0%
mul-1-neg80.0%
*-commutative80.0%
distribute-rgt-neg-in80.0%
Simplified80.0%
if -2.60000000000000008e-193 < z < 1.3500000000000001e59Initial program 79.2%
associate-*l*77.0%
associate-*r/77.5%
*-commutative77.5%
associate-/l*80.3%
Simplified80.3%
Taylor expanded in z around inf 61.9%
if 1.3500000000000001e59 < z Initial program 29.8%
associate-*l*29.5%
associate-*r/35.3%
*-commutative35.3%
associate-/l*33.1%
Simplified33.1%
Taylor expanded in z around inf 94.3%
*-commutative94.3%
Simplified94.3%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.9e-21) (* y (- x)) (if (<= z 6.4e-205) (/ (* x (* z y)) (- z)) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e-21) {
tmp = y * -x;
} else if (z <= 6.4e-205) {
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.9d-21)) then
tmp = y * -x
else if (z <= 6.4d-205) 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.9e-21) {
tmp = y * -x;
} else if (z <= 6.4e-205) {
tmp = (x * (z * y)) / -z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e-21: tmp = y * -x elif z <= 6.4e-205: tmp = (x * (z * y)) / -z else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e-21) tmp = Float64(y * Float64(-x)); elseif (z <= 6.4e-205) tmp = Float64(Float64(x * Float64(z * y)) / Float64(-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.9e-21) tmp = y * -x; elseif (z <= 6.4e-205) tmp = (x * (z * y)) / -z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e-21], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 6.4e-205], 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.9 \cdot 10^{-21}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-205}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{-z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.8999999999999999e-21Initial program 55.7%
associate-*l*54.3%
associate-*r/59.0%
*-commutative59.0%
associate-/l*61.4%
Simplified61.4%
Taylor expanded in z around -inf 92.5%
mul-1-neg92.5%
*-commutative92.5%
distribute-rgt-neg-in92.5%
Simplified92.5%
if -1.8999999999999999e-21 < z < 6.40000000000000018e-205Initial program 69.7%
associate-/l*69.5%
*-commutative69.5%
associate-/l*69.7%
associate-*l*75.4%
Simplified75.4%
Taylor expanded in y around 0 68.7%
Taylor expanded in z around -inf 47.3%
neg-mul-147.3%
Simplified47.3%
if 6.40000000000000018e-205 < z Initial program 56.1%
associate-*l*52.6%
associate-*r/56.0%
*-commutative56.0%
associate-/l*56.7%
Simplified56.7%
Taylor expanded in z around inf 79.0%
*-commutative79.0%
Simplified79.0%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.3e-215) (* y (- x)) (if (<= z 8.5e-204) (/ (* x (* z y)) z) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e-215) {
tmp = y * -x;
} else if (z <= 8.5e-204) {
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.3d-215)) then
tmp = y * -x
else if (z <= 8.5d-204) 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.3e-215) {
tmp = y * -x;
} else if (z <= 8.5e-204) {
tmp = (x * (z * y)) / z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e-215: tmp = y * -x elif z <= 8.5e-204: tmp = (x * (z * y)) / z else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e-215) tmp = Float64(y * Float64(-x)); elseif (z <= 8.5e-204) 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.3e-215) tmp = y * -x; elseif (z <= 8.5e-204) tmp = (x * (z * y)) / z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e-215], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8.5e-204], 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.3 \cdot 10^{-215}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-204}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.3e-215Initial program 59.9%
associate-*l*56.3%
associate-*r/59.8%
*-commutative59.8%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in z around -inf 79.3%
mul-1-neg79.3%
*-commutative79.3%
distribute-rgt-neg-in79.3%
Simplified79.3%
if -1.3e-215 < z < 8.4999999999999997e-204Initial program 66.5%
associate-/l*66.2%
*-commutative66.2%
associate-/l*66.5%
associate-*l*82.9%
Simplified82.9%
Taylor expanded in z around inf 45.2%
Taylor expanded in y around 0 45.3%
if 8.4999999999999997e-204 < z Initial program 56.1%
associate-*l*52.6%
associate-*r/56.0%
*-commutative56.0%
associate-/l*56.7%
Simplified56.7%
Taylor expanded in z around inf 79.0%
*-commutative79.0%
Simplified79.0%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -8e-219) (* y (- x)) (if (<= z 3.9e-187) (/ (* y (* z x)) z) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e-219) {
tmp = y * -x;
} else if (z <= 3.9e-187) {
tmp = (y * (z * x)) / 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 <= (-8d-219)) then
tmp = y * -x
else if (z <= 3.9d-187) then
tmp = (y * (z * x)) / 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 <= -8e-219) {
tmp = y * -x;
} else if (z <= 3.9e-187) {
tmp = (y * (z * x)) / z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e-219: tmp = y * -x elif z <= 3.9e-187: tmp = (y * (z * x)) / z else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e-219) tmp = Float64(y * Float64(-x)); elseif (z <= 3.9e-187) tmp = Float64(Float64(y * Float64(z * x)) / z); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8e-219) tmp = y * -x; elseif (z <= 3.9e-187) tmp = (y * (z * x)) / z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e-219], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.9e-187], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-219}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-187}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -8.0000000000000003e-219Initial program 59.9%
associate-*l*56.3%
associate-*r/59.8%
*-commutative59.8%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in z around -inf 79.3%
mul-1-neg79.3%
*-commutative79.3%
distribute-rgt-neg-in79.3%
Simplified79.3%
if -8.0000000000000003e-219 < z < 3.8999999999999999e-187Initial program 65.7%
associate-/l*66.0%
*-commutative66.0%
associate-/l*65.7%
associate-*l*81.9%
Simplified81.9%
Taylor expanded in z around inf 43.7%
if 3.8999999999999999e-187 < z Initial program 55.8%
associate-*l*52.3%
associate-*r/55.8%
*-commutative55.8%
associate-/l*56.2%
Simplified56.2%
Taylor expanded in z around inf 82.0%
*-commutative82.0%
Simplified82.0%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -2e-310) (* y (- x)) (* y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e-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 <= (-2d-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 <= -2e-310) {
tmp = y * -x;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e-310: tmp = y * -x else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e-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 <= -2e-310) tmp = y * -x; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e-310], N[(y * (-x)), $MachinePrecision], N[(y * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-310}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.999999999999994e-310Initial program 60.1%
associate-*l*57.6%
associate-*r/60.8%
*-commutative60.8%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in z around -inf 74.7%
mul-1-neg74.7%
*-commutative74.7%
distribute-rgt-neg-in74.7%
Simplified74.7%
if -1.999999999999994e-310 < z Initial program 57.4%
associate-*l*55.2%
associate-*r/58.3%
*-commutative58.3%
associate-/l*59.3%
Simplified59.3%
Taylor expanded in z around inf 73.4%
*-commutative73.4%
Simplified73.4%
Final simplification74.0%
(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 58.7%
associate-*l*56.3%
associate-*r/59.5%
*-commutative59.5%
associate-/l*60.6%
Simplified60.6%
Taylor expanded in z around inf 46.9%
*-commutative46.9%
Simplified46.9%
Final simplification46.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 2023312
(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)))))