
(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 13 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: 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.4e+77) (not (<= z 2e-18))) (* (fma -4.0 (* a t) (fma 9.0 (/ x (/ z y)) (/ b z))) (/ 1.0 c)) (/ (fma x (* 9.0 y) (+ b (* t (* a (* z -4.0))))) (* z c))))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.4e+77) || !(z <= 2e-18)) {
tmp = fma(-4.0, (a * t), fma(9.0, (x / (z / y)), (b / z))) * (1.0 / c);
} else {
tmp = fma(x, (9.0 * y), (b + (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.4e+77) || !(z <= 2e-18)) tmp = Float64(fma(-4.0, Float64(a * t), fma(9.0, Float64(x / Float64(z / y)), Float64(b / z))) * Float64(1.0 / c)); else tmp = Float64(fma(x, Float64(9.0 * y), Float64(b + Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
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.4e+77], N[Not[LessEqual[z, 2e-18]], $MachinePrecision]], N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(9.0 * N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], N[(N[(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}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+77} \lor \neg \left(z \leq 2 \cdot 10^{-18}\right):\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x}{\frac{z}{y}}, \frac{b}{z}\right)\right) \cdot \frac{1}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\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 < -3.39999999999999997e77 or 2.0000000000000001e-18 < z Initial program 60.8%
associate-+l-60.8%
*-commutative60.8%
associate-*r*58.0%
*-commutative58.0%
associate-+l-58.0%
Simplified64.3%
associate-/r*77.2%
div-inv77.1%
associate-+l-77.1%
associate-*r*68.4%
associate-+l-68.4%
associate-*l*68.4%
associate-*r*77.1%
Applied egg-rr77.1%
Taylor expanded in x around 0 87.2%
cancel-sign-sub-inv87.2%
metadata-eval87.2%
+-commutative87.2%
fma-def87.2%
fma-def87.3%
associate-/l*92.8%
Simplified92.8%
if -3.39999999999999997e77 < z < 2.0000000000000001e-18Initial program 95.0%
associate-+l-95.0%
associate-*l*95.1%
fma-neg95.1%
neg-sub095.1%
associate-+l-95.1%
neg-sub095.1%
+-commutative95.1%
distribute-rgt-neg-out95.1%
*-commutative95.1%
associate-*l*95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
distribute-rgt-neg-in95.4%
distribute-rgt-neg-in95.4%
metadata-eval95.4%
Simplified95.4%
Final simplification94.2%
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 (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c)))
(t_2 (/ (fma x (* 9.0 y) (+ b (* t (* a (* z -4.0))))) (* z c))))
(if (<= t_1 -1e+81)
t_2
(if (<= t_1 5e+146)
(* (/ 1.0 c) (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) z))
(if (<= t_1 INFINITY) t_2 (/ (+ (/ b z) (* -4.0 (* a t))) c))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double t_2 = fma(x, (9.0 * y), (b + (t * (a * (z * -4.0))))) / (z * c);
double tmp;
if (t_1 <= -1e+81) {
tmp = t_2;
} else if (t_1 <= 5e+146) {
tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / z);
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
}
return tmp;
}
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) t_2 = Float64(fma(x, Float64(9.0 * y), Float64(b + Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -1e+81) tmp = t_2; elseif (t_1 <= 5e+146) tmp = Float64(Float64(1.0 / c) * Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / z)); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(a * t))) / c); end return tmp end
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[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(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[t$95$1, -1e+81], t$95$2, If[LessEqual[t$95$1, 5e+146], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
t_2 := \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{if}\;t_1 \leq -1 \cdot 10^{+81}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+146}:\\
\;\;\;\;\frac{1}{c} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.99999999999999921e80 or 4.9999999999999999e146 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.1%
associate-+l-89.1%
associate-*l*89.1%
fma-neg89.1%
neg-sub089.1%
associate-+l-89.1%
neg-sub089.1%
+-commutative89.1%
distribute-rgt-neg-out89.1%
*-commutative89.1%
associate-*l*88.6%
distribute-rgt-neg-in88.6%
*-commutative88.6%
distribute-rgt-neg-in88.6%
distribute-rgt-neg-in88.6%
metadata-eval88.6%
Simplified88.6%
if -9.99999999999999921e80 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 4.9999999999999999e146Initial program 84.5%
associate-+l-84.5%
*-commutative84.5%
associate-*r*80.6%
*-commutative80.6%
associate-+l-80.6%
Simplified86.1%
associate-/r*99.6%
div-inv99.6%
associate-+l-99.6%
associate-*r*97.9%
associate-+l-97.9%
associate-*l*97.9%
associate-*r*99.6%
Applied egg-rr99.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.2%
*-commutative1.2%
associate-+l-1.2%
Simplified1.2%
associate-/r*28.5%
div-inv28.5%
associate-+l-28.5%
associate-*r*3.2%
associate-+l-3.2%
associate-*l*3.2%
associate-*r*28.6%
Applied egg-rr28.6%
Taylor expanded in x around 0 60.8%
cancel-sign-sub-inv60.8%
metadata-eval60.8%
+-commutative60.8%
fma-def60.8%
fma-def60.8%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in x around 0 61.2%
Final simplification88.4%
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)))
(t_3 (* (* a t) (* z 4.0))))
(if (<= t_2 -1e+119)
(/ (+ b (- t_1 t_3)) (* z c))
(if (<= t_2 5e+103)
(* (/ 1.0 c) (/ (+ b (- (* x (* 9.0 y)) t_3)) z))
(if (<= t_2 INFINITY) t_2 (/ (+ (/ b z) (* -4.0 (* a t))) c))))))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 t_3 = (a * t) * (z * 4.0);
double tmp;
if (t_2 <= -1e+119) {
tmp = (b + (t_1 - t_3)) / (z * c);
} else if (t_2 <= 5e+103) {
tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - t_3)) / z);
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
}
return tmp;
}
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 t_3 = (a * t) * (z * 4.0);
double tmp;
if (t_2 <= -1e+119) {
tmp = (b + (t_1 - t_3)) / (z * c);
} else if (t_2 <= 5e+103) {
tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - t_3)) / z);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
}
return tmp;
}
[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) t_3 = (a * t) * (z * 4.0) tmp = 0 if t_2 <= -1e+119: tmp = (b + (t_1 - t_3)) / (z * c) elif t_2 <= 5e+103: tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - t_3)) / z) elif t_2 <= math.inf: tmp = t_2 else: tmp = ((b / z) + (-4.0 * (a * t))) / c return tmp
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)) t_3 = Float64(Float64(a * t) * Float64(z * 4.0)) tmp = 0.0 if (t_2 <= -1e+119) tmp = Float64(Float64(b + Float64(t_1 - t_3)) / Float64(z * c)); elseif (t_2 <= 5e+103) tmp = Float64(Float64(1.0 / c) * Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - t_3)) / z)); elseif (t_2 <= Inf) tmp = t_2; else tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(a * t))) / c); end return tmp end
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);
t_3 = (a * t) * (z * 4.0);
tmp = 0.0;
if (t_2 <= -1e+119)
tmp = (b + (t_1 - t_3)) / (z * c);
elseif (t_2 <= 5e+103)
tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - t_3)) / z);
elseif (t_2 <= Inf)
tmp = t_2;
else
tmp = ((b / z) + (-4.0 * (a * t))) / c;
end
tmp_2 = tmp;
end
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]}, Block[{t$95$3 = N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+119], N[(N[(b + N[(t$95$1 - t$95$3), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+103], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]
\begin{array}{l}
[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}\\
t_3 := \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+119}:\\
\;\;\;\;\frac{b + \left(t_1 - t_3\right)}{z \cdot c}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+103}:\\
\;\;\;\;\frac{1}{c} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) - t_3\right)}{z}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.99999999999999944e118Initial program 87.3%
associate-+l-87.3%
*-commutative87.3%
associate-*r*86.3%
*-commutative86.3%
associate-+l-86.3%
Simplified89.4%
if -9.99999999999999944e118 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 5e103Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*81.5%
*-commutative81.5%
associate-+l-81.5%
Simplified84.1%
associate-/r*98.1%
div-inv98.0%
associate-+l-98.0%
associate-*r*96.3%
associate-+l-96.3%
associate-*l*96.3%
associate-*r*98.0%
Applied egg-rr98.0%
if 5e103 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 91.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.2%
*-commutative1.2%
associate-+l-1.2%
Simplified1.2%
associate-/r*28.5%
div-inv28.5%
associate-+l-28.5%
associate-*r*3.2%
associate-+l-3.2%
associate-*l*3.2%
associate-*r*28.6%
Applied egg-rr28.6%
Taylor expanded in x around 0 60.8%
cancel-sign-sub-inv60.8%
metadata-eval60.8%
+-commutative60.8%
fma-def60.8%
fma-def60.8%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in x around 0 61.2%
Final simplification89.1%
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))))
(if (<= (/ (+ b (- t_1 (* a (* t (* z 4.0))))) (* z c)) INFINITY)
(/ (+ b (- t_1 (* (* a t) (* z 4.0)))) (* z c))
(/ (+ (/ b z) (* -4.0 (* a t))) c))))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 tmp;
if (((b + (t_1 - (a * (t * (z * 4.0))))) / (z * c)) <= ((double) INFINITY)) {
tmp = (b + (t_1 - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
}
return tmp;
}
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 tmp;
if (((b + (t_1 - (a * (t * (z * 4.0))))) / (z * c)) <= Double.POSITIVE_INFINITY) {
tmp = (b + (t_1 - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) tmp = 0 if ((b + (t_1 - (a * (t * (z * 4.0))))) / (z * c)) <= math.inf: tmp = (b + (t_1 - ((a * t) * (z * 4.0)))) / (z * c) else: tmp = ((b / z) + (-4.0 * (a * t))) / c return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (Float64(Float64(b + Float64(t_1 - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) <= Inf) tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(a * t))) / c); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = y * (9.0 * x);
tmp = 0.0;
if (((b + (t_1 - (a * (t * (z * 4.0))))) / (z * c)) <= Inf)
tmp = (b + (t_1 - ((a * t) * (z * 4.0)))) / (z * c);
else
tmp = ((b / z) + (-4.0 * (a * t))) / c;
end
tmp_2 = tmp;
end
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]}, If[LessEqual[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], Infinity], N[(N[(b + N[(t$95$1 - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
\mathbf{if}\;\frac{b + \left(t_1 - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c} \leq \infty:\\
\;\;\;\;\frac{b + \left(t_1 - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 87.8%
associate-+l-87.8%
*-commutative87.8%
associate-*r*86.4%
*-commutative86.4%
associate-+l-86.4%
Simplified88.3%
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*1.2%
*-commutative1.2%
associate-+l-1.2%
Simplified1.2%
associate-/r*28.5%
div-inv28.5%
associate-+l-28.5%
associate-*r*3.2%
associate-+l-3.2%
associate-*l*3.2%
associate-*r*28.6%
Applied egg-rr28.6%
Taylor expanded in x around 0 60.8%
cancel-sign-sub-inv60.8%
metadata-eval60.8%
+-commutative60.8%
fma-def60.8%
fma-def60.8%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in x around 0 61.2%
Final simplification85.4%
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 (<= b -3.3e+143)
(/ b (* z c))
(if (<= b -2.6e+102)
t_1
(if (<= b -7.8e-25)
(/ (/ b z) c)
(if (<= b -1.75e-112)
t_1
(if (<= b -2.12e-221)
(* (/ x z) (/ 9.0 (/ c y)))
(if (<= b 7.8e-139)
(* -4.0 (/ a (/ c t)))
(if (<= b 3.8e-108)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= b 540000000.0)
(* (/ a c) (* -4.0 t))
(/ (/ b c) z)))))))))))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 (b <= -3.3e+143) {
tmp = b / (z * c);
} else if (b <= -2.6e+102) {
tmp = t_1;
} else if (b <= -7.8e-25) {
tmp = (b / z) / c;
} else if (b <= -1.75e-112) {
tmp = t_1;
} else if (b <= -2.12e-221) {
tmp = (x / z) * (9.0 / (c / y));
} else if (b <= 7.8e-139) {
tmp = -4.0 * (a / (c / t));
} else if (b <= 3.8e-108) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (b <= 540000000.0) {
tmp = (a / c) * (-4.0 * t);
} else {
tmp = (b / c) / z;
}
return tmp;
}
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 (b <= (-3.3d+143)) then
tmp = b / (z * c)
else if (b <= (-2.6d+102)) then
tmp = t_1
else if (b <= (-7.8d-25)) then
tmp = (b / z) / c
else if (b <= (-1.75d-112)) then
tmp = t_1
else if (b <= (-2.12d-221)) then
tmp = (x / z) * (9.0d0 / (c / y))
else if (b <= 7.8d-139) then
tmp = (-4.0d0) * (a / (c / t))
else if (b <= 3.8d-108) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (b <= 540000000.0d0) then
tmp = (a / c) * ((-4.0d0) * t)
else
tmp = (b / c) / z
end if
code = tmp
end function
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 (b <= -3.3e+143) {
tmp = b / (z * c);
} else if (b <= -2.6e+102) {
tmp = t_1;
} else if (b <= -7.8e-25) {
tmp = (b / z) / c;
} else if (b <= -1.75e-112) {
tmp = t_1;
} else if (b <= -2.12e-221) {
tmp = (x / z) * (9.0 / (c / y));
} else if (b <= 7.8e-139) {
tmp = -4.0 * (a / (c / t));
} else if (b <= 3.8e-108) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (b <= 540000000.0) {
tmp = (a / c) * (-4.0 * t);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * ((a * t) / c) tmp = 0 if b <= -3.3e+143: tmp = b / (z * c) elif b <= -2.6e+102: tmp = t_1 elif b <= -7.8e-25: tmp = (b / z) / c elif b <= -1.75e-112: tmp = t_1 elif b <= -2.12e-221: tmp = (x / z) * (9.0 / (c / y)) elif b <= 7.8e-139: tmp = -4.0 * (a / (c / t)) elif b <= 3.8e-108: tmp = 9.0 * ((x / c) * (y / z)) elif b <= 540000000.0: tmp = (a / c) * (-4.0 * t) else: tmp = (b / c) / z return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(Float64(a * t) / c)) tmp = 0.0 if (b <= -3.3e+143) tmp = Float64(b / Float64(z * c)); elseif (b <= -2.6e+102) tmp = t_1; elseif (b <= -7.8e-25) tmp = Float64(Float64(b / z) / c); elseif (b <= -1.75e-112) tmp = t_1; elseif (b <= -2.12e-221) tmp = Float64(Float64(x / z) * Float64(9.0 / Float64(c / y))); elseif (b <= 7.8e-139) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (b <= 3.8e-108) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (b <= 540000000.0) tmp = Float64(Float64(a / c) * Float64(-4.0 * t)); else tmp = Float64(Float64(b / c) / z); end return tmp end
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 (b <= -3.3e+143)
tmp = b / (z * c);
elseif (b <= -2.6e+102)
tmp = t_1;
elseif (b <= -7.8e-25)
tmp = (b / z) / c;
elseif (b <= -1.75e-112)
tmp = t_1;
elseif (b <= -2.12e-221)
tmp = (x / z) * (9.0 / (c / y));
elseif (b <= 7.8e-139)
tmp = -4.0 * (a / (c / t));
elseif (b <= 3.8e-108)
tmp = 9.0 * ((x / c) * (y / z));
elseif (b <= 540000000.0)
tmp = (a / c) * (-4.0 * t);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
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[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.3e+143], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.6e+102], t$95$1, If[LessEqual[b, -7.8e-25], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, -1.75e-112], t$95$1, If[LessEqual[b, -2.12e-221], N[(N[(x / z), $MachinePrecision] * N[(9.0 / N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.8e-139], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.8e-108], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 540000000.0], N[(N[(a / c), $MachinePrecision] * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a \cdot t}{c}\\
\mathbf{if}\;b \leq -3.3 \cdot 10^{+143}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -7.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;b \leq -1.75 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -2.12 \cdot 10^{-221}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{9}{\frac{c}{y}}\\
\mathbf{elif}\;b \leq 7.8 \cdot 10^{-139}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-108}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;b \leq 540000000:\\
\;\;\;\;\frac{a}{c} \cdot \left(-4 \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -3.3e143Initial program 84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*79.9%
*-commutative79.9%
associate-+l-79.9%
Simplified86.4%
Taylor expanded in b around inf 73.9%
*-commutative73.9%
Simplified73.9%
if -3.3e143 < b < -2.60000000000000006e102 or -7.8e-25 < b < -1.74999999999999997e-112Initial program 69.7%
associate-+l-69.7%
*-commutative69.7%
associate-*r*66.7%
*-commutative66.7%
associate-+l-66.7%
Simplified70.0%
Taylor expanded in z around inf 70.0%
if -2.60000000000000006e102 < b < -7.8e-25Initial program 89.4%
associate-+l-89.4%
*-commutative89.4%
associate-*r*89.7%
*-commutative89.7%
associate-+l-89.7%
Simplified84.4%
associate-/r*89.6%
div-inv89.5%
associate-+l-89.5%
associate-*r*89.6%
associate-+l-89.6%
associate-*l*89.6%
associate-*r*89.5%
Applied egg-rr89.5%
Taylor expanded in b around inf 54.8%
un-div-inv54.9%
Applied egg-rr54.9%
if -1.74999999999999997e-112 < b < -2.11999999999999992e-221Initial program 70.5%
associate-+l-70.5%
*-commutative70.5%
associate-*r*68.7%
*-commutative68.7%
associate-+l-68.7%
Simplified66.9%
Taylor expanded in x around inf 45.6%
associate-*r/45.6%
associate-*r*45.6%
*-commutative45.6%
associate-*r*45.6%
*-commutative45.6%
times-frac41.6%
associate-/l*41.6%
Simplified41.6%
if -2.11999999999999992e-221 < b < 7.8000000000000002e-139Initial program 68.4%
associate-+l-68.4%
*-commutative68.4%
associate-*r*68.5%
*-commutative68.5%
associate-+l-68.5%
Simplified71.8%
Taylor expanded in z around inf 56.0%
*-commutative56.0%
associate-/l*65.0%
Simplified65.0%
if 7.8000000000000002e-139 < b < 3.79999999999999973e-108Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
Simplified99.7%
associate-/r*99.7%
div-inv100.0%
associate-+l-100.0%
associate-*r*100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.7%
times-frac99.7%
Simplified99.7%
if 3.79999999999999973e-108 < b < 5.4e8Initial program 82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*78.2%
*-commutative78.2%
associate-+l-78.2%
Simplified82.7%
associate-/r*87.1%
div-inv87.1%
associate-+l-87.1%
associate-*r*86.9%
associate-+l-86.9%
associate-*l*86.9%
associate-*r*87.1%
Applied egg-rr87.1%
Taylor expanded in z around inf 42.7%
associate-*l/51.2%
*-commutative51.2%
associate-*l*51.2%
Simplified51.2%
if 5.4e8 < b Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*88.7%
*-commutative88.7%
associate-+l-88.7%
Simplified86.8%
Taylor expanded in b around inf 68.5%
associate-/r*70.4%
Simplified70.4%
Final simplification64.8%
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))))
(if (<= b -2.1e+170)
(/ (+ b (* 9.0 (* x y))) (* z c))
(if (or (<= b -1.12e-29) (not (<= b 5e-59)))
(/ (+ (/ b z) t_1) c)
(/ (+ t_1 (* 9.0 (/ (* x y) z))) c)))))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);
double tmp;
if (b <= -2.1e+170) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else if ((b <= -1.12e-29) || !(b <= 5e-59)) {
tmp = ((b / z) + t_1) / c;
} else {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
}
return tmp;
}
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)
if (b <= (-2.1d+170)) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else if ((b <= (-1.12d-29)) .or. (.not. (b <= 5d-59))) then
tmp = ((b / z) + t_1) / c
else
tmp = (t_1 + (9.0d0 * ((x * y) / z))) / c
end if
code = tmp
end function
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);
double tmp;
if (b <= -2.1e+170) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else if ((b <= -1.12e-29) || !(b <= 5e-59)) {
tmp = ((b / z) + t_1) / c;
} else {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * t) tmp = 0 if b <= -2.1e+170: tmp = (b + (9.0 * (x * y))) / (z * c) elif (b <= -1.12e-29) or not (b <= 5e-59): tmp = ((b / z) + t_1) / c else: tmp = (t_1 + (9.0 * ((x * y) / z))) / c return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * t)) tmp = 0.0 if (b <= -2.1e+170) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); elseif ((b <= -1.12e-29) || !(b <= 5e-59)) tmp = Float64(Float64(Float64(b / z) + t_1) / c); else tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / z))) / c); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * t);
tmp = 0.0;
if (b <= -2.1e+170)
tmp = (b + (9.0 * (x * y))) / (z * c);
elseif ((b <= -1.12e-29) || ~((b <= 5e-59)))
tmp = ((b / z) + t_1) / c;
else
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
end
tmp_2 = tmp;
end
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 * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.1e+170], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, -1.12e-29], N[Not[LessEqual[b, 5e-59]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] + t$95$1), $MachinePrecision] / c), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;b \leq -2.1 \cdot 10^{+170}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;b \leq -1.12 \cdot 10^{-29} \lor \neg \left(b \leq 5 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{\frac{b}{z} + t_1}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\end{array}
\end{array}
if b < -2.09999999999999998e170Initial program 87.3%
associate-+l-87.3%
*-commutative87.3%
associate-*r*84.8%
*-commutative84.8%
associate-+l-84.8%
Simplified89.7%
Taylor expanded in x around inf 84.8%
if -2.09999999999999998e170 < b < -1.11999999999999995e-29 or 5.0000000000000001e-59 < b Initial program 82.4%
associate-+l-82.4%
*-commutative82.4%
associate-*r*81.7%
*-commutative81.7%
associate-+l-81.7%
Simplified81.6%
associate-/r*86.5%
div-inv86.5%
associate-+l-86.5%
associate-*r*84.6%
associate-+l-84.6%
associate-*l*84.6%
associate-*r*86.5%
Applied egg-rr86.5%
Taylor expanded in x around 0 85.4%
cancel-sign-sub-inv85.4%
metadata-eval85.4%
+-commutative85.4%
fma-def85.4%
fma-def85.4%
associate-/l*86.3%
Simplified86.3%
Taylor expanded in x around 0 77.9%
if -1.11999999999999995e-29 < b < 5.0000000000000001e-59Initial program 72.4%
associate-+l-72.4%
*-commutative72.4%
associate-*r*71.3%
*-commutative71.3%
associate-+l-71.3%
Simplified73.5%
associate-/r*77.9%
div-inv77.9%
associate-+l-77.9%
associate-*r*72.0%
associate-+l-72.0%
associate-*l*72.0%
associate-*r*77.9%
Applied egg-rr77.9%
Taylor expanded in x around 0 85.3%
cancel-sign-sub-inv85.3%
metadata-eval85.3%
+-commutative85.3%
fma-def85.3%
fma-def85.3%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 80.8%
Final simplification80.3%
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 c))))
(if (<= b -3.6e+143)
t_1
(if (<= b -2.25e+102)
(* -4.0 (/ (* a t) c))
(if (<= b -3.95e+43)
t_1
(if (<= b 1.2e-123)
(* -4.0 (/ a (/ c t)))
(if (<= b 3.2e-108)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= b 1220000000.0)
(* (/ a c) (* -4.0 t))
(/ (/ b c) z)))))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -3.6e+143) {
tmp = t_1;
} else if (b <= -2.25e+102) {
tmp = -4.0 * ((a * t) / c);
} else if (b <= -3.95e+43) {
tmp = t_1;
} else if (b <= 1.2e-123) {
tmp = -4.0 * (a / (c / t));
} else if (b <= 3.2e-108) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (b <= 1220000000.0) {
tmp = (a / c) * (-4.0 * t);
} else {
tmp = (b / c) / z;
}
return tmp;
}
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 = b / (z * c)
if (b <= (-3.6d+143)) then
tmp = t_1
else if (b <= (-2.25d+102)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (b <= (-3.95d+43)) then
tmp = t_1
else if (b <= 1.2d-123) then
tmp = (-4.0d0) * (a / (c / t))
else if (b <= 3.2d-108) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (b <= 1220000000.0d0) then
tmp = (a / c) * ((-4.0d0) * t)
else
tmp = (b / c) / z
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -3.6e+143) {
tmp = t_1;
} else if (b <= -2.25e+102) {
tmp = -4.0 * ((a * t) / c);
} else if (b <= -3.95e+43) {
tmp = t_1;
} else if (b <= 1.2e-123) {
tmp = -4.0 * (a / (c / t));
} else if (b <= 3.2e-108) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (b <= 1220000000.0) {
tmp = (a / c) * (-4.0 * t);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = b / (z * c) tmp = 0 if b <= -3.6e+143: tmp = t_1 elif b <= -2.25e+102: tmp = -4.0 * ((a * t) / c) elif b <= -3.95e+43: tmp = t_1 elif b <= 1.2e-123: tmp = -4.0 * (a / (c / t)) elif b <= 3.2e-108: tmp = 9.0 * ((x / c) * (y / z)) elif b <= 1220000000.0: tmp = (a / c) * (-4.0 * t) else: tmp = (b / c) / z return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (b <= -3.6e+143) tmp = t_1; elseif (b <= -2.25e+102) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (b <= -3.95e+43) tmp = t_1; elseif (b <= 1.2e-123) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (b <= 3.2e-108) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (b <= 1220000000.0) tmp = Float64(Float64(a / c) * Float64(-4.0 * t)); else tmp = Float64(Float64(b / c) / z); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b / (z * c);
tmp = 0.0;
if (b <= -3.6e+143)
tmp = t_1;
elseif (b <= -2.25e+102)
tmp = -4.0 * ((a * t) / c);
elseif (b <= -3.95e+43)
tmp = t_1;
elseif (b <= 1.2e-123)
tmp = -4.0 * (a / (c / t));
elseif (b <= 3.2e-108)
tmp = 9.0 * ((x / c) * (y / z));
elseif (b <= 1220000000.0)
tmp = (a / c) * (-4.0 * t);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
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[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.6e+143], t$95$1, If[LessEqual[b, -2.25e+102], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.95e+43], t$95$1, If[LessEqual[b, 1.2e-123], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.2e-108], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1220000000.0], N[(N[(a / c), $MachinePrecision] * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;b \leq -3.6 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -2.25 \cdot 10^{+102}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;b \leq -3.95 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{-123}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-108}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;b \leq 1220000000:\\
\;\;\;\;\frac{a}{c} \cdot \left(-4 \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -3.5999999999999999e143 or -2.2500000000000001e102 < b < -3.94999999999999981e43Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
associate-*r*83.3%
*-commutative83.3%
associate-+l-83.3%
Simplified88.7%
Taylor expanded in b around inf 72.9%
*-commutative72.9%
Simplified72.9%
if -3.5999999999999999e143 < b < -2.2500000000000001e102Initial program 64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*65.1%
*-commutative65.1%
associate-+l-65.1%
Simplified65.1%
Taylor expanded in z around inf 56.3%
if -3.94999999999999981e43 < b < 1.2e-123Initial program 70.6%
associate-+l-70.6%
*-commutative70.6%
associate-*r*69.5%
*-commutative69.5%
associate-+l-69.5%
Simplified70.8%
Taylor expanded in z around inf 52.8%
*-commutative52.8%
associate-/l*59.4%
Simplified59.4%
if 1.2e-123 < b < 3.2e-108Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
Simplified99.7%
associate-/r*99.7%
div-inv100.0%
associate-+l-100.0%
associate-*r*100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.7%
times-frac99.7%
Simplified99.7%
if 3.2e-108 < b < 1.22e9Initial program 82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*78.2%
*-commutative78.2%
associate-+l-78.2%
Simplified82.7%
associate-/r*87.1%
div-inv87.1%
associate-+l-87.1%
associate-*r*86.9%
associate-+l-86.9%
associate-*l*86.9%
associate-*r*87.1%
Applied egg-rr87.1%
Taylor expanded in z around inf 42.7%
associate-*l/51.2%
*-commutative51.2%
associate-*l*51.2%
Simplified51.2%
if 1.22e9 < b Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*88.7%
*-commutative88.7%
associate-+l-88.7%
Simplified86.8%
Taylor expanded in b around inf 68.5%
associate-/r*70.4%
Simplified70.4%
Final simplification64.4%
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 (<= b -2.6e+143)
(/ b (* z c))
(if (<= b -9.2e+101)
t_1
(if (<= b -5.5e-25)
(/ (/ b z) c)
(if (<= b 620000000.0) t_1 (/ (/ b c) z)))))))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 (b <= -2.6e+143) {
tmp = b / (z * c);
} else if (b <= -9.2e+101) {
tmp = t_1;
} else if (b <= -5.5e-25) {
tmp = (b / z) / c;
} else if (b <= 620000000.0) {
tmp = t_1;
} else {
tmp = (b / c) / z;
}
return tmp;
}
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 (b <= (-2.6d+143)) then
tmp = b / (z * c)
else if (b <= (-9.2d+101)) then
tmp = t_1
else if (b <= (-5.5d-25)) then
tmp = (b / z) / c
else if (b <= 620000000.0d0) then
tmp = t_1
else
tmp = (b / c) / z
end if
code = tmp
end function
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 (b <= -2.6e+143) {
tmp = b / (z * c);
} else if (b <= -9.2e+101) {
tmp = t_1;
} else if (b <= -5.5e-25) {
tmp = (b / z) / c;
} else if (b <= 620000000.0) {
tmp = t_1;
} else {
tmp = (b / c) / z;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * ((a * t) / c) tmp = 0 if b <= -2.6e+143: tmp = b / (z * c) elif b <= -9.2e+101: tmp = t_1 elif b <= -5.5e-25: tmp = (b / z) / c elif b <= 620000000.0: tmp = t_1 else: tmp = (b / c) / z return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(Float64(a * t) / c)) tmp = 0.0 if (b <= -2.6e+143) tmp = Float64(b / Float64(z * c)); elseif (b <= -9.2e+101) tmp = t_1; elseif (b <= -5.5e-25) tmp = Float64(Float64(b / z) / c); elseif (b <= 620000000.0) tmp = t_1; else tmp = Float64(Float64(b / c) / z); end return tmp end
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 (b <= -2.6e+143)
tmp = b / (z * c);
elseif (b <= -9.2e+101)
tmp = t_1;
elseif (b <= -5.5e-25)
tmp = (b / z) / c;
elseif (b <= 620000000.0)
tmp = t_1;
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
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[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.6e+143], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -9.2e+101], t$95$1, If[LessEqual[b, -5.5e-25], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 620000000.0], t$95$1, N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a \cdot t}{c}\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+143}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq -9.2 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -5.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;b \leq 620000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -2.5999999999999999e143Initial program 84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*79.9%
*-commutative79.9%
associate-+l-79.9%
Simplified86.4%
Taylor expanded in b around inf 73.9%
*-commutative73.9%
Simplified73.9%
if -2.5999999999999999e143 < b < -9.2000000000000005e101 or -5.50000000000000004e-25 < b < 6.2e8Initial program 72.3%
associate-+l-72.3%
*-commutative72.3%
associate-*r*70.8%
*-commutative70.8%
associate-+l-70.8%
Simplified73.3%
Taylor expanded in z around inf 50.5%
if -9.2000000000000005e101 < b < -5.50000000000000004e-25Initial program 89.4%
associate-+l-89.4%
*-commutative89.4%
associate-*r*89.7%
*-commutative89.7%
associate-+l-89.7%
Simplified84.4%
associate-/r*89.6%
div-inv89.5%
associate-+l-89.5%
associate-*r*89.6%
associate-+l-89.6%
associate-*l*89.6%
associate-*r*89.5%
Applied egg-rr89.5%
Taylor expanded in b around inf 54.8%
un-div-inv54.9%
Applied egg-rr54.9%
if 6.2e8 < b Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*88.7%
*-commutative88.7%
associate-+l-88.7%
Simplified86.8%
Taylor expanded in b around inf 68.5%
associate-/r*70.4%
Simplified70.4%
Final simplification58.9%
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 (<= b -7e+143)
(/ b (* z c))
(if (<= b -5.4e+99)
(* -4.0 (/ (* a t) c))
(if (<= b -7.8e-25)
(/ (/ b z) c)
(if (<= b 2100000000.0) (* (/ a c) (* -4.0 t)) (/ (/ b c) z))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -7e+143) {
tmp = b / (z * c);
} else if (b <= -5.4e+99) {
tmp = -4.0 * ((a * t) / c);
} else if (b <= -7.8e-25) {
tmp = (b / z) / c;
} else if (b <= 2100000000.0) {
tmp = (a / c) * (-4.0 * t);
} else {
tmp = (b / c) / z;
}
return tmp;
}
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 (b <= (-7d+143)) then
tmp = b / (z * c)
else if (b <= (-5.4d+99)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (b <= (-7.8d-25)) then
tmp = (b / z) / c
else if (b <= 2100000000.0d0) then
tmp = (a / c) * ((-4.0d0) * t)
else
tmp = (b / c) / z
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -7e+143) {
tmp = b / (z * c);
} else if (b <= -5.4e+99) {
tmp = -4.0 * ((a * t) / c);
} else if (b <= -7.8e-25) {
tmp = (b / z) / c;
} else if (b <= 2100000000.0) {
tmp = (a / c) * (-4.0 * t);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -7e+143: tmp = b / (z * c) elif b <= -5.4e+99: tmp = -4.0 * ((a * t) / c) elif b <= -7.8e-25: tmp = (b / z) / c elif b <= 2100000000.0: tmp = (a / c) * (-4.0 * t) else: tmp = (b / c) / z return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -7e+143) tmp = Float64(b / Float64(z * c)); elseif (b <= -5.4e+99) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (b <= -7.8e-25) tmp = Float64(Float64(b / z) / c); elseif (b <= 2100000000.0) tmp = Float64(Float64(a / c) * Float64(-4.0 * t)); else tmp = Float64(Float64(b / c) / z); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -7e+143)
tmp = b / (z * c);
elseif (b <= -5.4e+99)
tmp = -4.0 * ((a * t) / c);
elseif (b <= -7.8e-25)
tmp = (b / z) / c;
elseif (b <= 2100000000.0)
tmp = (a / c) * (-4.0 * t);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -7e+143], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.4e+99], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.8e-25], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 2100000000.0], N[(N[(a / c), $MachinePrecision] * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+143}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq -5.4 \cdot 10^{+99}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;b \leq -7.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;b \leq 2100000000:\\
\;\;\;\;\frac{a}{c} \cdot \left(-4 \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -7.00000000000000017e143Initial program 84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*79.9%
*-commutative79.9%
associate-+l-79.9%
Simplified86.4%
Taylor expanded in b around inf 73.9%
*-commutative73.9%
Simplified73.9%
if -7.00000000000000017e143 < b < -5.39999999999999978e99Initial program 64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*65.1%
*-commutative65.1%
associate-+l-65.1%
Simplified65.1%
Taylor expanded in z around inf 56.3%
if -5.39999999999999978e99 < b < -7.8e-25Initial program 89.4%
associate-+l-89.4%
*-commutative89.4%
associate-*r*89.7%
*-commutative89.7%
associate-+l-89.7%
Simplified84.4%
associate-/r*89.6%
div-inv89.5%
associate-+l-89.5%
associate-*r*89.6%
associate-+l-89.6%
associate-*l*89.6%
associate-*r*89.5%
Applied egg-rr89.5%
Taylor expanded in b around inf 54.8%
un-div-inv54.9%
Applied egg-rr54.9%
if -7.8e-25 < b < 2.1e9Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*71.3%
*-commutative71.3%
associate-+l-71.3%
Simplified74.0%
associate-/r*79.4%
div-inv79.4%
associate-+l-79.4%
associate-*r*74.1%
associate-+l-74.1%
associate-*l*74.1%
associate-*r*79.4%
Applied egg-rr79.4%
Taylor expanded in z around inf 50.0%
associate-*l/51.3%
*-commutative51.3%
associate-*l*51.3%
Simplified51.3%
if 2.1e9 < b Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*88.7%
*-commutative88.7%
associate-+l-88.7%
Simplified86.8%
Taylor expanded in b around inf 68.5%
associate-/r*70.4%
Simplified70.4%
Final simplification59.5%
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 c))))
(if (<= b -2.7e+143)
t_1
(if (<= b -3.5e+99)
(* -4.0 (/ (* a t) c))
(if (<= b -3.8e+43)
t_1
(if (<= b 5.6e-59) (* -4.0 (/ a (/ c t))) (/ (/ b c) z)))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -2.7e+143) {
tmp = t_1;
} else if (b <= -3.5e+99) {
tmp = -4.0 * ((a * t) / c);
} else if (b <= -3.8e+43) {
tmp = t_1;
} else if (b <= 5.6e-59) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / c) / z;
}
return tmp;
}
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 = b / (z * c)
if (b <= (-2.7d+143)) then
tmp = t_1
else if (b <= (-3.5d+99)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (b <= (-3.8d+43)) then
tmp = t_1
else if (b <= 5.6d-59) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = (b / c) / z
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -2.7e+143) {
tmp = t_1;
} else if (b <= -3.5e+99) {
tmp = -4.0 * ((a * t) / c);
} else if (b <= -3.8e+43) {
tmp = t_1;
} else if (b <= 5.6e-59) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / c) / z;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = b / (z * c) tmp = 0 if b <= -2.7e+143: tmp = t_1 elif b <= -3.5e+99: tmp = -4.0 * ((a * t) / c) elif b <= -3.8e+43: tmp = t_1 elif b <= 5.6e-59: tmp = -4.0 * (a / (c / t)) else: tmp = (b / c) / z return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (b <= -2.7e+143) tmp = t_1; elseif (b <= -3.5e+99) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (b <= -3.8e+43) tmp = t_1; elseif (b <= 5.6e-59) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(Float64(b / c) / z); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b / (z * c);
tmp = 0.0;
if (b <= -2.7e+143)
tmp = t_1;
elseif (b <= -3.5e+99)
tmp = -4.0 * ((a * t) / c);
elseif (b <= -3.8e+43)
tmp = t_1;
elseif (b <= 5.6e-59)
tmp = -4.0 * (a / (c / t));
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
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[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.7e+143], t$95$1, If[LessEqual[b, -3.5e+99], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.8e+43], t$95$1, If[LessEqual[b, 5.6e-59], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;b \leq -2.7 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{+99}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;b \leq -3.8 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{-59}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -2.7000000000000002e143 or -3.4999999999999998e99 < b < -3.80000000000000008e43Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
associate-*r*83.3%
*-commutative83.3%
associate-+l-83.3%
Simplified88.7%
Taylor expanded in b around inf 72.9%
*-commutative72.9%
Simplified72.9%
if -2.7000000000000002e143 < b < -3.4999999999999998e99Initial program 64.5%
associate-+l-64.5%
*-commutative64.5%
associate-*r*65.1%
*-commutative65.1%
associate-+l-65.1%
Simplified65.1%
Taylor expanded in z around inf 56.3%
if -3.80000000000000008e43 < b < 5.59999999999999961e-59Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*72.0%
*-commutative72.0%
associate-+l-72.0%
Simplified73.2%
Taylor expanded in z around inf 51.1%
*-commutative51.1%
associate-/l*57.7%
Simplified57.7%
if 5.59999999999999961e-59 < b Initial program 85.1%
associate-+l-85.1%
*-commutative85.1%
associate-*r*85.2%
*-commutative85.2%
associate-+l-85.2%
Simplified85.2%
Taylor expanded in b around inf 60.0%
associate-/r*62.8%
Simplified62.8%
Final simplification62.1%
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 -1.36e+59) (not (<= z 7.8e-44))) (/ (+ (/ b z) (* -4.0 (* a t))) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.36e+59) || !(z <= 7.8e-44)) {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
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 <= (-1.36d+59)) .or. (.not. (z <= 7.8d-44))) then
tmp = ((b / z) + ((-4.0d0) * (a * t))) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
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 <= -1.36e+59) || !(z <= 7.8e-44)) {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.36e+59) or not (z <= 7.8e-44): tmp = ((b / z) + (-4.0 * (a * t))) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.36e+59) || !(z <= 7.8e-44)) tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.36e+59) || ~((z <= 7.8e-44)))
tmp = ((b / z) + (-4.0 * (a * t))) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
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, -1.36e+59], N[Not[LessEqual[z, 7.8e-44]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.36 \cdot 10^{+59} \lor \neg \left(z \leq 7.8 \cdot 10^{-44}\right):\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.36e59 or 7.8000000000000004e-44 < z Initial program 62.6%
associate-+l-62.6%
*-commutative62.6%
associate-*r*60.0%
*-commutative60.0%
associate-+l-60.0%
Simplified65.2%
associate-/r*77.5%
div-inv77.4%
associate-+l-77.4%
associate-*r*69.1%
associate-+l-69.1%
associate-*l*69.1%
associate-*r*77.5%
Applied egg-rr77.5%
Taylor expanded in x around 0 87.1%
cancel-sign-sub-inv87.1%
metadata-eval87.1%
+-commutative87.1%
fma-def87.1%
fma-def87.1%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in x around 0 72.4%
if -1.36e59 < z < 7.8000000000000004e-44Initial program 94.8%
associate-+l-94.8%
*-commutative94.8%
associate-*r*95.1%
*-commutative95.1%
associate-+l-95.1%
Simplified93.2%
Taylor expanded in x around inf 82.7%
Final simplification77.5%
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 (<= x -5e+137) (* 9.0 (* (/ x c) (/ y z))) (/ (+ (/ b z) (* -4.0 (* a t))) c)))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -5e+137) {
tmp = 9.0 * ((x / c) * (y / z));
} else {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
}
return tmp;
}
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 (x <= (-5d+137)) then
tmp = 9.0d0 * ((x / c) * (y / z))
else
tmp = ((b / z) + ((-4.0d0) * (a * t))) / c
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -5e+137) {
tmp = 9.0 * ((x / c) * (y / z));
} else {
tmp = ((b / z) + (-4.0 * (a * t))) / c;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -5e+137: tmp = 9.0 * ((x / c) * (y / z)) else: tmp = ((b / z) + (-4.0 * (a * t))) / c return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -5e+137) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); else tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(a * t))) / c); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -5e+137)
tmp = 9.0 * ((x / c) * (y / z));
else
tmp = ((b / z) + (-4.0 * (a * t))) / c;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -5e+137], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+137}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if x < -5.0000000000000002e137Initial program 78.1%
associate-+l-78.1%
*-commutative78.1%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
Simplified81.1%
associate-/r*75.8%
div-inv75.9%
associate-+l-75.9%
associate-*r*73.0%
associate-+l-73.0%
associate-*l*72.9%
associate-*r*75.8%
Applied egg-rr75.8%
Taylor expanded in x around inf 56.8%
times-frac66.1%
Simplified66.1%
if -5.0000000000000002e137 < x Initial program 78.6%
associate-+l-78.6%
*-commutative78.6%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
Simplified78.8%
associate-/r*81.7%
div-inv81.6%
associate-+l-81.6%
associate-*r*77.7%
associate-+l-77.7%
associate-*l*77.7%
associate-*r*81.7%
Applied egg-rr81.7%
Taylor expanded in x around 0 85.0%
cancel-sign-sub-inv85.0%
metadata-eval85.0%
+-commutative85.0%
fma-def85.0%
fma-def85.0%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in x around 0 68.9%
Final simplification68.6%
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(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
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 t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): return b / (z * c)
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
t, a = num2cell(sort([t, a])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
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}
[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*77.4%
*-commutative77.4%
associate-+l-77.4%
Simplified79.1%
Taylor expanded in b around inf 37.5%
*-commutative37.5%
Simplified37.5%
Final simplification37.5%
(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 2023293
(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)))