
(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 and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (/ b z) (+ (* -4.0 (* a t)) (* 9.0 (/ (* y x) z)))) c)))
(if (<= z -1.2e+29)
t_1
(if (<= z 5e-37)
(/ (fma x (* 9.0 y) (+ b (* t (* a (* z -4.0))))) (* z c))
(if (<= z 2.65e+265)
t_1
(+
(* (/ y z) (/ (* 9.0 x) c))
(fma -4.0 (* t (/ a c)) (/ b (* z c)))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((b / z) + ((-4.0 * (a * t)) + (9.0 * ((y * x) / z)))) / c;
double tmp;
if (z <= -1.2e+29) {
tmp = t_1;
} else if (z <= 5e-37) {
tmp = fma(x, (9.0 * y), (b + (t * (a * (z * -4.0))))) / (z * c);
} else if (z <= 2.65e+265) {
tmp = t_1;
} else {
tmp = ((y / z) * ((9.0 * x) / c)) + fma(-4.0, (t * (a / c)), (b / (z * c)));
}
return tmp;
}
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(b / z) + Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(y * x) / z)))) / c) tmp = 0.0 if (z <= -1.2e+29) tmp = t_1; elseif (z <= 5e-37) tmp = Float64(fma(x, Float64(9.0 * y), Float64(b + Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); elseif (z <= 2.65e+265) tmp = t_1; else tmp = Float64(Float64(Float64(y / z) * Float64(Float64(9.0 * x) / c)) + fma(-4.0, Float64(t * Float64(a / c)), Float64(b / Float64(z * c)))); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(b / z), $MachinePrecision] + N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.2e+29], t$95$1, If[LessEqual[z, 5e-37], N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(b + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e+265], t$95$1, N[(N[(N[(y / z), $MachinePrecision] * N[(N[(9.0 * x), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + \left(-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{y \cdot x}{z}\right)}{c}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-37}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, b + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{+265}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \frac{9 \cdot x}{c} + \mathsf{fma}\left(-4, t \cdot \frac{a}{c}, \frac{b}{z \cdot c}\right)\\
\end{array}
\end{array}
if z < -1.2e29 or 4.9999999999999997e-37 < z < 2.65000000000000017e265Initial program 67.6%
associate-+l-67.6%
*-commutative67.6%
associate-*r*63.1%
*-commutative63.1%
associate-+l-63.1%
Simplified69.2%
div-inv69.0%
associate-+l-69.0%
associate-*r*67.4%
associate-+l-67.4%
associate-*r*69.0%
associate-*l*69.0%
fma-neg69.0%
Applied egg-rr69.0%
Taylor expanded in x around 0 77.1%
associate--l+77.1%
associate-/l*76.2%
cancel-sign-sub-inv76.2%
metadata-eval76.2%
associate-/l*77.1%
+-commutative77.1%
associate-+r+77.1%
+-commutative77.1%
fma-def77.1%
*-commutative77.1%
times-frac81.6%
+-commutative81.6%
associate-/l*80.8%
*-commutative80.8%
Simplified87.8%
Taylor expanded in c around 0 88.5%
if -1.2e29 < z < 4.9999999999999997e-37Initial program 97.2%
associate-+l-97.2%
associate-*l*97.2%
fma-neg98.0%
neg-sub098.0%
associate-+l-98.0%
neg-sub098.0%
+-commutative98.0%
distribute-rgt-neg-out98.0%
*-commutative98.0%
associate-*l*97.2%
distribute-rgt-neg-in97.2%
*-commutative97.2%
distribute-rgt-neg-in97.2%
distribute-rgt-neg-in97.2%
metadata-eval97.2%
Simplified97.2%
if 2.65000000000000017e265 < z Initial program 23.2%
associate-+l-23.2%
*-commutative23.2%
associate-*r*23.5%
*-commutative23.5%
associate-+l-23.5%
Simplified23.5%
div-inv23.5%
associate-+l-23.5%
associate-*r*23.2%
associate-+l-23.2%
associate-*r*23.5%
associate-*l*23.5%
fma-neg23.5%
Applied egg-rr23.5%
Taylor expanded in x around 0 51.4%
associate--l+51.4%
associate-/l*71.4%
cancel-sign-sub-inv71.4%
metadata-eval71.4%
associate-/l*51.4%
+-commutative51.4%
associate-+r+51.4%
+-commutative51.4%
associate-*r/51.4%
*-commutative51.4%
associate-*r*51.4%
*-commutative51.4%
times-frac79.5%
*-commutative79.5%
+-commutative79.5%
Simplified94.1%
Final simplification92.7%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.55e+29) (not (<= z 1.4e-37))) (/ (fma b (/ 1.0 z) (fma 9.0 (/ y (/ z x)) (* -4.0 (* a t)))) c) (/ (fma x (* 9.0 y) (+ b (* t (* a (* z -4.0))))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.55e+29) || !(z <= 1.4e-37)) {
tmp = fma(b, (1.0 / z), fma(9.0, (y / (z / x)), (-4.0 * (a * t)))) / c;
} else {
tmp = fma(x, (9.0 * y), (b + (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.55e+29) || !(z <= 1.4e-37)) tmp = Float64(fma(b, Float64(1.0 / z), fma(9.0, Float64(y / Float64(z / x)), Float64(-4.0 * Float64(a * t)))) / c); else tmp = Float64(fma(x, Float64(9.0 * y), Float64(b + Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.55e+29], N[Not[LessEqual[z, 1.4e-37]], $MachinePrecision]], N[(N[(b * N[(1.0 / z), $MachinePrecision] + N[(9.0 * N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(b + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{+29} \lor \neg \left(z \leq 1.4 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{\mathsf{fma}\left(b, \frac{1}{z}, \mathsf{fma}\left(9, \frac{y}{\frac{z}{x}}, -4 \cdot \left(a \cdot t\right)\right)\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, b + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.55e29 or 1.4000000000000001e-37 < z Initial program 63.2%
associate-+l-63.2%
*-commutative63.2%
associate-*r*59.1%
*-commutative59.1%
associate-+l-59.1%
Simplified64.7%
div-inv64.4%
associate-+l-64.4%
associate-*r*63.0%
associate-+l-63.0%
associate-*r*64.4%
associate-*l*64.4%
fma-neg64.4%
Applied egg-rr64.4%
Taylor expanded in x around 0 74.5%
associate--l+74.5%
associate-/l*75.7%
cancel-sign-sub-inv75.7%
metadata-eval75.7%
associate-/l*74.5%
+-commutative74.5%
associate-+r+74.5%
+-commutative74.5%
fma-def74.5%
*-commutative74.5%
times-frac81.4%
+-commutative81.4%
associate-/l*82.7%
*-commutative82.7%
Simplified88.5%
Taylor expanded in c around 0 84.8%
div-inv84.8%
fma-def84.8%
fma-def84.8%
associate-/l*88.9%
Applied egg-rr88.9%
if -2.55e29 < z < 1.4000000000000001e-37Initial program 97.2%
associate-+l-97.2%
associate-*l*97.2%
fma-neg98.0%
neg-sub098.0%
associate-+l-98.0%
neg-sub098.0%
+-commutative98.0%
distribute-rgt-neg-out98.0%
*-commutative98.0%
associate-*l*97.2%
distribute-rgt-neg-in97.2%
*-commutative97.2%
distribute-rgt-neg-in97.2%
distribute-rgt-neg-in97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification92.7%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.8e+28) (not (<= z 5e-38))) (/ (+ (/ b z) (+ (* -4.0 (* a t)) (* 9.0 (/ (* y x) z)))) c) (/ (fma x (* 9.0 y) (+ b (* t (* a (* z -4.0))))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.8e+28) || !(z <= 5e-38)) {
tmp = ((b / z) + ((-4.0 * (a * t)) + (9.0 * ((y * x) / z)))) / c;
} else {
tmp = fma(x, (9.0 * y), (b + (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.8e+28) || !(z <= 5e-38)) tmp = Float64(Float64(Float64(b / z) + Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(y * x) / z)))) / c); else tmp = Float64(fma(x, Float64(9.0 * y), Float64(b + Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.8e+28], N[Not[LessEqual[z, 5e-38]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] + N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(b + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+28} \lor \neg \left(z \leq 5 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{\frac{b}{z} + \left(-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{y \cdot x}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, b + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.8000000000000001e28 or 5.00000000000000033e-38 < z Initial program 63.2%
associate-+l-63.2%
*-commutative63.2%
associate-*r*59.1%
*-commutative59.1%
associate-+l-59.1%
Simplified64.7%
div-inv64.4%
associate-+l-64.4%
associate-*r*63.0%
associate-+l-63.0%
associate-*r*64.4%
associate-*l*64.4%
fma-neg64.4%
Applied egg-rr64.4%
Taylor expanded in x around 0 74.5%
associate--l+74.5%
associate-/l*75.7%
cancel-sign-sub-inv75.7%
metadata-eval75.7%
associate-/l*74.5%
+-commutative74.5%
associate-+r+74.5%
+-commutative74.5%
fma-def74.5%
*-commutative74.5%
times-frac81.4%
+-commutative81.4%
associate-/l*82.7%
*-commutative82.7%
Simplified88.5%
Taylor expanded in c around 0 84.8%
if -2.8000000000000001e28 < z < 5.00000000000000033e-38Initial program 97.2%
associate-+l-97.2%
associate-*l*97.2%
fma-neg98.0%
neg-sub098.0%
associate-+l-98.0%
neg-sub098.0%
+-commutative98.0%
distribute-rgt-neg-out98.0%
*-commutative98.0%
associate-*l*97.2%
distribute-rgt-neg-in97.2%
*-commutative97.2%
distribute-rgt-neg-in97.2%
distribute-rgt-neg-in97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification90.4%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x)))
(t_2 (/ (+ b (- t_1 (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_2 -2e-94)
t_2
(if (<= t_2 0.0)
(/ (/ (+ b (* 9.0 (* y x))) z) c)
(if (<= t_2 INFINITY)
(/ (+ b (- t_1 (* (* z 4.0) (* a t)))) (* z c))
(* -4.0 (* a (/ t c))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_2 <= -2e-94) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_2 <= -2e-94) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c) tmp = 0 if t_2 <= -2e-94: tmp = t_2 elif t_2 <= 0.0: tmp = ((b + (9.0 * (y * x))) / z) / c elif t_2 <= math.inf: tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c) else: tmp = -4.0 * (a * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) t_2 = Float64(Float64(b + Float64(t_1 - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_2 <= -2e-94) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) / c); elseif (t_2 <= Inf) tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = y * (9.0 * x);
t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c);
tmp = 0.0;
if (t_2 <= -2e-94)
tmp = t_2;
elseif (t_2 <= 0.0)
tmp = ((b + (9.0 * (y * x))) / z) / c;
elseif (t_2 <= Inf)
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
else
tmp = -4.0 * (a * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(t$95$1 - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-94], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
t_2 := \frac{b + \left(t_1 - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{-94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z}}{c}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{b + \left(t_1 - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1.9999999999999999e-94Initial program 91.5%
if -1.9999999999999999e-94 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 0.0Initial program 54.0%
associate-+l-54.0%
*-commutative54.0%
associate-*r*50.4%
*-commutative50.4%
associate-+l-50.4%
Simplified54.0%
div-inv54.0%
associate-+l-54.0%
associate-*r*54.0%
associate-+l-54.0%
associate-*r*54.0%
associate-*l*54.0%
fma-neg54.0%
Applied egg-rr54.0%
Taylor expanded in x around 0 66.2%
associate--l+66.2%
associate-/l*54.2%
cancel-sign-sub-inv54.2%
metadata-eval54.2%
associate-/l*66.2%
+-commutative66.2%
associate-+r+66.2%
+-commutative66.2%
fma-def66.2%
*-commutative66.2%
times-frac78.4%
+-commutative78.4%
associate-/l*66.4%
*-commutative66.4%
Simplified96.6%
Taylor expanded in c around 0 99.6%
Taylor expanded in z around 0 83.7%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 91.2%
associate-+l-91.2%
*-commutative91.2%
associate-*r*88.7%
*-commutative88.7%
associate-+l-88.7%
Simplified93.0%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*0.4%
*-commutative0.4%
associate-+l-0.4%
Simplified0.4%
div-inv0.4%
associate-+l-0.4%
associate-*r*0.0%
associate-+l-0.0%
associate-*r*0.4%
associate-*l*0.4%
fma-neg4.8%
Applied egg-rr4.8%
Taylor expanded in x around 0 37.1%
associate--l+37.1%
associate-/l*61.0%
cancel-sign-sub-inv61.0%
metadata-eval61.0%
associate-/l*37.1%
+-commutative37.1%
associate-+r+37.1%
+-commutative37.1%
fma-def37.1%
*-commutative37.1%
times-frac58.5%
+-commutative58.5%
associate-/l*82.5%
*-commutative82.5%
Simplified91.7%
Taylor expanded in z around inf 42.2%
*-commutative42.2%
associate-/l*71.3%
associate-/r/66.1%
Simplified66.1%
Final simplification88.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= t -6.8e+248) (not (<= t 7.2e-22))) (* -4.0 (* a (/ t c))) (/ (+ b (- (* y (* 9.0 x)) (* (* z 4.0) (* a t)))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -6.8e+248) || !(t <= 7.2e-22)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 ((t <= (-6.8d+248)) .or. (.not. (t <= 7.2d-22))) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = (b + ((y * (9.0d0 * x)) - ((z * 4.0d0) * (a * t)))) / (z * c)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -6.8e+248) || !(t <= 7.2e-22)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -6.8e+248) or not (t <= 7.2e-22): tmp = -4.0 * (a * (t / c)) else: tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -6.8e+248) || !(t <= 7.2e-22)) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((t <= -6.8e+248) || ~((t <= 7.2e-22)))
tmp = -4.0 * (a * (t / c));
else
tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -6.8e+248], N[Not[LessEqual[t, 7.2e-22]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+248} \lor \neg \left(t \leq 7.2 \cdot 10^{-22}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if t < -6.7999999999999999e248 or 7.1999999999999996e-22 < t Initial program 64.6%
associate-+l-64.6%
*-commutative64.6%
associate-*r*67.1%
*-commutative67.1%
associate-+l-67.1%
Simplified67.1%
div-inv66.8%
associate-+l-66.8%
associate-*r*64.4%
associate-+l-64.4%
associate-*r*66.8%
associate-*l*66.8%
fma-neg68.0%
Applied egg-rr68.0%
Taylor expanded in x around 0 71.0%
associate--l+71.0%
associate-/l*83.8%
cancel-sign-sub-inv83.8%
metadata-eval83.8%
associate-/l*71.0%
+-commutative71.0%
associate-+r+71.0%
+-commutative71.0%
fma-def71.0%
*-commutative71.0%
times-frac71.0%
+-commutative71.0%
associate-/l*83.8%
*-commutative83.8%
Simplified85.9%
Taylor expanded in z around inf 50.7%
*-commutative50.7%
associate-/l*62.1%
associate-/r/64.8%
Simplified64.8%
if -6.7999999999999999e248 < t < 7.1999999999999996e-22Initial program 84.9%
associate-+l-84.9%
*-commutative84.9%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
Simplified83.3%
Final simplification77.5%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.2e+59) (not (<= z 1.4e-37))) (/ (+ (/ b z) (+ (* -4.0 (* a t)) (* 9.0 (/ (* y x) z)))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.2e+59) || !(z <= 1.4e-37)) {
tmp = ((b / z) + ((-4.0 * (a * t)) + (9.0 * ((y * x) / z)))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.2d+59)) .or. (.not. (z <= 1.4d-37))) then
tmp = ((b / z) + (((-4.0d0) * (a * t)) + (9.0d0 * ((y * x) / z)))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.2e+59) || !(z <= 1.4e-37)) {
tmp = ((b / z) + ((-4.0 * (a * t)) + (9.0 * ((y * x) / z)))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.2e+59) or not (z <= 1.4e-37): tmp = ((b / z) + ((-4.0 * (a * t)) + (9.0 * ((y * x) / z)))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.2e+59) || !(z <= 1.4e-37)) tmp = Float64(Float64(Float64(b / z) + Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(y * x) / z)))) / 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
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.2e+59) || ~((z <= 1.4e-37)))
tmp = ((b / z) + ((-4.0 * (a * t)) + (9.0 * ((y * x) / z)))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.2e+59], N[Not[LessEqual[z, 1.4e-37]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] + N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $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] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+59} \lor \neg \left(z \leq 1.4 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{\frac{b}{z} + \left(-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{y \cdot x}{z}\right)}{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 < -3.19999999999999982e59 or 1.4000000000000001e-37 < z Initial program 62.4%
associate-+l-62.4%
*-commutative62.4%
associate-*r*59.5%
*-commutative59.5%
associate-+l-59.5%
Simplified64.0%
div-inv63.7%
associate-+l-63.7%
associate-*r*62.2%
associate-+l-62.2%
associate-*r*63.7%
associate-*l*63.7%
fma-neg63.7%
Applied egg-rr63.7%
Taylor expanded in x around 0 74.4%
associate--l+74.4%
associate-/l*75.0%
cancel-sign-sub-inv75.0%
metadata-eval75.0%
associate-/l*74.4%
+-commutative74.4%
associate-+r+74.4%
+-commutative74.4%
fma-def74.4%
*-commutative74.4%
times-frac81.0%
+-commutative81.0%
associate-/l*81.6%
*-commutative81.6%
Simplified88.5%
Taylor expanded in c around 0 85.3%
if -3.19999999999999982e59 < z < 1.4000000000000001e-37Initial program 95.8%
Final simplification90.4%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 c)))) (t_2 (* 9.0 (* (/ y c) (/ x z)))))
(if (<= t -7.5e+131)
t_1
(if (<= t -2.3e+103)
(/ b (* z c))
(if (<= t -3e+96)
t_1
(if (<= t -2.3e+44)
t_2
(if (<= t -5.2e-301)
(/ (/ b z) c)
(if (<= t 9.8e-86) t_2 t_1))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * (t / c));
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if (t <= -3e+96) {
tmp = t_1;
} else if (t <= -2.3e+44) {
tmp = t_2;
} else if (t <= -5.2e-301) {
tmp = (b / z) / c;
} else if (t <= 9.8e-86) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (a * (t / c))
t_2 = 9.0d0 * ((y / c) * (x / z))
if (t <= (-7.5d+131)) then
tmp = t_1
else if (t <= (-2.3d+103)) then
tmp = b / (z * c)
else if (t <= (-3d+96)) then
tmp = t_1
else if (t <= (-2.3d+44)) then
tmp = t_2
else if (t <= (-5.2d-301)) then
tmp = (b / z) / c
else if (t <= 9.8d-86) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
assert t < a;
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 / c));
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if (t <= -3e+96) {
tmp = t_1;
} else if (t <= -2.3e+44) {
tmp = t_2;
} else if (t <= -5.2e-301) {
tmp = (b / z) / c;
} else if (t <= 9.8e-86) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * (t / c)) t_2 = 9.0 * ((y / c) * (x / z)) tmp = 0 if t <= -7.5e+131: tmp = t_1 elif t <= -2.3e+103: tmp = b / (z * c) elif t <= -3e+96: tmp = t_1 elif t <= -2.3e+44: tmp = t_2 elif t <= -5.2e-301: tmp = (b / z) / c elif t <= 9.8e-86: tmp = t_2 else: tmp = t_1 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * Float64(t / c))) t_2 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))) tmp = 0.0 if (t <= -7.5e+131) tmp = t_1; elseif (t <= -2.3e+103) tmp = Float64(b / Float64(z * c)); elseif (t <= -3e+96) tmp = t_1; elseif (t <= -2.3e+44) tmp = t_2; elseif (t <= -5.2e-301) tmp = Float64(Float64(b / z) / c); elseif (t <= 9.8e-86) tmp = t_2; else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * (t / c));
t_2 = 9.0 * ((y / c) * (x / z));
tmp = 0.0;
if (t <= -7.5e+131)
tmp = t_1;
elseif (t <= -2.3e+103)
tmp = b / (z * c);
elseif (t <= -3e+96)
tmp = t_1;
elseif (t <= -2.3e+44)
tmp = t_2;
elseif (t <= -5.2e-301)
tmp = (b / z) / c;
elseif (t <= 9.8e-86)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+131], t$95$1, If[LessEqual[t, -2.3e+103], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3e+96], t$95$1, If[LessEqual[t, -2.3e+44], t$95$2, If[LessEqual[t, -5.2e-301], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, 9.8e-86], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
t_2 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+103}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq -3 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-301}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-86}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.4999999999999995e131 or -2.30000000000000008e103 < t < -3e96 or 9.79999999999999944e-86 < t Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*73.2%
*-commutative73.2%
associate-+l-73.2%
Simplified73.2%
div-inv72.9%
associate-+l-72.9%
associate-*r*71.1%
associate-+l-71.1%
associate-*r*72.9%
associate-*l*72.9%
fma-neg73.8%
Applied egg-rr73.8%
Taylor expanded in x around 0 72.3%
associate--l+72.3%
associate-/l*80.9%
cancel-sign-sub-inv80.9%
metadata-eval80.9%
associate-/l*72.3%
+-commutative72.3%
associate-+r+72.3%
+-commutative72.3%
fma-def72.3%
*-commutative72.3%
times-frac74.2%
+-commutative74.2%
associate-/l*82.6%
*-commutative82.6%
Simplified85.9%
Taylor expanded in z around inf 44.3%
*-commutative44.3%
associate-/l*52.6%
associate-/r/57.2%
Simplified57.2%
if -7.4999999999999995e131 < t < -2.30000000000000008e103Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if -3e96 < t < -2.30000000000000004e44 or -5.1999999999999996e-301 < t < 9.79999999999999944e-86Initial program 88.3%
associate-+l-88.3%
*-commutative88.3%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
Simplified85.0%
Taylor expanded in x around inf 42.8%
times-frac48.1%
Simplified48.1%
if -2.30000000000000004e44 < t < -5.1999999999999996e-301Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
Simplified78.3%
div-inv78.2%
associate-+l-78.2%
associate-*r*79.3%
associate-+l-79.3%
associate-*r*78.2%
associate-*l*78.2%
fma-neg78.2%
Applied egg-rr78.2%
Taylor expanded in b around inf 45.6%
associate-/l/45.6%
Simplified45.6%
Final simplification51.5%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 c)))))
(if (<= t -8.5e+138)
t_1
(if (<= t -1e+46)
(* (/ x (/ c y)) (/ 9.0 z))
(if (<= t -4.1e-224)
(/ (/ b z) c)
(if (<= t -4e-257)
(* (/ y z) (/ (* 9.0 x) c))
(if (<= t -4.1e-300)
(/ b (* z c))
(if (<= t 1.18e-85) (* 9.0 (* (/ y c) (/ x z))) t_1))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * (t / c));
double tmp;
if (t <= -8.5e+138) {
tmp = t_1;
} else if (t <= -1e+46) {
tmp = (x / (c / y)) * (9.0 / z);
} else if (t <= -4.1e-224) {
tmp = (b / z) / c;
} else if (t <= -4e-257) {
tmp = (y / z) * ((9.0 * x) / c);
} else if (t <= -4.1e-300) {
tmp = b / (z * c);
} else if (t <= 1.18e-85) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / c))
if (t <= (-8.5d+138)) then
tmp = t_1
else if (t <= (-1d+46)) then
tmp = (x / (c / y)) * (9.0d0 / z)
else if (t <= (-4.1d-224)) then
tmp = (b / z) / c
else if (t <= (-4d-257)) then
tmp = (y / z) * ((9.0d0 * x) / c)
else if (t <= (-4.1d-300)) then
tmp = b / (z * c)
else if (t <= 1.18d-85) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
assert t < a;
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 / c));
double tmp;
if (t <= -8.5e+138) {
tmp = t_1;
} else if (t <= -1e+46) {
tmp = (x / (c / y)) * (9.0 / z);
} else if (t <= -4.1e-224) {
tmp = (b / z) / c;
} else if (t <= -4e-257) {
tmp = (y / z) * ((9.0 * x) / c);
} else if (t <= -4.1e-300) {
tmp = b / (z * c);
} else if (t <= 1.18e-85) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * (t / c)) tmp = 0 if t <= -8.5e+138: tmp = t_1 elif t <= -1e+46: tmp = (x / (c / y)) * (9.0 / z) elif t <= -4.1e-224: tmp = (b / z) / c elif t <= -4e-257: tmp = (y / z) * ((9.0 * x) / c) elif t <= -4.1e-300: tmp = b / (z * c) elif t <= 1.18e-85: tmp = 9.0 * ((y / c) * (x / z)) else: tmp = t_1 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -8.5e+138) tmp = t_1; elseif (t <= -1e+46) tmp = Float64(Float64(x / Float64(c / y)) * Float64(9.0 / z)); elseif (t <= -4.1e-224) tmp = Float64(Float64(b / z) / c); elseif (t <= -4e-257) tmp = Float64(Float64(y / z) * Float64(Float64(9.0 * x) / c)); elseif (t <= -4.1e-300) tmp = Float64(b / Float64(z * c)); elseif (t <= 1.18e-85) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -8.5e+138)
tmp = t_1;
elseif (t <= -1e+46)
tmp = (x / (c / y)) * (9.0 / z);
elseif (t <= -4.1e-224)
tmp = (b / z) / c;
elseif (t <= -4e-257)
tmp = (y / z) * ((9.0 * x) / c);
elseif (t <= -4.1e-300)
tmp = b / (z * c);
elseif (t <= 1.18e-85)
tmp = 9.0 * ((y / c) * (x / z));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+138], t$95$1, If[LessEqual[t, -1e+46], N[(N[(x / N[(c / y), $MachinePrecision]), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e-224], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, -4e-257], N[(N[(y / z), $MachinePrecision] * N[(N[(9.0 * x), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e-300], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.18e-85], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{\frac{c}{y}} \cdot \frac{9}{z}\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-224}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-257}:\\
\;\;\;\;\frac{y}{z} \cdot \frac{9 \cdot x}{c}\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-300}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq 1.18 \cdot 10^{-85}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -8.5000000000000006e138 or 1.18e-85 < t Initial program 70.3%
associate-+l-70.3%
*-commutative70.3%
associate-*r*72.2%
*-commutative72.2%
associate-+l-72.2%
Simplified72.2%
div-inv71.9%
associate-+l-71.9%
associate-*r*70.1%
associate-+l-70.1%
associate-*r*71.9%
associate-*l*71.9%
fma-neg72.9%
Applied egg-rr72.9%
Taylor expanded in x around 0 71.3%
associate--l+71.3%
associate-/l*80.2%
cancel-sign-sub-inv80.2%
metadata-eval80.2%
associate-/l*71.3%
+-commutative71.3%
associate-+r+71.3%
+-commutative71.3%
fma-def71.4%
*-commutative71.4%
times-frac74.1%
+-commutative74.1%
associate-/l*82.9%
*-commutative82.9%
Simplified86.3%
Taylor expanded in z around inf 45.9%
*-commutative45.9%
associate-/l*54.5%
associate-/r/59.3%
Simplified59.3%
if -8.5000000000000006e138 < t < -9.9999999999999999e45Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
Simplified83.6%
div-inv83.5%
associate-+l-83.5%
associate-*r*91.5%
associate-+l-91.5%
associate-*r*83.5%
associate-*l*83.6%
fma-neg83.6%
Applied egg-rr83.6%
Taylor expanded in x around inf 43.1%
associate-*r/43.2%
*-commutative43.2%
times-frac43.0%
associate-/l*39.0%
Simplified39.0%
Taylor expanded in y around 0 43.0%
*-commutative43.0%
associate-/l*43.1%
Simplified43.1%
if -9.9999999999999999e45 < t < -4.09999999999999986e-224Initial program 76.8%
associate-+l-76.8%
*-commutative76.8%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
Simplified75.3%
div-inv75.3%
associate-+l-75.3%
associate-*r*76.7%
associate-+l-76.7%
associate-*r*75.3%
associate-*l*75.3%
fma-neg75.3%
Applied egg-rr75.3%
Taylor expanded in b around inf 42.5%
associate-/l/45.4%
Simplified45.4%
if -4.09999999999999986e-224 < t < -3.9999999999999999e-257Initial program 86.0%
associate-+l-86.0%
*-commutative86.0%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
Simplified86.0%
div-inv85.6%
associate-+l-85.6%
associate-*r*85.6%
associate-+l-85.6%
associate-*r*85.6%
associate-*l*85.4%
fma-neg85.4%
Applied egg-rr85.4%
Taylor expanded in x around inf 72.3%
associate-*r/72.1%
*-commutative72.1%
associate-*r*72.3%
*-commutative72.3%
times-frac43.5%
*-commutative43.5%
Simplified43.5%
if -3.9999999999999999e-257 < t < -4.1000000000000001e-300Initial program 90.5%
associate-+l-90.5%
*-commutative90.5%
associate-*r*73.5%
*-commutative73.5%
associate-+l-73.5%
Simplified90.5%
Taylor expanded in b around inf 82.1%
*-commutative82.1%
Simplified82.1%
if -4.1000000000000001e-300 < t < 1.18e-85Initial program 89.2%
associate-+l-89.2%
*-commutative89.2%
associate-*r*78.6%
*-commutative78.6%
associate-+l-78.6%
Simplified89.2%
Taylor expanded in x around inf 43.5%
times-frac50.2%
Simplified50.2%
Final simplification53.3%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* y (/ 9.0 z)) (/ c x))) (t_2 (* -4.0 (* a (/ t c)))))
(if (<= t -9e+138)
t_2
(if (<= t -2.6e+47)
(* (/ x (/ c y)) (/ 9.0 z))
(if (<= t -5.5e-227)
(/ (/ b z) c)
(if (<= t -1.3e-255)
t_1
(if (<= t -3.35e-301)
(/ b (* z c))
(if (<= t 1.55e-25) t_1 t_2))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (y * (9.0 / z)) / (c / x);
double t_2 = -4.0 * (a * (t / c));
double tmp;
if (t <= -9e+138) {
tmp = t_2;
} else if (t <= -2.6e+47) {
tmp = (x / (c / y)) * (9.0 / z);
} else if (t <= -5.5e-227) {
tmp = (b / z) / c;
} else if (t <= -1.3e-255) {
tmp = t_1;
} else if (t <= -3.35e-301) {
tmp = b / (z * c);
} else if (t <= 1.55e-25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * (9.0d0 / z)) / (c / x)
t_2 = (-4.0d0) * (a * (t / c))
if (t <= (-9d+138)) then
tmp = t_2
else if (t <= (-2.6d+47)) then
tmp = (x / (c / y)) * (9.0d0 / z)
else if (t <= (-5.5d-227)) then
tmp = (b / z) / c
else if (t <= (-1.3d-255)) then
tmp = t_1
else if (t <= (-3.35d-301)) then
tmp = b / (z * c)
else if (t <= 1.55d-25) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (y * (9.0 / z)) / (c / x);
double t_2 = -4.0 * (a * (t / c));
double tmp;
if (t <= -9e+138) {
tmp = t_2;
} else if (t <= -2.6e+47) {
tmp = (x / (c / y)) * (9.0 / z);
} else if (t <= -5.5e-227) {
tmp = (b / z) / c;
} else if (t <= -1.3e-255) {
tmp = t_1;
} else if (t <= -3.35e-301) {
tmp = b / (z * c);
} else if (t <= 1.55e-25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (y * (9.0 / z)) / (c / x) t_2 = -4.0 * (a * (t / c)) tmp = 0 if t <= -9e+138: tmp = t_2 elif t <= -2.6e+47: tmp = (x / (c / y)) * (9.0 / z) elif t <= -5.5e-227: tmp = (b / z) / c elif t <= -1.3e-255: tmp = t_1 elif t <= -3.35e-301: tmp = b / (z * c) elif t <= 1.55e-25: tmp = t_1 else: tmp = t_2 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(y * Float64(9.0 / z)) / Float64(c / x)) t_2 = Float64(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -9e+138) tmp = t_2; elseif (t <= -2.6e+47) tmp = Float64(Float64(x / Float64(c / y)) * Float64(9.0 / z)); elseif (t <= -5.5e-227) tmp = Float64(Float64(b / z) / c); elseif (t <= -1.3e-255) tmp = t_1; elseif (t <= -3.35e-301) tmp = Float64(b / Float64(z * c)); elseif (t <= 1.55e-25) tmp = t_1; else tmp = t_2; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (y * (9.0 / z)) / (c / x);
t_2 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -9e+138)
tmp = t_2;
elseif (t <= -2.6e+47)
tmp = (x / (c / y)) * (9.0 / z);
elseif (t <= -5.5e-227)
tmp = (b / z) / c;
elseif (t <= -1.3e-255)
tmp = t_1;
elseif (t <= -3.35e-301)
tmp = b / (z * c);
elseif (t <= 1.55e-25)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(y * N[(9.0 / z), $MachinePrecision]), $MachinePrecision] / N[(c / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+138], t$95$2, If[LessEqual[t, -2.6e+47], N[(N[(x / N[(c / y), $MachinePrecision]), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-227], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, -1.3e-255], t$95$1, If[LessEqual[t, -3.35e-301], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e-25], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{y \cdot \frac{9}{z}}{\frac{c}{x}}\\
t_2 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{+138}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{+47}:\\
\;\;\;\;\frac{x}{\frac{c}{y}} \cdot \frac{9}{z}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-227}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-255}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.35 \cdot 10^{-301}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -8.99999999999999963e138 or 1.54999999999999997e-25 < t Initial program 69.2%
associate-+l-69.2%
*-commutative69.2%
associate-*r*71.4%
*-commutative71.4%
associate-+l-71.4%
Simplified71.4%
div-inv71.1%
associate-+l-71.1%
associate-*r*69.0%
associate-+l-69.0%
associate-*r*71.1%
associate-*l*71.1%
fma-neg72.2%
Applied egg-rr72.2%
Taylor expanded in x around 0 71.5%
associate--l+71.5%
associate-/l*81.6%
cancel-sign-sub-inv81.6%
metadata-eval81.6%
associate-/l*71.5%
+-commutative71.5%
associate-+r+71.5%
+-commutative71.5%
fma-def71.5%
*-commutative71.5%
times-frac72.6%
+-commutative72.6%
associate-/l*82.6%
*-commutative82.6%
Simplified85.5%
Taylor expanded in z around inf 49.8%
*-commutative49.8%
associate-/l*59.7%
associate-/r/65.1%
Simplified65.1%
if -8.99999999999999963e138 < t < -2.60000000000000003e47Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
Simplified83.6%
div-inv83.5%
associate-+l-83.5%
associate-*r*91.5%
associate-+l-91.5%
associate-*r*83.5%
associate-*l*83.6%
fma-neg83.6%
Applied egg-rr83.6%
Taylor expanded in x around inf 43.1%
associate-*r/43.2%
*-commutative43.2%
times-frac43.0%
associate-/l*39.0%
Simplified39.0%
Taylor expanded in y around 0 43.0%
*-commutative43.0%
associate-/l*43.1%
Simplified43.1%
if -2.60000000000000003e47 < t < -5.5e-227Initial program 76.8%
associate-+l-76.8%
*-commutative76.8%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
Simplified75.3%
div-inv75.3%
associate-+l-75.3%
associate-*r*76.7%
associate-+l-76.7%
associate-*r*75.3%
associate-*l*75.3%
fma-neg75.3%
Applied egg-rr75.3%
Taylor expanded in b around inf 42.5%
associate-/l/45.4%
Simplified45.4%
if -5.5e-227 < t < -1.3000000000000001e-255 or -3.35000000000000011e-301 < t < 1.54999999999999997e-25Initial program 86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
Simplified86.6%
div-inv86.4%
associate-+l-86.4%
associate-*r*86.5%
associate-+l-86.5%
associate-*r*86.4%
associate-*l*86.5%
fma-neg86.5%
Applied egg-rr86.5%
Taylor expanded in x around inf 44.4%
associate-*r/44.4%
*-commutative44.4%
times-frac47.6%
associate-/l*47.6%
Simplified47.6%
associate-*l/48.7%
Applied egg-rr48.7%
if -1.3000000000000001e-255 < t < -3.35000000000000011e-301Initial program 90.5%
associate-+l-90.5%
*-commutative90.5%
associate-*r*73.5%
*-commutative73.5%
associate-+l-73.5%
Simplified90.5%
Taylor expanded in b around inf 82.1%
*-commutative82.1%
Simplified82.1%
Final simplification54.7%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 c)))))
(if (<= t -2.1e+139)
t_1
(if (<= t -1.75e+47)
(* 9.0 (/ (* y x) (* z c)))
(if (<= t -2.8e-301)
(/ (/ b z) c)
(if (<= t 3.5e-86) (* 9.0 (* (/ y c) (/ x z))) t_1))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * (t / c));
double tmp;
if (t <= -2.1e+139) {
tmp = t_1;
} else if (t <= -1.75e+47) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (t <= -2.8e-301) {
tmp = (b / z) / c;
} else if (t <= 3.5e-86) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / c))
if (t <= (-2.1d+139)) then
tmp = t_1
else if (t <= (-1.75d+47)) then
tmp = 9.0d0 * ((y * x) / (z * c))
else if (t <= (-2.8d-301)) then
tmp = (b / z) / c
else if (t <= 3.5d-86) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
assert t < a;
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 / c));
double tmp;
if (t <= -2.1e+139) {
tmp = t_1;
} else if (t <= -1.75e+47) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (t <= -2.8e-301) {
tmp = (b / z) / c;
} else if (t <= 3.5e-86) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * (t / c)) tmp = 0 if t <= -2.1e+139: tmp = t_1 elif t <= -1.75e+47: tmp = 9.0 * ((y * x) / (z * c)) elif t <= -2.8e-301: tmp = (b / z) / c elif t <= 3.5e-86: tmp = 9.0 * ((y / c) * (x / z)) else: tmp = t_1 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -2.1e+139) tmp = t_1; elseif (t <= -1.75e+47) tmp = Float64(9.0 * Float64(Float64(y * x) / Float64(z * c))); elseif (t <= -2.8e-301) tmp = Float64(Float64(b / z) / c); elseif (t <= 3.5e-86) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -2.1e+139)
tmp = t_1;
elseif (t <= -1.75e+47)
tmp = 9.0 * ((y * x) / (z * c));
elseif (t <= -2.8e-301)
tmp = (b / z) / c;
elseif (t <= 3.5e-86)
tmp = 9.0 * ((y / c) * (x / z));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+139], t$95$1, If[LessEqual[t, -1.75e+47], N[(9.0 * N[(N[(y * x), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.8e-301], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, 3.5e-86], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{+47}:\\
\;\;\;\;9 \cdot \frac{y \cdot x}{z \cdot c}\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-301}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-86}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.0999999999999999e139 or 3.50000000000000021e-86 < t Initial program 70.6%
associate-+l-70.6%
*-commutative70.6%
associate-*r*72.4%
*-commutative72.4%
associate-+l-72.4%
Simplified72.4%
div-inv72.2%
associate-+l-72.2%
associate-*r*70.3%
associate-+l-70.3%
associate-*r*72.2%
associate-*l*72.2%
fma-neg73.1%
Applied egg-rr73.1%
Taylor expanded in x around 0 71.6%
associate--l+71.6%
associate-/l*80.4%
cancel-sign-sub-inv80.4%
metadata-eval80.4%
associate-/l*71.6%
+-commutative71.6%
associate-+r+71.6%
+-commutative71.6%
fma-def71.6%
*-commutative71.6%
times-frac74.3%
+-commutative74.3%
associate-/l*83.1%
*-commutative83.1%
Simplified86.4%
Taylor expanded in z around inf 45.5%
*-commutative45.5%
associate-/l*54.0%
associate-/r/58.7%
Simplified58.7%
if -2.0999999999999999e139 < t < -1.75000000000000008e47Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
Simplified83.6%
Taylor expanded in x around inf 43.1%
if -1.75000000000000008e47 < t < -2.8000000000000001e-301Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
Simplified78.3%
div-inv78.2%
associate-+l-78.2%
associate-*r*79.3%
associate-+l-79.3%
associate-*r*78.2%
associate-*l*78.2%
fma-neg78.2%
Applied egg-rr78.2%
Taylor expanded in b around inf 45.6%
associate-/l/45.6%
Simplified45.6%
if -2.8000000000000001e-301 < t < 3.50000000000000021e-86Initial program 89.0%
associate-+l-89.0%
*-commutative89.0%
associate-*r*78.1%
*-commutative78.1%
associate-+l-78.1%
Simplified88.9%
Taylor expanded in x around inf 42.3%
times-frac49.2%
Simplified49.2%
Final simplification51.4%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 c)))))
(if (<= t -2.1e+139)
t_1
(if (<= t -1.8e+45)
(* (/ x (/ c y)) (/ 9.0 z))
(if (<= t -5.9e-300)
(/ (/ b z) c)
(if (<= t 1.5e-85) (* 9.0 (* (/ y c) (/ x z))) t_1))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * (t / c));
double tmp;
if (t <= -2.1e+139) {
tmp = t_1;
} else if (t <= -1.8e+45) {
tmp = (x / (c / y)) * (9.0 / z);
} else if (t <= -5.9e-300) {
tmp = (b / z) / c;
} else if (t <= 1.5e-85) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / c))
if (t <= (-2.1d+139)) then
tmp = t_1
else if (t <= (-1.8d+45)) then
tmp = (x / (c / y)) * (9.0d0 / z)
else if (t <= (-5.9d-300)) then
tmp = (b / z) / c
else if (t <= 1.5d-85) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
assert t < a;
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 / c));
double tmp;
if (t <= -2.1e+139) {
tmp = t_1;
} else if (t <= -1.8e+45) {
tmp = (x / (c / y)) * (9.0 / z);
} else if (t <= -5.9e-300) {
tmp = (b / z) / c;
} else if (t <= 1.5e-85) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * (t / c)) tmp = 0 if t <= -2.1e+139: tmp = t_1 elif t <= -1.8e+45: tmp = (x / (c / y)) * (9.0 / z) elif t <= -5.9e-300: tmp = (b / z) / c elif t <= 1.5e-85: tmp = 9.0 * ((y / c) * (x / z)) else: tmp = t_1 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -2.1e+139) tmp = t_1; elseif (t <= -1.8e+45) tmp = Float64(Float64(x / Float64(c / y)) * Float64(9.0 / z)); elseif (t <= -5.9e-300) tmp = Float64(Float64(b / z) / c); elseif (t <= 1.5e-85) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -2.1e+139)
tmp = t_1;
elseif (t <= -1.8e+45)
tmp = (x / (c / y)) * (9.0 / z);
elseif (t <= -5.9e-300)
tmp = (b / z) / c;
elseif (t <= 1.5e-85)
tmp = 9.0 * ((y / c) * (x / z));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+139], t$95$1, If[LessEqual[t, -1.8e+45], N[(N[(x / N[(c / y), $MachinePrecision]), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.9e-300], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, 1.5e-85], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+45}:\\
\;\;\;\;\frac{x}{\frac{c}{y}} \cdot \frac{9}{z}\\
\mathbf{elif}\;t \leq -5.9 \cdot 10^{-300}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-85}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.0999999999999999e139 or 1.50000000000000011e-85 < t Initial program 70.3%
associate-+l-70.3%
*-commutative70.3%
associate-*r*72.2%
*-commutative72.2%
associate-+l-72.2%
Simplified72.2%
div-inv71.9%
associate-+l-71.9%
associate-*r*70.1%
associate-+l-70.1%
associate-*r*71.9%
associate-*l*71.9%
fma-neg72.9%
Applied egg-rr72.9%
Taylor expanded in x around 0 71.3%
associate--l+71.3%
associate-/l*80.2%
cancel-sign-sub-inv80.2%
metadata-eval80.2%
associate-/l*71.3%
+-commutative71.3%
associate-+r+71.3%
+-commutative71.3%
fma-def71.4%
*-commutative71.4%
times-frac74.1%
+-commutative74.1%
associate-/l*82.9%
*-commutative82.9%
Simplified86.3%
Taylor expanded in z around inf 45.9%
*-commutative45.9%
associate-/l*54.5%
associate-/r/59.3%
Simplified59.3%
if -2.0999999999999999e139 < t < -1.8e45Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
Simplified83.6%
div-inv83.5%
associate-+l-83.5%
associate-*r*91.5%
associate-+l-91.5%
associate-*r*83.5%
associate-*l*83.6%
fma-neg83.6%
Applied egg-rr83.6%
Taylor expanded in x around inf 43.1%
associate-*r/43.2%
*-commutative43.2%
times-frac43.0%
associate-/l*39.0%
Simplified39.0%
Taylor expanded in y around 0 43.0%
*-commutative43.0%
associate-/l*43.1%
Simplified43.1%
if -1.8e45 < t < -5.8999999999999998e-300Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
Simplified78.3%
div-inv78.2%
associate-+l-78.2%
associate-*r*79.3%
associate-+l-79.3%
associate-*r*78.2%
associate-*l*78.2%
fma-neg78.2%
Applied egg-rr78.2%
Taylor expanded in b around inf 45.6%
associate-/l/45.6%
Simplified45.6%
if -5.8999999999999998e-300 < t < 1.50000000000000011e-85Initial program 89.2%
associate-+l-89.2%
*-commutative89.2%
associate-*r*78.6%
*-commutative78.6%
associate-+l-78.6%
Simplified89.2%
Taylor expanded in x around inf 43.5%
times-frac50.2%
Simplified50.2%
Final simplification51.8%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= t -1.7e+139) (/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* y x) z))) c) (if (<= t 2e-22) (/ (/ (+ b (* 9.0 (* y x))) z) c) (* -4.0 (* a (/ t c))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.7e+139) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((y * x) / z))) / c;
} else if (t <= 2e-22) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 (t <= (-1.7d+139)) then
tmp = (((-4.0d0) * (a * t)) + (9.0d0 * ((y * x) / z))) / c
else if (t <= 2d-22) then
tmp = ((b + (9.0d0 * (y * x))) / z) / c
else
tmp = (-4.0d0) * (a * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.7e+139) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((y * x) / z))) / c;
} else if (t <= 2e-22) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.7e+139: tmp = ((-4.0 * (a * t)) + (9.0 * ((y * x) / z))) / c elif t <= 2e-22: tmp = ((b + (9.0 * (y * x))) / z) / c else: tmp = -4.0 * (a * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.7e+139) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(y * x) / z))) / c); elseif (t <= 2e-22) tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) / c); else tmp = Float64(-4.0 * Float64(a * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.7e+139)
tmp = ((-4.0 * (a * t)) + (9.0 * ((y * x) / z))) / c;
elseif (t <= 2e-22)
tmp = ((b + (9.0 * (y * x))) / z) / c;
else
tmp = -4.0 * (a * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.7e+139], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, 2e-22], N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+139}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{y \cdot x}{z}}{c}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if t < -1.7000000000000001e139Initial program 83.2%
associate-+l-83.2%
*-commutative83.2%
associate-*r*87.4%
*-commutative87.4%
associate-+l-87.4%
Simplified87.4%
div-inv87.4%
associate-+l-87.4%
associate-*r*83.2%
associate-+l-83.2%
associate-*r*87.4%
associate-*l*87.4%
fma-neg87.4%
Applied egg-rr87.4%
Taylor expanded in x around 0 87.4%
associate--l+87.4%
associate-/l*79.0%
cancel-sign-sub-inv79.0%
metadata-eval79.0%
associate-/l*87.4%
+-commutative87.4%
associate-+r+87.4%
+-commutative87.4%
fma-def87.4%
*-commutative87.4%
times-frac91.7%
+-commutative91.7%
associate-/l*83.2%
*-commutative83.2%
Simplified83.5%
Taylor expanded in c around 0 91.6%
Taylor expanded in b around 0 88.0%
if -1.7000000000000001e139 < t < 2.0000000000000001e-22Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*78.6%
*-commutative78.6%
associate-+l-78.6%
Simplified82.1%
div-inv82.0%
associate-+l-82.0%
associate-*r*83.7%
associate-+l-83.7%
associate-*r*82.0%
associate-*l*82.0%
fma-neg82.0%
Applied egg-rr82.0%
Taylor expanded in x around 0 79.5%
associate--l+79.5%
associate-/l*76.6%
cancel-sign-sub-inv76.6%
metadata-eval76.6%
associate-/l*79.5%
+-commutative79.5%
associate-+r+79.5%
+-commutative79.5%
fma-def79.5%
*-commutative79.5%
times-frac85.9%
+-commutative85.9%
associate-/l*83.0%
*-commutative83.0%
Simplified83.5%
Taylor expanded in c around 0 87.5%
Taylor expanded in z around 0 69.0%
if 2.0000000000000001e-22 < t Initial program 64.3%
associate-+l-64.3%
*-commutative64.3%
associate-*r*65.8%
*-commutative65.8%
associate-+l-65.8%
Simplified65.8%
div-inv65.4%
associate-+l-65.4%
associate-*r*64.0%
associate-+l-64.0%
associate-*r*65.4%
associate-*l*65.4%
fma-neg66.8%
Applied egg-rr66.8%
Taylor expanded in x around 0 65.9%
associate--l+65.9%
associate-/l*82.5%
cancel-sign-sub-inv82.5%
metadata-eval82.5%
associate-/l*65.9%
+-commutative65.9%
associate-+r+65.9%
+-commutative65.9%
fma-def65.9%
*-commutative65.9%
times-frac65.9%
+-commutative65.9%
associate-/l*82.4%
*-commutative82.4%
Simplified86.3%
Taylor expanded in z around inf 44.9%
*-commutative44.9%
associate-/l*61.0%
associate-/r/62.9%
Simplified62.9%
Final simplification69.1%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 c)))))
(if (<= t -7.5e+131)
t_1
(if (<= t -2.3e+103)
(/ b (* z c))
(if (or (<= t -2.6e+37) (not (<= t 7.8e-85))) t_1 (/ (/ b z) c))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * (t / c));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if ((t <= -2.6e+37) || !(t <= 7.8e-85)) {
tmp = t_1;
} else {
tmp = (b / z) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / c))
if (t <= (-7.5d+131)) then
tmp = t_1
else if (t <= (-2.3d+103)) then
tmp = b / (z * c)
else if ((t <= (-2.6d+37)) .or. (.not. (t <= 7.8d-85))) then
tmp = t_1
else
tmp = (b / z) / c
end if
code = tmp
end function
assert x < y;
assert t < a;
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 / c));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if ((t <= -2.6e+37) || !(t <= 7.8e-85)) {
tmp = t_1;
} else {
tmp = (b / z) / c;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * (t / c)) tmp = 0 if t <= -7.5e+131: tmp = t_1 elif t <= -2.3e+103: tmp = b / (z * c) elif (t <= -2.6e+37) or not (t <= 7.8e-85): tmp = t_1 else: tmp = (b / z) / c return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -7.5e+131) tmp = t_1; elseif (t <= -2.3e+103) tmp = Float64(b / Float64(z * c)); elseif ((t <= -2.6e+37) || !(t <= 7.8e-85)) tmp = t_1; else tmp = Float64(Float64(b / z) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -7.5e+131)
tmp = t_1;
elseif (t <= -2.3e+103)
tmp = b / (z * c);
elseif ((t <= -2.6e+37) || ~((t <= 7.8e-85)))
tmp = t_1;
else
tmp = (b / z) / c;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+131], t$95$1, If[LessEqual[t, -2.3e+103], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.6e+37], N[Not[LessEqual[t, 7.8e-85]], $MachinePrecision]], t$95$1, N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+103}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{+37} \lor \neg \left(t \leq 7.8 \cdot 10^{-85}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if t < -7.4999999999999995e131 or -2.30000000000000008e103 < t < -2.5999999999999999e37 or 7.79999999999999977e-85 < t Initial program 72.4%
associate-+l-72.4%
*-commutative72.4%
associate-*r*74.1%
*-commutative74.1%
associate-+l-74.1%
Simplified72.5%
div-inv72.2%
associate-+l-72.2%
associate-*r*72.2%
associate-+l-72.2%
associate-*r*72.2%
associate-*l*72.2%
fma-neg73.0%
Applied egg-rr73.0%
Taylor expanded in x around 0 72.6%
associate--l+72.6%
associate-/l*81.6%
cancel-sign-sub-inv81.6%
metadata-eval81.6%
associate-/l*72.6%
+-commutative72.6%
associate-+r+72.6%
+-commutative72.6%
fma-def72.6%
*-commutative72.6%
times-frac74.1%
+-commutative74.1%
associate-/l*83.1%
*-commutative83.1%
Simplified86.2%
Taylor expanded in z around inf 44.8%
*-commutative44.8%
associate-/l*53.0%
associate-/r/57.6%
Simplified57.6%
if -7.4999999999999995e131 < t < -2.30000000000000008e103Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if -2.5999999999999999e37 < t < 7.79999999999999977e-85Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*76.6%
*-commutative76.6%
associate-+l-76.6%
Simplified82.8%
div-inv82.7%
associate-+l-82.7%
associate-*r*83.4%
associate-+l-83.4%
associate-*r*82.7%
associate-*l*82.7%
fma-neg82.7%
Applied egg-rr82.7%
Taylor expanded in b around inf 46.1%
associate-/l/45.3%
Simplified45.3%
Final simplification51.6%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 c)))))
(if (<= t -7.5e+131)
t_1
(if (<= t -2.3e+103)
(/ b (* z c))
(if (<= t -3.1e+38)
(* -4.0 (/ a (/ c t)))
(if (<= t 1.2e-84) (/ (/ b z) c) t_1))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * (t / c));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if (t <= -3.1e+38) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 1.2e-84) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / c))
if (t <= (-7.5d+131)) then
tmp = t_1
else if (t <= (-2.3d+103)) then
tmp = b / (z * c)
else if (t <= (-3.1d+38)) then
tmp = (-4.0d0) * (a / (c / t))
else if (t <= 1.2d-84) then
tmp = (b / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
assert t < a;
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 / c));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if (t <= -3.1e+38) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 1.2e-84) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * (t / c)) tmp = 0 if t <= -7.5e+131: tmp = t_1 elif t <= -2.3e+103: tmp = b / (z * c) elif t <= -3.1e+38: tmp = -4.0 * (a / (c / t)) elif t <= 1.2e-84: tmp = (b / z) / c else: tmp = t_1 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -7.5e+131) tmp = t_1; elseif (t <= -2.3e+103) tmp = Float64(b / Float64(z * c)); elseif (t <= -3.1e+38) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (t <= 1.2e-84) tmp = Float64(Float64(b / z) / c); else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -7.5e+131)
tmp = t_1;
elseif (t <= -2.3e+103)
tmp = b / (z * c);
elseif (t <= -3.1e+38)
tmp = -4.0 * (a / (c / t));
elseif (t <= 1.2e-84)
tmp = (b / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+131], t$95$1, If[LessEqual[t, -2.3e+103], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.1e+38], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-84], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+103}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{+38}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-84}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.4999999999999995e131 or 1.20000000000000009e-84 < t Initial program 70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*72.7%
*-commutative72.7%
associate-+l-72.7%
Simplified72.7%
div-inv72.4%
associate-+l-72.4%
associate-*r*70.6%
associate-+l-70.6%
associate-*r*72.4%
associate-*l*72.4%
fma-neg73.4%
Applied egg-rr73.4%
Taylor expanded in x around 0 71.9%
associate--l+71.9%
associate-/l*80.5%
cancel-sign-sub-inv80.5%
metadata-eval80.5%
associate-/l*71.9%
+-commutative71.9%
associate-+r+71.9%
+-commutative71.9%
fma-def71.9%
*-commutative71.9%
times-frac73.7%
+-commutative73.7%
associate-/l*82.3%
*-commutative82.3%
Simplified85.7%
Taylor expanded in z around inf 45.1%
*-commutative45.1%
associate-/l*53.6%
associate-/r/58.2%
Simplified58.2%
if -7.4999999999999995e131 < t < -2.30000000000000008e103Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if -2.30000000000000008e103 < t < -3.10000000000000018e38Initial program 82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*82.6%
*-commutative82.6%
associate-+l-82.6%
Simplified71.1%
div-inv71.1%
associate-+l-71.1%
associate-*r*82.4%
associate-+l-82.4%
associate-*r*71.1%
associate-*l*71.1%
fma-neg71.1%
Applied egg-rr71.1%
Taylor expanded in x around 0 77.0%
associate--l+77.0%
associate-/l*88.0%
cancel-sign-sub-inv88.0%
metadata-eval88.0%
associate-/l*77.0%
+-commutative77.0%
associate-+r+77.0%
+-commutative77.0%
fma-def77.0%
*-commutative77.0%
times-frac77.0%
+-commutative77.0%
associate-/l*87.9%
*-commutative87.9%
Simplified89.0%
Taylor expanded in z around inf 43.0%
associate-/l*53.9%
Simplified53.9%
if -3.10000000000000018e38 < t < 1.20000000000000009e-84Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*76.6%
*-commutative76.6%
associate-+l-76.6%
Simplified82.8%
div-inv82.7%
associate-+l-82.7%
associate-*r*83.4%
associate-+l-83.4%
associate-*r*82.7%
associate-*l*82.7%
fma-neg82.7%
Applied egg-rr82.7%
Taylor expanded in b around inf 46.1%
associate-/l/45.3%
Simplified45.3%
Final simplification51.6%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 c)))))
(if (<= t -7.5e+131)
t_1
(if (<= t -2.3e+103)
(/ b (* z c))
(if (<= t -2.9e+37)
(* -4.0 (/ a (/ c t)))
(if (<= t 3.6e-84) (* (/ b z) (/ 1.0 c)) t_1))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * (t / c));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if (t <= -2.9e+37) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 3.6e-84) {
tmp = (b / z) * (1.0 / c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / c))
if (t <= (-7.5d+131)) then
tmp = t_1
else if (t <= (-2.3d+103)) then
tmp = b / (z * c)
else if (t <= (-2.9d+37)) then
tmp = (-4.0d0) * (a / (c / t))
else if (t <= 3.6d-84) then
tmp = (b / z) * (1.0d0 / c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
assert t < a;
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 / c));
double tmp;
if (t <= -7.5e+131) {
tmp = t_1;
} else if (t <= -2.3e+103) {
tmp = b / (z * c);
} else if (t <= -2.9e+37) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 3.6e-84) {
tmp = (b / z) * (1.0 / c);
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * (t / c)) tmp = 0 if t <= -7.5e+131: tmp = t_1 elif t <= -2.3e+103: tmp = b / (z * c) elif t <= -2.9e+37: tmp = -4.0 * (a / (c / t)) elif t <= 3.6e-84: tmp = (b / z) * (1.0 / c) else: tmp = t_1 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -7.5e+131) tmp = t_1; elseif (t <= -2.3e+103) tmp = Float64(b / Float64(z * c)); elseif (t <= -2.9e+37) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (t <= 3.6e-84) tmp = Float64(Float64(b / z) * Float64(1.0 / c)); else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -7.5e+131)
tmp = t_1;
elseif (t <= -2.3e+103)
tmp = b / (z * c);
elseif (t <= -2.9e+37)
tmp = -4.0 * (a / (c / t));
elseif (t <= 3.6e-84)
tmp = (b / z) * (1.0 / c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+131], t$95$1, If[LessEqual[t, -2.3e+103], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.9e+37], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-84], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+103}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{+37}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-84}:\\
\;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.4999999999999995e131 or 3.60000000000000003e-84 < t Initial program 70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*72.7%
*-commutative72.7%
associate-+l-72.7%
Simplified72.7%
div-inv72.4%
associate-+l-72.4%
associate-*r*70.6%
associate-+l-70.6%
associate-*r*72.4%
associate-*l*72.4%
fma-neg73.4%
Applied egg-rr73.4%
Taylor expanded in x around 0 71.9%
associate--l+71.9%
associate-/l*80.5%
cancel-sign-sub-inv80.5%
metadata-eval80.5%
associate-/l*71.9%
+-commutative71.9%
associate-+r+71.9%
+-commutative71.9%
fma-def71.9%
*-commutative71.9%
times-frac73.7%
+-commutative73.7%
associate-/l*82.3%
*-commutative82.3%
Simplified85.7%
Taylor expanded in z around inf 45.1%
*-commutative45.1%
associate-/l*53.6%
associate-/r/58.2%
Simplified58.2%
if -7.4999999999999995e131 < t < -2.30000000000000008e103Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if -2.30000000000000008e103 < t < -2.89999999999999978e37Initial program 82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*82.6%
*-commutative82.6%
associate-+l-82.6%
Simplified71.1%
div-inv71.1%
associate-+l-71.1%
associate-*r*82.4%
associate-+l-82.4%
associate-*r*71.1%
associate-*l*71.1%
fma-neg71.1%
Applied egg-rr71.1%
Taylor expanded in x around 0 77.0%
associate--l+77.0%
associate-/l*88.0%
cancel-sign-sub-inv88.0%
metadata-eval88.0%
associate-/l*77.0%
+-commutative77.0%
associate-+r+77.0%
+-commutative77.0%
fma-def77.0%
*-commutative77.0%
times-frac77.0%
+-commutative77.0%
associate-/l*87.9%
*-commutative87.9%
Simplified89.0%
Taylor expanded in z around inf 43.0%
associate-/l*53.9%
Simplified53.9%
if -2.89999999999999978e37 < t < 3.60000000000000003e-84Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*76.6%
*-commutative76.6%
associate-+l-76.6%
Simplified82.8%
div-inv82.7%
associate-+l-82.7%
associate-*r*83.4%
associate-+l-83.4%
associate-*r*82.7%
associate-*l*82.7%
fma-neg82.7%
Applied egg-rr82.7%
Taylor expanded in b around inf 46.1%
associate-/l/45.3%
Simplified45.3%
div-inv45.3%
Applied egg-rr45.3%
Final simplification51.6%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1.1e+139) (not (<= t 7.2e-22))) (* -4.0 (* a (/ t c))) (/ (+ b (* 9.0 (* y x))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.1e+139) || !(t <= 7.2e-22)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + (9.0 * (y * x))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 ((t <= (-1.1d+139)) .or. (.not. (t <= 7.2d-22))) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = (b + (9.0d0 * (y * x))) / (z * c)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.1e+139) || !(t <= 7.2e-22)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + (9.0 * (y * x))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.1e+139) or not (t <= 7.2e-22): tmp = -4.0 * (a * (t / c)) else: tmp = (b + (9.0 * (y * x))) / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.1e+139) || !(t <= 7.2e-22)) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((t <= -1.1e+139) || ~((t <= 7.2e-22)))
tmp = -4.0 * (a * (t / c));
else
tmp = (b + (9.0 * (y * x))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.1e+139], N[Not[LessEqual[t, 7.2e-22]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+139} \lor \neg \left(t \leq 7.2 \cdot 10^{-22}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if t < -1.1e139 or 7.1999999999999996e-22 < t Initial program 69.2%
associate-+l-69.2%
*-commutative69.2%
associate-*r*71.4%
*-commutative71.4%
associate-+l-71.4%
Simplified71.4%
div-inv71.1%
associate-+l-71.1%
associate-*r*69.0%
associate-+l-69.0%
associate-*r*71.1%
associate-*l*71.1%
fma-neg72.2%
Applied egg-rr72.2%
Taylor expanded in x around 0 71.5%
associate--l+71.5%
associate-/l*81.6%
cancel-sign-sub-inv81.6%
metadata-eval81.6%
associate-/l*71.5%
+-commutative71.5%
associate-+r+71.5%
+-commutative71.5%
fma-def71.5%
*-commutative71.5%
times-frac72.6%
+-commutative72.6%
associate-/l*82.6%
*-commutative82.6%
Simplified85.5%
Taylor expanded in z around inf 49.8%
*-commutative49.8%
associate-/l*59.7%
associate-/r/65.1%
Simplified65.1%
if -1.1e139 < t < 7.1999999999999996e-22Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*78.6%
*-commutative78.6%
associate-+l-78.6%
Simplified82.1%
Taylor expanded in x around inf 67.9%
Final simplification66.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1.05e+139) (not (<= t 7.2e-22))) (* -4.0 (* a (/ t c))) (/ (/ (+ b (* 9.0 (* y x))) z) c)))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.05e+139) || !(t <= 7.2e-22)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = ((b + (9.0 * (y * x))) / z) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 ((t <= (-1.05d+139)) .or. (.not. (t <= 7.2d-22))) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = ((b + (9.0d0 * (y * x))) / z) / c
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.05e+139) || !(t <= 7.2e-22)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = ((b + (9.0 * (y * x))) / z) / c;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.05e+139) or not (t <= 7.2e-22): tmp = -4.0 * (a * (t / c)) else: tmp = ((b + (9.0 * (y * x))) / z) / c return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.05e+139) || !(t <= 7.2e-22)) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((t <= -1.05e+139) || ~((t <= 7.2e-22)))
tmp = -4.0 * (a * (t / c));
else
tmp = ((b + (9.0 * (y * x))) / z) / c;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.05e+139], N[Not[LessEqual[t, 7.2e-22]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+139} \lor \neg \left(t \leq 7.2 \cdot 10^{-22}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z}}{c}\\
\end{array}
\end{array}
if t < -1.0499999999999999e139 or 7.1999999999999996e-22 < t Initial program 69.2%
associate-+l-69.2%
*-commutative69.2%
associate-*r*71.4%
*-commutative71.4%
associate-+l-71.4%
Simplified71.4%
div-inv71.1%
associate-+l-71.1%
associate-*r*69.0%
associate-+l-69.0%
associate-*r*71.1%
associate-*l*71.1%
fma-neg72.2%
Applied egg-rr72.2%
Taylor expanded in x around 0 71.5%
associate--l+71.5%
associate-/l*81.6%
cancel-sign-sub-inv81.6%
metadata-eval81.6%
associate-/l*71.5%
+-commutative71.5%
associate-+r+71.5%
+-commutative71.5%
fma-def71.5%
*-commutative71.5%
times-frac72.6%
+-commutative72.6%
associate-/l*82.6%
*-commutative82.6%
Simplified85.5%
Taylor expanded in z around inf 49.8%
*-commutative49.8%
associate-/l*59.7%
associate-/r/65.1%
Simplified65.1%
if -1.0499999999999999e139 < t < 7.1999999999999996e-22Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*78.6%
*-commutative78.6%
associate-+l-78.6%
Simplified82.1%
div-inv82.0%
associate-+l-82.0%
associate-*r*83.7%
associate-+l-83.7%
associate-*r*82.0%
associate-*l*82.0%
fma-neg82.0%
Applied egg-rr82.0%
Taylor expanded in x around 0 79.5%
associate--l+79.5%
associate-/l*76.6%
cancel-sign-sub-inv76.6%
metadata-eval76.6%
associate-/l*79.5%
+-commutative79.5%
associate-+r+79.5%
+-commutative79.5%
fma-def79.5%
*-commutative79.5%
times-frac85.9%
+-commutative85.9%
associate-/l*83.0%
*-commutative83.0%
Simplified83.5%
Taylor expanded in c around 0 87.5%
Taylor expanded in z around 0 69.0%
Final simplification67.6%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z 1000000000000.0) (/ b (* z c)) (/ (/ b z) c)))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1000000000000.0) {
tmp = b / (z * c);
} else {
tmp = (b / z) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 <= 1000000000000.0d0) then
tmp = b / (z * c)
else
tmp = (b / z) / c
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1000000000000.0) {
tmp = b / (z * c);
} else {
tmp = (b / z) / c;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1000000000000.0: tmp = b / (z * c) else: tmp = (b / z) / c return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1000000000000.0) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(b / z) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= 1000000000000.0)
tmp = b / (z * c);
else
tmp = (b / z) / c;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1000000000000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1000000000000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if z < 1e12Initial program 86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
Simplified86.0%
Taylor expanded in b around inf 40.4%
*-commutative40.4%
Simplified40.4%
if 1e12 < z Initial program 58.2%
associate-+l-58.2%
*-commutative58.2%
associate-*r*58.2%
*-commutative58.2%
associate-+l-58.2%
Simplified58.4%
div-inv58.3%
associate-+l-58.3%
associate-*r*58.1%
associate-+l-58.1%
associate-*r*58.3%
associate-*l*58.3%
fma-neg58.3%
Applied egg-rr58.3%
Taylor expanded in b around inf 21.1%
associate-/l/27.7%
Simplified27.7%
Final simplification36.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a 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);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a 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] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 78.6%
associate-+l-78.6%
*-commutative78.6%
associate-*r*76.0%
*-commutative76.0%
associate-+l-76.0%
Simplified78.2%
Taylor expanded in b around inf 35.0%
*-commutative35.0%
Simplified35.0%
Final simplification35.0%
(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 2023279
(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)))