
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: 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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c))))
(if (<= t_1 -5e-272)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c))
(if (<= t_1 0.0)
(/ (+ (* -4.0 (/ (* a (* z t)) c)) (+ (* 9.0 (/ (* x y) c)) (/ b c))) z)
(if (<= t_1 INFINITY) t_1 (* a (/ (* t -4.0) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double tmp;
if (t_1 <= -5e-272) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double tmp;
if (t_1 <= -5e-272) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c) tmp = 0 if t_1 <= -5e-272: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c) elif t_1 <= 0.0: tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z elif t_1 <= math.inf: tmp = t_1 else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) tmp = 0.0 if (t_1 <= -5e-272) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c))) / z); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
tmp = 0.0;
if (t_1 <= -5e-272)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((9.0 * ((x * y) / c)) + (b / c))) / z;
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e-272], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-272}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c} + \left(9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.99999999999999982e-272Initial program 89.7%
+-commutative89.7%
associate-+r-89.7%
*-commutative89.7%
associate-*r*92.7%
*-commutative92.7%
associate-+r-92.7%
+-commutative92.7%
associate-*l*92.7%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
if -4.99999999999999982e-272 < (/.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 39.0%
Simplified38.0%
Taylor expanded in z around 0 99.8%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 90.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%
Simplified0.6%
Taylor expanded in t around inf 57.4%
*-commutative57.4%
associate-/l*83.6%
associate-*r*83.6%
*-commutative83.6%
*-commutative83.6%
associate-*l/83.6%
Simplified83.6%
Final simplification91.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c))))
(if (<= t_1 -5e-272)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c))
(if (<= t_1 0.0)
(/ (+ (* -4.0 (/ (* a (* z t)) c)) (/ b c)) z)
(if (<= t_1 INFINITY) t_1 (* a (/ (* t -4.0) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double tmp;
if (t_1 <= -5e-272) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + (b / c)) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double tmp;
if (t_1 <= -5e-272) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c)) + (b / c)) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c) tmp = 0 if t_1 <= -5e-272: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c) elif t_1 <= 0.0: tmp = ((-4.0 * ((a * (z * t)) / c)) + (b / c)) / z elif t_1 <= math.inf: tmp = t_1 else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) tmp = 0.0 if (t_1 <= -5e-272) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c)) + Float64(b / c)) / z); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
tmp = 0.0;
if (t_1 <= -5e-272)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a * (z * t)) / c)) + (b / c)) / z;
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e-272], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-272}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c} + \frac{b}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.99999999999999982e-272Initial program 89.7%
+-commutative89.7%
associate-+r-89.7%
*-commutative89.7%
associate-*r*92.7%
*-commutative92.7%
associate-+r-92.7%
+-commutative92.7%
associate-*l*92.7%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
if -4.99999999999999982e-272 < (/.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 39.0%
Simplified38.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 89.8%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 90.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%
Simplified0.6%
Taylor expanded in t around inf 57.4%
*-commutative57.4%
associate-/l*83.6%
associate-*r*83.6%
*-commutative83.6%
*-commutative83.6%
associate-*l/83.6%
Simplified83.6%
Final simplification90.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* t -4.0) c))))
(if (<= y -9e-113)
(* x (* (/ y z) (/ 9.0 c)))
(if (<= y -1.38e-269)
t_1
(if (<= y 6.4e-121)
(/ (/ b z) c)
(if (<= y 6.5e-17)
t_1
(if (<= y 1.9e+22) (/ b (* z c)) (* 9.0 (* (/ y c) (/ x 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) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (y <= -9e-113) {
tmp = x * ((y / z) * (9.0 / c));
} else if (y <= -1.38e-269) {
tmp = t_1;
} else if (y <= 6.4e-121) {
tmp = (b / z) / c;
} else if (y <= 6.5e-17) {
tmp = t_1;
} else if (y <= 1.9e+22) {
tmp = b / (z * c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
if (y <= (-9d-113)) then
tmp = x * ((y / z) * (9.0d0 / c))
else if (y <= (-1.38d-269)) then
tmp = t_1
else if (y <= 6.4d-121) then
tmp = (b / z) / c
else if (y <= 6.5d-17) then
tmp = t_1
else if (y <= 1.9d+22) then
tmp = b / (z * c)
else
tmp = 9.0d0 * ((y / c) * (x / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (y <= -9e-113) {
tmp = x * ((y / z) * (9.0 / c));
} else if (y <= -1.38e-269) {
tmp = t_1;
} else if (y <= 6.4e-121) {
tmp = (b / z) / c;
} else if (y <= 6.5e-17) {
tmp = t_1;
} else if (y <= 1.9e+22) {
tmp = b / (z * c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
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 = a * ((t * -4.0) / c) tmp = 0 if y <= -9e-113: tmp = x * ((y / z) * (9.0 / c)) elif y <= -1.38e-269: tmp = t_1 elif y <= 6.4e-121: tmp = (b / z) / c elif y <= 6.5e-17: tmp = t_1 elif y <= 1.9e+22: tmp = b / (z * c) else: tmp = 9.0 * ((y / c) * (x / z)) 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(a * Float64(Float64(t * -4.0) / c)) tmp = 0.0 if (y <= -9e-113) tmp = Float64(x * Float64(Float64(y / z) * Float64(9.0 / c))); elseif (y <= -1.38e-269) tmp = t_1; elseif (y <= 6.4e-121) tmp = Float64(Float64(b / z) / c); elseif (y <= 6.5e-17) tmp = t_1; elseif (y <= 1.9e+22) tmp = Float64(b / Float64(z * c)); else tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); 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 = a * ((t * -4.0) / c);
tmp = 0.0;
if (y <= -9e-113)
tmp = x * ((y / z) * (9.0 / c));
elseif (y <= -1.38e-269)
tmp = t_1;
elseif (y <= 6.4e-121)
tmp = (b / z) / c;
elseif (y <= 6.5e-17)
tmp = t_1;
elseif (y <= 1.9e+22)
tmp = b / (z * c);
else
tmp = 9.0 * ((y / c) * (x / 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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e-113], N[(x * N[(N[(y / z), $MachinePrecision] * N[(9.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.38e-269], t$95$1, If[LessEqual[y, 6.4e-121], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 6.5e-17], t$95$1, If[LessEqual[y, 1.9e+22], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $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 := a \cdot \frac{t \cdot -4}{c}\\
\mathbf{if}\;y \leq -9 \cdot 10^{-113}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} \cdot \frac{9}{c}\right)\\
\mathbf{elif}\;y \leq -1.38 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+22}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if y < -9.0000000000000002e-113Initial program 77.4%
Simplified79.7%
Taylor expanded in t around 0 59.1%
+-commutative59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in x around inf 41.5%
associate-*r/41.5%
*-commutative41.5%
*-commutative41.5%
times-frac39.4%
associate-*r/41.5%
associate-*l*42.5%
Simplified42.5%
if -9.0000000000000002e-113 < y < -1.38000000000000008e-269 or 6.40000000000000038e-121 < y < 6.4999999999999996e-17Initial program 79.4%
Simplified79.3%
Taylor expanded in t around inf 47.5%
*-commutative47.5%
associate-/l*55.4%
associate-*r*55.4%
*-commutative55.4%
*-commutative55.4%
associate-*l/55.4%
Simplified55.4%
if -1.38000000000000008e-269 < y < 6.40000000000000038e-121Initial program 88.8%
Simplified86.2%
Applied egg-rr47.9%
Taylor expanded in b around inf 51.3%
associate-*r/57.2%
Applied egg-rr57.2%
Taylor expanded in z around 0 57.4%
if 6.4999999999999996e-17 < y < 1.9000000000000002e22Initial program 99.8%
Simplified99.6%
Taylor expanded in b around inf 86.1%
*-commutative86.1%
Simplified86.1%
if 1.9000000000000002e22 < y Initial program 76.1%
Simplified74.7%
Taylor expanded in x around inf 57.7%
*-commutative57.7%
*-commutative57.7%
*-commutative57.7%
times-frac64.3%
Simplified64.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* t -4.0) c))))
(if (<= y -9e-113)
(* 9.0 (* x (/ y (* z c))))
(if (<= y -1.35e-269)
t_1
(if (<= y 6.2e-121)
(/ (/ b z) c)
(if (<= y 4.4e-20)
t_1
(if (<= y 5.4e+23) (/ b (* z c)) (* 9.0 (* (/ y c) (/ x 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) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (y <= -9e-113) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (y <= -1.35e-269) {
tmp = t_1;
} else if (y <= 6.2e-121) {
tmp = (b / z) / c;
} else if (y <= 4.4e-20) {
tmp = t_1;
} else if (y <= 5.4e+23) {
tmp = b / (z * c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
if (y <= (-9d-113)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (y <= (-1.35d-269)) then
tmp = t_1
else if (y <= 6.2d-121) then
tmp = (b / z) / c
else if (y <= 4.4d-20) then
tmp = t_1
else if (y <= 5.4d+23) then
tmp = b / (z * c)
else
tmp = 9.0d0 * ((y / c) * (x / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (y <= -9e-113) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (y <= -1.35e-269) {
tmp = t_1;
} else if (y <= 6.2e-121) {
tmp = (b / z) / c;
} else if (y <= 4.4e-20) {
tmp = t_1;
} else if (y <= 5.4e+23) {
tmp = b / (z * c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
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 = a * ((t * -4.0) / c) tmp = 0 if y <= -9e-113: tmp = 9.0 * (x * (y / (z * c))) elif y <= -1.35e-269: tmp = t_1 elif y <= 6.2e-121: tmp = (b / z) / c elif y <= 4.4e-20: tmp = t_1 elif y <= 5.4e+23: tmp = b / (z * c) else: tmp = 9.0 * ((y / c) * (x / z)) 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(a * Float64(Float64(t * -4.0) / c)) tmp = 0.0 if (y <= -9e-113) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (y <= -1.35e-269) tmp = t_1; elseif (y <= 6.2e-121) tmp = Float64(Float64(b / z) / c); elseif (y <= 4.4e-20) tmp = t_1; elseif (y <= 5.4e+23) tmp = Float64(b / Float64(z * c)); else tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); 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 = a * ((t * -4.0) / c);
tmp = 0.0;
if (y <= -9e-113)
tmp = 9.0 * (x * (y / (z * c)));
elseif (y <= -1.35e-269)
tmp = t_1;
elseif (y <= 6.2e-121)
tmp = (b / z) / c;
elseif (y <= 4.4e-20)
tmp = t_1;
elseif (y <= 5.4e+23)
tmp = b / (z * c);
else
tmp = 9.0 * ((y / c) * (x / 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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e-113], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-269], t$95$1, If[LessEqual[y, 6.2e-121], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 4.4e-20], t$95$1, If[LessEqual[y, 5.4e+23], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $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 := a \cdot \frac{t \cdot -4}{c}\\
\mathbf{if}\;y \leq -9 \cdot 10^{-113}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+23}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if y < -9.0000000000000002e-113Initial program 77.4%
Simplified79.7%
Taylor expanded in x around inf 41.5%
associate-/l*43.5%
*-commutative43.5%
Simplified43.5%
if -9.0000000000000002e-113 < y < -1.35000000000000008e-269 or 6.1999999999999997e-121 < y < 4.39999999999999982e-20Initial program 79.4%
Simplified79.3%
Taylor expanded in t around inf 47.5%
*-commutative47.5%
associate-/l*55.4%
associate-*r*55.4%
*-commutative55.4%
*-commutative55.4%
associate-*l/55.4%
Simplified55.4%
if -1.35000000000000008e-269 < y < 6.1999999999999997e-121Initial program 88.8%
Simplified86.2%
Applied egg-rr47.9%
Taylor expanded in b around inf 51.3%
associate-*r/57.2%
Applied egg-rr57.2%
Taylor expanded in z around 0 57.4%
if 4.39999999999999982e-20 < y < 5.3999999999999997e23Initial program 99.8%
Simplified99.6%
Taylor expanded in b around inf 86.1%
*-commutative86.1%
Simplified86.1%
if 5.3999999999999997e23 < y Initial program 76.1%
Simplified74.7%
Taylor expanded in x around inf 57.7%
*-commutative57.7%
*-commutative57.7%
*-commutative57.7%
times-frac64.3%
Simplified64.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* t -4.0) c))) (t_2 (* 9.0 (* x (/ y (* z c))))))
(if (<= y -9e-113)
t_2
(if (<= y -9.6e-269)
t_1
(if (<= y 1.9e-117)
(/ (/ b z) c)
(if (<= y 9.5e-20) t_1 (if (<= y 1.55e+15) (/ b (* z c)) t_2)))))))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 = a * ((t * -4.0) / c);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (y <= -9e-113) {
tmp = t_2;
} else if (y <= -9.6e-269) {
tmp = t_1;
} else if (y <= 1.9e-117) {
tmp = (b / z) / c;
} else if (y <= 9.5e-20) {
tmp = t_1;
} else if (y <= 1.55e+15) {
tmp = b / (z * c);
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
t_2 = 9.0d0 * (x * (y / (z * c)))
if (y <= (-9d-113)) then
tmp = t_2
else if (y <= (-9.6d-269)) then
tmp = t_1
else if (y <= 1.9d-117) then
tmp = (b / z) / c
else if (y <= 9.5d-20) then
tmp = t_1
else if (y <= 1.55d+15) then
tmp = b / (z * c)
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (y <= -9e-113) {
tmp = t_2;
} else if (y <= -9.6e-269) {
tmp = t_1;
} else if (y <= 1.9e-117) {
tmp = (b / z) / c;
} else if (y <= 9.5e-20) {
tmp = t_1;
} else if (y <= 1.55e+15) {
tmp = b / (z * c);
} else {
tmp = t_2;
}
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 = a * ((t * -4.0) / c) t_2 = 9.0 * (x * (y / (z * c))) tmp = 0 if y <= -9e-113: tmp = t_2 elif y <= -9.6e-269: tmp = t_1 elif y <= 1.9e-117: tmp = (b / z) / c elif y <= 9.5e-20: tmp = t_1 elif y <= 1.55e+15: tmp = b / (z * c) else: tmp = t_2 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(a * Float64(Float64(t * -4.0) / c)) t_2 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (y <= -9e-113) tmp = t_2; elseif (y <= -9.6e-269) tmp = t_1; elseif (y <= 1.9e-117) tmp = Float64(Float64(b / z) / c); elseif (y <= 9.5e-20) tmp = t_1; elseif (y <= 1.55e+15) tmp = Float64(b / Float64(z * c)); else tmp = t_2; 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 = a * ((t * -4.0) / c);
t_2 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (y <= -9e-113)
tmp = t_2;
elseif (y <= -9.6e-269)
tmp = t_1;
elseif (y <= 1.9e-117)
tmp = (b / z) / c;
elseif (y <= 9.5e-20)
tmp = t_1;
elseif (y <= 1.55e+15)
tmp = b / (z * c);
else
tmp = t_2;
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[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e-113], t$95$2, If[LessEqual[y, -9.6e-269], t$95$1, If[LessEqual[y, 1.9e-117], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 9.5e-20], t$95$1, If[LessEqual[y, 1.55e+15], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
t_2 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{-113}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -9.6 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-117}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+15}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -9.0000000000000002e-113 or 1.55e15 < y Initial program 76.8%
Simplified77.5%
Taylor expanded in x around inf 48.6%
associate-/l*51.0%
*-commutative51.0%
Simplified51.0%
if -9.0000000000000002e-113 < y < -9.6000000000000004e-269 or 1.89999999999999986e-117 < y < 9.5e-20Initial program 79.4%
Simplified79.3%
Taylor expanded in t around inf 47.5%
*-commutative47.5%
associate-/l*55.4%
associate-*r*55.4%
*-commutative55.4%
*-commutative55.4%
associate-*l/55.4%
Simplified55.4%
if -9.6000000000000004e-269 < y < 1.89999999999999986e-117Initial program 88.8%
Simplified86.2%
Applied egg-rr47.9%
Taylor expanded in b around inf 51.3%
associate-*r/57.2%
Applied egg-rr57.2%
Taylor expanded in z around 0 57.4%
if 9.5e-20 < y < 1.55e15Initial program 99.8%
Simplified99.6%
Taylor expanded in b around inf 86.1%
*-commutative86.1%
Simplified86.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -8e+167)
(* t (/ (* a -4.0) c))
(if (<= z 7.8e+205)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c))
(* a (/ (* t -4.0) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8e+167) {
tmp = t * ((a * -4.0) / c);
} else if (z <= 7.8e+205) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-8d+167)) then
tmp = t * ((a * (-4.0d0)) / c)
else if (z <= 7.8d+205) then
tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (t * a)))) / (z * c)
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8e+167) {
tmp = t * ((a * -4.0) / c);
} else if (z <= 7.8e+205) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -8e+167: tmp = t * ((a * -4.0) / c) elif z <= 7.8e+205: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c) else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -8e+167) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); elseif (z <= 7.8e+205) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -8e+167)
tmp = t * ((a * -4.0) / c);
elseif (z <= 7.8e+205)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -8e+167], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+205], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+167}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+205}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if z < -8.0000000000000003e167Initial program 39.3%
Simplified47.4%
Taylor expanded in z around 0 50.1%
Taylor expanded in a around inf 62.8%
associate-*r/62.8%
associate-*r*63.4%
associate-*l/70.4%
*-commutative70.4%
Simplified70.4%
if -8.0000000000000003e167 < z < 7.7999999999999997e205Initial program 87.6%
+-commutative87.6%
associate-+r-87.6%
*-commutative87.6%
associate-*r*87.1%
*-commutative87.1%
associate-+r-87.1%
+-commutative87.1%
associate-*l*87.1%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
if 7.7999999999999997e205 < z Initial program 42.9%
Simplified37.1%
Taylor expanded in t around inf 77.9%
*-commutative77.9%
associate-/l*77.5%
associate-*r*77.5%
*-commutative77.5%
*-commutative77.5%
associate-*l/77.5%
Simplified77.5%
Final simplification83.7%
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.5e+129)
(* a (/ (* t -4.0) c))
(if (<= t 1.6e-123)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* t (/ (* a -4.0) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.5e+129) {
tmp = a * ((t * -4.0) / c);
} else if (t <= 1.6e-123) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t * ((a * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.5d+129)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (t <= 1.6d-123) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = t * ((a * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.5e+129) {
tmp = a * ((t * -4.0) / c);
} else if (t <= 1.6e-123) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t * ((a * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.5e+129: tmp = a * ((t * -4.0) / c) elif t <= 1.6e-123: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = t * ((a * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.5e+129) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (t <= 1.6e-123) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(t * Float64(Float64(a * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.5e+129)
tmp = a * ((t * -4.0) / c);
elseif (t <= 1.6e-123)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = t * ((a * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.5e+129], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-123], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+129}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-123}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\end{array}
\end{array}
if t < -1.50000000000000015e129Initial program 64.6%
Simplified70.1%
Taylor expanded in t around inf 64.9%
*-commutative64.9%
associate-/l*72.8%
associate-*r*72.8%
*-commutative72.8%
*-commutative72.8%
associate-*l/72.8%
Simplified72.8%
if -1.50000000000000015e129 < t < 1.59999999999999989e-123Initial program 85.1%
Simplified83.5%
Taylor expanded in t around 0 76.7%
+-commutative76.7%
*-commutative76.7%
Simplified76.7%
if 1.59999999999999989e-123 < t Initial program 79.0%
Simplified79.1%
Taylor expanded in z around 0 75.2%
Taylor expanded in a around inf 48.0%
associate-*r/48.0%
associate-*r*48.1%
associate-*l/56.7%
*-commutative56.7%
Simplified56.7%
Final simplification68.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.58e+49) (not (<= t 1.26e-123))) (* a (/ (* t -4.0) c)) (* b (/ (/ 1.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 ((t <= -1.58e+49) || !(t <= 1.26e-123)) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = b * ((1.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 ((t <= (-1.58d+49)) .or. (.not. (t <= 1.26d-123))) then
tmp = a * ((t * (-4.0d0)) / c)
else
tmp = b * ((1.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 ((t <= -1.58e+49) || !(t <= 1.26e-123)) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = b * ((1.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 (t <= -1.58e+49) or not (t <= 1.26e-123): tmp = a * ((t * -4.0) / c) else: tmp = b * ((1.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 ((t <= -1.58e+49) || !(t <= 1.26e-123)) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); else tmp = Float64(b * Float64(Float64(1.0 / 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.58e+49) || ~((t <= 1.26e-123)))
tmp = a * ((t * -4.0) / c);
else
tmp = b * ((1.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[t, -1.58e+49], N[Not[LessEqual[t, 1.26e-123]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.58 \cdot 10^{+49} \lor \neg \left(t \leq 1.26 \cdot 10^{-123}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\end{array}
\end{array}
if t < -1.57999999999999992e49 or 1.26000000000000005e-123 < t Initial program 75.5%
Simplified77.5%
Taylor expanded in t around inf 51.1%
*-commutative51.1%
associate-/l*60.6%
associate-*r*60.6%
*-commutative60.6%
*-commutative60.6%
associate-*l/60.7%
Simplified60.7%
if -1.57999999999999992e49 < t < 1.26000000000000005e-123Initial program 86.0%
Simplified83.2%
Taylor expanded in b around inf 48.5%
*-commutative48.5%
Simplified48.5%
div-inv48.5%
Applied egg-rr48.5%
Taylor expanded in z around 0 48.5%
*-commutative48.5%
associate-/r*50.1%
Simplified50.1%
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 (if (or (<= t -3.4e+49) (not (<= t 1.4e-123))) (* a (/ (* t -4.0) 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 <= -3.4e+49) || !(t <= 1.4e-123)) {
tmp = a * ((t * -4.0) / 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 <= (-3.4d+49)) .or. (.not. (t <= 1.4d-123))) then
tmp = a * ((t * (-4.0d0)) / 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 <= -3.4e+49) || !(t <= 1.4e-123)) {
tmp = a * ((t * -4.0) / 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 <= -3.4e+49) or not (t <= 1.4e-123): tmp = a * ((t * -4.0) / 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 <= -3.4e+49) || !(t <= 1.4e-123)) tmp = Float64(a * Float64(Float64(t * -4.0) / 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 <= -3.4e+49) || ~((t <= 1.4e-123)))
tmp = a * ((t * -4.0) / 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, -3.4e+49], N[Not[LessEqual[t, 1.4e-123]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+49} \lor \neg \left(t \leq 1.4 \cdot 10^{-123}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if t < -3.4000000000000001e49 or 1.3999999999999999e-123 < t Initial program 75.5%
Simplified77.5%
Taylor expanded in t around inf 51.1%
*-commutative51.1%
associate-/l*60.6%
associate-*r*60.6%
*-commutative60.6%
*-commutative60.6%
associate-*l/60.7%
Simplified60.7%
if -3.4000000000000001e49 < t < 1.3999999999999999e-123Initial program 86.0%
Simplified83.2%
Taylor expanded in b around inf 48.5%
*-commutative48.5%
Simplified48.5%
Final simplification55.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= t -3.05e+49) (not (<= t 4.6e-124))) (* -4.0 (/ (* t a) 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 <= -3.05e+49) || !(t <= 4.6e-124)) {
tmp = -4.0 * ((t * a) / 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 <= (-3.05d+49)) .or. (.not. (t <= 4.6d-124))) then
tmp = (-4.0d0) * ((t * a) / 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 <= -3.05e+49) || !(t <= 4.6e-124)) {
tmp = -4.0 * ((t * a) / 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 <= -3.05e+49) or not (t <= 4.6e-124): tmp = -4.0 * ((t * a) / 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 <= -3.05e+49) || !(t <= 4.6e-124)) tmp = Float64(-4.0 * Float64(Float64(t * a) / 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 <= -3.05e+49) || ~((t <= 4.6e-124)))
tmp = -4.0 * ((t * a) / 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, -3.05e+49], N[Not[LessEqual[t, 4.6e-124]], $MachinePrecision]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.05 \cdot 10^{+49} \lor \neg \left(t \leq 4.6 \cdot 10^{-124}\right):\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if t < -3.04999999999999982e49 or 4.60000000000000024e-124 < t Initial program 75.5%
Simplified77.5%
Taylor expanded in t around inf 51.1%
if -3.04999999999999982e49 < t < 4.60000000000000024e-124Initial program 86.0%
Simplified83.2%
Taylor expanded in b around inf 48.5%
*-commutative48.5%
Simplified48.5%
Final simplification50.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= t -1.3e+49) (* a (/ (* t -4.0) c)) (if (<= t 1.6e-123) (* b (/ (/ 1.0 z) c)) (* t (/ (* a -4.0) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.3e+49) {
tmp = a * ((t * -4.0) / c);
} else if (t <= 1.6e-123) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = t * ((a * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.3d+49)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (t <= 1.6d-123) then
tmp = b * ((1.0d0 / z) / c)
else
tmp = t * ((a * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.3e+49) {
tmp = a * ((t * -4.0) / c);
} else if (t <= 1.6e-123) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = t * ((a * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.3e+49: tmp = a * ((t * -4.0) / c) elif t <= 1.6e-123: tmp = b * ((1.0 / z) / c) else: tmp = t * ((a * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.3e+49) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (t <= 1.6e-123) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); else tmp = Float64(t * Float64(Float64(a * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.3e+49)
tmp = a * ((t * -4.0) / c);
elseif (t <= 1.6e-123)
tmp = b * ((1.0 / z) / c);
else
tmp = t * ((a * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.3e+49], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-123], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+49}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-123}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\end{array}
\end{array}
if t < -1.29999999999999994e49Initial program 68.6%
Simplified74.5%
Taylor expanded in t around inf 57.1%
*-commutative57.1%
associate-/l*66.6%
associate-*r*66.6%
*-commutative66.6%
*-commutative66.6%
associate-*l/66.6%
Simplified66.6%
if -1.29999999999999994e49 < t < 1.59999999999999989e-123Initial program 86.0%
Simplified83.2%
Taylor expanded in b around inf 48.5%
*-commutative48.5%
Simplified48.5%
div-inv48.5%
Applied egg-rr48.5%
Taylor expanded in z around 0 48.5%
*-commutative48.5%
associate-/r*50.1%
Simplified50.1%
if 1.59999999999999989e-123 < t Initial program 79.0%
Simplified79.1%
Taylor expanded in z around 0 75.2%
Taylor expanded in a around inf 48.0%
associate-*r/48.0%
associate-*r*48.1%
associate-*l/56.7%
*-commutative56.7%
Simplified56.7%
Final simplification55.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= c 1.2e+223) (/ (/ b z) c) (/ (/ 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) {
double tmp;
if (c <= 1.2e+223) {
tmp = (b / z) / c;
} else {
tmp = (b / c) / z;
}
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 (c <= 1.2d+223) then
tmp = (b / z) / c
else
tmp = (b / c) / z
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 (c <= 1.2e+223) {
tmp = (b / z) / c;
} else {
tmp = (b / c) / z;
}
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 c <= 1.2e+223: tmp = (b / z) / c else: tmp = (b / c) / z 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 (c <= 1.2e+223) tmp = Float64(Float64(b / z) / c); else tmp = Float64(Float64(b / c) / z); 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 (c <= 1.2e+223)
tmp = (b / z) / c;
else
tmp = (b / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.2e+223], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.2 \cdot 10^{+223}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if c < 1.20000000000000006e223Initial program 82.1%
Simplified82.1%
Applied egg-rr53.7%
Taylor expanded in b around inf 33.7%
associate-*r/36.1%
Applied egg-rr36.1%
Taylor expanded in z around 0 36.1%
if 1.20000000000000006e223 < c Initial program 57.0%
Simplified56.6%
Applied egg-rr56.3%
Taylor expanded in b around inf 35.3%
associate-*l/35.4%
*-un-lft-identity35.4%
Applied egg-rr35.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 (/ 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 79.9%
Simplified79.9%
Taylor expanded in b around inf 35.3%
*-commutative35.3%
Simplified35.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 2024136
(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)))