
(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 12 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 (if (or (<= z -1.05e+48) (not (<= z 1.12e-26))) (+ (* 9.0 (* x (/ (/ y z) c))) (fma -4.0 (* a (/ t c)) (/ (/ b z) c))) (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* 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.05e+48) || !(z <= 1.12e-26)) {
tmp = (9.0 * (x * ((y / z) / c))) + fma(-4.0, (a * (t / c)), ((b / z) / c));
} else {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (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.05e+48) || !(z <= 1.12e-26)) tmp = Float64(Float64(9.0 * Float64(x * Float64(Float64(y / z) / c))) + fma(-4.0, Float64(a * Float64(t / c)), Float64(Float64(b / z) / c))); else tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.05e+48], N[Not[LessEqual[z, 1.12e-26]], $MachinePrecision]], N[(N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+48} \lor \neg \left(z \leq 1.12 \cdot 10^{-26}\right):\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c}\right) + \mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{\frac{b}{z}}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.0499999999999999e48 or 1.12e-26 < z Initial program 59.2%
Simplified62.2%
Taylor expanded in x around 0 78.5%
+-commutative78.5%
metadata-eval78.5%
cancel-sign-sub-inv78.5%
associate--l+78.5%
fma-define78.5%
associate-/l*82.4%
*-commutative82.4%
cancel-sign-sub-inv82.4%
metadata-eval82.4%
+-commutative82.4%
fma-define82.4%
associate-/l*84.6%
*-commutative84.6%
Simplified84.6%
fma-undefine84.6%
associate-/r*87.4%
associate-/r*91.0%
Applied egg-rr91.0%
if -1.0499999999999999e48 < z < 1.12e-26Initial program 96.6%
Simplified96.0%
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)))
(t_2 (/ (- b (- (* a (* t (* z 4.0))) t_1)) (* z c))))
(if (<= t_2 -5e-324)
(* (+ t_1 (- b (* t (* z (* a 4.0))))) (/ 1.0 (* z c)))
(if (<= t_2 0.0)
(/ (+ (* -4.0 (/ (* a (* z t)) c)) (+ (* 9.0 (/ (* x y) c)) (/ b c))) z)
(if (<= t_2 INFINITY)
(/ (+ b (- t_1 (* (* z 4.0) (* a t)))) (* 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 t_1 = y * (9.0 * x);
double t_2 = (b - ((a * (t * (z * 4.0))) - t_1)) / (z * c);
double tmp;
if (t_2 <= -5e-324) {
tmp = (t_1 + (b - (t * (z * (a * 4.0))))) * (1.0 / (z * c));
} else if (t_2 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
assert x < y && 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);
double t_2 = (b - ((a * (t * (z * 4.0))) - t_1)) / (z * c);
double tmp;
if (t_2 <= -5e-324) {
tmp = (t_1 + (b - (t * (z * (a * 4.0))))) * (1.0 / (z * c));
} else if (t_2 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
[x, y, 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) t_2 = (b - ((a * (t * (z * 4.0))) - t_1)) / (z * c) tmp = 0 if t_2 <= -5e-324: tmp = (t_1 + (b - (t * (z * (a * 4.0))))) * (1.0 / (z * c)) elif t_2 <= 0.0: tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z elif t_2 <= math.inf: tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c) else: tmp = -4.0 * (a * (t / c)) return tmp
x, y, 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(y * Float64(9.0 * x)) t_2 = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - t_1)) / Float64(z * c)) tmp = 0.0 if (t_2 <= -5e-324) tmp = Float64(Float64(t_1 + Float64(b - Float64(t * Float64(z * Float64(a * 4.0))))) * Float64(1.0 / Float64(z * c))); elseif (t_2 <= 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_2 <= Inf) tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a * Float64(t / c))); end return tmp end
x, y, 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);
t_2 = (b - ((a * (t * (z * 4.0))) - t_1)) / (z * c);
tmp = 0.0;
if (t_2 <= -5e-324)
tmp = (t_1 + (b - (t * (z * (a * 4.0))))) * (1.0 / (z * c));
elseif (t_2 <= 0.0)
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
elseif (t_2 <= Inf)
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
else
tmp = -4.0 * (a * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, 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[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-324], N[(N[(t$95$1 + N[(b - N[(t * N[(z * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 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$2, Infinity], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
t_2 := \frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - t\_1\right)}{z \cdot c}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-324}:\\
\;\;\;\;\left(t\_1 + \left(b - t \cdot \left(z \cdot \left(a \cdot 4\right)\right)\right)\right) \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;t\_2 \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\_2 \leq \infty:\\
\;\;\;\;\frac{b + \left(t\_1 - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.94066e-324Initial program 92.0%
associate-+l-92.0%
*-commutative92.0%
associate-*r*91.2%
*-commutative91.2%
associate-+l-91.2%
associate-*l*91.2%
associate-*l*92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in z around 0 92.0%
associate-*r*92.0%
*-commutative92.0%
Simplified92.0%
div-inv92.0%
associate-+l-92.0%
associate-*r*91.9%
associate-*l*91.1%
*-commutative91.1%
Applied egg-rr91.1%
if -4.94066e-324 < (/.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.6%
Simplified33.7%
Taylor expanded in z around 0 99.6%
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 87.4%
associate-+l-87.4%
*-commutative87.4%
associate-*r*90.2%
*-commutative90.2%
associate-+l-90.2%
associate-*l*90.2%
associate-*l*90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in x around 0 90.1%
associate-*r*90.1%
Simplified90.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%
Simplified4.3%
Taylor expanded in x around 0 41.9%
+-commutative41.9%
metadata-eval41.9%
cancel-sign-sub-inv41.9%
associate--l+41.9%
fma-define41.9%
associate-/l*43.3%
*-commutative43.3%
cancel-sign-sub-inv43.3%
metadata-eval43.3%
+-commutative43.3%
fma-define43.3%
associate-/l*78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in z around inf 47.0%
associate-*r/81.9%
Simplified81.9%
Final simplification90.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
(let* ((t_1 (* y (* 9.0 x))))
(if (<= (/ (- b (- (* a (* t (* z 4.0))) t_1)) (* z c)) INFINITY)
(/ (+ b (- t_1 (* (* z 4.0) (* a t)))) (* 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 t_1 = y * (9.0 * x);
double tmp;
if (((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= ((double) INFINITY)) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
assert x < y && 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);
double tmp;
if (((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= Double.POSITIVE_INFINITY) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * (a * (t / c));
}
return tmp;
}
[x, y, 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) tmp = 0 if ((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= math.inf: tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c) else: tmp = -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) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - t_1)) / Float64(z * c)) <= Inf) tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a * Float64(t / c))); end return tmp end
x, y, 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);
tmp = 0.0;
if (((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= Inf)
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
else
tmp = -4.0 * (a * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, 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[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
\mathbf{if}\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - t\_1\right)}{z \cdot c} \leq \infty:\\
\;\;\;\;\frac{b + \left(t\_1 - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*87.4%
*-commutative87.4%
associate-+l-87.4%
associate-*l*87.4%
associate-*l*87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in x around 0 87.9%
associate-*r*87.9%
Simplified87.9%
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%
Simplified4.3%
Taylor expanded in x around 0 41.9%
+-commutative41.9%
metadata-eval41.9%
cancel-sign-sub-inv41.9%
associate--l+41.9%
fma-define41.9%
associate-/l*43.3%
*-commutative43.3%
cancel-sign-sub-inv43.3%
metadata-eval43.3%
+-commutative43.3%
fma-define43.3%
associate-/l*78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in z around inf 47.0%
associate-*r/81.9%
Simplified81.9%
Final simplification87.2%
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 -5.2e+138) (not (<= z 3.8e+100))) (/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* x y) z))) c) (/ (+ b (- (* x (* 9.0 y)) (* (* z t) (* a 4.0)))) (* 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 <= -5.2e+138) || !(z <= 3.8e+100)) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * t) * (a * 4.0)))) / (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 <= (-5.2d+138)) .or. (.not. (z <= 3.8d+100))) then
tmp = (((-4.0d0) * (a * t)) + (9.0d0 * ((x * y) / z))) / c
else
tmp = (b + ((x * (9.0d0 * y)) - ((z * t) * (a * 4.0d0)))) / (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 <= -5.2e+138) || !(z <= 3.8e+100)) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * t) * (a * 4.0)))) / (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 <= -5.2e+138) or not (z <= 3.8e+100): tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c else: tmp = (b + ((x * (9.0 * y)) - ((z * t) * (a * 4.0)))) / (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 <= -5.2e+138) || !(z <= 3.8e+100)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * t) * Float64(a * 4.0)))) / 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 <= -5.2e+138) || ~((z <= 3.8e+100)))
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
else
tmp = (b + ((x * (9.0 * y)) - ((z * t) * (a * 4.0)))) / (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, -5.2e+138], N[Not[LessEqual[z, 3.8e+100]], $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[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * t), $MachinePrecision] * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+138} \lor \neg \left(z \leq 3.8 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot t\right) \cdot \left(a \cdot 4\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.2000000000000002e138 or 3.79999999999999963e100 < z Initial program 46.4%
Simplified50.0%
Taylor expanded in x around 0 76.3%
+-commutative76.3%
metadata-eval76.3%
cancel-sign-sub-inv76.3%
associate--l+76.3%
fma-define76.3%
associate-/l*78.9%
*-commutative78.9%
cancel-sign-sub-inv78.9%
metadata-eval78.9%
+-commutative78.9%
fma-define78.9%
associate-/l*81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in b around 0 71.7%
Taylor expanded in c around 0 74.3%
if -5.2000000000000002e138 < z < 3.79999999999999963e100Initial program 92.1%
associate-+l-92.1%
*-commutative92.1%
associate-*r*91.6%
*-commutative91.6%
associate-+l-91.6%
associate-*l*91.6%
associate-*l*90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in z around 0 92.1%
associate-*r*92.1%
*-commutative92.1%
Simplified92.1%
Final simplification86.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
(if (<= t -1.06e+70)
(* -4.0 (* t (/ a c)))
(if (<= t -3.3e-88)
(/ b (* z c))
(if (<= t 1.7e-282)
(* 9.0 (* x (/ y (* z c))))
(if (<= t 2.6e-121) (* (/ b c) (/ 1.0 z)) (* -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 (t <= -1.06e+70) {
tmp = -4.0 * (t * (a / c));
} else if (t <= -3.3e-88) {
tmp = b / (z * c);
} else if (t <= 1.7e-282) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (t <= 2.6e-121) {
tmp = (b / c) * (1.0 / 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.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.06d+70)) then
tmp = (-4.0d0) * (t * (a / c))
else if (t <= (-3.3d-88)) then
tmp = b / (z * c)
else if (t <= 1.7d-282) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (t <= 2.6d-121) then
tmp = (b / c) * (1.0d0 / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.06e+70) {
tmp = -4.0 * (t * (a / c));
} else if (t <= -3.3e-88) {
tmp = b / (z * c);
} else if (t <= 1.7e-282) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (t <= 2.6e-121) {
tmp = (b / c) * (1.0 / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.06e+70: tmp = -4.0 * (t * (a / c)) elif t <= -3.3e-88: tmp = b / (z * c) elif t <= 1.7e-282: tmp = 9.0 * (x * (y / (z * c))) elif t <= 2.6e-121: tmp = (b / c) * (1.0 / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.06e+70) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (t <= -3.3e-88) tmp = Float64(b / Float64(z * c)); elseif (t <= 1.7e-282) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (t <= 2.6e-121) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = Float64(-4.0 * Float64(a * Float64(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 <= -1.06e+70)
tmp = -4.0 * (t * (a / c));
elseif (t <= -3.3e-88)
tmp = b / (z * c);
elseif (t <= 1.7e-282)
tmp = 9.0 * (x * (y / (z * c)));
elseif (t <= 2.6e-121)
tmp = (b / c) * (1.0 / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.06e+70], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.3e-88], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-282], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-121], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{+70}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-88}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-282}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-121}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if t < -1.06e70Initial program 63.4%
Simplified66.5%
Taylor expanded in x around 0 74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
associate--l+74.6%
fma-define74.6%
associate-/l*74.7%
*-commutative74.7%
cancel-sign-sub-inv74.7%
metadata-eval74.7%
+-commutative74.7%
fma-define74.7%
associate-/l*84.0%
*-commutative84.0%
Simplified84.0%
fma-undefine84.0%
associate-/r*87.2%
associate-/r*87.3%
Applied egg-rr87.3%
Taylor expanded in z around inf 60.6%
associate-*r/60.6%
associate-*r*60.6%
associate-*l/68.9%
associate-*r/68.9%
associate-*l*68.9%
Simplified68.9%
if -1.06e70 < t < -3.29999999999999994e-88Initial program 83.4%
Simplified83.4%
Taylor expanded in b around inf 55.0%
*-commutative55.0%
Simplified55.0%
if -3.29999999999999994e-88 < t < 1.69999999999999999e-282Initial program 85.9%
Simplified81.7%
Taylor expanded in x around 0 79.4%
+-commutative79.4%
metadata-eval79.4%
cancel-sign-sub-inv79.4%
associate--l+79.4%
fma-define79.4%
associate-/l*81.5%
*-commutative81.5%
cancel-sign-sub-inv81.5%
metadata-eval81.5%
+-commutative81.5%
fma-define81.5%
associate-/l*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in x around inf 57.5%
associate-/l*59.5%
Simplified59.5%
if 1.69999999999999999e-282 < t < 2.59999999999999986e-121Initial program 92.4%
Simplified92.4%
Applied egg-rr88.5%
Taylor expanded in b around inf 63.0%
if 2.59999999999999986e-121 < t Initial program 76.2%
Simplified79.8%
Taylor expanded in x around 0 78.3%
+-commutative78.3%
metadata-eval78.3%
cancel-sign-sub-inv78.3%
associate--l+78.3%
fma-define78.3%
associate-/l*77.3%
*-commutative77.3%
cancel-sign-sub-inv77.3%
metadata-eval77.3%
+-commutative77.3%
fma-define77.3%
associate-/l*80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in z around inf 52.0%
associate-*r/58.2%
Simplified58.2%
Final simplification61.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 (<= b -2.3e+90)
(/ (+ b (* x (* 9.0 y))) (* z c))
(if (<= b 1.5e+21)
(/ (+ (* -4.0 (* a t)) (* 9.0 (/ (* x y) z))) c)
(/ (- b (* (* z t) (* a 4.0))) (* 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 (b <= -2.3e+90) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if (b <= 1.5e+21) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = (b - ((z * t) * (a * 4.0))) / (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 (b <= (-2.3d+90)) then
tmp = (b + (x * (9.0d0 * y))) / (z * c)
else if (b <= 1.5d+21) then
tmp = (((-4.0d0) * (a * t)) + (9.0d0 * ((x * y) / z))) / c
else
tmp = (b - ((z * t) * (a * 4.0d0))) / (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 (b <= -2.3e+90) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if (b <= 1.5e+21) {
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = (b - ((z * t) * (a * 4.0))) / (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 b <= -2.3e+90: tmp = (b + (x * (9.0 * y))) / (z * c) elif b <= 1.5e+21: tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c else: tmp = (b - ((z * t) * (a * 4.0))) / (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 (b <= -2.3e+90) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)); elseif (b <= 1.5e+21) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); else tmp = Float64(Float64(b - Float64(Float64(z * t) * Float64(a * 4.0))) / 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 (b <= -2.3e+90)
tmp = (b + (x * (9.0 * y))) / (z * c);
elseif (b <= 1.5e+21)
tmp = ((-4.0 * (a * t)) + (9.0 * ((x * y) / z))) / c;
else
tmp = (b - ((z * t) * (a * 4.0))) / (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[b, -2.3e+90], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+21], 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[(b - N[(N[(z * t), $MachinePrecision] * N[(a * 4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+90}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - \left(z \cdot t\right) \cdot \left(a \cdot 4\right)}{z \cdot c}\\
\end{array}
\end{array}
if b < -2.3e90Initial program 79.8%
associate-+l-79.8%
*-commutative79.8%
associate-*r*77.5%
*-commutative77.5%
associate-+l-77.5%
associate-*l*77.5%
associate-*l*79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in z around 0 79.8%
associate-*r*79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in x around inf 75.2%
associate-*r*75.2%
*-commutative75.2%
associate-*l*75.2%
Simplified75.2%
if -2.3e90 < b < 1.5e21Initial program 79.2%
Simplified81.2%
Taylor expanded in x around 0 83.5%
+-commutative83.5%
metadata-eval83.5%
cancel-sign-sub-inv83.5%
associate--l+83.5%
fma-define83.5%
associate-/l*82.3%
*-commutative82.3%
cancel-sign-sub-inv82.3%
metadata-eval82.3%
+-commutative82.3%
fma-define82.3%
associate-/l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in b around 0 78.5%
Taylor expanded in c around 0 80.6%
if 1.5e21 < b Initial program 71.6%
Simplified73.4%
Taylor expanded in x around 0 66.8%
metadata-eval66.8%
cancel-sign-sub-inv66.8%
associate-*r*66.8%
*-commutative66.8%
Simplified66.8%
Final simplification76.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 (<= t -2.7e+167) (not (<= t 6.2e-54))) (* -4.0 (* a (/ t c))) (/ (+ b (* y (* 9.0 x))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -2.7e+167) || !(t <= 6.2e-54)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + (y * (9.0 * x))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-2.7d+167)) .or. (.not. (t <= 6.2d-54))) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = (b + (y * (9.0d0 * x))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -2.7e+167) || !(t <= 6.2e-54)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + (y * (9.0 * x))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -2.7e+167) or not (t <= 6.2e-54): tmp = -4.0 * (a * (t / c)) else: tmp = (b + (y * (9.0 * x))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -2.7e+167) || !(t <= 6.2e-54)) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((t <= -2.7e+167) || ~((t <= 6.2e-54)))
tmp = -4.0 * (a * (t / c));
else
tmp = (b + (y * (9.0 * x))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -2.7e+167], N[Not[LessEqual[t, 6.2e-54]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+167} \lor \neg \left(t \leq 6.2 \cdot 10^{-54}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if t < -2.70000000000000005e167 or 6.20000000000000008e-54 < t Initial program 71.7%
Simplified74.5%
Taylor expanded in x around 0 75.1%
+-commutative75.1%
metadata-eval75.1%
cancel-sign-sub-inv75.1%
associate--l+75.1%
fma-define75.1%
associate-/l*76.0%
*-commutative76.0%
cancel-sign-sub-inv76.0%
metadata-eval76.0%
+-commutative76.0%
fma-define76.0%
associate-/l*83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in z around inf 59.0%
associate-*r/68.6%
Simplified68.6%
if -2.70000000000000005e167 < t < 6.20000000000000008e-54Initial program 82.4%
Simplified82.3%
Taylor expanded in t around 0 72.4%
+-commutative72.4%
associate-*r*72.4%
*-commutative72.4%
Simplified72.4%
Final simplification70.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 (or (<= t -2.4e+167) (not (<= t 7.4e-54))) (* -4.0 (* a (/ t c))) (/ (+ b (* x (* 9.0 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 ((t <= -2.4e+167) || !(t <= 7.4e-54)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + (x * (9.0 * 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 ((t <= (-2.4d+167)) .or. (.not. (t <= 7.4d-54))) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = (b + (x * (9.0d0 * 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 ((t <= -2.4e+167) || !(t <= 7.4e-54)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (b + (x * (9.0 * 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 (t <= -2.4e+167) or not (t <= 7.4e-54): tmp = -4.0 * (a * (t / c)) else: tmp = (b + (x * (9.0 * 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 ((t <= -2.4e+167) || !(t <= 7.4e-54)) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / 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 <= -2.4e+167) || ~((t <= 7.4e-54)))
tmp = -4.0 * (a * (t / c));
else
tmp = (b + (x * (9.0 * 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[Or[LessEqual[t, -2.4e+167], N[Not[LessEqual[t, 7.4e-54]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+167} \lor \neg \left(t \leq 7.4 \cdot 10^{-54}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if t < -2.39999999999999999e167 or 7.4000000000000006e-54 < t Initial program 71.7%
Simplified74.5%
Taylor expanded in x around 0 75.1%
+-commutative75.1%
metadata-eval75.1%
cancel-sign-sub-inv75.1%
associate--l+75.1%
fma-define75.1%
associate-/l*76.0%
*-commutative76.0%
cancel-sign-sub-inv76.0%
metadata-eval76.0%
+-commutative76.0%
fma-define76.0%
associate-/l*83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in z around inf 59.0%
associate-*r/68.6%
Simplified68.6%
if -2.39999999999999999e167 < t < 7.4000000000000006e-54Initial program 82.4%
associate-+l-82.4%
*-commutative82.4%
associate-*r*82.3%
*-commutative82.3%
associate-+l-82.3%
associate-*l*82.3%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in z around 0 82.4%
associate-*r*82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in x around inf 72.4%
associate-*r*72.4%
*-commutative72.4%
associate-*l*72.4%
Simplified72.4%
Final simplification70.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 (or (<= t -1.06e+70) (not (<= t 6.6e-122))) (* -4.0 (* a (/ 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 <= -1.06e+70) || !(t <= 6.6e-122)) {
tmp = -4.0 * (a * (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 <= (-1.06d+70)) .or. (.not. (t <= 6.6d-122))) then
tmp = (-4.0d0) * (a * (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 <= -1.06e+70) || !(t <= 6.6e-122)) {
tmp = -4.0 * (a * (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 <= -1.06e+70) or not (t <= 6.6e-122): tmp = -4.0 * (a * (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 <= -1.06e+70) || !(t <= 6.6e-122)) tmp = Float64(-4.0 * Float64(a * Float64(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 <= -1.06e+70) || ~((t <= 6.6e-122)))
tmp = -4.0 * (a * (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, -1.06e+70], N[Not[LessEqual[t, 6.6e-122]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{+70} \lor \neg \left(t \leq 6.6 \cdot 10^{-122}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if t < -1.06e70 or 6.59999999999999999e-122 < t Initial program 71.0%
Simplified74.5%
Taylor expanded in x around 0 76.8%
+-commutative76.8%
metadata-eval76.8%
cancel-sign-sub-inv76.8%
associate--l+76.8%
fma-define76.8%
associate-/l*76.2%
*-commutative76.2%
cancel-sign-sub-inv76.2%
metadata-eval76.2%
+-commutative76.2%
fma-define76.2%
associate-/l*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in z around inf 55.5%
associate-*r/62.3%
Simplified62.3%
if -1.06e70 < t < 6.59999999999999999e-122Initial program 86.8%
Simplified84.9%
Taylor expanded in b around inf 47.1%
*-commutative47.1%
Simplified47.1%
Final simplification56.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 (<= t -8.5e+70) (* -4.0 (* t (/ a c))) (if (<= t 1.6e-122) (/ 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 (t <= -8.5e+70) {
tmp = -4.0 * (t * (a / c));
} else if (t <= 1.6e-122) {
tmp = b / (z * c);
} 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.
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 <= (-8.5d+70)) then
tmp = (-4.0d0) * (t * (a / c))
else if (t <= 1.6d-122) then
tmp = b / (z * c)
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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -8.5e+70) {
tmp = -4.0 * (t * (a / c));
} else if (t <= 1.6e-122) {
tmp = b / (z * c);
} else {
tmp = -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 t <= -8.5e+70: tmp = -4.0 * (t * (a / c)) elif t <= 1.6e-122: tmp = b / (z * c) else: tmp = -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 (t <= -8.5e+70) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (t <= 1.6e-122) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a * Float64(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 <= -8.5e+70)
tmp = -4.0 * (t * (a / c));
elseif (t <= 1.6e-122)
tmp = b / (z * c);
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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -8.5e+70], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-122], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+70}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-122}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if t < -8.4999999999999996e70Initial program 63.4%
Simplified66.5%
Taylor expanded in x around 0 74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
associate--l+74.6%
fma-define74.6%
associate-/l*74.7%
*-commutative74.7%
cancel-sign-sub-inv74.7%
metadata-eval74.7%
+-commutative74.7%
fma-define74.7%
associate-/l*84.0%
*-commutative84.0%
Simplified84.0%
fma-undefine84.0%
associate-/r*87.2%
associate-/r*87.3%
Applied egg-rr87.3%
Taylor expanded in z around inf 60.6%
associate-*r/60.6%
associate-*r*60.6%
associate-*l/68.9%
associate-*r/68.9%
associate-*l*68.9%
Simplified68.9%
if -8.4999999999999996e70 < t < 1.6000000000000001e-122Initial program 86.8%
Simplified84.9%
Taylor expanded in b around inf 47.1%
*-commutative47.1%
Simplified47.1%
if 1.6000000000000001e-122 < t Initial program 76.2%
Simplified79.8%
Taylor expanded in x around 0 78.3%
+-commutative78.3%
metadata-eval78.3%
cancel-sign-sub-inv78.3%
associate--l+78.3%
fma-define78.3%
associate-/l*77.3%
*-commutative77.3%
cancel-sign-sub-inv77.3%
metadata-eval77.3%
+-commutative77.3%
fma-define77.3%
associate-/l*80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in z around inf 52.0%
associate-*r/58.2%
Simplified58.2%
Final simplification56.2%
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);
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.
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;
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]) 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]) 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])){:}
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. 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])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 77.4%
Simplified78.7%
Taylor expanded in x around 0 78.4%
+-commutative78.4%
metadata-eval78.4%
cancel-sign-sub-inv78.4%
associate--l+78.4%
fma-define78.5%
associate-/l*77.8%
*-commutative77.8%
cancel-sign-sub-inv77.8%
metadata-eval77.8%
+-commutative77.8%
fma-define77.8%
associate-/l*80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in b around inf 33.3%
associate-/r*34.8%
Simplified34.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 (/ 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 77.4%
Simplified78.7%
Taylor expanded in b around inf 33.3%
*-commutative33.3%
Simplified33.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 2024170
(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)))