
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -4e+191)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= z 1.9e-7)
(/ (+ b (- (* (* x 9.0) y) (* a (* t (* z 4.0))))) (* z c))
(*
y
(-
(/ (fma -4.0 (* a (/ t c)) (/ b (* z c))) y)
(/ (/ (* x -9.0) z) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -4e+191) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 1.9e-7) {
tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = y * ((fma(-4.0, (a * (t / c)), (b / (z * c))) / y) - (((x * -9.0) / z) / c));
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -4e+191) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (z <= 1.9e-7) tmp = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(y * Float64(Float64(fma(-4.0, Float64(a * Float64(t / c)), Float64(b / Float64(z * c))) / y) - Float64(Float64(Float64(x * -9.0) / z) / c))); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -4e+191], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.9e-7], N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(N[(N[(x * -9.0), $MachinePrecision] / 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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+191}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-7}:\\
\;\;\;\;\frac{b + \left(\left(x \cdot 9\right) \cdot y - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{b}{z \cdot c}\right)}{y} - \frac{\frac{x \cdot -9}{z}}{c}\right)\\
\end{array}
\end{array}
if z < -4.00000000000000029e191Initial program 40.8%
Simplified51.8%
Taylor expanded in a around inf 75.4%
Taylor expanded in c around 0 84.5%
Taylor expanded in x around 0 89.8%
Taylor expanded in a around 0 90.2%
if -4.00000000000000029e191 < z < 1.90000000000000007e-7Initial program 93.4%
if 1.90000000000000007e-7 < z Initial program 62.3%
Simplified67.8%
Taylor expanded in y around -inf 73.5%
Simplified82.9%
Final simplification90.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (- (* (* x 9.0) y) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -2e-191)
t_1
(* (/ 1.0 z) (/ (+ b (fma x (* 9.0 y) (* z (* t (* -4.0 a))))) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -2e-191) {
tmp = t_1;
} else {
tmp = (1.0 / z) * ((b + fma(x, (9.0 * y), (z * (t * (-4.0 * a))))) / c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -2e-191) tmp = t_1; else tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(z * Float64(t * Float64(-4.0 * a))))) / c)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-191], t$95$1, N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(\left(x \cdot 9\right) \cdot y - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-191}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + \mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(t \cdot \left(-4 \cdot a\right)\right)\right)}{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)) < -2e-191Initial program 92.0%
if -2e-191 < (/.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 73.4%
Simplified75.0%
Applied egg-rr82.2%
Final simplification86.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (- (* (* x 9.0) y) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -5e-275)
t_1
(if (<= t_1 5e-13)
(/ (+ (* -4.0 (/ (* a (* z t)) c)) (+ (* 9.0 (/ (* x y) c)) (/ b c))) z)
(if (<= t_1 INFINITY)
(/ (- b (- (* (* z 4.0) (* a t)) (* x (* 9.0 y)))) (* z c))
(* a (* -4.0 (/ t c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -5e-275) {
tmp = t_1;
} else if (t_1 <= 5e-13) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -5e-275) {
tmp = t_1;
} else if (t_1 <= 5e-13) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c) tmp = 0 if t_1 <= -5e-275: tmp = t_1 elif t_1 <= 5e-13: tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z elif t_1 <= math.inf: tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -5e-275) tmp = t_1; elseif (t_1 <= 5e-13) 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(Float64(z * 4.0) * Float64(a * t)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
tmp = 0.0;
if (t_1 <= -5e-275)
tmp = t_1;
elseif (t_1 <= 5e-13)
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
elseif (t_1 <= Inf)
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-275], t$95$1, If[LessEqual[t$95$1, 5e-13], 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[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(\left(x \cdot 9\right) \cdot y - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-13}:\\
\;\;\;\;\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(\left(z \cdot 4\right) \cdot \left(a \cdot t\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\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.99999999999999983e-275Initial program 92.2%
if -4.99999999999999983e-275 < (/.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.9999999999999999e-13Initial program 61.9%
Simplified62.0%
Taylor expanded in z around 0 93.4%
if 4.9999999999999999e-13 < (/.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 90.0%
associate-+l-90.0%
*-commutative90.0%
associate-*r*89.1%
*-commutative89.1%
associate-+l-89.1%
associate-*l*89.2%
associate-*l*87.4%
*-commutative87.4%
Simplified87.4%
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%
Simplified26.1%
Taylor expanded in z around inf 56.5%
*-commutative56.5%
associate-/l*70.9%
associate-*r*70.9%
*-commutative70.9%
Simplified70.9%
Final simplification88.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (- (* (* x 9.0) y) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -5e-275)
t_1
(if (<= t_1 0.0)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= t_1 INFINITY)
(/ (- b (- (* (* z 4.0) (* a t)) (* x (* 9.0 y)))) (* z c))
(* a (* -4.0 (/ t c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -5e-275) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -5e-275) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c) tmp = 0 if t_1 <= -5e-275: tmp = t_1 elif t_1 <= 0.0: tmp = ((-4.0 * (a * t)) + (b / z)) / c elif t_1 <= math.inf: tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -5e-275) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (t_1 <= Inf) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(a * t)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
tmp = 0.0;
if (t_1 <= -5e-275)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
elseif (t_1 <= Inf)
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-275], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(\left(x \cdot 9\right) \cdot y - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(a \cdot t\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\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.99999999999999983e-275Initial program 92.2%
if -4.99999999999999983e-275 < (/.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 34.9%
Simplified34.9%
Taylor expanded in a around inf 49.7%
Taylor expanded in c around 0 82.3%
Taylor expanded in x around 0 76.7%
Taylor expanded in a around 0 94.0%
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 90.4%
associate-+l-90.4%
*-commutative90.4%
associate-*r*90.3%
*-commutative90.3%
associate-+l-90.3%
associate-*l*90.4%
associate-*l*88.1%
*-commutative88.1%
Simplified88.1%
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%
Simplified26.1%
Taylor expanded in z around inf 56.5%
*-commutative56.5%
associate-/l*70.9%
associate-*r*70.9%
*-commutative70.9%
Simplified70.9%
Final simplification88.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.8e+195)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= z -3200000000000.0)
(/ (* a (+ (* -4.0 t) (* 9.0 (/ (* x y) (* z a))))) c)
(if (<= z 4.3e+29)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.8e+195) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= -3200000000000.0) {
tmp = (a * ((-4.0 * t) + (9.0 * ((x * y) / (z * a))))) / c;
} else if (z <= 4.3e+29) {
tmp = (b + (9.0 * (x * y))) / (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.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-2.8d+195)) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else if (z <= (-3200000000000.0d0)) then
tmp = (a * (((-4.0d0) * t) + (9.0d0 * ((x * y) / (z * a))))) / c
else if (z <= 4.3d+29) then
tmp = (b + (9.0d0 * (x * y))) / (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;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.8e+195) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= -3200000000000.0) {
tmp = (a * ((-4.0 * t) + (9.0 * ((x * y) / (z * a))))) / c;
} else if (z <= 4.3e+29) {
tmp = (b + (9.0 * (x * y))) / (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]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.8e+195: tmp = ((-4.0 * (a * t)) + (b / z)) / c elif z <= -3200000000000.0: tmp = (a * ((-4.0 * t) + (9.0 * ((x * y) / (z * a))))) / c elif z <= 4.3e+29: tmp = (b + (9.0 * (x * y))) / (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]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.8e+195) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (z <= -3200000000000.0) tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) + Float64(9.0 * Float64(Float64(x * y) / Float64(z * a))))) / c); elseif (z <= 4.3e+29) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / 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])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -2.8e+195)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
elseif (z <= -3200000000000.0)
tmp = (a * ((-4.0 * t) + (9.0 * ((x * y) / (z * a))))) / c;
elseif (z <= 4.3e+29)
tmp = (b + (9.0 * (x * y))) / (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. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.8e+195], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -3200000000000.0], N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4.3e+29], N[(N[(b + N[(9.0 * N[(x * y), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+195}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq -3200000000000:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t + 9 \cdot \frac{x \cdot y}{z \cdot a}\right)}{c}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+29}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\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 < -2.7999999999999998e195Initial program 42.9%
Simplified54.3%
Taylor expanded in a around inf 74.1%
Taylor expanded in c around 0 83.8%
Taylor expanded in x around 0 89.3%
Taylor expanded in a around 0 89.8%
if -2.7999999999999998e195 < z < -3.2e12Initial program 83.8%
Simplified86.3%
Taylor expanded in a around inf 79.9%
Taylor expanded in c around 0 86.0%
Taylor expanded in b around 0 81.7%
if -3.2e12 < z < 4.3000000000000003e29Initial program 95.4%
Simplified94.0%
Taylor expanded in z around 0 82.8%
if 4.3000000000000003e29 < z Initial program 59.7%
Simplified65.8%
Taylor expanded in x around 0 52.0%
metadata-eval52.0%
cancel-sign-sub-inv52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in t around inf 71.3%
Final simplification80.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.5e+193)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= z 4.2e+35)
(/ (- b (- (* (* z 4.0) (* a t)) (* x (* 9.0 y)))) (* z c))
(* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.5e+193) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 4.2e+35) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (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.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-2.5d+193)) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else if (z <= 4.2d+35) then
tmp = (b - (((z * 4.0d0) * (a * t)) - (x * (9.0d0 * y)))) / (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;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.5e+193) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 4.2e+35) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (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]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.5e+193: tmp = ((-4.0 * (a * t)) + (b / z)) / c elif z <= 4.2e+35: tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (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]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.5e+193) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (z <= 4.2e+35) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(a * t)) - Float64(x * Float64(9.0 * y)))) / 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])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -2.5e+193)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
elseif (z <= 4.2e+35)
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (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. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.5e+193], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4.2e+35], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+193}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(a \cdot t\right) - x \cdot \left(9 \cdot y\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 < -2.49999999999999986e193Initial program 40.8%
Simplified51.8%
Taylor expanded in a around inf 75.4%
Taylor expanded in c around 0 84.5%
Taylor expanded in x around 0 89.8%
Taylor expanded in a around 0 90.2%
if -2.49999999999999986e193 < z < 4.1999999999999998e35Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*93.1%
*-commutative93.1%
associate-+l-93.1%
associate-*l*93.2%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
if 4.1999999999999998e35 < z Initial program 59.7%
Simplified65.8%
Taylor expanded in x around 0 52.0%
metadata-eval52.0%
cancel-sign-sub-inv52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in t around inf 71.3%
Final simplification86.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= a -1.65e-153)
(* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t)))))
(if (<= a 1.35e+61)
(* (/ 1.0 z) (/ (+ b (* 9.0 (* x y))) c))
(/ (+ (* -4.0 (* a t)) (/ b z)) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -1.65e-153) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if (a <= 1.35e+61) {
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (a <= (-1.65d-153)) then
tmp = t * (((-4.0d0) * (a / c)) + (b / (c * (z * t))))
else if (a <= 1.35d+61) then
tmp = (1.0d0 / z) * ((b + (9.0d0 * (x * y))) / c)
else
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -1.65e-153) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if (a <= 1.35e+61) {
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if a <= -1.65e-153: tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t)))) elif a <= 1.35e+61: tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c) else: tmp = ((-4.0 * (a * t)) + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -1.65e-153) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(c * Float64(z * t))))); elseif (a <= 1.35e+61) tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + Float64(9.0 * Float64(x * y))) / c)); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (a <= -1.65e-153)
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
elseif (a <= 1.35e+61)
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
else
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -1.65e-153], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+61], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-153}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{c \cdot \left(z \cdot t\right)}\right)\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+61}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + 9 \cdot \left(x \cdot y\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if a < -1.64999999999999994e-153Initial program 83.0%
Simplified82.1%
Taylor expanded in x around 0 55.5%
metadata-eval55.5%
cancel-sign-sub-inv55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in t around inf 60.9%
if -1.64999999999999994e-153 < a < 1.3500000000000001e61Initial program 77.2%
Simplified82.0%
Applied egg-rr87.1%
Taylor expanded in x around inf 74.5%
if 1.3500000000000001e61 < a Initial program 83.0%
Simplified85.0%
Taylor expanded in a around inf 84.3%
Taylor expanded in c around 0 81.2%
Taylor expanded in x around 0 79.2%
Taylor expanded in a around 0 81.2%
Final simplification70.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= a -3.8e-52)
(* a (* -4.0 (/ t c)))
(if (<= a 2.8e+59)
(* (/ 1.0 z) (/ (+ b (* 9.0 (* x y))) c))
(/ (+ (* -4.0 (* a t)) (/ b z)) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -3.8e-52) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 2.8e+59) {
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (a <= (-3.8d-52)) then
tmp = a * ((-4.0d0) * (t / c))
else if (a <= 2.8d+59) then
tmp = (1.0d0 / z) * ((b + (9.0d0 * (x * y))) / c)
else
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -3.8e-52) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 2.8e+59) {
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if a <= -3.8e-52: tmp = a * (-4.0 * (t / c)) elif a <= 2.8e+59: tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c) else: tmp = ((-4.0 * (a * t)) + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -3.8e-52) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (a <= 2.8e+59) tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + Float64(9.0 * Float64(x * y))) / c)); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (a <= -3.8e-52)
tmp = a * (-4.0 * (t / c));
elseif (a <= 2.8e+59)
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
else
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -3.8e-52], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+59], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-52}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+59}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + 9 \cdot \left(x \cdot y\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if a < -3.8000000000000003e-52Initial program 80.3%
Simplified79.1%
Taylor expanded in z around inf 44.3%
*-commutative44.3%
associate-/l*49.8%
associate-*r*49.8%
*-commutative49.8%
Simplified49.8%
if -3.8000000000000003e-52 < a < 2.7999999999999998e59Initial program 79.8%
Simplified83.7%
Applied egg-rr87.9%
Taylor expanded in x around inf 73.2%
if 2.7999999999999998e59 < a Initial program 83.0%
Simplified85.0%
Taylor expanded in a around inf 84.3%
Taylor expanded in c around 0 81.2%
Taylor expanded in x around 0 79.2%
Taylor expanded in a around 0 81.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -4.8e+55) (not (<= z 4e+24))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.8e+55) || !(z <= 4e+24)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-4.8d+55)) .or. (.not. (z <= 4d+24))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.8e+55) || !(z <= 4e+24)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -4.8e+55) or not (z <= 4e+24): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -4.8e+55) || !(z <= 4e+24)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -4.8e+55) || ~((z <= 4e+24)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -4.8e+55], N[Not[LessEqual[z, 4e+24]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+55} \lor \neg \left(z \leq 4 \cdot 10^{+24}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.7999999999999998e55 or 3.9999999999999999e24 < z Initial program 63.3%
Simplified69.6%
Taylor expanded in a around inf 76.4%
Taylor expanded in c around 0 79.5%
Taylor expanded in x around 0 70.9%
Taylor expanded in a around 0 74.3%
if -4.7999999999999998e55 < z < 3.9999999999999999e24Initial program 94.4%
Simplified93.1%
Taylor expanded in z around 0 80.8%
Final simplification77.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= a -5.5e-52) (not (<= a 2.9e+146))) (* a (* -4.0 (/ t c))) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -5.5e-52) || !(a <= 2.9e+146)) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a <= (-5.5d-52)) .or. (.not. (a <= 2.9d+146))) then
tmp = a * ((-4.0d0) * (t / c))
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -5.5e-52) || !(a <= 2.9e+146)) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -5.5e-52) or not (a <= 2.9e+146): tmp = a * (-4.0 * (t / c)) else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -5.5e-52) || !(a <= 2.9e+146)) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((a <= -5.5e-52) || ~((a <= 2.9e+146)))
tmp = a * (-4.0 * (t / c));
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -5.5e-52], N[Not[LessEqual[a, 2.9e+146]], $MachinePrecision]], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-52} \lor \neg \left(a \leq 2.9 \cdot 10^{+146}\right):\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if a < -5.5e-52 or 2.8999999999999998e146 < a Initial program 80.1%
Simplified80.2%
Taylor expanded in z around inf 53.6%
*-commutative53.6%
associate-/l*58.9%
associate-*r*58.9%
*-commutative58.9%
Simplified58.9%
if -5.5e-52 < a < 2.8999999999999998e146Initial program 80.9%
Simplified84.5%
Taylor expanded in z around 0 69.7%
Final simplification65.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= a -5.5e-149) (not (<= a 3.4e+59))) (* t (* a (/ -4.0 c))) (* 9.0 (* x (/ (/ y c) z)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -5.5e-149) || !(a <= 3.4e+59)) {
tmp = t * (a * (-4.0 / c));
} else {
tmp = 9.0 * (x * ((y / c) / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a <= (-5.5d-149)) .or. (.not. (a <= 3.4d+59))) then
tmp = t * (a * ((-4.0d0) / c))
else
tmp = 9.0d0 * (x * ((y / c) / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -5.5e-149) || !(a <= 3.4e+59)) {
tmp = t * (a * (-4.0 / c));
} else {
tmp = 9.0 * (x * ((y / c) / z));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -5.5e-149) or not (a <= 3.4e+59): tmp = t * (a * (-4.0 / c)) else: tmp = 9.0 * (x * ((y / c) / z)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -5.5e-149) || !(a <= 3.4e+59)) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((a <= -5.5e-149) || ~((a <= 3.4e+59)))
tmp = t * (a * (-4.0 / c));
else
tmp = 9.0 * (x * ((y / c) / z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -5.5e-149], N[Not[LessEqual[a, 3.4e+59]], $MachinePrecision]], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-149} \lor \neg \left(a \leq 3.4 \cdot 10^{+59}\right):\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\end{array}
\end{array}
if a < -5.50000000000000043e-149 or 3.40000000000000006e59 < a Initial program 82.9%
Simplified83.0%
Applied egg-rr85.2%
Taylor expanded in z around inf 49.6%
associate-*r/49.6%
*-commutative49.6%
*-commutative49.6%
associate-*r*49.6%
associate-*r/55.0%
*-commutative55.0%
Simplified55.0%
Taylor expanded in a around 0 55.0%
associate-*r/55.0%
*-commutative55.0%
associate-/l*55.0%
Simplified55.0%
if -5.50000000000000043e-149 < a < 3.40000000000000006e59Initial program 77.4%
Simplified82.1%
Taylor expanded in x around inf 46.6%
associate-/l*49.3%
associate-/r*52.0%
Simplified52.0%
Final simplification53.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= a -7.8e-55) (* a (* -4.0 (/ t c))) (if (<= a 8e+59) (* 9.0 (* y (/ (/ x c) z))) (* t (* a (/ -4.0 c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -7.8e-55) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 8e+59) {
tmp = 9.0 * (y * ((x / c) / z));
} 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.
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 (a <= (-7.8d-55)) then
tmp = a * ((-4.0d0) * (t / c))
else if (a <= 8d+59) then
tmp = 9.0d0 * (y * ((x / c) / z))
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;
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 (a <= -7.8e-55) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 8e+59) {
tmp = 9.0 * (y * ((x / c) / z));
} else {
tmp = t * (a * (-4.0 / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if a <= -7.8e-55: tmp = a * (-4.0 * (t / c)) elif a <= 8e+59: tmp = 9.0 * (y * ((x / c) / z)) else: tmp = t * (a * (-4.0 / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -7.8e-55) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (a <= 8e+59) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); 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])){:}
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 (a <= -7.8e-55)
tmp = a * (-4.0 * (t / c));
elseif (a <= 8e+59)
tmp = 9.0 * (y * ((x / c) / z));
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. 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[a, -7.8e-55], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e+59], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{-55}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+59}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\end{array}
\end{array}
if a < -7.8e-55Initial program 80.5%
Simplified79.3%
Taylor expanded in z around inf 43.7%
*-commutative43.7%
associate-/l*49.2%
associate-*r*49.2%
*-commutative49.2%
Simplified49.2%
if -7.8e-55 < a < 7.99999999999999977e59Initial program 79.6%
Simplified83.6%
Taylor expanded in x around inf 48.1%
times-frac46.5%
Simplified46.5%
associate-*r/48.1%
Applied egg-rr48.1%
associate-*r/48.1%
*-commutative48.1%
Applied egg-rr48.1%
Taylor expanded in y around 0 48.1%
associate-/r*46.6%
*-commutative46.6%
associate-*r/48.1%
associate-/l*49.1%
Simplified49.1%
if 7.99999999999999977e59 < a Initial program 83.0%
Simplified85.0%
Applied egg-rr85.3%
Taylor expanded in z around inf 64.1%
associate-*r/64.1%
*-commutative64.1%
*-commutative64.1%
associate-*r*64.1%
associate-*r/67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in a around 0 67.5%
associate-*r/67.5%
*-commutative67.5%
associate-/l*67.5%
Simplified67.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -6.2e+73) (not (<= b 1.2e-14))) (/ (/ b c) z) (* a (* -4.0 (/ t c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -6.2e+73) || !(b <= 1.2e-14)) {
tmp = (b / c) / z;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-6.2d+73)) .or. (.not. (b <= 1.2d-14))) then
tmp = (b / c) / z
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -6.2e+73) || !(b <= 1.2e-14)) {
tmp = (b / c) / z;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -6.2e+73) or not (b <= 1.2e-14): tmp = (b / c) / z else: tmp = a * (-4.0 * (t / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -6.2e+73) || !(b <= 1.2e-14)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -6.2e+73) || ~((b <= 1.2e-14)))
tmp = (b / c) / z;
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -6.2e+73], N[Not[LessEqual[b, 1.2e-14]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+73} \lor \neg \left(b \leq 1.2 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if b < -6.1999999999999999e73 or 1.2e-14 < b Initial program 81.6%
Simplified83.3%
Taylor expanded in b around inf 56.9%
associate-/r*63.3%
Simplified63.3%
if -6.1999999999999999e73 < b < 1.2e-14Initial program 79.8%
Simplified82.1%
Taylor expanded in z around inf 48.8%
*-commutative48.8%
associate-/l*52.9%
associate-*r*52.9%
*-commutative52.9%
Simplified52.9%
Final simplification57.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -2.65e+20) (not (<= b 1.02e-14))) (/ (/ b c) z) (* -4.0 (/ (* a t) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -2.65e+20) || !(b <= 1.02e-14)) {
tmp = (b / c) / z;
} else {
tmp = -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.
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 ((b <= (-2.65d+20)) .or. (.not. (b <= 1.02d-14))) then
tmp = (b / c) / z
else
tmp = (-4.0d0) * ((a * t) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -2.65e+20) || !(b <= 1.02e-14)) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * ((a * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -2.65e+20) or not (b <= 1.02e-14): tmp = (b / c) / z else: tmp = -4.0 * ((a * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -2.65e+20) || !(b <= 1.02e-14)) tmp = Float64(Float64(b / c) / z); else tmp = 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])){:}
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 ((b <= -2.65e+20) || ~((b <= 1.02e-14)))
tmp = (b / c) / z;
else
tmp = -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. 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[b, -2.65e+20], N[Not[LessEqual[b, 1.02e-14]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.65 \cdot 10^{+20} \lor \neg \left(b \leq 1.02 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if b < -2.65e20 or 1.02e-14 < b Initial program 81.5%
Simplified82.4%
Taylor expanded in b around inf 54.1%
associate-/r*60.7%
Simplified60.7%
if -2.65e20 < b < 1.02e-14Initial program 79.7%
Simplified82.9%
Taylor expanded in z around inf 50.7%
Final simplification55.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (/ b c) z))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (b / c) / z
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return (b / c) / z
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(Float64(b / c) / z) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (b / c) / z;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 80.6%
Simplified82.6%
Taylor expanded in b around inf 32.0%
associate-/r*33.6%
Simplified33.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 80.6%
Simplified82.6%
Taylor expanded in b around inf 32.0%
*-commutative32.0%
Simplified32.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024157
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))