
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c))))
(if (<= z -2.3e+72)
(fma -4.0 (/ 1.0 (/ c (* a t))) (fma 9.0 (* (/ x c) (/ y z)) t_1))
(if (<= z 2.5e-74)
(* (/ 1.0 z) (/ (+ b (fma x (* 9.0 y) (* a (* z (* -4.0 t))))) c))
(fma (* t (/ a c)) -4.0 (fma 9.0 (/ (* x y) (* z c)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (z <= -2.3e+72) {
tmp = fma(-4.0, (1.0 / (c / (a * t))), fma(9.0, ((x / c) * (y / z)), t_1));
} else if (z <= 2.5e-74) {
tmp = (1.0 / z) * ((b + fma(x, (9.0 * y), (a * (z * (-4.0 * t))))) / c);
} else {
tmp = fma((t * (a / c)), -4.0, fma(9.0, ((x * y) / (z * c)), t_1));
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -2.3e+72) tmp = fma(-4.0, Float64(1.0 / Float64(c / Float64(a * t))), fma(9.0, Float64(Float64(x / c) * Float64(y / z)), t_1)); elseif (z <= 2.5e-74) tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(a * Float64(z * Float64(-4.0 * t))))) / c)); else tmp = fma(Float64(t * Float64(a / c)), -4.0, fma(9.0, Float64(Float64(x * y) / Float64(z * c)), t_1)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+72], N[(-4.0 * N[(1.0 / N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-74], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{1}{\frac{c}{a \cdot t}}, \mathsf{fma}\left(9, \frac{x}{c} \cdot \frac{y}{z}, t\_1\right)\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(z \cdot \left(-4 \cdot t\right)\right)\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot \frac{a}{c}, -4, \mathsf{fma}\left(9, \frac{x \cdot y}{z \cdot c}, t\_1\right)\right)\\
\end{array}
\end{array}
if z < -2.3e72Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*65.3%
*-commutative65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*60.0%
*-commutative60.0%
associate-*l*60.0%
associate-*l*66.3%
Simplified66.3%
Taylor expanded in x around 0 78.9%
cancel-sign-sub-inv78.9%
metadata-eval78.9%
+-commutative78.9%
fma-def78.9%
associate-/l*80.2%
fma-def80.3%
times-frac92.0%
*-commutative92.0%
Simplified92.0%
clear-num91.8%
inv-pow91.8%
Applied egg-rr91.8%
unpow-191.8%
associate-/l/90.6%
Simplified90.6%
if -2.3e72 < z < 2.49999999999999999e-74Initial program 96.2%
associate-+l-96.2%
*-commutative96.2%
associate-*r*95.6%
*-commutative95.6%
associate-+l-95.6%
*-commutative95.6%
associate-*r*96.2%
*-commutative96.2%
associate-*l*96.2%
associate-*l*91.8%
Simplified91.8%
Applied egg-rr98.3%
if 2.49999999999999999e-74 < z Initial program 72.5%
associate-+l-72.5%
*-commutative72.5%
associate-*r*76.8%
*-commutative76.8%
associate-+l-76.8%
*-commutative76.8%
associate-*r*72.5%
*-commutative72.5%
associate-*l*72.5%
associate-*l*79.3%
Simplified79.3%
Taylor expanded in x around 0 88.5%
cancel-sign-sub-inv88.5%
metadata-eval88.5%
+-commutative88.5%
*-commutative88.5%
fma-def88.5%
associate-/l*85.2%
associate-/r/86.1%
fma-def86.1%
*-commutative86.1%
*-commutative86.1%
Simplified86.1%
Final simplification93.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c))))
(if (<= z -1.25e+72)
(fma -4.0 (/ a (/ c t)) (fma 9.0 (* (/ x c) (/ y z)) t_1))
(if (<= z 3.1e-74)
(* (/ 1.0 z) (/ (+ b (fma x (* 9.0 y) (* a (* z (* -4.0 t))))) c))
(fma (* t (/ a c)) -4.0 (fma 9.0 (/ (* x y) (* z c)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (z <= -1.25e+72) {
tmp = fma(-4.0, (a / (c / t)), fma(9.0, ((x / c) * (y / z)), t_1));
} else if (z <= 3.1e-74) {
tmp = (1.0 / z) * ((b + fma(x, (9.0 * y), (a * (z * (-4.0 * t))))) / c);
} else {
tmp = fma((t * (a / c)), -4.0, fma(9.0, ((x * y) / (z * c)), t_1));
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -1.25e+72) tmp = fma(-4.0, Float64(a / Float64(c / t)), fma(9.0, Float64(Float64(x / c) * Float64(y / z)), t_1)); elseif (z <= 3.1e-74) tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(a * Float64(z * Float64(-4.0 * t))))) / c)); else tmp = fma(Float64(t * Float64(a / c)), -4.0, fma(9.0, Float64(Float64(x * y) / Float64(z * c)), t_1)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+72], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-74], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c}{t}}, \mathsf{fma}\left(9, \frac{x}{c} \cdot \frac{y}{z}, t\_1\right)\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-74}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(z \cdot \left(-4 \cdot t\right)\right)\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot \frac{a}{c}, -4, \mathsf{fma}\left(9, \frac{x \cdot y}{z \cdot c}, t\_1\right)\right)\\
\end{array}
\end{array}
if z < -1.24999999999999998e72Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*65.3%
*-commutative65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*60.0%
*-commutative60.0%
associate-*l*60.0%
associate-*l*66.3%
Simplified66.3%
Taylor expanded in x around 0 78.9%
cancel-sign-sub-inv78.9%
metadata-eval78.9%
+-commutative78.9%
fma-def78.9%
associate-/l*80.2%
fma-def80.3%
times-frac92.0%
*-commutative92.0%
Simplified92.0%
if -1.24999999999999998e72 < z < 3.1000000000000002e-74Initial program 96.2%
associate-+l-96.2%
*-commutative96.2%
associate-*r*95.6%
*-commutative95.6%
associate-+l-95.6%
*-commutative95.6%
associate-*r*96.2%
*-commutative96.2%
associate-*l*96.2%
associate-*l*91.8%
Simplified91.8%
Applied egg-rr98.3%
if 3.1000000000000002e-74 < z Initial program 72.5%
associate-+l-72.5%
*-commutative72.5%
associate-*r*76.8%
*-commutative76.8%
associate-+l-76.8%
*-commutative76.8%
associate-*r*72.5%
*-commutative72.5%
associate-*l*72.5%
associate-*l*79.3%
Simplified79.3%
Taylor expanded in x around 0 88.5%
cancel-sign-sub-inv88.5%
metadata-eval88.5%
+-commutative88.5%
*-commutative88.5%
fma-def88.5%
associate-/l*85.2%
associate-/r/86.1%
fma-def86.1%
*-commutative86.1%
*-commutative86.1%
Simplified86.1%
Final simplification93.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (* 9.0 y)))
(t_2 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c)))
(t_3 (* a (* z (* -4.0 t)))))
(if (<= t_2 -2e+49)
(* (+ b (fma (* z a) (* -4.0 t) t_1)) (/ (/ 1.0 z) c))
(if (<= t_2 5e+120)
(* (/ 1.0 z) (/ (+ b (fma x (* 9.0 y) t_3)) c))
(if (<= t_2 INFINITY)
(* (+ b (+ t_3 t_1)) (/ 1.0 (* z c)))
(* -4.0 (* t (/ a c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double t_2 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double t_3 = a * (z * (-4.0 * t));
double tmp;
if (t_2 <= -2e+49) {
tmp = (b + fma((z * a), (-4.0 * t), t_1)) * ((1.0 / z) / c);
} else if (t_2 <= 5e+120) {
tmp = (1.0 / z) * ((b + fma(x, (9.0 * y), t_3)) / c);
} else if (t_2 <= ((double) INFINITY)) {
tmp = (b + (t_3 + t_1)) * (1.0 / (z * c));
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(9.0 * y)) t_2 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) t_3 = Float64(a * Float64(z * Float64(-4.0 * t))) tmp = 0.0 if (t_2 <= -2e+49) tmp = Float64(Float64(b + fma(Float64(z * a), Float64(-4.0 * t), t_1)) * Float64(Float64(1.0 / z) / c)); elseif (t_2 <= 5e+120) tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + fma(x, Float64(9.0 * y), t_3)) / c)); elseif (t_2 <= Inf) tmp = Float64(Float64(b + Float64(t_3 + t_1)) * Float64(1.0 / Float64(z * c))); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+49], N[(N[(b + N[(N[(z * a), $MachinePrecision] * N[(-4.0 * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+120], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(b + N[(t$95$3 + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(9 \cdot y\right)\\
t_2 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
t_3 := a \cdot \left(z \cdot \left(-4 \cdot t\right)\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+49}:\\
\;\;\;\;\left(b + \mathsf{fma}\left(z \cdot a, -4 \cdot t, t\_1\right)\right) \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+120}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + \mathsf{fma}\left(x, 9 \cdot y, t\_3\right)}{c}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(b + \left(t\_3 + t\_1\right)\right) \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1.99999999999999989e49Initial program 87.9%
associate-+l-87.9%
*-commutative87.9%
associate-*r*92.8%
*-commutative92.8%
associate-+l-92.8%
*-commutative92.8%
associate-*r*87.9%
*-commutative87.9%
associate-*l*87.9%
associate-*l*91.5%
Simplified91.5%
div-inv91.4%
associate-*r*87.8%
cancel-sign-sub-inv87.8%
fma-def87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
distribute-rgt-neg-in87.8%
distribute-lft-neg-in87.8%
distribute-rgt-neg-in87.8%
metadata-eval87.8%
associate-*r*87.8%
*-commutative87.8%
Applied egg-rr87.8%
fma-udef87.8%
Applied egg-rr87.8%
Taylor expanded in z around 0 87.8%
*-commutative87.8%
associate-/r*87.8%
Simplified87.8%
+-commutative87.8%
associate-*r*92.7%
fma-def92.7%
Applied egg-rr92.7%
if -1.99999999999999989e49 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 5.00000000000000019e120Initial program 87.4%
associate-+l-87.4%
*-commutative87.4%
associate-*r*85.7%
*-commutative85.7%
associate-+l-85.7%
*-commutative85.7%
associate-*r*87.4%
*-commutative87.4%
associate-*l*87.5%
associate-*l*85.2%
Simplified85.2%
Applied egg-rr98.0%
if 5.00000000000000019e120 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 88.5%
associate-+l-88.4%
*-commutative88.4%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
*-commutative89.5%
associate-*r*88.5%
*-commutative88.5%
associate-*l*88.5%
associate-*l*88.4%
Simplified88.4%
div-inv88.4%
associate-*r*88.5%
cancel-sign-sub-inv88.5%
fma-def88.5%
distribute-lft-neg-in88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
distribute-lft-neg-in88.5%
distribute-rgt-neg-in88.5%
metadata-eval88.5%
associate-*r*88.5%
*-commutative88.5%
Applied egg-rr88.5%
fma-udef88.5%
Applied egg-rr88.5%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.7%
*-commutative6.7%
associate-+l-6.7%
*-commutative6.7%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*6.7%
Simplified6.7%
div-inv6.7%
associate-*r*0.0%
cancel-sign-sub-inv0.0%
fma-def0.0%
distribute-lft-neg-in0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-in0.0%
metadata-eval0.0%
associate-*r*0.0%
*-commutative0.0%
Applied egg-rr0.0%
Taylor expanded in a around inf 55.1%
associate-*l/61.5%
*-commutative61.5%
Simplified61.5%
Final simplification90.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (* 9.0 y)))
(t_2 (/ (/ 1.0 z) c))
(t_3 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_3 (- INFINITY))
(* (+ b (fma (* z a) (* -4.0 t) t_1)) t_2)
(if (<= t_3 INFINITY)
(* t_2 (+ b (+ (* a (* z (* -4.0 t))) t_1)))
(* -4.0 (* t (/ a c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double t_2 = (1.0 / z) / c;
double t_3 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = (b + fma((z * a), (-4.0 * t), t_1)) * t_2;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2 * (b + ((a * (z * (-4.0 * t))) + t_1));
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(9.0 * y)) t_2 = Float64(Float64(1.0 / z) / c) t_3 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(b + fma(Float64(z * a), Float64(-4.0 * t), t_1)) * t_2); elseif (t_3 <= Inf) tmp = Float64(t_2 * Float64(b + Float64(Float64(a * Float64(z * Float64(-4.0 * t))) + t_1))); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(b + N[(N[(z * a), $MachinePrecision] * N[(-4.0 * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(t$95$2 * N[(b + N[(N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(9 \cdot y\right)\\
t_2 := \frac{\frac{1}{z}}{c}\\
t_3 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\left(b + \mathsf{fma}\left(z \cdot a, -4 \cdot t, t\_1\right)\right) \cdot t\_2\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_2 \cdot \left(b + \left(a \cdot \left(z \cdot \left(-4 \cdot t\right)\right) + t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -inf.0Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*91.0%
*-commutative91.0%
associate-+l-91.0%
*-commutative91.0%
associate-*r*81.8%
*-commutative81.8%
associate-*l*81.8%
associate-*l*89.0%
Simplified89.0%
div-inv89.0%
associate-*r*81.8%
cancel-sign-sub-inv81.8%
fma-def81.8%
distribute-lft-neg-in81.8%
*-commutative81.8%
distribute-rgt-neg-in81.8%
distribute-lft-neg-in81.8%
distribute-rgt-neg-in81.8%
metadata-eval81.8%
associate-*r*81.8%
*-commutative81.8%
Applied egg-rr81.8%
fma-udef81.8%
Applied egg-rr81.8%
Taylor expanded in z around 0 81.8%
*-commutative81.8%
associate-/r*81.8%
Simplified81.8%
+-commutative81.8%
associate-*r*91.0%
fma-def91.0%
Applied egg-rr91.0%
if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.7%
associate-+l-89.7%
*-commutative89.7%
associate-*r*89.2%
*-commutative89.2%
associate-+l-89.2%
*-commutative89.2%
associate-*r*89.7%
*-commutative89.7%
associate-*l*89.7%
associate-*l*88.4%
Simplified88.4%
div-inv88.4%
associate-*r*89.7%
cancel-sign-sub-inv89.7%
fma-def89.7%
distribute-lft-neg-in89.7%
*-commutative89.7%
distribute-rgt-neg-in89.7%
distribute-lft-neg-in89.7%
distribute-rgt-neg-in89.7%
metadata-eval89.7%
associate-*r*89.7%
*-commutative89.7%
Applied egg-rr89.7%
fma-udef89.7%
Applied egg-rr89.7%
Taylor expanded in z around 0 89.7%
*-commutative89.7%
associate-/r*90.0%
Simplified90.0%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.7%
*-commutative6.7%
associate-+l-6.7%
*-commutative6.7%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*6.7%
Simplified6.7%
div-inv6.7%
associate-*r*0.0%
cancel-sign-sub-inv0.0%
fma-def0.0%
distribute-lft-neg-in0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-in0.0%
metadata-eval0.0%
associate-*r*0.0%
*-commutative0.0%
Applied egg-rr0.0%
Taylor expanded in a around inf 55.1%
associate-*l/61.5%
*-commutative61.5%
Simplified61.5%
Final simplification88.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= c 1.65e-50) (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* a t)))) (* z c)) (fma -4.0 (/ a (/ c t)) (/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 1.65e-50) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = fma(-4.0, (a / (c / t)), (((9.0 * ((x * y) / c)) + (b / c)) / z));
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 1.65e-50) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); else tmp = fma(-4.0, Float64(a / Float64(c / t)), Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.65e-50], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.65 \cdot 10^{-50}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c}{t}}, \frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\right)\\
\end{array}
\end{array}
if c < 1.6499999999999999e-50Initial program 84.3%
associate-+l-84.3%
*-commutative84.3%
associate-*r*86.5%
*-commutative86.5%
associate-+l-86.5%
*-commutative86.5%
associate-*r*84.3%
*-commutative84.3%
associate-*l*84.3%
associate-*l*85.5%
Simplified85.5%
if 1.6499999999999999e-50 < c Initial program 78.8%
associate-+l-78.8%
*-commutative78.8%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
*-commutative80.0%
associate-*r*78.8%
*-commutative78.8%
associate-*l*78.8%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in x around 0 83.1%
cancel-sign-sub-inv83.1%
metadata-eval83.1%
+-commutative83.1%
fma-def83.1%
associate-/l*83.1%
fma-def83.1%
times-frac81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in z around 0 88.8%
Final simplification86.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c)))
(t_2 (* x (* 9.0 y))))
(if (<= t_1 -1e-204)
(/ (+ b (- t_2 (* (* z 4.0) (* a t)))) (* z c))
(if (<= t_1 0.0)
(/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z)
(if (<= t_1 INFINITY)
(* (+ b (+ (* a (* z (* -4.0 t))) t_2)) (/ 1.0 (* z c)))
(* -4.0 (* t (/ a c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double t_2 = x * (9.0 * y);
double tmp;
if (t_1 <= -1e-204) {
tmp = (b + (t_2 - ((z * 4.0) * (a * t)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((a * (z * (-4.0 * t))) + t_2)) * (1.0 / (z * c));
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double t_2 = x * (9.0 * y);
double tmp;
if (t_1 <= -1e-204) {
tmp = (b + (t_2 - ((z * 4.0) * (a * t)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((a * (z * (-4.0 * t))) + t_2)) * (1.0 / (z * c));
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) t_2 = x * (9.0 * y) tmp = 0 if t_1 <= -1e-204: tmp = (b + (t_2 - ((z * 4.0) * (a * t)))) / (z * c) elif t_1 <= 0.0: tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z elif t_1 <= math.inf: tmp = (b + ((a * (z * (-4.0 * t))) + t_2)) * (1.0 / (z * c)) else: tmp = -4.0 * (t * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) t_2 = Float64(x * Float64(9.0 * y)) tmp = 0.0 if (t_1 <= -1e-204) tmp = Float64(Float64(b + Float64(t_2 - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(a * Float64(z * Float64(-4.0 * t))) + t_2)) * Float64(1.0 / Float64(z * c))); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
t_2 = x * (9.0 * y);
tmp = 0.0;
if (t_1 <= -1e-204)
tmp = (b + (t_2 - ((z * 4.0) * (a * t)))) / (z * c);
elseif (t_1 <= 0.0)
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
elseif (t_1 <= Inf)
tmp = (b + ((a * (z * (-4.0 * t))) + t_2)) * (1.0 / (z * c));
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-204], N[(N[(b + N[(t$95$2 - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
t_2 := x \cdot \left(9 \cdot y\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-204}:\\
\;\;\;\;\frac{b + \left(t\_2 - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(b + \left(a \cdot \left(z \cdot \left(-4 \cdot t\right)\right) + t\_2\right)\right) \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1e-204Initial program 90.0%
associate-+l-90.0%
*-commutative90.0%
associate-*r*93.0%
*-commutative93.0%
associate-+l-93.0%
*-commutative93.0%
associate-*r*90.0%
*-commutative90.0%
associate-*l*90.0%
associate-*l*92.5%
Simplified92.5%
if -1e-204 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 60.3%
associate-+l-60.3%
*-commutative60.3%
associate-*r*59.8%
*-commutative59.8%
associate-+l-59.8%
*-commutative59.8%
associate-*r*60.3%
*-commutative60.3%
associate-*l*60.3%
associate-*l*60.3%
Simplified60.3%
Taylor expanded in x around inf 55.6%
associate-*r*55.6%
*-commutative55.6%
associate-*r*55.6%
Simplified55.6%
Taylor expanded in x around 0 55.6%
Taylor expanded in z around 0 85.2%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*91.5%
*-commutative91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.7%
associate-*l*89.8%
Simplified89.8%
div-inv89.8%
associate-*r*90.6%
cancel-sign-sub-inv90.6%
fma-def90.6%
distribute-lft-neg-in90.6%
*-commutative90.6%
distribute-rgt-neg-in90.6%
distribute-lft-neg-in90.6%
distribute-rgt-neg-in90.6%
metadata-eval90.6%
associate-*r*90.6%
*-commutative90.6%
Applied egg-rr90.6%
fma-udef90.6%
Applied egg-rr90.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.7%
*-commutative6.7%
associate-+l-6.7%
*-commutative6.7%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*6.7%
Simplified6.7%
div-inv6.7%
associate-*r*0.0%
cancel-sign-sub-inv0.0%
fma-def0.0%
distribute-lft-neg-in0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-in0.0%
metadata-eval0.0%
associate-*r*0.0%
*-commutative0.0%
Applied egg-rr0.0%
Taylor expanded in a around inf 55.1%
associate-*l/61.5%
*-commutative61.5%
Simplified61.5%
Final simplification89.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -1e-204)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* a t)))) (* z c))
(if (<= t_1 0.0)
(/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z)
(if (<= t_1 INFINITY) t_1 (* -4.0 (* t (/ a c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -1e-204) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -1e-204) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) tmp = 0 if t_1 <= -1e-204: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c) elif t_1 <= 0.0: tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z elif t_1 <= math.inf: tmp = t_1 else: tmp = -4.0 * (t * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -1e-204) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
tmp = 0.0;
if (t_1 <= -1e-204)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
elseif (t_1 <= 0.0)
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-204], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-204}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1e-204Initial program 90.0%
associate-+l-90.0%
*-commutative90.0%
associate-*r*93.0%
*-commutative93.0%
associate-+l-93.0%
*-commutative93.0%
associate-*r*90.0%
*-commutative90.0%
associate-*l*90.0%
associate-*l*92.5%
Simplified92.5%
if -1e-204 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 60.3%
associate-+l-60.3%
*-commutative60.3%
associate-*r*59.8%
*-commutative59.8%
associate-+l-59.8%
*-commutative59.8%
associate-*r*60.3%
*-commutative60.3%
associate-*l*60.3%
associate-*l*60.3%
Simplified60.3%
Taylor expanded in x around inf 55.6%
associate-*r*55.6%
*-commutative55.6%
associate-*r*55.6%
Simplified55.6%
Taylor expanded in x around 0 55.6%
Taylor expanded in z around 0 85.2%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 90.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.7%
*-commutative6.7%
associate-+l-6.7%
*-commutative6.7%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*6.7%
Simplified6.7%
div-inv6.7%
associate-*r*0.0%
cancel-sign-sub-inv0.0%
fma-def0.0%
distribute-lft-neg-in0.0%
*-commutative0.0%
distribute-rgt-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-in0.0%
metadata-eval0.0%
associate-*r*0.0%
*-commutative0.0%
Applied egg-rr0.0%
Taylor expanded in a around inf 55.1%
associate-*l/61.5%
*-commutative61.5%
Simplified61.5%
Final simplification89.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* 9.0 y) (/ x (* z c)))))
(if (<= z -2.35e+145)
(* -4.0 (* t (/ a c)))
(if (<= z -4.5e+104)
t_1
(if (<= z -135.0)
(/ (/ b z) c)
(if (<= z -3.2e-298)
t_1
(if (<= z 2.02e-227)
(* b (/ 1.0 (* z c)))
(if (<= z 3500000.0)
(* 9.0 (/ y (* c (/ z x))))
(/ (* a (* -4.0 t)) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (9.0 * y) * (x / (z * c));
double tmp;
if (z <= -2.35e+145) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -4.5e+104) {
tmp = t_1;
} else if (z <= -135.0) {
tmp = (b / z) / c;
} else if (z <= -3.2e-298) {
tmp = t_1;
} else if (z <= 2.02e-227) {
tmp = b * (1.0 / (z * c));
} else if (z <= 3500000.0) {
tmp = 9.0 * (y / (c * (z / x)));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (9.0d0 * y) * (x / (z * c))
if (z <= (-2.35d+145)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= (-4.5d+104)) then
tmp = t_1
else if (z <= (-135.0d0)) then
tmp = (b / z) / c
else if (z <= (-3.2d-298)) then
tmp = t_1
else if (z <= 2.02d-227) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 3500000.0d0) then
tmp = 9.0d0 * (y / (c * (z / x)))
else
tmp = (a * ((-4.0d0) * t)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (9.0 * y) * (x / (z * c));
double tmp;
if (z <= -2.35e+145) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -4.5e+104) {
tmp = t_1;
} else if (z <= -135.0) {
tmp = (b / z) / c;
} else if (z <= -3.2e-298) {
tmp = t_1;
} else if (z <= 2.02e-227) {
tmp = b * (1.0 / (z * c));
} else if (z <= 3500000.0) {
tmp = 9.0 * (y / (c * (z / x)));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (9.0 * y) * (x / (z * c)) tmp = 0 if z <= -2.35e+145: tmp = -4.0 * (t * (a / c)) elif z <= -4.5e+104: tmp = t_1 elif z <= -135.0: tmp = (b / z) / c elif z <= -3.2e-298: tmp = t_1 elif z <= 2.02e-227: tmp = b * (1.0 / (z * c)) elif z <= 3500000.0: tmp = 9.0 * (y / (c * (z / x))) else: tmp = (a * (-4.0 * t)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(9.0 * y) * Float64(x / Float64(z * c))) tmp = 0.0 if (z <= -2.35e+145) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= -4.5e+104) tmp = t_1; elseif (z <= -135.0) tmp = Float64(Float64(b / z) / c); elseif (z <= -3.2e-298) tmp = t_1; elseif (z <= 2.02e-227) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 3500000.0) tmp = Float64(9.0 * Float64(y / Float64(c * Float64(z / x)))); else tmp = Float64(Float64(a * Float64(-4.0 * t)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (9.0 * y) * (x / (z * c));
tmp = 0.0;
if (z <= -2.35e+145)
tmp = -4.0 * (t * (a / c));
elseif (z <= -4.5e+104)
tmp = t_1;
elseif (z <= -135.0)
tmp = (b / z) / c;
elseif (z <= -3.2e-298)
tmp = t_1;
elseif (z <= 2.02e-227)
tmp = b * (1.0 / (z * c));
elseif (z <= 3500000.0)
tmp = 9.0 * (y / (c * (z / x)));
else
tmp = (a * (-4.0 * t)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(9.0 * y), $MachinePrecision] * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e+145], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.5e+104], t$95$1, If[LessEqual[z, -135.0], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -3.2e-298], t$95$1, If[LessEqual[z, 2.02e-227], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3500000.0], N[(9.0 * N[(y / N[(c * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(9 \cdot y\right) \cdot \frac{x}{z \cdot c}\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{+145}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -135:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.02 \cdot 10^{-227}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 3500000:\\
\;\;\;\;9 \cdot \frac{y}{c \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -2.3500000000000001e145Initial program 49.6%
associate-+l-49.6%
*-commutative49.6%
associate-*r*49.8%
*-commutative49.8%
associate-+l-49.8%
*-commutative49.8%
associate-*r*49.6%
*-commutative49.6%
associate-*l*49.6%
associate-*l*53.4%
Simplified53.4%
div-inv53.4%
associate-*r*49.5%
cancel-sign-sub-inv49.5%
fma-def49.5%
distribute-lft-neg-in49.5%
*-commutative49.5%
distribute-rgt-neg-in49.5%
distribute-lft-neg-in49.5%
distribute-rgt-neg-in49.5%
metadata-eval49.5%
associate-*r*49.5%
*-commutative49.5%
Applied egg-rr49.5%
Taylor expanded in a around inf 65.5%
associate-*l/65.7%
*-commutative65.7%
Simplified65.7%
if -2.3500000000000001e145 < z < -4.4999999999999998e104 or -135 < z < -3.19999999999999997e-298Initial program 95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.5%
*-commutative95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.5%
*-commutative95.5%
associate-*l*95.5%
associate-*l*93.2%
Simplified93.2%
div-inv93.1%
associate-*r*95.5%
cancel-sign-sub-inv95.5%
fma-def95.5%
distribute-lft-neg-in95.5%
*-commutative95.5%
distribute-rgt-neg-in95.5%
distribute-lft-neg-in95.5%
distribute-rgt-neg-in95.5%
metadata-eval95.5%
associate-*r*95.5%
*-commutative95.5%
Applied egg-rr95.5%
fma-udef95.5%
Applied egg-rr95.5%
Taylor expanded in x around inf 62.1%
associate-*r/62.1%
associate-*r*62.2%
*-commutative62.2%
associate-*r*62.2%
*-commutative62.2%
associate-/l*70.9%
associate-/r/66.2%
Simplified66.2%
if -4.4999999999999998e104 < z < -135Initial program 83.1%
associate-+l-83.1%
*-commutative83.1%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*83.1%
*-commutative83.1%
associate-*l*83.1%
associate-*l*91.7%
Simplified91.7%
div-inv92.0%
associate-*r*83.3%
cancel-sign-sub-inv83.3%
fma-def83.3%
distribute-lft-neg-in83.3%
*-commutative83.3%
distribute-rgt-neg-in83.3%
distribute-lft-neg-in83.3%
distribute-rgt-neg-in83.3%
metadata-eval83.3%
associate-*r*83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in b around inf 70.8%
*-commutative70.8%
associate-/r*71.0%
Simplified71.0%
if -3.19999999999999997e-298 < z < 2.0200000000000001e-227Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in b around inf 69.0%
*-commutative69.0%
Simplified69.0%
div-inv72.2%
Applied egg-rr72.2%
if 2.0200000000000001e-227 < z < 3.5e6Initial program 93.4%
associate-+l-93.4%
*-commutative93.4%
associate-*r*93.5%
*-commutative93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*93.4%
*-commutative93.4%
associate-*l*93.4%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in x around inf 52.8%
associate-*r/52.8%
*-commutative52.8%
associate-*r*52.8%
*-commutative52.8%
times-frac50.7%
Simplified50.7%
associate-*l/52.8%
Applied egg-rr52.8%
associate-/l*52.8%
Simplified52.8%
*-un-lft-identity52.8%
times-frac52.8%
metadata-eval52.8%
associate-/r/52.8%
Applied egg-rr52.8%
if 3.5e6 < z Initial program 68.4%
associate-+l-68.4%
*-commutative68.4%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
*-commutative73.8%
associate-*r*68.4%
*-commutative68.4%
associate-*l*68.5%
associate-*l*76.9%
Simplified76.9%
Taylor expanded in z around inf 58.9%
*-commutative58.9%
*-commutative58.9%
associate-*l/58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
Final simplification63.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.35e+145)
(* -4.0 (* t (/ a c)))
(if (<= z -1.1e+107)
(/ 9.0 (* (/ z y) (/ c x)))
(if (<= z -350.0)
(/ (/ b z) c)
(if (<= z -8.6e-298)
(* (* 9.0 y) (/ x (* z c)))
(if (<= z 1.02e-224)
(* b (/ 1.0 (* z c)))
(if (<= z 300000.0)
(* 9.0 (/ y (* c (/ z x))))
(/ (* a (* -4.0 t)) c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.35e+145) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -1.1e+107) {
tmp = 9.0 / ((z / y) * (c / x));
} else if (z <= -350.0) {
tmp = (b / z) / c;
} else if (z <= -8.6e-298) {
tmp = (9.0 * y) * (x / (z * c));
} else if (z <= 1.02e-224) {
tmp = b * (1.0 / (z * c));
} else if (z <= 300000.0) {
tmp = 9.0 * (y / (c * (z / x)));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-2.35d+145)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= (-1.1d+107)) then
tmp = 9.0d0 / ((z / y) * (c / x))
else if (z <= (-350.0d0)) then
tmp = (b / z) / c
else if (z <= (-8.6d-298)) then
tmp = (9.0d0 * y) * (x / (z * c))
else if (z <= 1.02d-224) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 300000.0d0) then
tmp = 9.0d0 * (y / (c * (z / x)))
else
tmp = (a * ((-4.0d0) * t)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.35e+145) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -1.1e+107) {
tmp = 9.0 / ((z / y) * (c / x));
} else if (z <= -350.0) {
tmp = (b / z) / c;
} else if (z <= -8.6e-298) {
tmp = (9.0 * y) * (x / (z * c));
} else if (z <= 1.02e-224) {
tmp = b * (1.0 / (z * c));
} else if (z <= 300000.0) {
tmp = 9.0 * (y / (c * (z / x)));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.35e+145: tmp = -4.0 * (t * (a / c)) elif z <= -1.1e+107: tmp = 9.0 / ((z / y) * (c / x)) elif z <= -350.0: tmp = (b / z) / c elif z <= -8.6e-298: tmp = (9.0 * y) * (x / (z * c)) elif z <= 1.02e-224: tmp = b * (1.0 / (z * c)) elif z <= 300000.0: tmp = 9.0 * (y / (c * (z / x))) else: tmp = (a * (-4.0 * t)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.35e+145) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= -1.1e+107) tmp = Float64(9.0 / Float64(Float64(z / y) * Float64(c / x))); elseif (z <= -350.0) tmp = Float64(Float64(b / z) / c); elseif (z <= -8.6e-298) tmp = Float64(Float64(9.0 * y) * Float64(x / Float64(z * c))); elseif (z <= 1.02e-224) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 300000.0) tmp = Float64(9.0 * Float64(y / Float64(c * Float64(z / x)))); else tmp = Float64(Float64(a * Float64(-4.0 * t)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -2.35e+145)
tmp = -4.0 * (t * (a / c));
elseif (z <= -1.1e+107)
tmp = 9.0 / ((z / y) * (c / x));
elseif (z <= -350.0)
tmp = (b / z) / c;
elseif (z <= -8.6e-298)
tmp = (9.0 * y) * (x / (z * c));
elseif (z <= 1.02e-224)
tmp = b * (1.0 / (z * c));
elseif (z <= 300000.0)
tmp = 9.0 * (y / (c * (z / x)));
else
tmp = (a * (-4.0 * t)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.35e+145], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e+107], N[(9.0 / N[(N[(z / y), $MachinePrecision] * N[(c / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -350.0], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -8.6e-298], N[(N[(9.0 * y), $MachinePrecision] * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-224], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 300000.0], N[(9.0 * N[(y / N[(c * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+145}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+107}:\\
\;\;\;\;\frac{9}{\frac{z}{y} \cdot \frac{c}{x}}\\
\mathbf{elif}\;z \leq -350:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-298}:\\
\;\;\;\;\left(9 \cdot y\right) \cdot \frac{x}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-224}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 300000:\\
\;\;\;\;9 \cdot \frac{y}{c \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -2.3500000000000001e145Initial program 49.6%
associate-+l-49.6%
*-commutative49.6%
associate-*r*49.8%
*-commutative49.8%
associate-+l-49.8%
*-commutative49.8%
associate-*r*49.6%
*-commutative49.6%
associate-*l*49.6%
associate-*l*53.4%
Simplified53.4%
div-inv53.4%
associate-*r*49.5%
cancel-sign-sub-inv49.5%
fma-def49.5%
distribute-lft-neg-in49.5%
*-commutative49.5%
distribute-rgt-neg-in49.5%
distribute-lft-neg-in49.5%
distribute-rgt-neg-in49.5%
metadata-eval49.5%
associate-*r*49.5%
*-commutative49.5%
Applied egg-rr49.5%
Taylor expanded in a around inf 65.5%
associate-*l/65.7%
*-commutative65.7%
Simplified65.7%
if -2.3500000000000001e145 < z < -1.1e107Initial program 81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*81.2%
*-commutative81.2%
associate-*l*81.2%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in x around inf 71.3%
associate-*r/71.1%
*-commutative71.1%
associate-*r*71.1%
*-commutative71.1%
times-frac86.5%
Simplified86.5%
associate-/l*86.2%
clear-num69.6%
frac-times70.5%
metadata-eval70.5%
Applied egg-rr70.5%
if -1.1e107 < z < -350Initial program 83.1%
associate-+l-83.1%
*-commutative83.1%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*83.1%
*-commutative83.1%
associate-*l*83.1%
associate-*l*91.7%
Simplified91.7%
div-inv92.0%
associate-*r*83.3%
cancel-sign-sub-inv83.3%
fma-def83.3%
distribute-lft-neg-in83.3%
*-commutative83.3%
distribute-rgt-neg-in83.3%
distribute-lft-neg-in83.3%
distribute-rgt-neg-in83.3%
metadata-eval83.3%
associate-*r*83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in b around inf 70.8%
*-commutative70.8%
associate-/r*71.0%
Simplified71.0%
if -350 < z < -8.600000000000001e-298Initial program 96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.7%
*-commutative96.7%
associate-*l*96.7%
associate-*l*95.0%
Simplified95.0%
div-inv94.9%
associate-*r*96.6%
cancel-sign-sub-inv96.6%
fma-def96.6%
distribute-lft-neg-in96.6%
*-commutative96.6%
distribute-rgt-neg-in96.6%
distribute-lft-neg-in96.6%
distribute-rgt-neg-in96.6%
metadata-eval96.6%
associate-*r*96.6%
*-commutative96.6%
Applied egg-rr96.6%
fma-udef96.6%
Applied egg-rr96.6%
Taylor expanded in x around inf 61.3%
associate-*r/61.4%
associate-*r*61.4%
*-commutative61.4%
associate-*r*61.4%
*-commutative61.4%
associate-/l*69.4%
associate-/r/65.8%
Simplified65.8%
if -8.600000000000001e-298 < z < 1.02e-224Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in b around inf 69.0%
*-commutative69.0%
Simplified69.0%
div-inv72.2%
Applied egg-rr72.2%
if 1.02e-224 < z < 3e5Initial program 93.4%
associate-+l-93.4%
*-commutative93.4%
associate-*r*93.5%
*-commutative93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*93.4%
*-commutative93.4%
associate-*l*93.4%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in x around inf 52.8%
associate-*r/52.8%
*-commutative52.8%
associate-*r*52.8%
*-commutative52.8%
times-frac50.7%
Simplified50.7%
associate-*l/52.8%
Applied egg-rr52.8%
associate-/l*52.8%
Simplified52.8%
*-un-lft-identity52.8%
times-frac52.8%
metadata-eval52.8%
associate-/r/52.8%
Applied egg-rr52.8%
if 3e5 < z Initial program 68.4%
associate-+l-68.4%
*-commutative68.4%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
*-commutative73.8%
associate-*r*68.4%
*-commutative68.4%
associate-*l*68.5%
associate-*l*76.9%
Simplified76.9%
Taylor expanded in z around inf 58.9%
*-commutative58.9%
*-commutative58.9%
associate-*l/58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
Final simplification63.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -7.5e+143)
(* -4.0 (* t (/ a c)))
(if (<= z -2.1e+102)
(/ 9.0 (* (/ z y) (/ c x)))
(if (<= z -230.0)
(/ (/ b z) c)
(if (<= z -1.06e-297)
(* (* 9.0 y) (/ x (* z c)))
(if (<= z 1.4e-222)
(* b (/ 1.0 (* z c)))
(if (<= z 16500000.0)
(/ (* 9.0 y) (/ z (/ x c)))
(/ (* a (* -4.0 t)) c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7.5e+143) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -2.1e+102) {
tmp = 9.0 / ((z / y) * (c / x));
} else if (z <= -230.0) {
tmp = (b / z) / c;
} else if (z <= -1.06e-297) {
tmp = (9.0 * y) * (x / (z * c));
} else if (z <= 1.4e-222) {
tmp = b * (1.0 / (z * c));
} else if (z <= 16500000.0) {
tmp = (9.0 * y) / (z / (x / c));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-7.5d+143)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= (-2.1d+102)) then
tmp = 9.0d0 / ((z / y) * (c / x))
else if (z <= (-230.0d0)) then
tmp = (b / z) / c
else if (z <= (-1.06d-297)) then
tmp = (9.0d0 * y) * (x / (z * c))
else if (z <= 1.4d-222) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 16500000.0d0) then
tmp = (9.0d0 * y) / (z / (x / c))
else
tmp = (a * ((-4.0d0) * t)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7.5e+143) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -2.1e+102) {
tmp = 9.0 / ((z / y) * (c / x));
} else if (z <= -230.0) {
tmp = (b / z) / c;
} else if (z <= -1.06e-297) {
tmp = (9.0 * y) * (x / (z * c));
} else if (z <= 1.4e-222) {
tmp = b * (1.0 / (z * c));
} else if (z <= 16500000.0) {
tmp = (9.0 * y) / (z / (x / c));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -7.5e+143: tmp = -4.0 * (t * (a / c)) elif z <= -2.1e+102: tmp = 9.0 / ((z / y) * (c / x)) elif z <= -230.0: tmp = (b / z) / c elif z <= -1.06e-297: tmp = (9.0 * y) * (x / (z * c)) elif z <= 1.4e-222: tmp = b * (1.0 / (z * c)) elif z <= 16500000.0: tmp = (9.0 * y) / (z / (x / c)) else: tmp = (a * (-4.0 * t)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -7.5e+143) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= -2.1e+102) tmp = Float64(9.0 / Float64(Float64(z / y) * Float64(c / x))); elseif (z <= -230.0) tmp = Float64(Float64(b / z) / c); elseif (z <= -1.06e-297) tmp = Float64(Float64(9.0 * y) * Float64(x / Float64(z * c))); elseif (z <= 1.4e-222) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 16500000.0) tmp = Float64(Float64(9.0 * y) / Float64(z / Float64(x / c))); else tmp = Float64(Float64(a * Float64(-4.0 * t)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -7.5e+143)
tmp = -4.0 * (t * (a / c));
elseif (z <= -2.1e+102)
tmp = 9.0 / ((z / y) * (c / x));
elseif (z <= -230.0)
tmp = (b / z) / c;
elseif (z <= -1.06e-297)
tmp = (9.0 * y) * (x / (z * c));
elseif (z <= 1.4e-222)
tmp = b * (1.0 / (z * c));
elseif (z <= 16500000.0)
tmp = (9.0 * y) / (z / (x / c));
else
tmp = (a * (-4.0 * t)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -7.5e+143], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e+102], N[(9.0 / N[(N[(z / y), $MachinePrecision] * N[(c / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -230.0], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -1.06e-297], N[(N[(9.0 * y), $MachinePrecision] * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-222], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 16500000.0], N[(N[(9.0 * y), $MachinePrecision] / N[(z / N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+143}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{+102}:\\
\;\;\;\;\frac{9}{\frac{z}{y} \cdot \frac{c}{x}}\\
\mathbf{elif}\;z \leq -230:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-297}:\\
\;\;\;\;\left(9 \cdot y\right) \cdot \frac{x}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-222}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 16500000:\\
\;\;\;\;\frac{9 \cdot y}{\frac{z}{\frac{x}{c}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -7.49999999999999974e143Initial program 49.6%
associate-+l-49.6%
*-commutative49.6%
associate-*r*49.8%
*-commutative49.8%
associate-+l-49.8%
*-commutative49.8%
associate-*r*49.6%
*-commutative49.6%
associate-*l*49.6%
associate-*l*53.4%
Simplified53.4%
div-inv53.4%
associate-*r*49.5%
cancel-sign-sub-inv49.5%
fma-def49.5%
distribute-lft-neg-in49.5%
*-commutative49.5%
distribute-rgt-neg-in49.5%
distribute-lft-neg-in49.5%
distribute-rgt-neg-in49.5%
metadata-eval49.5%
associate-*r*49.5%
*-commutative49.5%
Applied egg-rr49.5%
Taylor expanded in a around inf 65.5%
associate-*l/65.7%
*-commutative65.7%
Simplified65.7%
if -7.49999999999999974e143 < z < -2.10000000000000001e102Initial program 81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*81.2%
*-commutative81.2%
associate-*l*81.2%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in x around inf 71.3%
associate-*r/71.1%
*-commutative71.1%
associate-*r*71.1%
*-commutative71.1%
times-frac86.5%
Simplified86.5%
associate-/l*86.2%
clear-num69.6%
frac-times70.5%
metadata-eval70.5%
Applied egg-rr70.5%
if -2.10000000000000001e102 < z < -230Initial program 83.1%
associate-+l-83.1%
*-commutative83.1%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*83.1%
*-commutative83.1%
associate-*l*83.1%
associate-*l*91.7%
Simplified91.7%
div-inv92.0%
associate-*r*83.3%
cancel-sign-sub-inv83.3%
fma-def83.3%
distribute-lft-neg-in83.3%
*-commutative83.3%
distribute-rgt-neg-in83.3%
distribute-lft-neg-in83.3%
distribute-rgt-neg-in83.3%
metadata-eval83.3%
associate-*r*83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in b around inf 70.8%
*-commutative70.8%
associate-/r*71.0%
Simplified71.0%
if -230 < z < -1.06e-297Initial program 96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.7%
*-commutative96.7%
associate-*l*96.7%
associate-*l*95.0%
Simplified95.0%
div-inv94.9%
associate-*r*96.6%
cancel-sign-sub-inv96.6%
fma-def96.6%
distribute-lft-neg-in96.6%
*-commutative96.6%
distribute-rgt-neg-in96.6%
distribute-lft-neg-in96.6%
distribute-rgt-neg-in96.6%
metadata-eval96.6%
associate-*r*96.6%
*-commutative96.6%
Applied egg-rr96.6%
fma-udef96.6%
Applied egg-rr96.6%
Taylor expanded in x around inf 61.3%
associate-*r/61.4%
associate-*r*61.4%
*-commutative61.4%
associate-*r*61.4%
*-commutative61.4%
associate-/l*69.4%
associate-/r/65.8%
Simplified65.8%
if -1.06e-297 < z < 1.40000000000000004e-222Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in b around inf 69.0%
*-commutative69.0%
Simplified69.0%
div-inv72.2%
Applied egg-rr72.2%
if 1.40000000000000004e-222 < z < 1.65e7Initial program 93.4%
associate-+l-93.4%
*-commutative93.4%
associate-*r*93.5%
*-commutative93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*93.4%
*-commutative93.4%
associate-*l*93.4%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in x around inf 52.8%
associate-*r/52.8%
*-commutative52.8%
associate-*r*52.8%
*-commutative52.8%
times-frac50.7%
Simplified50.7%
associate-*l/52.8%
Applied egg-rr52.8%
associate-/l*52.8%
Simplified52.8%
if 1.65e7 < z Initial program 68.4%
associate-+l-68.4%
*-commutative68.4%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
*-commutative73.8%
associate-*r*68.4%
*-commutative68.4%
associate-*l*68.5%
associate-*l*76.9%
Simplified76.9%
Taylor expanded in z around inf 58.9%
*-commutative58.9%
*-commutative58.9%
associate-*l/58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
Final simplification63.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -5.6e+144)
(* -4.0 (* t (/ a c)))
(if (<= z -1.25e+100)
(/ 9.0 (* (/ z y) (/ c x)))
(if (<= z -370.0)
(/ (/ b z) c)
(if (<= z -2.5e-298)
(* (* 9.0 y) (/ x (* z c)))
(if (<= z 1.15e-226)
(* b (/ 1.0 (* z c)))
(if (<= z 46000000.0)
(/ (* (/ x c) (* 9.0 y)) z)
(/ (* a (* -4.0 t)) c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.6e+144) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -1.25e+100) {
tmp = 9.0 / ((z / y) * (c / x));
} else if (z <= -370.0) {
tmp = (b / z) / c;
} else if (z <= -2.5e-298) {
tmp = (9.0 * y) * (x / (z * c));
} else if (z <= 1.15e-226) {
tmp = b * (1.0 / (z * c));
} else if (z <= 46000000.0) {
tmp = ((x / c) * (9.0 * y)) / z;
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-5.6d+144)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= (-1.25d+100)) then
tmp = 9.0d0 / ((z / y) * (c / x))
else if (z <= (-370.0d0)) then
tmp = (b / z) / c
else if (z <= (-2.5d-298)) then
tmp = (9.0d0 * y) * (x / (z * c))
else if (z <= 1.15d-226) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 46000000.0d0) then
tmp = ((x / c) * (9.0d0 * y)) / z
else
tmp = (a * ((-4.0d0) * t)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.6e+144) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -1.25e+100) {
tmp = 9.0 / ((z / y) * (c / x));
} else if (z <= -370.0) {
tmp = (b / z) / c;
} else if (z <= -2.5e-298) {
tmp = (9.0 * y) * (x / (z * c));
} else if (z <= 1.15e-226) {
tmp = b * (1.0 / (z * c));
} else if (z <= 46000000.0) {
tmp = ((x / c) * (9.0 * y)) / z;
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5.6e+144: tmp = -4.0 * (t * (a / c)) elif z <= -1.25e+100: tmp = 9.0 / ((z / y) * (c / x)) elif z <= -370.0: tmp = (b / z) / c elif z <= -2.5e-298: tmp = (9.0 * y) * (x / (z * c)) elif z <= 1.15e-226: tmp = b * (1.0 / (z * c)) elif z <= 46000000.0: tmp = ((x / c) * (9.0 * y)) / z else: tmp = (a * (-4.0 * t)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5.6e+144) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= -1.25e+100) tmp = Float64(9.0 / Float64(Float64(z / y) * Float64(c / x))); elseif (z <= -370.0) tmp = Float64(Float64(b / z) / c); elseif (z <= -2.5e-298) tmp = Float64(Float64(9.0 * y) * Float64(x / Float64(z * c))); elseif (z <= 1.15e-226) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 46000000.0) tmp = Float64(Float64(Float64(x / c) * Float64(9.0 * y)) / z); else tmp = Float64(Float64(a * Float64(-4.0 * t)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -5.6e+144)
tmp = -4.0 * (t * (a / c));
elseif (z <= -1.25e+100)
tmp = 9.0 / ((z / y) * (c / x));
elseif (z <= -370.0)
tmp = (b / z) / c;
elseif (z <= -2.5e-298)
tmp = (9.0 * y) * (x / (z * c));
elseif (z <= 1.15e-226)
tmp = b * (1.0 / (z * c));
elseif (z <= 46000000.0)
tmp = ((x / c) * (9.0 * y)) / z;
else
tmp = (a * (-4.0 * t)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5.6e+144], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e+100], N[(9.0 / N[(N[(z / y), $MachinePrecision] * N[(c / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -370.0], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -2.5e-298], N[(N[(9.0 * y), $MachinePrecision] * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e-226], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 46000000.0], N[(N[(N[(x / c), $MachinePrecision] * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+144}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+100}:\\
\;\;\;\;\frac{9}{\frac{z}{y} \cdot \frac{c}{x}}\\
\mathbf{elif}\;z \leq -370:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-298}:\\
\;\;\;\;\left(9 \cdot y\right) \cdot \frac{x}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-226}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 46000000:\\
\;\;\;\;\frac{\frac{x}{c} \cdot \left(9 \cdot y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -5.60000000000000013e144Initial program 49.6%
associate-+l-49.6%
*-commutative49.6%
associate-*r*49.8%
*-commutative49.8%
associate-+l-49.8%
*-commutative49.8%
associate-*r*49.6%
*-commutative49.6%
associate-*l*49.6%
associate-*l*53.4%
Simplified53.4%
div-inv53.4%
associate-*r*49.5%
cancel-sign-sub-inv49.5%
fma-def49.5%
distribute-lft-neg-in49.5%
*-commutative49.5%
distribute-rgt-neg-in49.5%
distribute-lft-neg-in49.5%
distribute-rgt-neg-in49.5%
metadata-eval49.5%
associate-*r*49.5%
*-commutative49.5%
Applied egg-rr49.5%
Taylor expanded in a around inf 65.5%
associate-*l/65.7%
*-commutative65.7%
Simplified65.7%
if -5.60000000000000013e144 < z < -1.25e100Initial program 81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*81.2%
*-commutative81.2%
associate-*l*81.2%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in x around inf 71.3%
associate-*r/71.1%
*-commutative71.1%
associate-*r*71.1%
*-commutative71.1%
times-frac86.5%
Simplified86.5%
associate-/l*86.2%
clear-num69.6%
frac-times70.5%
metadata-eval70.5%
Applied egg-rr70.5%
if -1.25e100 < z < -370Initial program 83.1%
associate-+l-83.1%
*-commutative83.1%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*83.1%
*-commutative83.1%
associate-*l*83.1%
associate-*l*91.7%
Simplified91.7%
div-inv92.0%
associate-*r*83.3%
cancel-sign-sub-inv83.3%
fma-def83.3%
distribute-lft-neg-in83.3%
*-commutative83.3%
distribute-rgt-neg-in83.3%
distribute-lft-neg-in83.3%
distribute-rgt-neg-in83.3%
metadata-eval83.3%
associate-*r*83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in b around inf 70.8%
*-commutative70.8%
associate-/r*71.0%
Simplified71.0%
if -370 < z < -2.5000000000000001e-298Initial program 96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.7%
*-commutative96.7%
associate-*l*96.7%
associate-*l*95.0%
Simplified95.0%
div-inv94.9%
associate-*r*96.6%
cancel-sign-sub-inv96.6%
fma-def96.6%
distribute-lft-neg-in96.6%
*-commutative96.6%
distribute-rgt-neg-in96.6%
distribute-lft-neg-in96.6%
distribute-rgt-neg-in96.6%
metadata-eval96.6%
associate-*r*96.6%
*-commutative96.6%
Applied egg-rr96.6%
fma-udef96.6%
Applied egg-rr96.6%
Taylor expanded in x around inf 61.3%
associate-*r/61.4%
associate-*r*61.4%
*-commutative61.4%
associate-*r*61.4%
*-commutative61.4%
associate-/l*69.4%
associate-/r/65.8%
Simplified65.8%
if -2.5000000000000001e-298 < z < 1.15e-226Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in b around inf 69.0%
*-commutative69.0%
Simplified69.0%
div-inv72.2%
Applied egg-rr72.2%
if 1.15e-226 < z < 4.6e7Initial program 93.4%
associate-+l-93.4%
*-commutative93.4%
associate-*r*93.5%
*-commutative93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*93.4%
*-commutative93.4%
associate-*l*93.4%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in x around inf 52.8%
associate-*r/52.8%
*-commutative52.8%
associate-*r*52.8%
*-commutative52.8%
times-frac50.7%
Simplified50.7%
associate-*l/52.8%
Applied egg-rr52.8%
if 4.6e7 < z Initial program 68.4%
associate-+l-68.4%
*-commutative68.4%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
*-commutative73.8%
associate-*r*68.4%
*-commutative68.4%
associate-*l*68.5%
associate-*l*76.9%
Simplified76.9%
Taylor expanded in z around inf 58.9%
*-commutative58.9%
*-commutative58.9%
associate-*l/58.9%
*-commutative58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
Final simplification63.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (* x (* 9.0 y))) (* z c))) (t_2 (* -4.0 (* t (/ a c)))))
(if (<= z -4.5e+141)
t_2
(if (<= z 47000000000000.0)
t_1
(if (<= z 9e+83)
(/ (* a (* -4.0 t)) c)
(if (<= z 1.55e+111) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (x * (9.0 * y))) / (z * c);
double t_2 = -4.0 * (t * (a / c));
double tmp;
if (z <= -4.5e+141) {
tmp = t_2;
} else if (z <= 47000000000000.0) {
tmp = t_1;
} else if (z <= 9e+83) {
tmp = (a * (-4.0 * t)) / c;
} else if (z <= 1.55e+111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b + (x * (9.0d0 * y))) / (z * c)
t_2 = (-4.0d0) * (t * (a / c))
if (z <= (-4.5d+141)) then
tmp = t_2
else if (z <= 47000000000000.0d0) then
tmp = t_1
else if (z <= 9d+83) then
tmp = (a * ((-4.0d0) * t)) / c
else if (z <= 1.55d+111) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (x * (9.0 * y))) / (z * c);
double t_2 = -4.0 * (t * (a / c));
double tmp;
if (z <= -4.5e+141) {
tmp = t_2;
} else if (z <= 47000000000000.0) {
tmp = t_1;
} else if (z <= 9e+83) {
tmp = (a * (-4.0 * t)) / c;
} else if (z <= 1.55e+111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + (x * (9.0 * y))) / (z * c) t_2 = -4.0 * (t * (a / c)) tmp = 0 if z <= -4.5e+141: tmp = t_2 elif z <= 47000000000000.0: tmp = t_1 elif z <= 9e+83: tmp = (a * (-4.0 * t)) / c elif z <= 1.55e+111: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)) t_2 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (z <= -4.5e+141) tmp = t_2; elseif (z <= 47000000000000.0) tmp = t_1; elseif (z <= 9e+83) tmp = Float64(Float64(a * Float64(-4.0 * t)) / c); elseif (z <= 1.55e+111) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + (x * (9.0 * y))) / (z * c);
t_2 = -4.0 * (t * (a / c));
tmp = 0.0;
if (z <= -4.5e+141)
tmp = t_2;
elseif (z <= 47000000000000.0)
tmp = t_1;
elseif (z <= 9e+83)
tmp = (a * (-4.0 * t)) / c;
elseif (z <= 1.55e+111)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+141], t$95$2, If[LessEqual[z, 47000000000000.0], t$95$1, If[LessEqual[z, 9e+83], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.55e+111], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 47000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+83}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.5000000000000002e141 or 1.55e111 < z Initial program 55.5%
associate-+l-55.5%
*-commutative55.5%
associate-*r*59.4%
*-commutative59.4%
associate-+l-59.4%
*-commutative59.4%
associate-*r*55.5%
*-commutative55.5%
associate-*l*55.5%
associate-*l*62.3%
Simplified62.3%
div-inv62.3%
associate-*r*55.5%
cancel-sign-sub-inv55.5%
fma-def55.5%
distribute-lft-neg-in55.5%
*-commutative55.5%
distribute-rgt-neg-in55.5%
distribute-lft-neg-in55.5%
distribute-rgt-neg-in55.5%
metadata-eval55.5%
associate-*r*55.5%
*-commutative55.5%
Applied egg-rr55.5%
Taylor expanded in a around inf 65.6%
associate-*l/67.1%
*-commutative67.1%
Simplified67.1%
if -4.5000000000000002e141 < z < 4.7e13 or 8.9999999999999999e83 < z < 1.55e111Initial program 92.6%
associate-+l-92.6%
*-commutative92.6%
associate-*r*94.4%
*-commutative94.4%
associate-+l-94.4%
*-commutative94.4%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in x around inf 85.0%
associate-*r*85.0%
*-commutative85.0%
associate-*r*85.0%
Simplified85.0%
if 4.7e13 < z < 8.9999999999999999e83Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*92.3%
*-commutative92.3%
associate-+l-92.3%
*-commutative92.3%
associate-*r*99.6%
*-commutative99.6%
associate-*l*99.6%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.6%
*-commutative70.6%
*-commutative70.6%
associate-*l/70.6%
*-commutative70.6%
associate-*r*70.6%
*-commutative70.6%
*-commutative70.6%
Simplified70.6%
Final simplification79.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.5e+183) (not (<= z 3.1e+185))) (* -4.0 (* t (/ a c))) (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* a t)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.5e+183) || !(z <= 3.1e+185)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.5d+183)) .or. (.not. (z <= 3.1d+185))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (a * t)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.5e+183) || !(z <= 3.1e+185)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.5e+183) or not (z <= 3.1e+185): tmp = -4.0 * (t * (a / c)) else: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.5e+183) || !(z <= 3.1e+185)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.5e+183) || ~((z <= 3.1e+185)))
tmp = -4.0 * (t * (a / c));
else
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.5e+183], N[Not[LessEqual[z, 3.1e+185]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+183} \lor \neg \left(z \leq 3.1 \cdot 10^{+185}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.49999999999999987e183 or 3.1e185 < z Initial program 48.8%
associate-+l-48.8%
*-commutative48.8%
associate-*r*53.1%
*-commutative53.1%
associate-+l-53.1%
*-commutative53.1%
associate-*r*48.8%
*-commutative48.8%
associate-*l*48.8%
associate-*l*53.2%
Simplified53.2%
div-inv53.2%
associate-*r*48.7%
cancel-sign-sub-inv48.7%
fma-def48.7%
distribute-lft-neg-in48.7%
*-commutative48.7%
distribute-rgt-neg-in48.7%
distribute-lft-neg-in48.7%
distribute-rgt-neg-in48.7%
metadata-eval48.7%
associate-*r*48.7%
*-commutative48.7%
Applied egg-rr48.7%
Taylor expanded in a around inf 73.6%
associate-*l/75.9%
*-commutative75.9%
Simplified75.9%
if -3.49999999999999987e183 < z < 3.1e185Initial program 89.9%
associate-+l-89.9%
*-commutative89.9%
associate-*r*91.3%
*-commutative91.3%
associate-+l-91.3%
*-commutative91.3%
associate-*r*89.9%
*-commutative89.9%
associate-*l*89.9%
associate-*l*90.1%
Simplified90.1%
Final simplification87.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= z -7.2e+145)
t_1
(if (<= z 5500000.0)
(/ (+ b (* x (* 9.0 y))) (* z c))
(if (<= z 2.5e+169) (/ (+ b (* z (* a (* -4.0 t)))) (* z c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (z <= -7.2e+145) {
tmp = t_1;
} else if (z <= 5500000.0) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if (z <= 2.5e+169) {
tmp = (b + (z * (a * (-4.0 * t)))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (z <= (-7.2d+145)) then
tmp = t_1
else if (z <= 5500000.0d0) then
tmp = (b + (x * (9.0d0 * y))) / (z * c)
else if (z <= 2.5d+169) then
tmp = (b + (z * (a * ((-4.0d0) * t)))) / (z * c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (z <= -7.2e+145) {
tmp = t_1;
} else if (z <= 5500000.0) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if (z <= 2.5e+169) {
tmp = (b + (z * (a * (-4.0 * t)))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if z <= -7.2e+145: tmp = t_1 elif z <= 5500000.0: tmp = (b + (x * (9.0 * y))) / (z * c) elif z <= 2.5e+169: tmp = (b + (z * (a * (-4.0 * t)))) / (z * c) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (z <= -7.2e+145) tmp = t_1; elseif (z <= 5500000.0) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)); elseif (z <= 2.5e+169) tmp = Float64(Float64(b + Float64(z * Float64(a * Float64(-4.0 * t)))) / Float64(z * c)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
tmp = 0.0;
if (z <= -7.2e+145)
tmp = t_1;
elseif (z <= 5500000.0)
tmp = (b + (x * (9.0 * y))) / (z * c);
elseif (z <= 2.5e+169)
tmp = (b + (z * (a * (-4.0 * t)))) / (z * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+145], t$95$1, If[LessEqual[z, 5500000.0], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+169], N[(N[(b + N[(z * N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5500000:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+169}:\\
\;\;\;\;\frac{b + z \cdot \left(a \cdot \left(-4 \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.19999999999999948e145 or 2.50000000000000009e169 < z Initial program 52.1%
associate-+l-52.1%
*-commutative52.1%
associate-*r*55.8%
*-commutative55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*52.1%
*-commutative52.1%
associate-*l*52.1%
associate-*l*57.6%
Simplified57.6%
div-inv57.6%
associate-*r*52.1%
cancel-sign-sub-inv52.1%
fma-def52.1%
distribute-lft-neg-in52.1%
*-commutative52.1%
distribute-rgt-neg-in52.1%
distribute-lft-neg-in52.1%
distribute-rgt-neg-in52.1%
metadata-eval52.1%
associate-*r*52.1%
*-commutative52.1%
Applied egg-rr52.1%
Taylor expanded in a around inf 70.9%
associate-*l/72.9%
*-commutative72.9%
Simplified72.9%
if -7.19999999999999948e145 < z < 5.5e6Initial program 94.0%
associate-+l-94.0%
*-commutative94.0%
associate-*r*94.6%
*-commutative94.6%
associate-+l-94.6%
*-commutative94.6%
associate-*r*94.0%
*-commutative94.0%
associate-*l*94.0%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in x around inf 85.4%
associate-*r*85.5%
*-commutative85.5%
associate-*r*85.5%
Simplified85.5%
if 5.5e6 < z < 2.50000000000000009e169Initial program 78.2%
associate-+l-78.1%
*-commutative78.1%
associate-*r*82.6%
*-commutative82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*78.2%
*-commutative78.2%
associate-*l*78.3%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in x around 0 66.2%
*-commutative66.2%
associate-*r*66.2%
associate-*l*66.2%
*-commutative66.2%
*-commutative66.2%
associate-*l*75.7%
*-commutative75.7%
Simplified75.7%
Final simplification81.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= a -4.1e-76)
t_1
(if (<= a 1.2e-189)
(* 9.0 (/ y (* c (/ z x))))
(if (<= a 2.25e+67) (/ (/ b z) c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -4.1e-76) {
tmp = t_1;
} else if (a <= 1.2e-189) {
tmp = 9.0 * (y / (c * (z / x)));
} else if (a <= 2.25e+67) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (a <= (-4.1d-76)) then
tmp = t_1
else if (a <= 1.2d-189) then
tmp = 9.0d0 * (y / (c * (z / x)))
else if (a <= 2.25d+67) then
tmp = (b / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -4.1e-76) {
tmp = t_1;
} else if (a <= 1.2e-189) {
tmp = 9.0 * (y / (c * (z / x)));
} else if (a <= 2.25e+67) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if a <= -4.1e-76: tmp = t_1 elif a <= 1.2e-189: tmp = 9.0 * (y / (c * (z / x))) elif a <= 2.25e+67: tmp = (b / z) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (a <= -4.1e-76) tmp = t_1; elseif (a <= 1.2e-189) tmp = Float64(9.0 * Float64(y / Float64(c * Float64(z / x)))); elseif (a <= 2.25e+67) tmp = Float64(Float64(b / z) / c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
tmp = 0.0;
if (a <= -4.1e-76)
tmp = t_1;
elseif (a <= 1.2e-189)
tmp = 9.0 * (y / (c * (z / x)));
elseif (a <= 2.25e+67)
tmp = (b / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.1e-76], t$95$1, If[LessEqual[a, 1.2e-189], N[(9.0 * N[(y / N[(c * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.25e+67], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;a \leq -4.1 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-189}:\\
\;\;\;\;9 \cdot \frac{y}{c \cdot \frac{z}{x}}\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{+67}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.0999999999999998e-76 or 2.2499999999999999e67 < a Initial program 82.5%
associate-+l-82.5%
*-commutative82.5%
associate-*r*81.0%
*-commutative81.0%
associate-+l-81.1%
*-commutative81.1%
associate-*r*82.5%
*-commutative82.5%
associate-*l*82.6%
associate-*l*79.6%
Simplified79.6%
div-inv79.6%
associate-*r*82.6%
cancel-sign-sub-inv82.6%
fma-def82.6%
distribute-lft-neg-in82.6%
*-commutative82.6%
distribute-rgt-neg-in82.6%
distribute-lft-neg-in82.6%
distribute-rgt-neg-in82.6%
metadata-eval82.6%
associate-*r*82.6%
*-commutative82.6%
Applied egg-rr82.6%
Taylor expanded in a around inf 42.7%
associate-*l/44.8%
*-commutative44.8%
Simplified44.8%
if -4.0999999999999998e-76 < a < 1.1999999999999999e-189Initial program 80.3%
associate-+l-80.3%
*-commutative80.3%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*80.3%
*-commutative80.3%
associate-*l*80.2%
associate-*l*86.2%
Simplified86.2%
Taylor expanded in x around inf 56.9%
associate-*r/56.9%
*-commutative56.9%
associate-*r*56.9%
*-commutative56.9%
times-frac54.1%
Simplified54.1%
associate-*l/56.8%
Applied egg-rr56.8%
associate-/l*53.9%
Simplified53.9%
*-un-lft-identity53.9%
times-frac55.2%
metadata-eval55.2%
associate-/r/60.2%
Applied egg-rr60.2%
if 1.1999999999999999e-189 < a < 2.2499999999999999e67Initial program 87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*87.7%
*-commutative87.7%
associate-*l*87.7%
associate-*l*91.6%
Simplified91.6%
div-inv91.6%
associate-*r*87.6%
cancel-sign-sub-inv87.6%
fma-def87.6%
distribute-lft-neg-in87.6%
*-commutative87.6%
distribute-rgt-neg-in87.6%
distribute-lft-neg-in87.6%
distribute-rgt-neg-in87.6%
metadata-eval87.6%
associate-*r*87.6%
*-commutative87.6%
Applied egg-rr87.6%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
associate-/r*56.4%
Simplified56.4%
Final simplification51.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -9e+123) (not (<= z 2500000000000.0))) (* -4.0 (* t (/ a c))) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -9e+123) || !(z <= 2500000000000.0)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-9d+123)) .or. (.not. (z <= 2500000000000.0d0))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -9e+123) || !(z <= 2500000000000.0)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -9e+123) or not (z <= 2500000000000.0): tmp = -4.0 * (t * (a / c)) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -9e+123) || !(z <= 2500000000000.0)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -9e+123) || ~((z <= 2500000000000.0)))
tmp = -4.0 * (t * (a / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -9e+123], N[Not[LessEqual[z, 2500000000000.0]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+123} \lor \neg \left(z \leq 2500000000000\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -8.99999999999999965e123 or 2.5e12 < z Initial program 63.1%
associate-+l-63.1%
*-commutative63.1%
associate-*r*67.0%
*-commutative67.0%
associate-+l-67.1%
*-commutative67.1%
associate-*r*63.1%
*-commutative63.1%
associate-*l*63.2%
associate-*l*69.7%
Simplified69.7%
div-inv69.8%
associate-*r*63.2%
cancel-sign-sub-inv63.2%
fma-def63.2%
distribute-lft-neg-in63.2%
*-commutative63.2%
distribute-rgt-neg-in63.2%
distribute-lft-neg-in63.2%
distribute-rgt-neg-in63.2%
metadata-eval63.2%
associate-*r*63.2%
*-commutative63.2%
Applied egg-rr63.2%
Taylor expanded in a around inf 59.5%
associate-*l/59.5%
*-commutative59.5%
Simplified59.5%
if -8.99999999999999965e123 < z < 2.5e12Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*95.1%
*-commutative95.1%
associate-+l-95.1%
*-commutative95.1%
associate-*r*94.5%
*-commutative94.5%
associate-*l*94.5%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in b around inf 51.0%
*-commutative51.0%
Simplified51.0%
Final simplification54.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -7e+122) (not (<= z 6800000000.0))) (* -4.0 (* t (/ a c))) (* b (/ 1.0 (* z c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -7e+122) || !(z <= 6800000000.0)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-7d+122)) .or. (.not. (z <= 6800000000.0d0))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b * (1.0d0 / (z * c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -7e+122) || !(z <= 6800000000.0)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -7e+122) or not (z <= 6800000000.0): tmp = -4.0 * (t * (a / c)) else: tmp = b * (1.0 / (z * c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -7e+122) || !(z <= 6800000000.0)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b * Float64(1.0 / Float64(z * c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -7e+122) || ~((z <= 6800000000.0)))
tmp = -4.0 * (t * (a / c));
else
tmp = b * (1.0 / (z * c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -7e+122], N[Not[LessEqual[z, 6800000000.0]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+122} \lor \neg \left(z \leq 6800000000\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.00000000000000028e122 or 6.8e9 < z Initial program 63.1%
associate-+l-63.1%
*-commutative63.1%
associate-*r*67.0%
*-commutative67.0%
associate-+l-67.1%
*-commutative67.1%
associate-*r*63.1%
*-commutative63.1%
associate-*l*63.2%
associate-*l*69.7%
Simplified69.7%
div-inv69.8%
associate-*r*63.2%
cancel-sign-sub-inv63.2%
fma-def63.2%
distribute-lft-neg-in63.2%
*-commutative63.2%
distribute-rgt-neg-in63.2%
distribute-lft-neg-in63.2%
distribute-rgt-neg-in63.2%
metadata-eval63.2%
associate-*r*63.2%
*-commutative63.2%
Applied egg-rr63.2%
Taylor expanded in a around inf 59.5%
associate-*l/59.5%
*-commutative59.5%
Simplified59.5%
if -7.00000000000000028e122 < z < 6.8e9Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*95.1%
*-commutative95.1%
associate-+l-95.1%
*-commutative95.1%
associate-*r*94.5%
*-commutative94.5%
associate-*l*94.5%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in b around inf 51.0%
*-commutative51.0%
Simplified51.0%
div-inv51.5%
Applied egg-rr51.5%
Final simplification54.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -1.85e+127) (* -4.0 (* t (/ a c))) (if (<= z 2900000000000.0) (* b (/ 1.0 (* z c))) (/ (* a (* -4.0 t)) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.85e+127) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2900000000000.0) {
tmp = b * (1.0 / (z * c));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-1.85d+127)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 2900000000000.0d0) then
tmp = b * (1.0d0 / (z * c))
else
tmp = (a * ((-4.0d0) * t)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.85e+127) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2900000000000.0) {
tmp = b * (1.0 / (z * c));
} else {
tmp = (a * (-4.0 * t)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.85e+127: tmp = -4.0 * (t * (a / c)) elif z <= 2900000000000.0: tmp = b * (1.0 / (z * c)) else: tmp = (a * (-4.0 * t)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.85e+127) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 2900000000000.0) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(Float64(a * Float64(-4.0 * t)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.85e+127)
tmp = -4.0 * (t * (a / c));
elseif (z <= 2900000000000.0)
tmp = b * (1.0 / (z * c));
else
tmp = (a * (-4.0 * t)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.85e+127], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2900000000000.0], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+127}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 2900000000000:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -1.8499999999999999e127Initial program 51.7%
associate-+l-51.7%
*-commutative51.7%
associate-*r*51.9%
*-commutative51.9%
associate-+l-51.9%
*-commutative51.9%
associate-*r*51.7%
*-commutative51.7%
associate-*l*51.7%
associate-*l*53.4%
Simplified53.4%
div-inv53.4%
associate-*r*51.8%
cancel-sign-sub-inv51.8%
fma-def51.8%
distribute-lft-neg-in51.8%
*-commutative51.8%
distribute-rgt-neg-in51.8%
distribute-lft-neg-in51.8%
distribute-rgt-neg-in51.8%
metadata-eval51.8%
associate-*r*51.8%
*-commutative51.8%
Applied egg-rr51.8%
Taylor expanded in a around inf 58.9%
associate-*l/59.3%
*-commutative59.3%
Simplified59.3%
if -1.8499999999999999e127 < z < 2.9e12Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*95.1%
*-commutative95.1%
associate-+l-95.1%
*-commutative95.1%
associate-*r*94.5%
*-commutative94.5%
associate-*l*94.5%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in b around inf 51.0%
*-commutative51.0%
Simplified51.0%
div-inv51.5%
Applied egg-rr51.5%
if 2.9e12 < z Initial program 67.9%
associate-+l-67.9%
*-commutative67.9%
associate-*r*73.4%
*-commutative73.4%
associate-+l-73.4%
*-commutative73.4%
associate-*r*67.9%
*-commutative67.9%
associate-*l*68.0%
associate-*l*76.6%
Simplified76.6%
Taylor expanded in z around inf 59.7%
*-commutative59.7%
*-commutative59.7%
associate-*l/59.7%
*-commutative59.7%
associate-*r*59.7%
*-commutative59.7%
*-commutative59.7%
Simplified59.7%
Final simplification54.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 82.8%
associate-+l-82.8%
*-commutative82.8%
associate-*r*84.7%
*-commutative84.7%
associate-+l-84.7%
*-commutative84.7%
associate-*r*82.8%
*-commutative82.8%
associate-*l*82.9%
associate-*l*83.8%
Simplified83.8%
Taylor expanded in b around inf 40.4%
*-commutative40.4%
Simplified40.4%
Final simplification40.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024040
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))