
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* y (* 9.0 x)) (* a (* t (* z 4.0)))) b) (* z c))))
(if (<= t_1 -4e+78)
t_1
(if (<= t_1 0.0)
(* (/ 1.0 c) (/ (+ b (fma x (* 9.0 y) (* a (* z (* -4.0 t))))) z))
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))
(* a (/ (* -4.0 t) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
double tmp;
if (t_1 <= -4e+78) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (1.0 / c) * ((b + fma(x, (9.0 * y), (a * (z * (-4.0 * t))))) / z);
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0)))) + b) / Float64(z * c)) tmp = 0.0 if (t_1 <= -4e+78) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(1.0 / c) * Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(a * Float64(z * Float64(-4.0 * t))))) / z)); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+78], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{1}{c} \cdot \frac{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(z \cdot \left(-4 \cdot t\right)\right)\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.00000000000000003e78Initial program 94.4%
if -4.00000000000000003e78 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 74.0%
+-commutative74.0%
associate-+r-74.0%
*-commutative74.0%
associate-*r*76.5%
*-commutative76.5%
associate-+r-76.5%
+-commutative76.5%
associate-*l*76.5%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Applied egg-rr93.8%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
*-commutative93.2%
associate-*r*93.2%
*-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate-*l*92.4%
associate-*l*95.7%
*-commutative95.7%
Simplified95.7%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
+-commutative0.0%
associate-+r-0.0%
*-commutative0.0%
associate-*r*0.8%
*-commutative0.8%
associate-+r-0.8%
+-commutative0.8%
associate-*l*0.8%
associate-*l*0.8%
*-commutative0.8%
Simplified0.8%
Taylor expanded in z around inf 53.5%
associate-/l*71.8%
associate-*r*71.8%
*-commutative71.8%
associate-*r*71.8%
associate-*r/71.8%
*-commutative71.8%
Simplified71.8%
Final simplification93.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2e+128)
(/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* x y) z))) c)
(if (<= z 1.6e+125)
(/ (+ (- (* y (* 9.0 x)) (* a (* t (* z 4.0)))) b) (* z c))
(*
(* y (fma -4.0 (* a (/ t y)) (fma 9.0 (/ x z) (/ b (* z y)))))
(/ 1.0 c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2e+128) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else if (z <= 1.6e+125) {
tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
} else {
tmp = (y * fma(-4.0, (a * (t / y)), fma(9.0, (x / z), (b / (z * y))))) * (1.0 / c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2e+128) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); elseif (z <= 1.6e+125) tmp = Float64(Float64(Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0)))) + b) / Float64(z * c)); else tmp = Float64(Float64(y * fma(-4.0, Float64(a * Float64(t / y)), fma(9.0, Float64(x / z), Float64(b / Float64(z * y))))) * Float64(1.0 / c)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2e+128], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.6e+125], N[(N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(-4.0 * N[(a * N[(t / y), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x / z), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+128}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+125}:\\
\;\;\;\;\frac{\left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right) + b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \mathsf{fma}\left(-4, a \cdot \frac{t}{y}, \mathsf{fma}\left(9, \frac{x}{z}, \frac{b}{z \cdot y}\right)\right)\right) \cdot \frac{1}{c}\\
\end{array}
\end{array}
if z < -2.0000000000000002e128Initial program 64.1%
+-commutative64.1%
associate-+r-64.1%
*-commutative64.1%
associate-*r*59.7%
*-commutative59.7%
associate-+r-59.7%
+-commutative59.7%
associate-*l*59.7%
associate-*l*66.6%
*-commutative66.6%
Simplified66.6%
Applied egg-rr79.8%
Taylor expanded in b around 0 71.2%
Taylor expanded in a around 0 75.5%
Taylor expanded in c around 0 82.2%
if -2.0000000000000002e128 < z < 1.59999999999999992e125Initial program 95.4%
if 1.59999999999999992e125 < z Initial program 52.0%
+-commutative52.0%
associate-+r-52.0%
*-commutative52.0%
associate-*r*52.2%
*-commutative52.2%
associate-+r-52.2%
+-commutative52.2%
associate-*l*52.2%
associate-*l*59.5%
*-commutative59.5%
Simplified59.5%
Applied egg-rr58.2%
Taylor expanded in y around inf 82.4%
fma-define82.4%
associate-/l*80.0%
fma-define80.0%
*-commutative80.0%
Simplified80.0%
Final simplification90.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* y (* 9.0 x)) (* a (* t (* z 4.0)))) b) (* z c))))
(if (<= t_1 -5e-319)
t_1
(if (<= t_1 0.0)
(/ (+ (* -4.0 (/ (* a (* z t)) c)) (+ (* 9.0 (/ (* x y) c)) (/ b c))) z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))
(* a (/ (* -4.0 t) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
double tmp;
if (t_1 <= -5e-319) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
double tmp;
if (t_1 <= -5e-319) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c) tmp = 0 if t_1 <= -5e-319: tmp = t_1 elif t_1 <= 0.0: tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z elif t_1 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) else: tmp = a * ((-4.0 * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0)))) + b) / Float64(z * c)) tmp = 0.0 if (t_1 <= -5e-319) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
tmp = 0.0;
if (t_1 <= -5e-319)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
elseif (t_1 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
else
tmp = a * ((-4.0 * t) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-319], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c} + \left(9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.9999937e-319Initial program 94.3%
if -4.9999937e-319 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 46.5%
+-commutative46.5%
associate-+r-46.5%
*-commutative46.5%
associate-*r*45.6%
*-commutative45.6%
associate-+r-45.6%
+-commutative45.6%
associate-*l*45.6%
associate-*l*46.5%
*-commutative46.5%
Simplified46.5%
Taylor expanded in z around 0 99.4%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
*-commutative93.2%
associate-*r*93.2%
*-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate-*l*92.4%
associate-*l*95.7%
*-commutative95.7%
Simplified95.7%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
+-commutative0.0%
associate-+r-0.0%
*-commutative0.0%
associate-*r*0.8%
*-commutative0.8%
associate-+r-0.8%
+-commutative0.8%
associate-*l*0.8%
associate-*l*0.8%
*-commutative0.8%
Simplified0.8%
Taylor expanded in z around inf 53.5%
associate-/l*71.8%
associate-*r*71.8%
*-commutative71.8%
associate-*r*71.8%
associate-*r/71.8%
*-commutative71.8%
Simplified71.8%
Final simplification93.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* y (* 9.0 x)) (* a (* t (* z 4.0)))) b) (* z c))))
(if (<= t_1 -5e-319)
t_1
(if (<= t_1 0.0)
(* t (+ (* -4.0 (/ a c)) (* 9.0 (/ (* x y) (* c (* z t))))))
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))
(* a (/ (* -4.0 t) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
double tmp;
if (t_1 <= -5e-319) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t * ((-4.0 * (a / c)) + (9.0 * ((x * y) / (c * (z * t)))));
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
double tmp;
if (t_1 <= -5e-319) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t * ((-4.0 * (a / c)) + (9.0 * ((x * y) / (c * (z * t)))));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c) tmp = 0 if t_1 <= -5e-319: tmp = t_1 elif t_1 <= 0.0: tmp = t * ((-4.0 * (a / c)) + (9.0 * ((x * y) / (c * (z * t))))) elif t_1 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) else: tmp = a * ((-4.0 * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0)))) + b) / Float64(z * c)) tmp = 0.0 if (t_1 <= -5e-319) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(9.0 * Float64(Float64(x * y) / Float64(c * Float64(z * t)))))); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
tmp = 0.0;
if (t_1 <= -5e-319)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = t * ((-4.0 * (a / c)) + (9.0 * ((x * y) / (c * (z * t)))));
elseif (t_1 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
else
tmp = a * ((-4.0 * t) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-319], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + 9 \cdot \frac{x \cdot y}{c \cdot \left(z \cdot t\right)}\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.9999937e-319Initial program 94.3%
if -4.9999937e-319 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 46.5%
+-commutative46.5%
associate-+r-46.5%
*-commutative46.5%
associate-*r*45.6%
*-commutative45.6%
associate-+r-45.6%
+-commutative45.6%
associate-*l*45.6%
associate-*l*46.5%
*-commutative46.5%
Simplified46.5%
Applied egg-rr99.6%
Taylor expanded in b around 0 86.3%
Taylor expanded in t around inf 79.9%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
*-commutative93.2%
associate-*r*93.2%
*-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate-*l*92.4%
associate-*l*95.7%
*-commutative95.7%
Simplified95.7%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
+-commutative0.0%
associate-+r-0.0%
*-commutative0.0%
associate-*r*0.8%
*-commutative0.8%
associate-+r-0.8%
+-commutative0.8%
associate-*l*0.8%
associate-*l*0.8%
*-commutative0.8%
Simplified0.8%
Taylor expanded in z around inf 53.5%
associate-/l*71.8%
associate-*r*71.8%
*-commutative71.8%
associate-*r*71.8%
associate-*r/71.8%
*-commutative71.8%
Simplified71.8%
Final simplification92.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c)))
(t_2 (* 9.0 (* x (/ (/ y z) c))))
(t_3 (* a (/ (* -4.0 t) c))))
(if (<= t -4.5e+158)
(* t (* a (/ -4.0 c)))
(if (<= t -2.5e+82)
(* 9.0 (* x (/ y (* z c))))
(if (<= t -9.5e+58)
t_3
(if (<= t -4.2e+27)
t_1
(if (<= t -2.1e-159)
t_2
(if (<= t 6.6e-289) t_1 (if (<= t 1.5e-66) t_2 t_3)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double t_2 = 9.0 * (x * ((y / z) / c));
double t_3 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -4.5e+158) {
tmp = t * (a * (-4.0 / c));
} else if (t <= -2.5e+82) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (t <= -9.5e+58) {
tmp = t_3;
} else if (t <= -4.2e+27) {
tmp = t_1;
} else if (t <= -2.1e-159) {
tmp = t_2;
} else if (t <= 6.6e-289) {
tmp = t_1;
} else if (t <= 1.5e-66) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = b / (z * c)
t_2 = 9.0d0 * (x * ((y / z) / c))
t_3 = a * (((-4.0d0) * t) / c)
if (t <= (-4.5d+158)) then
tmp = t * (a * ((-4.0d0) / c))
else if (t <= (-2.5d+82)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (t <= (-9.5d+58)) then
tmp = t_3
else if (t <= (-4.2d+27)) then
tmp = t_1
else if (t <= (-2.1d-159)) then
tmp = t_2
else if (t <= 6.6d-289) then
tmp = t_1
else if (t <= 1.5d-66) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double t_2 = 9.0 * (x * ((y / z) / c));
double t_3 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -4.5e+158) {
tmp = t * (a * (-4.0 / c));
} else if (t <= -2.5e+82) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (t <= -9.5e+58) {
tmp = t_3;
} else if (t <= -4.2e+27) {
tmp = t_1;
} else if (t <= -2.1e-159) {
tmp = t_2;
} else if (t <= 6.6e-289) {
tmp = t_1;
} else if (t <= 1.5e-66) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = b / (z * c) t_2 = 9.0 * (x * ((y / z) / c)) t_3 = a * ((-4.0 * t) / c) tmp = 0 if t <= -4.5e+158: tmp = t * (a * (-4.0 / c)) elif t <= -2.5e+82: tmp = 9.0 * (x * (y / (z * c))) elif t <= -9.5e+58: tmp = t_3 elif t <= -4.2e+27: tmp = t_1 elif t <= -2.1e-159: tmp = t_2 elif t <= 6.6e-289: tmp = t_1 elif t <= 1.5e-66: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) t_2 = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c))) t_3 = Float64(a * Float64(Float64(-4.0 * t) / c)) tmp = 0.0 if (t <= -4.5e+158) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); elseif (t <= -2.5e+82) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (t <= -9.5e+58) tmp = t_3; elseif (t <= -4.2e+27) tmp = t_1; elseif (t <= -2.1e-159) tmp = t_2; elseif (t <= 6.6e-289) tmp = t_1; elseif (t <= 1.5e-66) tmp = t_2; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b / (z * c);
t_2 = 9.0 * (x * ((y / z) / c));
t_3 = a * ((-4.0 * t) / c);
tmp = 0.0;
if (t <= -4.5e+158)
tmp = t * (a * (-4.0 / c));
elseif (t <= -2.5e+82)
tmp = 9.0 * (x * (y / (z * c)));
elseif (t <= -9.5e+58)
tmp = t_3;
elseif (t <= -4.2e+27)
tmp = t_1;
elseif (t <= -2.1e-159)
tmp = t_2;
elseif (t <= 6.6e-289)
tmp = t_1;
elseif (t <= 1.5e-66)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+158], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.5e+82], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.5e+58], t$95$3, If[LessEqual[t, -4.2e+27], t$95$1, If[LessEqual[t, -2.1e-159], t$95$2, If[LessEqual[t, 6.6e-289], t$95$1, If[LessEqual[t, 1.5e-66], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c}\right)\\
t_3 := a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+158}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{+82}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{+58}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-159}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -4.50000000000000046e158Initial program 77.2%
Simplified82.5%
Taylor expanded in a around inf 77.2%
Taylor expanded in a around inf 79.7%
*-commutative79.7%
*-commutative79.7%
associate-/l*79.7%
associate-*r*79.7%
*-commutative79.7%
associate-*r/79.7%
*-commutative79.7%
associate-/l*79.7%
Simplified79.7%
if -4.50000000000000046e158 < t < -2.50000000000000008e82Initial program 55.3%
+-commutative55.3%
associate-+r-55.3%
*-commutative55.3%
associate-*r*55.3%
*-commutative55.3%
associate-+r-55.3%
+-commutative55.3%
associate-*l*55.3%
associate-*l*55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in x around inf 67.7%
associate-/l*67.7%
*-commutative67.7%
Simplified67.7%
if -2.50000000000000008e82 < t < -9.5000000000000002e58 or 1.5000000000000001e-66 < t Initial program 75.5%
+-commutative75.5%
associate-+r-75.5%
*-commutative75.5%
associate-*r*78.2%
*-commutative78.2%
associate-+r-78.2%
+-commutative78.2%
associate-*l*78.2%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in z around inf 52.6%
associate-/l*58.7%
associate-*r*58.7%
*-commutative58.7%
associate-*r*58.7%
associate-*r/58.7%
*-commutative58.7%
Simplified58.7%
if -9.5000000000000002e58 < t < -4.19999999999999989e27 or -2.0999999999999999e-159 < t < 6.59999999999999994e-289Initial program 90.2%
+-commutative90.2%
associate-+r-90.2%
*-commutative90.2%
associate-*r*85.4%
*-commutative85.4%
associate-+r-85.4%
+-commutative85.4%
associate-*l*85.5%
associate-*l*90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in b around inf 52.9%
*-commutative52.9%
Simplified52.9%
if -4.19999999999999989e27 < t < -2.0999999999999999e-159 or 6.59999999999999994e-289 < t < 1.5000000000000001e-66Initial program 92.5%
+-commutative92.5%
associate-+r-92.5%
*-commutative92.5%
associate-*r*88.3%
*-commutative88.3%
associate-+r-88.3%
+-commutative88.3%
associate-*l*87.2%
associate-*l*92.5%
*-commutative92.5%
Simplified92.5%
Applied egg-rr90.5%
Taylor expanded in x around inf 57.7%
associate-/l*57.7%
associate-/r*52.5%
Simplified52.5%
Taylor expanded in y around 0 57.7%
associate-/l/57.7%
Simplified57.7%
Final simplification60.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ y (* z c)))))
(t_2 (/ b (* z c)))
(t_3 (* a (/ (* -4.0 t) c))))
(if (<= t -3e+158)
(* t (* a (/ -4.0 c)))
(if (<= t -2.75e+82)
t_1
(if (<= t -2.4e+58)
t_3
(if (<= t -2.8e+20)
t_2
(if (<= t -1.32e-159)
t_1
(if (<= t -7.4e-289) t_2 (if (<= t 1.95e-66) t_1 t_3)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = b / (z * c);
double t_3 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -3e+158) {
tmp = t * (a * (-4.0 / c));
} else if (t <= -2.75e+82) {
tmp = t_1;
} else if (t <= -2.4e+58) {
tmp = t_3;
} else if (t <= -2.8e+20) {
tmp = t_2;
} else if (t <= -1.32e-159) {
tmp = t_1;
} else if (t <= -7.4e-289) {
tmp = t_2;
} else if (t <= 1.95e-66) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (z * c)))
t_2 = b / (z * c)
t_3 = a * (((-4.0d0) * t) / c)
if (t <= (-3d+158)) then
tmp = t * (a * ((-4.0d0) / c))
else if (t <= (-2.75d+82)) then
tmp = t_1
else if (t <= (-2.4d+58)) then
tmp = t_3
else if (t <= (-2.8d+20)) then
tmp = t_2
else if (t <= (-1.32d-159)) then
tmp = t_1
else if (t <= (-7.4d-289)) then
tmp = t_2
else if (t <= 1.95d-66) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = b / (z * c);
double t_3 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -3e+158) {
tmp = t * (a * (-4.0 / c));
} else if (t <= -2.75e+82) {
tmp = t_1;
} else if (t <= -2.4e+58) {
tmp = t_3;
} else if (t <= -2.8e+20) {
tmp = t_2;
} else if (t <= -1.32e-159) {
tmp = t_1;
} else if (t <= -7.4e-289) {
tmp = t_2;
} else if (t <= 1.95e-66) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * (y / (z * c))) t_2 = b / (z * c) t_3 = a * ((-4.0 * t) / c) tmp = 0 if t <= -3e+158: tmp = t * (a * (-4.0 / c)) elif t <= -2.75e+82: tmp = t_1 elif t <= -2.4e+58: tmp = t_3 elif t <= -2.8e+20: tmp = t_2 elif t <= -1.32e-159: tmp = t_1 elif t <= -7.4e-289: tmp = t_2 elif t <= 1.95e-66: tmp = t_1 else: tmp = t_3 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) t_2 = Float64(b / Float64(z * c)) t_3 = Float64(a * Float64(Float64(-4.0 * t) / c)) tmp = 0.0 if (t <= -3e+158) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); elseif (t <= -2.75e+82) tmp = t_1; elseif (t <= -2.4e+58) tmp = t_3; elseif (t <= -2.8e+20) tmp = t_2; elseif (t <= -1.32e-159) tmp = t_1; elseif (t <= -7.4e-289) tmp = t_2; elseif (t <= 1.95e-66) tmp = t_1; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
t_2 = b / (z * c);
t_3 = a * ((-4.0 * t) / c);
tmp = 0.0;
if (t <= -3e+158)
tmp = t * (a * (-4.0 / c));
elseif (t <= -2.75e+82)
tmp = t_1;
elseif (t <= -2.4e+58)
tmp = t_3;
elseif (t <= -2.8e+20)
tmp = t_2;
elseif (t <= -1.32e-159)
tmp = t_1;
elseif (t <= -7.4e-289)
tmp = t_2;
elseif (t <= 1.95e-66)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+158], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.75e+82], t$95$1, If[LessEqual[t, -2.4e+58], t$95$3, If[LessEqual[t, -2.8e+20], t$95$2, If[LessEqual[t, -1.32e-159], t$95$1, If[LessEqual[t, -7.4e-289], t$95$2, If[LessEqual[t, 1.95e-66], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
t_2 := \frac{b}{z \cdot c}\\
t_3 := a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{if}\;t \leq -3 \cdot 10^{+158}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;t \leq -2.75 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+58}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.32 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.4 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -3e158Initial program 77.2%
Simplified82.5%
Taylor expanded in a around inf 77.2%
Taylor expanded in a around inf 79.7%
*-commutative79.7%
*-commutative79.7%
associate-/l*79.7%
associate-*r*79.7%
*-commutative79.7%
associate-*r/79.7%
*-commutative79.7%
associate-/l*79.7%
Simplified79.7%
if -3e158 < t < -2.74999999999999998e82 or -2.8e20 < t < -1.32e-159 or -7.39999999999999977e-289 < t < 1.94999999999999991e-66Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
associate-*r*83.8%
*-commutative83.8%
associate-+r-83.8%
+-commutative83.8%
associate-*l*82.9%
associate-*l*88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in x around inf 58.1%
associate-/l*58.1%
*-commutative58.1%
Simplified58.1%
if -2.74999999999999998e82 < t < -2.4e58 or 1.94999999999999991e-66 < t Initial program 75.5%
+-commutative75.5%
associate-+r-75.5%
*-commutative75.5%
associate-*r*78.2%
*-commutative78.2%
associate-+r-78.2%
+-commutative78.2%
associate-*l*78.2%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in z around inf 52.6%
associate-/l*58.7%
associate-*r*58.7%
*-commutative58.7%
associate-*r*58.7%
associate-*r/58.7%
*-commutative58.7%
Simplified58.7%
if -2.4e58 < t < -2.8e20 or -1.32e-159 < t < -7.39999999999999977e-289Initial program 93.7%
+-commutative93.7%
associate-+r-93.7%
*-commutative93.7%
associate-*r*90.7%
*-commutative90.7%
associate-+r-90.7%
+-commutative90.7%
associate-*l*90.7%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in b around inf 55.7%
*-commutative55.7%
Simplified55.7%
Final simplification60.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -1.32e+163)
(/ (* 9.0 (* y (/ x c))) z)
(if (<= x -6.2e+132)
(* -4.0 (/ (* a t) c))
(if (<= x -1.25e+75)
(/ (* x (* 9.0 y)) (* z c))
(if (<= x -2.65e-188)
(* t (* a (/ -4.0 c)))
(if (<= x 1.15e-67) (/ b (* z c)) (* 9.0 (* x (/ (/ y z) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.32e+163) {
tmp = (9.0 * (y * (x / c))) / z;
} else if (x <= -6.2e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -1.25e+75) {
tmp = (x * (9.0 * y)) / (z * c);
} else if (x <= -2.65e-188) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 1.15e-67) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-1.32d+163)) then
tmp = (9.0d0 * (y * (x / c))) / z
else if (x <= (-6.2d+132)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (x <= (-1.25d+75)) then
tmp = (x * (9.0d0 * y)) / (z * c)
else if (x <= (-2.65d-188)) then
tmp = t * (a * ((-4.0d0) / c))
else if (x <= 1.15d-67) then
tmp = b / (z * c)
else
tmp = 9.0d0 * (x * ((y / z) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.32e+163) {
tmp = (9.0 * (y * (x / c))) / z;
} else if (x <= -6.2e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -1.25e+75) {
tmp = (x * (9.0 * y)) / (z * c);
} else if (x <= -2.65e-188) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 1.15e-67) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.32e+163: tmp = (9.0 * (y * (x / c))) / z elif x <= -6.2e+132: tmp = -4.0 * ((a * t) / c) elif x <= -1.25e+75: tmp = (x * (9.0 * y)) / (z * c) elif x <= -2.65e-188: tmp = t * (a * (-4.0 / c)) elif x <= 1.15e-67: tmp = b / (z * c) else: tmp = 9.0 * (x * ((y / z) / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.32e+163) tmp = Float64(Float64(9.0 * Float64(y * Float64(x / c))) / z); elseif (x <= -6.2e+132) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (x <= -1.25e+75) tmp = Float64(Float64(x * Float64(9.0 * y)) / Float64(z * c)); elseif (x <= -2.65e-188) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); elseif (x <= 1.15e-67) tmp = Float64(b / Float64(z * c)); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -1.32e+163)
tmp = (9.0 * (y * (x / c))) / z;
elseif (x <= -6.2e+132)
tmp = -4.0 * ((a * t) / c);
elseif (x <= -1.25e+75)
tmp = (x * (9.0 * y)) / (z * c);
elseif (x <= -2.65e-188)
tmp = t * (a * (-4.0 / c));
elseif (x <= 1.15e-67)
tmp = b / (z * c);
else
tmp = 9.0 * (x * ((y / z) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.32e+163], N[(N[(9.0 * N[(y * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, -6.2e+132], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.25e+75], N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.65e-188], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-67], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.32 \cdot 10^{+163}:\\
\;\;\;\;\frac{9 \cdot \left(y \cdot \frac{x}{c}\right)}{z}\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{+132}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{+75}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;x \leq -2.65 \cdot 10^{-188}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-67}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c}\right)\\
\end{array}
\end{array}
if x < -1.31999999999999995e163Initial program 81.6%
+-commutative81.6%
associate-+r-81.6%
*-commutative81.6%
associate-*r*78.5%
*-commutative78.5%
associate-+r-78.5%
+-commutative78.5%
associate-*l*78.5%
associate-*l*81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in x around inf 59.1%
*-commutative59.1%
associate-/r*62.0%
associate-*l/62.0%
associate-/l*55.9%
associate-*l*55.9%
Simplified55.9%
Taylor expanded in x around 0 62.0%
*-commutative62.0%
associate-/l*61.9%
Simplified61.9%
if -1.31999999999999995e163 < x < -6.1999999999999995e132Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*81.5%
*-commutative81.5%
associate-+r-81.5%
+-commutative81.5%
associate-*l*81.5%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in z around inf 50.9%
*-commutative50.9%
Simplified50.9%
if -6.1999999999999995e132 < x < -1.2500000000000001e75Initial program 92.3%
Simplified92.3%
Taylor expanded in a around inf 75.8%
Taylor expanded in x around inf 84.4%
associate-*r*84.4%
*-commutative84.4%
associate-*r*84.4%
Simplified84.4%
if -1.2500000000000001e75 < x < -2.65000000000000007e-188Initial program 77.9%
Simplified79.7%
Taylor expanded in a around inf 74.2%
Taylor expanded in a around inf 46.7%
*-commutative46.7%
*-commutative46.7%
associate-/l*51.6%
associate-*r*51.6%
*-commutative51.6%
associate-*r/51.6%
*-commutative51.6%
associate-/l*51.5%
Simplified51.5%
if -2.65000000000000007e-188 < x < 1.15e-67Initial program 89.1%
+-commutative89.1%
associate-+r-89.1%
*-commutative89.1%
associate-*r*90.3%
*-commutative90.3%
associate-+r-90.3%
+-commutative90.3%
associate-*l*88.9%
associate-*l*90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in b around inf 49.3%
*-commutative49.3%
Simplified49.3%
if 1.15e-67 < x Initial program 82.3%
+-commutative82.3%
associate-+r-82.3%
*-commutative82.3%
associate-*r*78.4%
*-commutative78.4%
associate-+r-78.4%
+-commutative78.4%
associate-*l*78.4%
associate-*l*82.3%
*-commutative82.3%
Simplified82.3%
Applied egg-rr78.9%
Taylor expanded in x around inf 54.0%
associate-/l*54.2%
associate-/r*55.7%
Simplified55.7%
Taylor expanded in y around 0 54.2%
associate-/l/55.6%
Simplified55.6%
Final simplification54.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -1.32e+163)
(/ (* 9.0 (* y (/ x c))) z)
(if (<= x -6.2e+132)
(* -4.0 (/ (* a t) c))
(if (<= x -1.5e+74)
(* 9.0 (* x (/ y (* z c))))
(if (<= x -1.95e-188)
(* t (* a (/ -4.0 c)))
(if (<= x 1.05e-77) (/ b (* z c)) (* 9.0 (* x (/ (/ y z) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.32e+163) {
tmp = (9.0 * (y * (x / c))) / z;
} else if (x <= -6.2e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -1.5e+74) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -1.95e-188) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 1.05e-77) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-1.32d+163)) then
tmp = (9.0d0 * (y * (x / c))) / z
else if (x <= (-6.2d+132)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (x <= (-1.5d+74)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (x <= (-1.95d-188)) then
tmp = t * (a * ((-4.0d0) / c))
else if (x <= 1.05d-77) then
tmp = b / (z * c)
else
tmp = 9.0d0 * (x * ((y / z) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.32e+163) {
tmp = (9.0 * (y * (x / c))) / z;
} else if (x <= -6.2e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -1.5e+74) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -1.95e-188) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 1.05e-77) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.32e+163: tmp = (9.0 * (y * (x / c))) / z elif x <= -6.2e+132: tmp = -4.0 * ((a * t) / c) elif x <= -1.5e+74: tmp = 9.0 * (x * (y / (z * c))) elif x <= -1.95e-188: tmp = t * (a * (-4.0 / c)) elif x <= 1.05e-77: tmp = b / (z * c) else: tmp = 9.0 * (x * ((y / z) / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.32e+163) tmp = Float64(Float64(9.0 * Float64(y * Float64(x / c))) / z); elseif (x <= -6.2e+132) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (x <= -1.5e+74) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (x <= -1.95e-188) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); elseif (x <= 1.05e-77) tmp = Float64(b / Float64(z * c)); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -1.32e+163)
tmp = (9.0 * (y * (x / c))) / z;
elseif (x <= -6.2e+132)
tmp = -4.0 * ((a * t) / c);
elseif (x <= -1.5e+74)
tmp = 9.0 * (x * (y / (z * c)));
elseif (x <= -1.95e-188)
tmp = t * (a * (-4.0 / c));
elseif (x <= 1.05e-77)
tmp = b / (z * c);
else
tmp = 9.0 * (x * ((y / z) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.32e+163], N[(N[(9.0 * N[(y * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, -6.2e+132], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e+74], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.95e-188], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-77], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.32 \cdot 10^{+163}:\\
\;\;\;\;\frac{9 \cdot \left(y \cdot \frac{x}{c}\right)}{z}\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{+132}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+74}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq -1.95 \cdot 10^{-188}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-77}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c}\right)\\
\end{array}
\end{array}
if x < -1.31999999999999995e163Initial program 81.6%
+-commutative81.6%
associate-+r-81.6%
*-commutative81.6%
associate-*r*78.5%
*-commutative78.5%
associate-+r-78.5%
+-commutative78.5%
associate-*l*78.5%
associate-*l*81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in x around inf 59.1%
*-commutative59.1%
associate-/r*62.0%
associate-*l/62.0%
associate-/l*55.9%
associate-*l*55.9%
Simplified55.9%
Taylor expanded in x around 0 62.0%
*-commutative62.0%
associate-/l*61.9%
Simplified61.9%
if -1.31999999999999995e163 < x < -6.1999999999999995e132Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*81.5%
*-commutative81.5%
associate-+r-81.5%
+-commutative81.5%
associate-*l*81.5%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in z around inf 50.9%
*-commutative50.9%
Simplified50.9%
if -6.1999999999999995e132 < x < -1.5e74Initial program 92.3%
+-commutative92.3%
associate-+r-92.3%
*-commutative92.3%
associate-*r*92.3%
*-commutative92.3%
associate-+r-92.3%
+-commutative92.3%
associate-*l*92.3%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around inf 84.5%
associate-/l*84.5%
*-commutative84.5%
Simplified84.5%
if -1.5e74 < x < -1.94999999999999988e-188Initial program 77.9%
Simplified79.7%
Taylor expanded in a around inf 74.2%
Taylor expanded in a around inf 46.7%
*-commutative46.7%
*-commutative46.7%
associate-/l*51.6%
associate-*r*51.6%
*-commutative51.6%
associate-*r/51.6%
*-commutative51.6%
associate-/l*51.5%
Simplified51.5%
if -1.94999999999999988e-188 < x < 1.05000000000000008e-77Initial program 90.2%
+-commutative90.2%
associate-+r-90.2%
*-commutative90.2%
associate-*r*91.5%
*-commutative91.5%
associate-+r-91.5%
+-commutative91.5%
associate-*l*90.0%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in b around inf 50.0%
*-commutative50.0%
Simplified50.0%
if 1.05000000000000008e-77 < x Initial program 81.5%
+-commutative81.5%
associate-+r-81.5%
*-commutative81.5%
associate-*r*77.6%
*-commutative77.6%
associate-+r-77.6%
+-commutative77.6%
associate-*l*77.7%
associate-*l*81.5%
*-commutative81.5%
Simplified81.5%
Applied egg-rr79.4%
Taylor expanded in x around inf 52.7%
associate-/l*53.0%
associate-/r*54.5%
Simplified54.5%
Taylor expanded in y around 0 53.0%
associate-/l/54.3%
Simplified54.3%
Final simplification54.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -1.35e+163)
(* 9.0 (/ (* y (/ x c)) z))
(if (<= x -5.6e+132)
(* -4.0 (/ (* a t) c))
(if (<= x -3.5e+74)
(* 9.0 (* x (/ y (* z c))))
(if (<= x -1e-185)
(* t (* a (/ -4.0 c)))
(if (<= x 2e-67) (/ b (* z c)) (* 9.0 (* x (/ (/ y z) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.35e+163) {
tmp = 9.0 * ((y * (x / c)) / z);
} else if (x <= -5.6e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -3.5e+74) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -1e-185) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 2e-67) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-1.35d+163)) then
tmp = 9.0d0 * ((y * (x / c)) / z)
else if (x <= (-5.6d+132)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (x <= (-3.5d+74)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (x <= (-1d-185)) then
tmp = t * (a * ((-4.0d0) / c))
else if (x <= 2d-67) then
tmp = b / (z * c)
else
tmp = 9.0d0 * (x * ((y / z) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.35e+163) {
tmp = 9.0 * ((y * (x / c)) / z);
} else if (x <= -5.6e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -3.5e+74) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -1e-185) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 2e-67) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.35e+163: tmp = 9.0 * ((y * (x / c)) / z) elif x <= -5.6e+132: tmp = -4.0 * ((a * t) / c) elif x <= -3.5e+74: tmp = 9.0 * (x * (y / (z * c))) elif x <= -1e-185: tmp = t * (a * (-4.0 / c)) elif x <= 2e-67: tmp = b / (z * c) else: tmp = 9.0 * (x * ((y / z) / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.35e+163) tmp = Float64(9.0 * Float64(Float64(y * Float64(x / c)) / z)); elseif (x <= -5.6e+132) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (x <= -3.5e+74) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (x <= -1e-185) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); elseif (x <= 2e-67) tmp = Float64(b / Float64(z * c)); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -1.35e+163)
tmp = 9.0 * ((y * (x / c)) / z);
elseif (x <= -5.6e+132)
tmp = -4.0 * ((a * t) / c);
elseif (x <= -3.5e+74)
tmp = 9.0 * (x * (y / (z * c)));
elseif (x <= -1e-185)
tmp = t * (a * (-4.0 / c));
elseif (x <= 2e-67)
tmp = b / (z * c);
else
tmp = 9.0 * (x * ((y / z) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.35e+163], N[(9.0 * N[(N[(y * N[(x / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.6e+132], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e+74], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1e-185], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-67], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+163}:\\
\;\;\;\;9 \cdot \frac{y \cdot \frac{x}{c}}{z}\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{+132}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+74}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-185}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-67}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c}\right)\\
\end{array}
\end{array}
if x < -1.35e163Initial program 81.6%
+-commutative81.6%
associate-+r-81.6%
*-commutative81.6%
associate-*r*78.5%
*-commutative78.5%
associate-+r-78.5%
+-commutative78.5%
associate-*l*78.5%
associate-*l*81.6%
*-commutative81.6%
Simplified81.6%
Applied egg-rr76.5%
Taylor expanded in x around inf 59.1%
associate-/r*62.0%
*-commutative62.0%
associate-/l*61.8%
Simplified61.8%
if -1.35e163 < x < -5.5999999999999998e132Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*81.5%
*-commutative81.5%
associate-+r-81.5%
+-commutative81.5%
associate-*l*81.5%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in z around inf 50.9%
*-commutative50.9%
Simplified50.9%
if -5.5999999999999998e132 < x < -3.50000000000000014e74Initial program 92.3%
+-commutative92.3%
associate-+r-92.3%
*-commutative92.3%
associate-*r*92.3%
*-commutative92.3%
associate-+r-92.3%
+-commutative92.3%
associate-*l*92.3%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around inf 84.5%
associate-/l*84.5%
*-commutative84.5%
Simplified84.5%
if -3.50000000000000014e74 < x < -9.9999999999999999e-186Initial program 77.5%
Simplified79.3%
Taylor expanded in a around inf 73.8%
Taylor expanded in a around inf 45.8%
*-commutative45.8%
*-commutative45.8%
associate-/l*50.8%
associate-*r*50.7%
*-commutative50.7%
associate-*r/50.7%
*-commutative50.7%
associate-/l*50.7%
Simplified50.7%
if -9.9999999999999999e-186 < x < 1.99999999999999989e-67Initial program 89.2%
+-commutative89.2%
associate-+r-89.2%
*-commutative89.2%
associate-*r*90.5%
*-commutative90.5%
associate-+r-90.5%
+-commutative90.5%
associate-*l*89.1%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in b around inf 48.6%
*-commutative48.6%
Simplified48.6%
if 1.99999999999999989e-67 < x Initial program 82.3%
+-commutative82.3%
associate-+r-82.3%
*-commutative82.3%
associate-*r*78.4%
*-commutative78.4%
associate-+r-78.4%
+-commutative78.4%
associate-*l*78.4%
associate-*l*82.3%
*-commutative82.3%
Simplified82.3%
Applied egg-rr78.9%
Taylor expanded in x around inf 54.0%
associate-/l*54.2%
associate-/r*55.7%
Simplified55.7%
Taylor expanded in y around 0 54.2%
associate-/l/55.6%
Simplified55.6%
Final simplification54.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -1.32e+163)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= x -6.2e+132)
(* -4.0 (/ (* a t) c))
(if (<= x -2.15e+75)
(* 9.0 (* x (/ y (* z c))))
(if (<= x -3.2e-186)
(* t (* a (/ -4.0 c)))
(if (<= x 4.7e-68) (/ b (* z c)) (* 9.0 (* x (/ (/ y z) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.32e+163) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (x <= -6.2e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -2.15e+75) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -3.2e-186) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 4.7e-68) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-1.32d+163)) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (x <= (-6.2d+132)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (x <= (-2.15d+75)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (x <= (-3.2d-186)) then
tmp = t * (a * ((-4.0d0) / c))
else if (x <= 4.7d-68) then
tmp = b / (z * c)
else
tmp = 9.0d0 * (x * ((y / z) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.32e+163) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (x <= -6.2e+132) {
tmp = -4.0 * ((a * t) / c);
} else if (x <= -2.15e+75) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (x <= -3.2e-186) {
tmp = t * (a * (-4.0 / c));
} else if (x <= 4.7e-68) {
tmp = b / (z * c);
} else {
tmp = 9.0 * (x * ((y / z) / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.32e+163: tmp = 9.0 * ((x / c) * (y / z)) elif x <= -6.2e+132: tmp = -4.0 * ((a * t) / c) elif x <= -2.15e+75: tmp = 9.0 * (x * (y / (z * c))) elif x <= -3.2e-186: tmp = t * (a * (-4.0 / c)) elif x <= 4.7e-68: tmp = b / (z * c) else: tmp = 9.0 * (x * ((y / z) / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.32e+163) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (x <= -6.2e+132) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (x <= -2.15e+75) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (x <= -3.2e-186) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); elseif (x <= 4.7e-68) tmp = Float64(b / Float64(z * c)); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -1.32e+163)
tmp = 9.0 * ((x / c) * (y / z));
elseif (x <= -6.2e+132)
tmp = -4.0 * ((a * t) / c);
elseif (x <= -2.15e+75)
tmp = 9.0 * (x * (y / (z * c)));
elseif (x <= -3.2e-186)
tmp = t * (a * (-4.0 / c));
elseif (x <= 4.7e-68)
tmp = b / (z * c);
else
tmp = 9.0 * (x * ((y / z) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.32e+163], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.2e+132], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.15e+75], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-186], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.7e-68], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.32 \cdot 10^{+163}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{+132}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;x \leq -2.15 \cdot 10^{+75}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-186}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-68}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c}\right)\\
\end{array}
\end{array}
if x < -1.31999999999999995e163Initial program 81.6%
Simplified84.7%
Taylor expanded in a around inf 70.0%
Taylor expanded in x around inf 59.1%
*-commutative59.1%
*-commutative59.1%
times-frac61.8%
Simplified61.8%
if -1.31999999999999995e163 < x < -6.1999999999999995e132Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*81.5%
*-commutative81.5%
associate-+r-81.5%
+-commutative81.5%
associate-*l*81.5%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in z around inf 50.9%
*-commutative50.9%
Simplified50.9%
if -6.1999999999999995e132 < x < -2.1500000000000001e75Initial program 92.3%
+-commutative92.3%
associate-+r-92.3%
*-commutative92.3%
associate-*r*92.3%
*-commutative92.3%
associate-+r-92.3%
+-commutative92.3%
associate-*l*92.3%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around inf 84.5%
associate-/l*84.5%
*-commutative84.5%
Simplified84.5%
if -2.1500000000000001e75 < x < -3.2e-186Initial program 77.5%
Simplified79.3%
Taylor expanded in a around inf 73.8%
Taylor expanded in a around inf 45.8%
*-commutative45.8%
*-commutative45.8%
associate-/l*50.8%
associate-*r*50.7%
*-commutative50.7%
associate-*r/50.7%
*-commutative50.7%
associate-/l*50.7%
Simplified50.7%
if -3.2e-186 < x < 4.69999999999999988e-68Initial program 89.2%
+-commutative89.2%
associate-+r-89.2%
*-commutative89.2%
associate-*r*90.5%
*-commutative90.5%
associate-+r-90.5%
+-commutative90.5%
associate-*l*89.1%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in b around inf 48.6%
*-commutative48.6%
Simplified48.6%
if 4.69999999999999988e-68 < x Initial program 82.3%
+-commutative82.3%
associate-+r-82.3%
*-commutative82.3%
associate-*r*78.4%
*-commutative78.4%
associate-+r-78.4%
+-commutative78.4%
associate-*l*78.4%
associate-*l*82.3%
*-commutative82.3%
Simplified82.3%
Applied egg-rr78.9%
Taylor expanded in x around inf 54.0%
associate-/l*54.2%
associate-/r*55.7%
Simplified55.7%
Taylor expanded in y around 0 54.2%
associate-/l/55.6%
Simplified55.6%
Final simplification54.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -5.5e+127)
(/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* x y) z))) c)
(if (<= z 2.25e+127)
(/ (+ (- (* y (* 9.0 x)) (* a (* t (* z 4.0)))) b) (* z c))
(- (+ (* 9.0 (/ (* x y) (* z c))) (/ b (* z c))) (* 4.0 (/ (* a t) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.5e+127) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else if (z <= 2.25e+127) {
tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
} else {
tmp = ((9.0 * ((x * y) / (z * c))) + (b / (z * c))) - (4.0 * ((a * t) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-5.5d+127)) then
tmp = (((-4.0d0) * (a * t)) + (9.0d0 * ((x * y) / z))) / c
else if (z <= 2.25d+127) then
tmp = (((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0)))) + b) / (z * c)
else
tmp = ((9.0d0 * ((x * y) / (z * c))) + (b / (z * c))) - (4.0d0 * ((a * t) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.5e+127) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else if (z <= 2.25e+127) {
tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
} else {
tmp = ((9.0 * ((x * y) / (z * c))) + (b / (z * c))) - (4.0 * ((a * t) / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5.5e+127: tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c elif z <= 2.25e+127: tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c) else: tmp = ((9.0 * ((x * y) / (z * c))) + (b / (z * c))) - (4.0 * ((a * t) / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5.5e+127) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); elseif (z <= 2.25e+127) tmp = Float64(Float64(Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0)))) + b) / Float64(z * c)); else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))) + Float64(b / Float64(z * c))) - Float64(4.0 * Float64(Float64(a * t) / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -5.5e+127)
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
elseif (z <= 2.25e+127)
tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
else
tmp = ((9.0 * ((x * y) / (z * c))) + (b / (z * c))) - (4.0 * ((a * t) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5.5e+127], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.25e+127], N[(N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+127}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+127}:\\
\;\;\;\;\frac{\left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right) + b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \frac{x \cdot y}{z \cdot c} + \frac{b}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -5.50000000000000041e127Initial program 64.1%
+-commutative64.1%
associate-+r-64.1%
*-commutative64.1%
associate-*r*59.7%
*-commutative59.7%
associate-+r-59.7%
+-commutative59.7%
associate-*l*59.7%
associate-*l*66.6%
*-commutative66.6%
Simplified66.6%
Applied egg-rr79.8%
Taylor expanded in b around 0 71.2%
Taylor expanded in a around 0 75.5%
Taylor expanded in c around 0 82.2%
if -5.50000000000000041e127 < z < 2.25000000000000017e127Initial program 95.4%
if 2.25000000000000017e127 < z Initial program 50.7%
+-commutative50.7%
associate-+r-50.7%
*-commutative50.7%
associate-*r*50.9%
*-commutative50.9%
associate-+r-50.9%
+-commutative50.9%
associate-*l*50.9%
associate-*l*58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in x around 0 81.8%
Final simplification91.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -3.7e+127)
(/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* x y) z))) c)
(if (<= z 7.8e+188)
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))
(* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.7e+127) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else if (z <= 7.8e+188) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-3.7d+127)) then
tmp = (((-4.0d0) * (a * t)) + (9.0d0 * ((x * y) / z))) / c
else if (z <= 7.8d+188) then
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
else
tmp = t * (((-4.0d0) * (a / c)) + (b / (c * (z * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.7e+127) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else if (z <= 7.8e+188) {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -3.7e+127: tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c elif z <= 7.8e+188: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) else: tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t)))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -3.7e+127) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); elseif (z <= 7.8e+188) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(c * Float64(z * t))))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -3.7e+127)
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
elseif (z <= 7.8e+188)
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
else
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.7e+127], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 7.8e+188], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+127}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+188}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{c \cdot \left(z \cdot t\right)}\right)\\
\end{array}
\end{array}
if z < -3.6999999999999998e127Initial program 64.1%
+-commutative64.1%
associate-+r-64.1%
*-commutative64.1%
associate-*r*59.7%
*-commutative59.7%
associate-+r-59.7%
+-commutative59.7%
associate-*l*59.7%
associate-*l*66.6%
*-commutative66.6%
Simplified66.6%
Applied egg-rr79.8%
Taylor expanded in b around 0 71.2%
Taylor expanded in a around 0 75.5%
Taylor expanded in c around 0 82.2%
if -3.6999999999999998e127 < z < 7.7999999999999999e188Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
*-commutative93.2%
associate-*r*93.7%
*-commutative93.7%
associate-+r-93.7%
+-commutative93.7%
associate-*l*93.1%
associate-*l*93.6%
*-commutative93.6%
Simplified93.6%
if 7.7999999999999999e188 < z Initial program 40.0%
+-commutative40.0%
associate-+r-40.0%
*-commutative40.0%
associate-*r*40.1%
*-commutative40.1%
associate-+r-40.1%
+-commutative40.1%
associate-*l*40.1%
associate-*l*44.3%
*-commutative44.3%
Simplified44.3%
Taylor expanded in x around 0 39.8%
Taylor expanded in t around inf 78.4%
Final simplification90.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.5e-98) (not (<= z 1.02e-126))) (/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* x y) z))) c) (/ (+ (* y (* 9.0 x)) b) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.5e-98) || !(z <= 1.02e-126)) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = ((y * (9.0 * x)) + b) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.5d-98)) .or. (.not. (z <= 1.02d-126))) then
tmp = (((-4.0d0) * (a * t)) + (9.0d0 * ((x * y) / z))) / c
else
tmp = ((y * (9.0d0 * x)) + b) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.5e-98) || !(z <= 1.02e-126)) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = ((y * (9.0 * x)) + b) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.5e-98) or not (z <= 1.02e-126): tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c else: tmp = ((y * (9.0 * x)) + b) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.5e-98) || !(z <= 1.02e-126)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); else tmp = Float64(Float64(Float64(y * Float64(9.0 * x)) + b) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.5e-98) || ~((z <= 1.02e-126)))
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
else
tmp = ((y * (9.0 * x)) + b) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.5e-98], N[Not[LessEqual[z, 1.02e-126]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-98} \lor \neg \left(z \leq 1.02 \cdot 10^{-126}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot x\right) + b}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.5e-98 or 1.02000000000000004e-126 < z Initial program 75.8%
+-commutative75.8%
associate-+r-75.8%
*-commutative75.8%
associate-*r*74.7%
*-commutative74.7%
associate-+r-74.7%
+-commutative74.7%
associate-*l*74.7%
associate-*l*78.7%
*-commutative78.7%
Simplified78.7%
Applied egg-rr80.7%
Taylor expanded in b around 0 64.6%
Taylor expanded in a around 0 69.3%
Taylor expanded in c around 0 74.0%
if -1.5e-98 < z < 1.02000000000000004e-126Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
*-commutative98.6%
associate-*r*99.7%
*-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-*l*98.6%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around inf 89.2%
associate-*r*89.2%
Simplified89.2%
Final simplification79.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= t -3e+158) (not (<= t 1.55e-147))) (* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t))))) (/ (+ (* y (* 9.0 x)) b) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -3e+158) || !(t <= 1.55e-147)) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else {
tmp = ((y * (9.0 * x)) + b) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-3d+158)) .or. (.not. (t <= 1.55d-147))) then
tmp = t * (((-4.0d0) * (a / c)) + (b / (c * (z * t))))
else
tmp = ((y * (9.0d0 * x)) + b) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -3e+158) || !(t <= 1.55e-147)) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else {
tmp = ((y * (9.0 * x)) + b) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -3e+158) or not (t <= 1.55e-147): tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t)))) else: tmp = ((y * (9.0 * x)) + b) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -3e+158) || !(t <= 1.55e-147)) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(c * Float64(z * t))))); else tmp = Float64(Float64(Float64(y * Float64(9.0 * x)) + b) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((t <= -3e+158) || ~((t <= 1.55e-147)))
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
else
tmp = ((y * (9.0 * x)) + b) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -3e+158], N[Not[LessEqual[t, 1.55e-147]], $MachinePrecision]], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+158} \lor \neg \left(t \leq 1.55 \cdot 10^{-147}\right):\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{c \cdot \left(z \cdot t\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot x\right) + b}{z \cdot c}\\
\end{array}
\end{array}
if t < -3e158 or 1.5500000000000001e-147 < t Initial program 77.6%
+-commutative77.6%
associate-+r-77.6%
*-commutative77.6%
associate-*r*80.7%
*-commutative80.7%
associate-+r-80.7%
+-commutative80.7%
associate-*l*80.7%
associate-*l*80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in x around 0 62.2%
Taylor expanded in t around inf 69.7%
if -3e158 < t < 1.5500000000000001e-147Initial program 89.2%
+-commutative89.2%
associate-+r-89.2%
*-commutative89.2%
associate-*r*85.5%
*-commutative85.5%
associate-+r-85.5%
+-commutative85.5%
associate-*l*84.7%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around inf 79.4%
associate-*r*79.5%
Simplified79.5%
Final simplification74.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -4.3e+158)
(* t (* a (/ -4.0 c)))
(if (<= t 5.2e+18)
(/ (+ (* y (* 9.0 x)) b) (* z c))
(* a (/ (* -4.0 t) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -4.3e+158) {
tmp = t * (a * (-4.0 / c));
} else if (t <= 5.2e+18) {
tmp = ((y * (9.0 * x)) + b) / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-4.3d+158)) then
tmp = t * (a * ((-4.0d0) / c))
else if (t <= 5.2d+18) then
tmp = ((y * (9.0d0 * x)) + b) / (z * c)
else
tmp = a * (((-4.0d0) * t) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -4.3e+158) {
tmp = t * (a * (-4.0 / c));
} else if (t <= 5.2e+18) {
tmp = ((y * (9.0 * x)) + b) / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -4.3e+158: tmp = t * (a * (-4.0 / c)) elif t <= 5.2e+18: tmp = ((y * (9.0 * x)) + b) / (z * c) else: tmp = a * ((-4.0 * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -4.3e+158) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); elseif (t <= 5.2e+18) tmp = Float64(Float64(Float64(y * Float64(9.0 * x)) + b) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -4.3e+158)
tmp = t * (a * (-4.0 / c));
elseif (t <= 5.2e+18)
tmp = ((y * (9.0 * x)) + b) / (z * c);
else
tmp = a * ((-4.0 * t) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -4.3e+158], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+18], N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{+158}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot x\right) + b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if t < -4.3e158Initial program 77.2%
Simplified82.5%
Taylor expanded in a around inf 77.2%
Taylor expanded in a around inf 79.7%
*-commutative79.7%
*-commutative79.7%
associate-/l*79.7%
associate-*r*79.7%
*-commutative79.7%
associate-*r/79.7%
*-commutative79.7%
associate-/l*79.7%
Simplified79.7%
if -4.3e158 < t < 5.2e18Initial program 86.5%
+-commutative86.5%
associate-+r-86.5%
*-commutative86.5%
associate-*r*83.6%
*-commutative83.6%
associate-+r-83.6%
+-commutative83.6%
associate-*l*83.0%
associate-*l*87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in x around inf 75.3%
associate-*r*75.3%
Simplified75.3%
if 5.2e18 < t Initial program 78.0%
+-commutative78.0%
associate-+r-78.0%
*-commutative78.0%
associate-*r*80.1%
*-commutative80.1%
associate-+r-80.1%
+-commutative80.1%
associate-*l*80.1%
associate-*l*78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around inf 58.0%
associate-/l*65.2%
associate-*r*65.2%
*-commutative65.2%
associate-*r*65.2%
associate-*r/65.2%
*-commutative65.2%
Simplified65.2%
Final simplification73.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= t -9.5e+58) (not (<= t 4.8e-54))) (* a (/ (* -4.0 t) c)) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -9.5e+58) || !(t <= 4.8e-54)) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-9.5d+58)) .or. (.not. (t <= 4.8d-54))) then
tmp = a * (((-4.0d0) * t) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -9.5e+58) || !(t <= 4.8e-54)) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -9.5e+58) or not (t <= 4.8e-54): tmp = a * ((-4.0 * t) / c) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -9.5e+58) || !(t <= 4.8e-54)) tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((t <= -9.5e+58) || ~((t <= 4.8e-54)))
tmp = a * ((-4.0 * t) / c);
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -9.5e+58], N[Not[LessEqual[t, 4.8e-54]], $MachinePrecision]], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+58} \lor \neg \left(t \leq 4.8 \cdot 10^{-54}\right):\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if t < -9.5000000000000002e58 or 4.80000000000000026e-54 < t Initial program 74.4%
+-commutative74.4%
associate-+r-74.4%
*-commutative74.4%
associate-*r*78.6%
*-commutative78.6%
associate-+r-78.6%
+-commutative78.6%
associate-*l*78.6%
associate-*l*76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around inf 58.3%
associate-/l*63.2%
associate-*r*63.2%
*-commutative63.2%
associate-*r*63.2%
associate-*r/63.2%
*-commutative63.2%
Simplified63.2%
if -9.5000000000000002e58 < t < 4.80000000000000026e-54Initial program 91.3%
+-commutative91.3%
associate-+r-91.3%
*-commutative91.3%
associate-*r*87.1%
*-commutative87.1%
associate-+r-87.1%
+-commutative87.1%
associate-*l*86.4%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in b around inf 39.1%
*-commutative39.1%
Simplified39.1%
Final simplification50.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= t -4.8e+58) (* a (/ (* -4.0 t) c)) (if (<= t 2e-93) (/ b (* z c)) (* t (* a (/ -4.0 c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -4.8e+58) {
tmp = a * ((-4.0 * t) / c);
} else if (t <= 2e-93) {
tmp = b / (z * c);
} else {
tmp = t * (a * (-4.0 / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-4.8d+58)) then
tmp = a * (((-4.0d0) * t) / c)
else if (t <= 2d-93) then
tmp = b / (z * c)
else
tmp = t * (a * ((-4.0d0) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -4.8e+58) {
tmp = a * ((-4.0 * t) / c);
} else if (t <= 2e-93) {
tmp = b / (z * c);
} else {
tmp = t * (a * (-4.0 / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -4.8e+58: tmp = a * ((-4.0 * t) / c) elif t <= 2e-93: tmp = b / (z * c) else: tmp = t * (a * (-4.0 / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -4.8e+58) tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); elseif (t <= 2e-93) tmp = Float64(b / Float64(z * c)); else tmp = Float64(t * Float64(a * Float64(-4.0 / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -4.8e+58)
tmp = a * ((-4.0 * t) / c);
elseif (t <= 2e-93)
tmp = b / (z * c);
else
tmp = t * (a * (-4.0 / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -4.8e+58], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-93], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+58}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-93}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\end{array}
\end{array}
if t < -4.8e58Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*77.5%
*-commutative77.5%
associate-+r-77.5%
+-commutative77.5%
associate-*l*77.5%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around inf 66.1%
associate-/l*70.2%
associate-*r*70.2%
*-commutative70.2%
associate-*r*70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.2%
if -4.8e58 < t < 1.9999999999999998e-93Initial program 92.9%
+-commutative92.9%
associate-+r-92.9%
*-commutative92.9%
associate-*r*88.4%
*-commutative88.4%
associate-+r-88.4%
+-commutative88.4%
associate-*l*87.6%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in b around inf 39.7%
*-commutative39.7%
Simplified39.7%
if 1.9999999999999998e-93 < t Initial program 76.8%
Simplified79.6%
Taylor expanded in a around inf 70.6%
Taylor expanded in a around inf 52.5%
*-commutative52.5%
*-commutative52.5%
associate-/l*54.9%
associate-*r*54.9%
*-commutative54.9%
associate-*r/54.9%
*-commutative54.9%
associate-/l*54.9%
Simplified54.9%
Final simplification50.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 83.5%
+-commutative83.5%
associate-+r-83.5%
*-commutative83.5%
associate-*r*83.1%
*-commutative83.1%
associate-+r-83.1%
+-commutative83.1%
associate-*l*82.7%
associate-*l*84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in b around inf 34.3%
*-commutative34.3%
Simplified34.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024086
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(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)))