
(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
(if (<= z -400000000.0)
(* (fma -4.0 (* a t) (fma 9.0 (/ x (/ z y)) (/ b z))) (/ 1.0 c))
(if (<= z 3e-105)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(if (<= z 4.8e-12)
(fma -4.0 (/ a (/ c t)) (fma 9.0 (* (/ x c) (/ y z)) (/ b (* z c))))
(if (<= z 1.25e+107)
(* (/ 1.0 z) (/ (+ b (fma x (* 9.0 y) (* a (* z (* -4.0 t))))) c))
(/ (fma 9.0 (* y (/ x 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 <= -400000000.0) {
tmp = fma(-4.0, (a * t), fma(9.0, (x / (z / y)), (b / z))) * (1.0 / c);
} else if (z <= 3e-105) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else if (z <= 4.8e-12) {
tmp = fma(-4.0, (a / (c / t)), fma(9.0, ((x / c) * (y / z)), (b / (z * c))));
} else if (z <= 1.25e+107) {
tmp = (1.0 / z) * ((b + fma(x, (9.0 * y), (a * (z * (-4.0 * t))))) / c);
} else {
tmp = fma(9.0, (y * (x / z)), (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 <= -400000000.0) tmp = Float64(fma(-4.0, Float64(a * t), fma(9.0, Float64(x / Float64(z / y)), Float64(b / z))) * Float64(1.0 / c)); elseif (z <= 3e-105) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); elseif (z <= 4.8e-12) tmp = fma(-4.0, Float64(a / Float64(c / t)), fma(9.0, Float64(Float64(x / c) * Float64(y / z)), Float64(b / Float64(z * c)))); elseif (z <= 1.25e+107) 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 = Float64(fma(9.0, Float64(y * Float64(x / z)), Float64(a * Float64(-4.0 * t))) / 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_] := If[LessEqual[z, -400000000.0], N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(9.0 * N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-105], 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[z, 4.8e-12], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+107], 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[(9.0 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * N[(-4.0 * t), $MachinePrecision]), $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 -400000000:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x}{\frac{z}{y}}, \frac{b}{z}\right)\right) \cdot \frac{1}{c}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-105}:\\
\;\;\;\;\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{elif}\;z \leq 4.8 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c}{t}}, \mathsf{fma}\left(9, \frac{x}{c} \cdot \frac{y}{z}, \frac{b}{z \cdot c}\right)\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+107}:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, y \cdot \frac{x}{z}, a \cdot \left(-4 \cdot t\right)\right)}{c}\\
\end{array}
\end{array}
if z < -4e8Initial program 58.0%
associate-+l-58.0%
*-commutative58.0%
associate-*r*57.8%
*-commutative57.8%
associate-+l-57.8%
*-commutative57.8%
associate-*r*58.0%
*-commutative58.0%
associate-*l*57.9%
associate-*l*61.0%
Simplified61.0%
Applied egg-rr66.5%
Taylor expanded in x around 0 86.7%
fma-def86.7%
fma-def86.7%
associate-/l*95.2%
Simplified95.2%
if -4e8 < z < 3.0000000000000001e-105Initial program 97.1%
if 3.0000000000000001e-105 < z < 4.79999999999999974e-12Initial program 82.1%
associate-+l-82.1%
*-commutative82.1%
associate-*r*82.1%
*-commutative82.1%
associate-+l-82.1%
*-commutative82.1%
associate-*r*82.1%
*-commutative82.1%
associate-*l*82.1%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in x around 0 78.8%
cancel-sign-sub-inv78.8%
metadata-eval78.8%
+-commutative78.8%
fma-def78.8%
associate-/l*85.5%
fma-def85.5%
times-frac99.8%
*-commutative99.8%
Simplified99.8%
if 4.79999999999999974e-12 < z < 1.25e107Initial program 88.4%
associate-+l-88.4%
*-commutative88.4%
associate-*r*88.4%
*-commutative88.4%
associate-+l-88.4%
*-commutative88.4%
associate-*r*88.4%
*-commutative88.4%
associate-*l*88.4%
associate-*l*88.4%
Simplified88.4%
Applied egg-rr93.8%
if 1.25e107 < z Initial program 50.0%
associate-+l-50.0%
*-commutative50.0%
associate-*r*52.5%
*-commutative52.5%
associate-+l-52.5%
*-commutative52.5%
associate-*r*50.0%
*-commutative50.0%
associate-*l*50.0%
associate-*l*52.4%
Simplified52.4%
Applied egg-rr61.0%
Taylor expanded in x around 0 76.4%
fma-def76.4%
fma-def76.4%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in b around 0 71.7%
+-commutative71.7%
associate-*l/87.6%
fma-def87.5%
*-commutative87.5%
*-commutative87.5%
associate-*r*87.5%
*-commutative87.5%
Simplified87.5%
Final simplification95.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 (if (or (<= z -4000000000.0) (not (<= z 8.6e+54))) (* (fma -4.0 (* a t) (fma 9.0 (/ x (/ z y)) (/ b z))) (/ 1.0 c)) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.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 <= -4000000000.0) || !(z <= 8.6e+54)) {
tmp = fma(-4.0, (a * t), fma(9.0, (x / (z / y)), (b / z))) * (1.0 / c);
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.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 <= -4000000000.0) || !(z <= 8.6e+54)) tmp = Float64(fma(-4.0, Float64(a * t), fma(9.0, Float64(x / Float64(z / y)), Float64(b / z))) * Float64(1.0 / c)); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * 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_] := If[Or[LessEqual[z, -4000000000.0], N[Not[LessEqual[z, 8.6e+54]], $MachinePrecision]], N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(9.0 * N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], 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]]
\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 -4000000000 \lor \neg \left(z \leq 8.6 \cdot 10^{+54}\right):\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x}{\frac{z}{y}}, \frac{b}{z}\right)\right) \cdot \frac{1}{c}\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if z < -4e9 or 8.59999999999999952e54 < z Initial program 55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*56.6%
*-commutative56.6%
associate-+l-56.6%
*-commutative56.6%
associate-*r*55.8%
*-commutative55.8%
associate-*l*55.8%
associate-*l*58.5%
Simplified58.5%
Applied egg-rr65.6%
Taylor expanded in x around 0 83.0%
fma-def83.0%
fma-def83.0%
associate-/l*93.5%
Simplified93.5%
if -4e9 < z < 8.59999999999999952e54Initial program 94.5%
Final simplification94.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 (<= z -1.72e+25)
(- (+ (/ b (* z c)) (* 9.0 (/ (* x y) (* z c)))) (* 4.0 (/ (* a t) c)))
(if (<= z 3.4e+84)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(/ (fma 9.0 (* y (/ x 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 <= -1.72e+25) {
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c));
} else if (z <= 3.4e+84) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = fma(9.0, (y * (x / z)), (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.72e+25) tmp = Float64(Float64(Float64(b / Float64(z * c)) + Float64(9.0 * Float64(Float64(x * y) / Float64(z * c)))) - Float64(4.0 * Float64(Float64(a * t) / c))); elseif (z <= 3.4e+84) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(fma(9.0, Float64(y * Float64(x / z)), Float64(a * Float64(-4.0 * t))) / 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_] := If[LessEqual[z, -1.72e+25], N[(N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+84], 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], N[(N[(9.0 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * N[(-4.0 * t), $MachinePrecision]), $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.72 \cdot 10^{+25}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+84}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, y \cdot \frac{x}{z}, a \cdot \left(-4 \cdot t\right)\right)}{c}\\
\end{array}
\end{array}
if z < -1.71999999999999995e25Initial program 54.6%
associate-+l-54.6%
*-commutative54.6%
associate-*r*54.4%
*-commutative54.4%
associate-+l-54.4%
*-commutative54.4%
associate-*r*54.6%
*-commutative54.6%
associate-*l*54.5%
associate-*l*57.9%
Simplified57.9%
Taylor expanded in x around 0 81.4%
if -1.71999999999999995e25 < z < 3.3999999999999998e84Initial program 94.1%
if 3.3999999999999998e84 < z Initial program 52.6%
associate-+l-52.6%
*-commutative52.6%
associate-*r*54.8%
*-commutative54.8%
associate-+l-54.8%
*-commutative54.8%
associate-*r*52.6%
*-commutative52.6%
associate-*l*52.6%
associate-*l*54.8%
Simplified54.8%
Applied egg-rr64.8%
Taylor expanded in x around 0 78.6%
fma-def78.6%
fma-def78.6%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in b around 0 72.2%
+-commutative72.2%
associate-*l/86.6%
fma-def86.5%
*-commutative86.5%
*-commutative86.5%
associate-*r*86.5%
*-commutative86.5%
Simplified86.5%
Final simplification89.9%
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 (* a t))))
(if (<= z -3.1e+118)
(/ (+ (/ b z) t_1) c)
(if (<= z 1.25e+85)
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))
(/ (+ t_1 (* 9.0 (/ (* x y) 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 t_1 = -4.0 * (a * t);
double tmp;
if (z <= -3.1e+118) {
tmp = ((b / z) + t_1) / c;
} else if (z <= 1.25e+85) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = (t_1 + (9.0 * ((x * y) / 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * t)
if (z <= (-3.1d+118)) then
tmp = ((b / z) + t_1) / c
else if (z <= 1.25d+85) then
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
else
tmp = (t_1 + (9.0d0 * ((x * y) / 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 t_1 = -4.0 * (a * t);
double tmp;
if (z <= -3.1e+118) {
tmp = ((b / z) + t_1) / c;
} else if (z <= 1.25e+85) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = (t_1 + (9.0 * ((x * y) / 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): t_1 = -4.0 * (a * t) tmp = 0 if z <= -3.1e+118: tmp = ((b / z) + t_1) / c elif z <= 1.25e+85: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) else: tmp = (t_1 + (9.0 * ((x * y) / 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) t_1 = Float64(-4.0 * Float64(a * t)) tmp = 0.0 if (z <= -3.1e+118) tmp = Float64(Float64(Float64(b / z) + t_1) / c); elseif (z <= 1.25e+85) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / 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)
t_1 = -4.0 * (a * t);
tmp = 0.0;
if (z <= -3.1e+118)
tmp = ((b / z) + t_1) / c;
elseif (z <= 1.25e+85)
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
else
tmp = (t_1 + (9.0 * ((x * y) / 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_] := Block[{t$95$1 = N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+118], N[(N[(N[(b / z), $MachinePrecision] + t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.25e+85], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $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 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+118}:\\
\;\;\;\;\frac{\frac{b}{z} + t_1}{c}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+85}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\end{array}
\end{array}
if z < -3.09999999999999986e118Initial program 53.8%
associate-+l-53.8%
*-commutative53.8%
associate-*r*47.1%
*-commutative47.1%
associate-+l-47.1%
*-commutative47.1%
associate-*r*53.8%
*-commutative53.8%
associate-*l*53.8%
associate-*l*51.8%
Simplified51.8%
Applied egg-rr64.1%
Taylor expanded in x around 0 87.2%
fma-def87.2%
fma-def87.2%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in x around 0 79.0%
if -3.09999999999999986e118 < z < 1.25e85Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*92.0%
*-commutative92.0%
associate-+l-92.0%
*-commutative92.0%
associate-*r*90.6%
*-commutative90.6%
associate-*l*90.6%
associate-*l*87.4%
Simplified87.4%
if 1.25e85 < z Initial program 52.6%
associate-+l-52.6%
*-commutative52.6%
associate-*r*54.8%
*-commutative54.8%
associate-+l-54.8%
*-commutative54.8%
associate-*r*52.6%
*-commutative52.6%
associate-*l*52.6%
associate-*l*54.8%
Simplified54.8%
Applied egg-rr64.8%
Taylor expanded in x around 0 78.6%
fma-def78.6%
fma-def78.6%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in b around 0 72.2%
Final simplification83.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 (* -4.0 (* a t))))
(if (<= z -1.45e+118)
(/ (+ (/ b z) t_1) c)
(if (<= z 1.16e+86)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(/ (+ t_1 (* 9.0 (/ (* x y) 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 t_1 = -4.0 * (a * t);
double tmp;
if (z <= -1.45e+118) {
tmp = ((b / z) + t_1) / c;
} else if (z <= 1.16e+86) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (t_1 + (9.0 * ((x * y) / 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * t)
if (z <= (-1.45d+118)) then
tmp = ((b / z) + t_1) / c
else if (z <= 1.16d+86) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = (t_1 + (9.0d0 * ((x * y) / 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 t_1 = -4.0 * (a * t);
double tmp;
if (z <= -1.45e+118) {
tmp = ((b / z) + t_1) / c;
} else if (z <= 1.16e+86) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (t_1 + (9.0 * ((x * y) / 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): t_1 = -4.0 * (a * t) tmp = 0 if z <= -1.45e+118: tmp = ((b / z) + t_1) / c elif z <= 1.16e+86: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = (t_1 + (9.0 * ((x * y) / 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) t_1 = Float64(-4.0 * Float64(a * t)) tmp = 0.0 if (z <= -1.45e+118) tmp = Float64(Float64(Float64(b / z) + t_1) / c); elseif (z <= 1.16e+86) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / 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)
t_1 = -4.0 * (a * t);
tmp = 0.0;
if (z <= -1.45e+118)
tmp = ((b / z) + t_1) / c;
elseif (z <= 1.16e+86)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = (t_1 + (9.0 * ((x * y) / 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_] := Block[{t$95$1 = N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+118], N[(N[(N[(b / z), $MachinePrecision] + t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.16e+86], 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], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $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 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+118}:\\
\;\;\;\;\frac{\frac{b}{z} + t_1}{c}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+86}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\frac{t_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\end{array}
\end{array}
if z < -1.45000000000000008e118Initial program 53.8%
associate-+l-53.8%
*-commutative53.8%
associate-*r*47.1%
*-commutative47.1%
associate-+l-47.1%
*-commutative47.1%
associate-*r*53.8%
*-commutative53.8%
associate-*l*53.8%
associate-*l*51.8%
Simplified51.8%
Applied egg-rr64.1%
Taylor expanded in x around 0 87.2%
fma-def87.2%
fma-def87.2%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in x around 0 79.0%
if -1.45000000000000008e118 < z < 1.15999999999999999e86Initial program 90.6%
if 1.15999999999999999e86 < z Initial program 52.6%
associate-+l-52.6%
*-commutative52.6%
associate-*r*54.8%
*-commutative54.8%
associate-+l-54.8%
*-commutative54.8%
associate-*r*52.6%
*-commutative52.6%
associate-*l*52.6%
associate-*l*54.8%
Simplified54.8%
Applied egg-rr64.8%
Taylor expanded in x around 0 78.6%
fma-def78.6%
fma-def78.6%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in b around 0 72.2%
Final simplification85.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 (<= z -2.65e+25)
(- (+ (/ b (* z c)) (* 9.0 (/ (* x y) (* z c)))) (* 4.0 (/ (* a t) c)))
(if (<= z 5.2e+88)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* x y) 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 <= -2.65e+25) {
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c));
} else if (z <= 5.2e+88) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / 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 <= (-2.65d+25)) then
tmp = ((b / (z * c)) + (9.0d0 * ((x * y) / (z * c)))) - (4.0d0 * ((a * t) / c))
else if (z <= 5.2d+88) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = (((-4.0d0) * (a * t)) + (9.0d0 * ((x * y) / 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 <= -2.65e+25) {
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c));
} else if (z <= 5.2e+88) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / 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 <= -2.65e+25: tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c)) elif z <= 5.2e+88: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / 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 <= -2.65e+25) tmp = Float64(Float64(Float64(b / Float64(z * c)) + Float64(9.0 * Float64(Float64(x * y) / Float64(z * c)))) - Float64(4.0 * Float64(Float64(a * t) / c))); elseif (z <= 5.2e+88) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(x * y) / 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 <= -2.65e+25)
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c));
elseif (z <= 5.2e+88)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / 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[LessEqual[z, -2.65e+25], N[(N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+88], 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], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $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.65 \cdot 10^{+25}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+88}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\end{array}
\end{array}
if z < -2.64999999999999993e25Initial program 54.6%
associate-+l-54.6%
*-commutative54.6%
associate-*r*54.4%
*-commutative54.4%
associate-+l-54.4%
*-commutative54.4%
associate-*r*54.6%
*-commutative54.6%
associate-*l*54.5%
associate-*l*57.9%
Simplified57.9%
Taylor expanded in x around 0 81.4%
if -2.64999999999999993e25 < z < 5.2000000000000001e88Initial program 94.1%
if 5.2000000000000001e88 < z Initial program 52.6%
associate-+l-52.6%
*-commutative52.6%
associate-*r*54.8%
*-commutative54.8%
associate-+l-54.8%
*-commutative54.8%
associate-*r*52.6%
*-commutative52.6%
associate-*l*52.6%
associate-*l*54.8%
Simplified54.8%
Applied egg-rr64.8%
Taylor expanded in x around 0 78.6%
fma-def78.6%
fma-def78.6%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in b around 0 72.2%
Final simplification87.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
(let* ((t_1 (* -4.0 (* a t))))
(if (<= z -2e-60)
(/ (+ (/ b z) t_1) c)
(if (<= z 5.2e+81)
(/ (+ b (* y (* 9.0 x))) (* z c))
(/ (+ t_1 (* 9.0 (/ (* x y) 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 t_1 = -4.0 * (a * t);
double tmp;
if (z <= -2e-60) {
tmp = ((b / z) + t_1) / c;
} else if (z <= 5.2e+81) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else {
tmp = (t_1 + (9.0 * ((x * y) / 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * t)
if (z <= (-2d-60)) then
tmp = ((b / z) + t_1) / c
else if (z <= 5.2d+81) then
tmp = (b + (y * (9.0d0 * x))) / (z * c)
else
tmp = (t_1 + (9.0d0 * ((x * y) / 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 t_1 = -4.0 * (a * t);
double tmp;
if (z <= -2e-60) {
tmp = ((b / z) + t_1) / c;
} else if (z <= 5.2e+81) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else {
tmp = (t_1 + (9.0 * ((x * y) / 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): t_1 = -4.0 * (a * t) tmp = 0 if z <= -2e-60: tmp = ((b / z) + t_1) / c elif z <= 5.2e+81: tmp = (b + (y * (9.0 * x))) / (z * c) else: tmp = (t_1 + (9.0 * ((x * y) / 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) t_1 = Float64(-4.0 * Float64(a * t)) tmp = 0.0 if (z <= -2e-60) tmp = Float64(Float64(Float64(b / z) + t_1) / c); elseif (z <= 5.2e+81) tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)); else tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / 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)
t_1 = -4.0 * (a * t);
tmp = 0.0;
if (z <= -2e-60)
tmp = ((b / z) + t_1) / c;
elseif (z <= 5.2e+81)
tmp = (b + (y * (9.0 * x))) / (z * c);
else
tmp = (t_1 + (9.0 * ((x * y) / 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_] := Block[{t$95$1 = N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e-60], N[(N[(N[(b / z), $MachinePrecision] + t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 5.2e+81], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $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 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{-60}:\\
\;\;\;\;\frac{\frac{b}{z} + t_1}{c}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+81}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\end{array}
\end{array}
if z < -1.9999999999999999e-60Initial program 65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*65.2%
*-commutative65.2%
associate-+l-65.2%
*-commutative65.2%
associate-*r*65.3%
*-commutative65.3%
associate-*l*65.3%
associate-*l*66.7%
Simplified66.7%
Applied egg-rr71.1%
Taylor expanded in x around 0 85.9%
fma-def85.9%
fma-def85.9%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in x around 0 73.6%
if -1.9999999999999999e-60 < z < 5.19999999999999984e81Initial program 94.0%
associate-+l-94.0%
*-commutative94.0%
associate-*r*93.6%
*-commutative93.6%
associate-+l-93.6%
*-commutative93.6%
associate-*r*94.0%
*-commutative94.0%
associate-*l*94.0%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in x around inf 81.8%
associate-*r*81.7%
Simplified81.7%
if 5.19999999999999984e81 < z Initial program 52.6%
associate-+l-52.6%
*-commutative52.6%
associate-*r*54.8%
*-commutative54.8%
associate-+l-54.8%
*-commutative54.8%
associate-*r*52.6%
*-commutative52.6%
associate-*l*52.6%
associate-*l*54.8%
Simplified54.8%
Applied egg-rr64.8%
Taylor expanded in x around 0 78.6%
fma-def78.6%
fma-def78.6%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in b around 0 72.2%
Final simplification77.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 (<= y 3e-132)
(* -4.0 (* t (/ a c)))
(if (<= y 32500000000000.0)
(/ b (* z c))
(if (<= y 1.5e+86) (* -4.0 (/ a (/ c t))) (* 9.0 (* (/ x z) (/ y 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 (y <= 3e-132) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 32500000000000.0) {
tmp = b / (z * c);
} else if (y <= 1.5e+86) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = 9.0 * ((x / z) * (y / 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 (y <= 3d-132) then
tmp = (-4.0d0) * (t * (a / c))
else if (y <= 32500000000000.0d0) then
tmp = b / (z * c)
else if (y <= 1.5d+86) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = 9.0d0 * ((x / z) * (y / 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 (y <= 3e-132) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 32500000000000.0) {
tmp = b / (z * c);
} else if (y <= 1.5e+86) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = 9.0 * ((x / z) * (y / 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 y <= 3e-132: tmp = -4.0 * (t * (a / c)) elif y <= 32500000000000.0: tmp = b / (z * c) elif y <= 1.5e+86: tmp = -4.0 * (a / (c / t)) else: tmp = 9.0 * ((x / z) * (y / 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 (y <= 3e-132) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (y <= 32500000000000.0) tmp = Float64(b / Float64(z * c)); elseif (y <= 1.5e+86) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(9.0 * Float64(Float64(x / z) * Float64(y / 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 (y <= 3e-132)
tmp = -4.0 * (t * (a / c));
elseif (y <= 32500000000000.0)
tmp = b / (z * c);
elseif (y <= 1.5e+86)
tmp = -4.0 * (a / (c / t));
else
tmp = 9.0 * ((x / z) * (y / 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[y, 3e-132], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 32500000000000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+86], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / 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}\;y \leq 3 \cdot 10^{-132}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;y \leq 32500000000000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+86}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\end{array}
\end{array}
if y < 3e-132Initial program 78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*77.6%
*-commutative77.6%
associate-+l-77.6%
*-commutative77.6%
associate-*r*78.2%
*-commutative78.2%
associate-*l*78.2%
associate-*l*75.3%
Simplified75.3%
Applied egg-rr78.5%
Taylor expanded in x around 0 82.6%
fma-def82.6%
fma-def82.6%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 62.5%
+-commutative62.5%
associate-*l/66.3%
fma-def66.3%
*-commutative66.3%
*-commutative66.3%
associate-*r*66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in y around 0 44.5%
*-commutative44.5%
*-lft-identity44.5%
times-frac48.0%
/-rgt-identity48.0%
Simplified48.0%
if 3e-132 < y < 3.25e13Initial program 87.5%
associate-+l-87.5%
*-commutative87.5%
associate-*r*85.8%
*-commutative85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*87.5%
*-commutative87.5%
associate-*l*87.5%
associate-*l*81.3%
Simplified81.3%
Taylor expanded in b around inf 45.3%
*-commutative45.3%
Simplified45.3%
if 3.25e13 < y < 1.49999999999999988e86Initial program 76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*68.2%
*-commutative68.2%
associate-+l-68.2%
*-commutative68.2%
associate-*r*76.5%
*-commutative76.5%
associate-*l*76.5%
associate-*l*76.4%
Simplified76.4%
Taylor expanded in z around inf 35.8%
*-commutative35.8%
associate-/l*43.0%
Simplified43.0%
if 1.49999999999999988e86 < y Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
*-commutative78.0%
associate-*r*73.0%
*-commutative73.0%
associate-*l*73.0%
associate-*l*74.6%
Simplified74.6%
Applied egg-rr71.0%
Taylor expanded in x around inf 49.1%
*-commutative49.1%
times-frac63.1%
Simplified63.1%
Final simplification50.9%
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.2e-54)
(* -4.0 (* t (/ a c)))
(if (<= z 2.6e-105)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 4.6e+53) (/ b (* z c)) (/ (* -4.0 a) (* c (/ 1.0 t)))))))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.2e-54) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2.6e-105) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 4.6e+53) {
tmp = b / (z * c);
} else {
tmp = (-4.0 * a) / (c * (1.0 / t));
}
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.2d-54)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 2.6d-105) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 4.6d+53) then
tmp = b / (z * c)
else
tmp = ((-4.0d0) * a) / (c * (1.0d0 / t))
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.2e-54) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2.6e-105) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 4.6e+53) {
tmp = b / (z * c);
} else {
tmp = (-4.0 * a) / (c * (1.0 / t));
}
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.2e-54: tmp = -4.0 * (t * (a / c)) elif z <= 2.6e-105: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 4.6e+53: tmp = b / (z * c) else: tmp = (-4.0 * a) / (c * (1.0 / t)) 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.2e-54) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 2.6e-105) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 4.6e+53) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(-4.0 * a) / Float64(c * Float64(1.0 / t))); 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.2e-54)
tmp = -4.0 * (t * (a / c));
elseif (z <= 2.6e-105)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 4.6e+53)
tmp = b / (z * c);
else
tmp = (-4.0 * a) / (c * (1.0 / t));
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.2e-54], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-105], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+53], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * a), $MachinePrecision] / N[(c * N[(1.0 / t), $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 -1.2 \cdot 10^{-54}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-105}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+53}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot a}{c \cdot \frac{1}{t}}\\
\end{array}
\end{array}
if z < -1.20000000000000007e-54Initial program 65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*65.2%
*-commutative65.2%
associate-+l-65.2%
*-commutative65.2%
associate-*r*65.3%
*-commutative65.3%
associate-*l*65.3%
associate-*l*66.7%
Simplified66.7%
Applied egg-rr71.1%
Taylor expanded in x around 0 85.9%
fma-def85.9%
fma-def85.9%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in b around 0 69.0%
+-commutative69.0%
associate-*l/75.8%
fma-def75.8%
*-commutative75.8%
*-commutative75.8%
associate-*r*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 56.2%
*-commutative56.2%
*-lft-identity56.2%
times-frac57.2%
/-rgt-identity57.2%
Simplified57.2%
if -1.20000000000000007e-54 < z < 2.5999999999999999e-105Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.7%
*-commutative97.7%
associate-*l*97.7%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around inf 56.4%
if 2.5999999999999999e-105 < z < 4.60000000000000039e53Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-*l*86.8%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in b around inf 52.7%
*-commutative52.7%
Simplified52.7%
if 4.60000000000000039e53 < z Initial program 53.5%
associate-+l-53.5%
*-commutative53.5%
associate-*r*55.6%
*-commutative55.6%
associate-+l-55.6%
*-commutative55.6%
associate-*r*53.5%
*-commutative53.5%
associate-*l*53.6%
associate-*l*55.6%
Simplified55.6%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
*-commutative60.8%
associate-*l/60.8%
*-commutative60.8%
associate-*r*60.8%
*-commutative60.8%
*-commutative60.8%
Simplified60.8%
*-commutative60.8%
*-un-lft-identity60.8%
times-frac60.8%
*-commutative60.8%
Applied egg-rr60.8%
/-rgt-identity60.8%
*-commutative60.8%
/-rgt-identity60.8%
associate-/l*60.8%
frac-times63.2%
Applied egg-rr63.2%
Final simplification57.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
(if (<= z -3e-54)
(* -4.0 (* t (/ a c)))
(if (<= z 6.8e-106)
(/ (* y (* 9.0 x)) (* z c))
(if (<= z 3.6e+53) (/ b (* z c)) (/ (* -4.0 a) (* c (/ 1.0 t)))))))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 <= -3e-54) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 6.8e-106) {
tmp = (y * (9.0 * x)) / (z * c);
} else if (z <= 3.6e+53) {
tmp = b / (z * c);
} else {
tmp = (-4.0 * a) / (c * (1.0 / t));
}
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 <= (-3d-54)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 6.8d-106) then
tmp = (y * (9.0d0 * x)) / (z * c)
else if (z <= 3.6d+53) then
tmp = b / (z * c)
else
tmp = ((-4.0d0) * a) / (c * (1.0d0 / t))
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 <= -3e-54) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 6.8e-106) {
tmp = (y * (9.0 * x)) / (z * c);
} else if (z <= 3.6e+53) {
tmp = b / (z * c);
} else {
tmp = (-4.0 * a) / (c * (1.0 / t));
}
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 <= -3e-54: tmp = -4.0 * (t * (a / c)) elif z <= 6.8e-106: tmp = (y * (9.0 * x)) / (z * c) elif z <= 3.6e+53: tmp = b / (z * c) else: tmp = (-4.0 * a) / (c * (1.0 / t)) 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 <= -3e-54) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 6.8e-106) tmp = Float64(Float64(y * Float64(9.0 * x)) / Float64(z * c)); elseif (z <= 3.6e+53) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(-4.0 * a) / Float64(c * Float64(1.0 / t))); 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 <= -3e-54)
tmp = -4.0 * (t * (a / c));
elseif (z <= 6.8e-106)
tmp = (y * (9.0 * x)) / (z * c);
elseif (z <= 3.6e+53)
tmp = b / (z * c);
else
tmp = (-4.0 * a) / (c * (1.0 / t));
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, -3e-54], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-106], N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+53], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * a), $MachinePrecision] / N[(c * N[(1.0 / t), $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 -3 \cdot 10^{-54}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-106}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+53}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot a}{c \cdot \frac{1}{t}}\\
\end{array}
\end{array}
if z < -3.00000000000000009e-54Initial program 65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*65.2%
*-commutative65.2%
associate-+l-65.2%
*-commutative65.2%
associate-*r*65.3%
*-commutative65.3%
associate-*l*65.3%
associate-*l*66.7%
Simplified66.7%
Applied egg-rr71.1%
Taylor expanded in x around 0 85.9%
fma-def85.9%
fma-def85.9%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in b around 0 69.0%
+-commutative69.0%
associate-*l/75.8%
fma-def75.8%
*-commutative75.8%
*-commutative75.8%
associate-*r*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 56.2%
*-commutative56.2%
*-lft-identity56.2%
times-frac57.2%
/-rgt-identity57.2%
Simplified57.2%
if -3.00000000000000009e-54 < z < 6.79999999999999965e-106Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.7%
*-commutative97.7%
associate-*l*97.7%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around inf 56.4%
associate-*r/56.4%
associate-*r*56.3%
*-commutative56.3%
Simplified56.3%
if 6.79999999999999965e-106 < z < 3.6e53Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-*l*86.8%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in b around inf 52.7%
*-commutative52.7%
Simplified52.7%
if 3.6e53 < z Initial program 53.5%
associate-+l-53.5%
*-commutative53.5%
associate-*r*55.6%
*-commutative55.6%
associate-+l-55.6%
*-commutative55.6%
associate-*r*53.5%
*-commutative53.5%
associate-*l*53.6%
associate-*l*55.6%
Simplified55.6%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
*-commutative60.8%
associate-*l/60.8%
*-commutative60.8%
associate-*r*60.8%
*-commutative60.8%
*-commutative60.8%
Simplified60.8%
*-commutative60.8%
*-un-lft-identity60.8%
times-frac60.8%
*-commutative60.8%
Applied egg-rr60.8%
/-rgt-identity60.8%
*-commutative60.8%
/-rgt-identity60.8%
associate-/l*60.8%
frac-times63.2%
Applied egg-rr63.2%
Final simplification57.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
(if (<= z -2.7e-121)
(* -4.0 (* t (/ a c)))
(if (<= z 9.5e-106)
(* 9.0 (* x (/ y (* z c))))
(if (<= z 3.05e+53) (/ b (* z c)) (* -4.0 (/ a (/ c t)))))))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.7e-121) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 9.5e-106) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 3.05e+53) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
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.7d-121)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 9.5d-106) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (z <= 3.05d+53) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * (a / (c / t))
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.7e-121) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 9.5e-106) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 3.05e+53) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
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.7e-121: tmp = -4.0 * (t * (a / c)) elif z <= 9.5e-106: tmp = 9.0 * (x * (y / (z * c))) elif z <= 3.05e+53: tmp = b / (z * c) else: tmp = -4.0 * (a / (c / t)) 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.7e-121) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 9.5e-106) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (z <= 3.05e+53) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); 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.7e-121)
tmp = -4.0 * (t * (a / c));
elseif (z <= 9.5e-106)
tmp = 9.0 * (x * (y / (z * c)));
elseif (z <= 3.05e+53)
tmp = b / (z * c);
else
tmp = -4.0 * (a / (c / t));
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.7e-121], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-106], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+53], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $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 -2.7 \cdot 10^{-121}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-106}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+53}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if z < -2.7000000000000002e-121Initial program 69.3%
associate-+l-69.3%
*-commutative69.3%
associate-*r*69.2%
*-commutative69.2%
associate-+l-69.2%
*-commutative69.2%
associate-*r*69.3%
*-commutative69.3%
associate-*l*69.3%
associate-*l*68.5%
Simplified68.5%
Applied egg-rr72.4%
Taylor expanded in x around 0 85.5%
fma-def85.5%
fma-def85.5%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in b around 0 66.5%
+-commutative66.5%
associate-*l/72.4%
fma-def72.4%
*-commutative72.4%
*-commutative72.4%
associate-*r*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in y around 0 51.9%
*-commutative51.9%
*-lft-identity51.9%
times-frac54.8%
/-rgt-identity54.8%
Simplified54.8%
if -2.7000000000000002e-121 < z < 9.4999999999999994e-106Initial program 97.5%
associate-+l-97.5%
*-commutative97.5%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*97.5%
*-commutative97.5%
associate-*l*97.5%
associate-*l*91.6%
Simplified91.6%
Applied egg-rr84.8%
Taylor expanded in x around 0 74.9%
fma-def74.9%
fma-def74.9%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in x around inf 58.8%
associate-*r/58.8%
*-commutative58.8%
associate-*r*58.8%
associate-*r/56.5%
associate-*l*56.5%
Simplified56.5%
if 9.4999999999999994e-106 < z < 3.0500000000000001e53Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-*l*86.8%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in b around inf 52.7%
*-commutative52.7%
Simplified52.7%
if 3.0500000000000001e53 < z Initial program 53.5%
associate-+l-53.5%
*-commutative53.5%
associate-*r*55.6%
*-commutative55.6%
associate-+l-55.6%
*-commutative55.6%
associate-*r*53.5%
*-commutative53.5%
associate-*l*53.6%
associate-*l*55.6%
Simplified55.6%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
associate-/l*63.0%
Simplified63.0%
Final simplification56.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 (<= z -4e-59)
(* -4.0 (* t (/ a c)))
(if (<= z 8.8e-106)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 2.95e+53) (/ b (* z c)) (* -4.0 (/ a (/ c t)))))))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 <= -4e-59) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 8.8e-106) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 2.95e+53) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
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 <= (-4d-59)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 8.8d-106) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 2.95d+53) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * (a / (c / t))
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 <= -4e-59) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 8.8e-106) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 2.95e+53) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
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 <= -4e-59: tmp = -4.0 * (t * (a / c)) elif z <= 8.8e-106: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 2.95e+53: tmp = b / (z * c) else: tmp = -4.0 * (a / (c / t)) 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 <= -4e-59) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 8.8e-106) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 2.95e+53) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); 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 <= -4e-59)
tmp = -4.0 * (t * (a / c));
elseif (z <= 8.8e-106)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 2.95e+53)
tmp = b / (z * c);
else
tmp = -4.0 * (a / (c / t));
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, -4e-59], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-106], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.95e+53], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $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 -4 \cdot 10^{-59}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-106}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{+53}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if z < -4.0000000000000001e-59Initial program 65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*65.2%
*-commutative65.2%
associate-+l-65.2%
*-commutative65.2%
associate-*r*65.3%
*-commutative65.3%
associate-*l*65.3%
associate-*l*66.7%
Simplified66.7%
Applied egg-rr71.1%
Taylor expanded in x around 0 85.9%
fma-def85.9%
fma-def85.9%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in b around 0 69.0%
+-commutative69.0%
associate-*l/75.8%
fma-def75.8%
*-commutative75.8%
*-commutative75.8%
associate-*r*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 56.2%
*-commutative56.2%
*-lft-identity56.2%
times-frac57.2%
/-rgt-identity57.2%
Simplified57.2%
if -4.0000000000000001e-59 < z < 8.79999999999999977e-106Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.7%
*-commutative97.7%
associate-*l*97.7%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around inf 56.4%
if 8.79999999999999977e-106 < z < 2.9499999999999999e53Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-*l*86.8%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in b around inf 52.7%
*-commutative52.7%
Simplified52.7%
if 2.9499999999999999e53 < z Initial program 53.5%
associate-+l-53.5%
*-commutative53.5%
associate-*r*55.6%
*-commutative55.6%
associate-+l-55.6%
*-commutative55.6%
associate-*r*53.5%
*-commutative53.5%
associate-*l*53.6%
associate-*l*55.6%
Simplified55.6%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
associate-/l*63.0%
Simplified63.0%
Final simplification57.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
(if (<= z -9e-58)
(* -4.0 (* t (/ a c)))
(if (<= z 1.55e-105)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 5.1e+53) (/ b (* 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 <= -9e-58) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.55e-105) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 5.1e+53) {
tmp = b / (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 <= (-9d-58)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 1.55d-105) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 5.1d+53) then
tmp = b / (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 <= -9e-58) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.55e-105) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 5.1e+53) {
tmp = b / (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 <= -9e-58: tmp = -4.0 * (t * (a / c)) elif z <= 1.55e-105: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 5.1e+53: tmp = b / (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 <= -9e-58) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 1.55e-105) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 5.1e+53) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(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 <= -9e-58)
tmp = -4.0 * (t * (a / c));
elseif (z <= 1.55e-105)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 5.1e+53)
tmp = b / (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, -9e-58], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-105], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.1e+53], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / 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^{-58}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-105}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+53}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if z < -9.0000000000000006e-58Initial program 65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*65.2%
*-commutative65.2%
associate-+l-65.2%
*-commutative65.2%
associate-*r*65.3%
*-commutative65.3%
associate-*l*65.3%
associate-*l*66.7%
Simplified66.7%
Applied egg-rr71.1%
Taylor expanded in x around 0 85.9%
fma-def85.9%
fma-def85.9%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in b around 0 69.0%
+-commutative69.0%
associate-*l/75.8%
fma-def75.8%
*-commutative75.8%
*-commutative75.8%
associate-*r*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 56.2%
*-commutative56.2%
*-lft-identity56.2%
times-frac57.2%
/-rgt-identity57.2%
Simplified57.2%
if -9.0000000000000006e-58 < z < 1.55000000000000007e-105Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.7%
*-commutative97.7%
associate-*l*97.7%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around inf 56.4%
if 1.55000000000000007e-105 < z < 5.0999999999999998e53Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
associate-*l*86.8%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in b around inf 52.7%
*-commutative52.7%
Simplified52.7%
if 5.0999999999999998e53 < z Initial program 53.5%
associate-+l-53.5%
*-commutative53.5%
associate-*r*55.6%
*-commutative55.6%
associate-+l-55.6%
*-commutative55.6%
associate-*r*53.5%
*-commutative53.5%
associate-*l*53.6%
associate-*l*55.6%
Simplified55.6%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
*-commutative60.8%
associate-*l/60.8%
*-commutative60.8%
associate-*r*60.8%
*-commutative60.8%
*-commutative60.8%
Simplified60.8%
*-un-lft-identity60.8%
times-frac63.1%
*-commutative63.1%
Applied egg-rr63.1%
Final simplification57.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 (if (or (<= z -2.3e-54) (not (<= z 1.45e+54))) (/ (+ (/ b z) (* -4.0 (* a t))) c) (/ (+ b (* y (* 9.0 x))) (* 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 <= -2.3e-54) || !(z <= 1.45e+54)) {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
} else {
tmp = (b + (y * (9.0 * x))) / (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 <= (-2.3d-54)) .or. (.not. (z <= 1.45d+54))) then
tmp = ((b / z) + ((-4.0d0) * (a * t))) / c
else
tmp = (b + (y * (9.0d0 * x))) / (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 <= -2.3e-54) || !(z <= 1.45e+54)) {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
} else {
tmp = (b + (y * (9.0 * x))) / (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 <= -2.3e-54) or not (z <= 1.45e+54): tmp = ((b / z) + (-4.0 * (a * t))) / c else: tmp = (b + (y * (9.0 * x))) / (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 <= -2.3e-54) || !(z <= 1.45e+54)) tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / 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 <= -2.3e-54) || ~((z <= 1.45e+54)))
tmp = ((b / z) + (-4.0 * (a * t))) / c;
else
tmp = (b + (y * (9.0 * x))) / (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, -2.3e-54], N[Not[LessEqual[z, 1.45e+54]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $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 -2.3 \cdot 10^{-54} \lor \neg \left(z \leq 1.45 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.2999999999999999e-54 or 1.4499999999999999e54 < z Initial program 61.2%
associate-+l-61.2%
*-commutative61.2%
associate-*r*61.9%
*-commutative61.9%
associate-+l-61.9%
*-commutative61.9%
associate-*r*61.2%
*-commutative61.2%
associate-*l*61.2%
associate-*l*62.8%
Simplified62.8%
Applied egg-rr69.0%
Taylor expanded in x around 0 83.1%
fma-def83.1%
fma-def83.1%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in x around 0 71.6%
if -2.2999999999999999e-54 < z < 1.4499999999999999e54Initial program 94.6%
associate-+l-94.6%
*-commutative94.6%
associate-*r*94.2%
*-commutative94.2%
associate-+l-94.2%
*-commutative94.2%
associate-*r*94.6%
*-commutative94.6%
associate-*l*94.6%
associate-*l*88.7%
Simplified88.7%
Taylor expanded in x around inf 82.8%
associate-*r*82.8%
Simplified82.8%
Final simplification77.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 (if (or (<= z -4.2e-65) (not (<= z 3.4e+53))) (* -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 <= -4.2e-65) || !(z <= 3.4e+53)) {
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 <= (-4.2d-65)) .or. (.not. (z <= 3.4d+53))) 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 <= -4.2e-65) || !(z <= 3.4e+53)) {
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 <= -4.2e-65) or not (z <= 3.4e+53): 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 <= -4.2e-65) || !(z <= 3.4e+53)) 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 <= -4.2e-65) || ~((z <= 3.4e+53)))
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, -4.2e-65], N[Not[LessEqual[z, 3.4e+53]], $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 -4.2 \cdot 10^{-65} \lor \neg \left(z \leq 3.4 \cdot 10^{+53}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.20000000000000006e-65 or 3.39999999999999998e53 < z Initial program 61.8%
associate-+l-61.8%
*-commutative61.8%
associate-*r*62.5%
*-commutative62.5%
associate-+l-62.5%
*-commutative62.5%
associate-*r*61.8%
*-commutative61.8%
associate-*l*61.8%
associate-*l*63.4%
Simplified63.4%
Applied egg-rr69.4%
Taylor expanded in x around 0 83.4%
fma-def83.4%
fma-def83.4%
associate-/l*92.3%
Simplified92.3%
Taylor expanded in b around 0 69.7%
+-commutative69.7%
associate-*l/78.6%
fma-def78.6%
*-commutative78.6%
*-commutative78.6%
associate-*r*78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y around 0 57.7%
*-commutative57.7%
*-lft-identity57.7%
times-frac58.3%
/-rgt-identity58.3%
Simplified58.3%
if -4.20000000000000006e-65 < z < 3.39999999999999998e53Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*94.1%
*-commutative94.1%
associate-+l-94.1%
*-commutative94.1%
associate-*r*94.5%
*-commutative94.5%
associate-*l*94.5%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in b around inf 45.5%
*-commutative45.5%
Simplified45.5%
Final simplification52.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-66) (* -4.0 (* t (/ a c))) (if (<= z 2.65e+54) (/ b (* z c)) (* -4.0 (/ a (/ c t))))))
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-66) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2.65e+54) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
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-66)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 2.65d+54) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * (a / (c / t))
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-66) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2.65e+54) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
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-66: tmp = -4.0 * (t * (a / c)) elif z <= 2.65e+54: tmp = b / (z * c) else: tmp = -4.0 * (a / (c / t)) 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-66) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 2.65e+54) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); 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-66)
tmp = -4.0 * (t * (a / c));
elseif (z <= 2.65e+54)
tmp = b / (z * c);
else
tmp = -4.0 * (a / (c / t));
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-66], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e+54], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $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 -5.6 \cdot 10^{-66}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{+54}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if z < -5.6000000000000001e-66Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*66.0%
*-commutative66.0%
associate-+l-66.0%
*-commutative66.0%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*67.5%
Simplified67.5%
Applied egg-rr71.8%
Taylor expanded in x around 0 86.3%
fma-def86.3%
fma-def86.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in b around 0 69.8%
+-commutative69.8%
associate-*l/76.3%
fma-def76.4%
*-commutative76.4%
*-commutative76.4%
associate-*r*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in y around 0 56.0%
*-commutative56.0%
*-lft-identity56.0%
times-frac57.0%
/-rgt-identity57.0%
Simplified57.0%
if -5.6000000000000001e-66 < z < 2.65000000000000009e54Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*94.1%
*-commutative94.1%
associate-+l-94.1%
*-commutative94.1%
associate-*r*94.5%
*-commutative94.5%
associate-*l*94.5%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in b around inf 45.5%
*-commutative45.5%
Simplified45.5%
if 2.65000000000000009e54 < z Initial program 53.5%
associate-+l-53.5%
*-commutative53.5%
associate-*r*55.6%
*-commutative55.6%
associate-+l-55.6%
*-commutative55.6%
associate-*r*53.5%
*-commutative53.5%
associate-*l*53.6%
associate-*l*55.6%
Simplified55.6%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
associate-/l*63.0%
Simplified63.0%
Final simplification52.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 (<= y 3.1e+147) (/ (+ (/ b z) (* -4.0 (* a t))) c) (* (/ y c) (* 9.0 (/ x 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 (y <= 3.1e+147) {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
} else {
tmp = (y / c) * (9.0 * (x / z));
}
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 (y <= 3.1d+147) then
tmp = ((b / z) + ((-4.0d0) * (a * t))) / c
else
tmp = (y / c) * (9.0d0 * (x / z))
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 (y <= 3.1e+147) {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
} else {
tmp = (y / c) * (9.0 * (x / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if y <= 3.1e+147: tmp = ((b / z) + (-4.0 * (a * t))) / c else: tmp = (y / c) * (9.0 * (x / 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 (y <= 3.1e+147) tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(y / c) * Float64(9.0 * Float64(x / z))); 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 (y <= 3.1e+147)
tmp = ((b / z) + (-4.0 * (a * t))) / c;
else
tmp = (y / c) * (9.0 * (x / z));
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[y, 3.1e+147], N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(y / c), $MachinePrecision] * N[(9.0 * N[(x / z), $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}\;y \leq 3.1 \cdot 10^{+147}:\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{c} \cdot \left(9 \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if y < 3.1e147Initial program 79.7%
associate-+l-79.7%
*-commutative79.7%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
*-commutative78.9%
associate-*r*79.7%
*-commutative79.7%
associate-*l*79.7%
associate-*l*76.6%
Simplified76.6%
Applied egg-rr78.5%
Taylor expanded in x around 0 83.2%
fma-def83.2%
fma-def83.2%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in x around 0 64.4%
if 3.1e147 < y Initial program 69.8%
associate-+l-69.8%
*-commutative69.8%
associate-*r*74.5%
*-commutative74.5%
associate-+l-74.5%
*-commutative74.5%
associate-*r*69.8%
*-commutative69.8%
associate-*l*69.8%
associate-*l*72.3%
Simplified72.3%
Taylor expanded in x around inf 52.5%
associate-*r/52.4%
associate-*r*52.4%
*-commutative52.4%
Simplified52.4%
*-commutative52.4%
*-commutative52.4%
times-frac71.9%
*-un-lft-identity71.9%
times-frac71.9%
metadata-eval71.9%
Applied egg-rr71.9%
Final simplification65.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 (/ 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 78.0%
associate-+l-78.0%
*-commutative78.0%
associate-*r*78.2%
*-commutative78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*78.0%
*-commutative78.0%
associate-*l*78.0%
associate-*l*75.9%
Simplified75.9%
Taylor expanded in b around inf 33.1%
*-commutative33.1%
Simplified33.1%
Final simplification33.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 (/ (/ 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) {
return (b / c) / z;
}
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 / c) / z
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 / c) / z;
}
[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 / c) / z
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(Float64(b / c) / z) 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 / c) / z;
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[(N[(b / c), $MachinePrecision] / z), $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{\frac{b}{c}}{z}
\end{array}
Initial program 78.0%
associate-+l-78.0%
*-commutative78.0%
associate-*r*78.2%
*-commutative78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*78.0%
*-commutative78.0%
associate-*l*78.0%
associate-*l*75.9%
Simplified75.9%
Taylor expanded in b around inf 33.1%
*-commutative33.1%
Simplified33.1%
div-inv32.8%
Applied egg-rr32.8%
Taylor expanded in b around 0 33.1%
associate-/r*34.3%
Simplified34.3%
Final simplification34.3%
(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 2024018
(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)))