
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= z -4.8e+26)
(/ (+ (* y (+ (/ (* 9.0 x) z) (/ b (* z y)))) t_1) c)
(if (<= z 1e-50)
(/ (/ (- (+ b (* x (* y 9.0))) (* a (* z (* t 4.0)))) c) z)
(/ 1.0 (/ c (+ t_1 (/ (+ b (* 9.0 (* y 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 = t * (a * -4.0);
double tmp;
if (z <= -4.8e+26) {
tmp = ((y * (((9.0 * x) / z) + (b / (z * y)))) + t_1) / c;
} else if (z <= 1e-50) {
tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z;
} else {
tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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 = t * (a * (-4.0d0))
if (z <= (-4.8d+26)) then
tmp = ((y * (((9.0d0 * x) / z) + (b / (z * y)))) + t_1) / c
else if (z <= 1d-50) then
tmp = (((b + (x * (y * 9.0d0))) - (a * (z * (t * 4.0d0)))) / c) / z
else
tmp = 1.0d0 / (c / (t_1 + ((b + (9.0d0 * (y * 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 = t * (a * -4.0);
double tmp;
if (z <= -4.8e+26) {
tmp = ((y * (((9.0 * x) / z) + (b / (z * y)))) + t_1) / c;
} else if (z <= 1e-50) {
tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z;
} else {
tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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 = t * (a * -4.0) tmp = 0 if z <= -4.8e+26: tmp = ((y * (((9.0 * x) / z) + (b / (z * y)))) + t_1) / c elif z <= 1e-50: tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z else: tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -4.8e+26) tmp = Float64(Float64(Float64(y * Float64(Float64(Float64(9.0 * x) / z) + Float64(b / Float64(z * y)))) + t_1) / c); elseif (z <= 1e-50) tmp = Float64(Float64(Float64(Float64(b + Float64(x * Float64(y * 9.0))) - Float64(a * Float64(z * Float64(t * 4.0)))) / c) / z); else tmp = Float64(1.0 / Float64(c / Float64(t_1 + Float64(Float64(b + Float64(9.0 * Float64(y * 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 = t * (a * -4.0);
tmp = 0.0;
if (z <= -4.8e+26)
tmp = ((y * (((9.0 * x) / z) + (b / (z * y)))) + t_1) / c;
elseif (z <= 1e-50)
tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z;
else
tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+26], N[(N[(N[(y * N[(N[(N[(9.0 * x), $MachinePrecision] / z), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1e-50], N[(N[(N[(N[(b + N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(z * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(1.0 / N[(c / N[(t$95$1 + N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+26}:\\
\;\;\;\;\frac{y \cdot \left(\frac{9 \cdot x}{z} + \frac{b}{z \cdot y}\right) + t\_1}{c}\\
\mathbf{elif}\;z \leq 10^{-50}:\\
\;\;\;\;\frac{\frac{\left(b + x \cdot \left(y \cdot 9\right)\right) - a \cdot \left(z \cdot \left(t \cdot 4\right)\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{c}{t\_1 + \frac{b + 9 \cdot \left(y \cdot x\right)}{z}}}\\
\end{array}
\end{array}
if z < -4.80000000000000009e26Initial program 57.3%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified84.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6490.2%
Simplified90.2%
if -4.80000000000000009e26 < z < 1.00000000000000001e-50Initial program 95.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.0%
Applied egg-rr95.0%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr96.8%
if 1.00000000000000001e-50 < z Initial program 71.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified93.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.1%
Applied egg-rr93.1%
Final simplification94.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 (<= t -3.3e+214)
(* a (* -4.0 (/ t c)))
(if (<= t -1.2e+103)
(* -4.0 (/ (* t a) c))
(if (<= t -7.5e-102)
(* (/ (* y 9.0) c) (/ x z))
(if (<= t -1.75e-187)
(* b (/ (/ 1.0 z) c))
(if (<= t -5.8e-284)
(/ (* 9.0 (* y x)) (* z c))
(if (<= t 2.1e-162) (/ b (* z c)) (* (* t -4.0) (/ a 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.3e+214) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -1.2e+103) {
tmp = -4.0 * ((t * a) / c);
} else if (t <= -7.5e-102) {
tmp = ((y * 9.0) / c) * (x / z);
} else if (t <= -1.75e-187) {
tmp = b * ((1.0 / z) / c);
} else if (t <= -5.8e-284) {
tmp = (9.0 * (y * x)) / (z * c);
} else if (t <= 2.1e-162) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / 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.3d+214)) then
tmp = a * ((-4.0d0) * (t / c))
else if (t <= (-1.2d+103)) then
tmp = (-4.0d0) * ((t * a) / c)
else if (t <= (-7.5d-102)) then
tmp = ((y * 9.0d0) / c) * (x / z)
else if (t <= (-1.75d-187)) then
tmp = b * ((1.0d0 / z) / c)
else if (t <= (-5.8d-284)) then
tmp = (9.0d0 * (y * x)) / (z * c)
else if (t <= 2.1d-162) then
tmp = b / (z * c)
else
tmp = (t * (-4.0d0)) * (a / 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.3e+214) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -1.2e+103) {
tmp = -4.0 * ((t * a) / c);
} else if (t <= -7.5e-102) {
tmp = ((y * 9.0) / c) * (x / z);
} else if (t <= -1.75e-187) {
tmp = b * ((1.0 / z) / c);
} else if (t <= -5.8e-284) {
tmp = (9.0 * (y * x)) / (z * c);
} else if (t <= 2.1e-162) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / 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.3e+214: tmp = a * (-4.0 * (t / c)) elif t <= -1.2e+103: tmp = -4.0 * ((t * a) / c) elif t <= -7.5e-102: tmp = ((y * 9.0) / c) * (x / z) elif t <= -1.75e-187: tmp = b * ((1.0 / z) / c) elif t <= -5.8e-284: tmp = (9.0 * (y * x)) / (z * c) elif t <= 2.1e-162: tmp = b / (z * c) else: tmp = (t * -4.0) * (a / 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.3e+214) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (t <= -1.2e+103) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); elseif (t <= -7.5e-102) tmp = Float64(Float64(Float64(y * 9.0) / c) * Float64(x / z)); elseif (t <= -1.75e-187) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (t <= -5.8e-284) tmp = Float64(Float64(9.0 * Float64(y * x)) / Float64(z * c)); elseif (t <= 2.1e-162) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(t * -4.0) * Float64(a / 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.3e+214)
tmp = a * (-4.0 * (t / c));
elseif (t <= -1.2e+103)
tmp = -4.0 * ((t * a) / c);
elseif (t <= -7.5e-102)
tmp = ((y * 9.0) / c) * (x / z);
elseif (t <= -1.75e-187)
tmp = b * ((1.0 / z) / c);
elseif (t <= -5.8e-284)
tmp = (9.0 * (y * x)) / (z * c);
elseif (t <= 2.1e-162)
tmp = b / (z * c);
else
tmp = (t * -4.0) * (a / 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, -3.3e+214], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.2e+103], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.5e-102], N[(N[(N[(y * 9.0), $MachinePrecision] / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.75e-187], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e-284], N[(N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-162], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t * -4.0), $MachinePrecision] * N[(a / 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.3 \cdot 10^{+214}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{+103}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-102}:\\
\;\;\;\;\frac{y \cdot 9}{c} \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-187}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-284}:\\
\;\;\;\;\frac{9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-162}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot -4\right) \cdot \frac{a}{c}\\
\end{array}
\end{array}
if t < -3.30000000000000011e214Initial program 70.6%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6466.4%
Simplified66.4%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6480.5%
Applied egg-rr80.5%
if -3.30000000000000011e214 < t < -1.1999999999999999e103Initial program 73.6%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified91.2%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0%
Applied egg-rr91.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6477.5%
Simplified77.5%
if -1.1999999999999999e103 < t < -7.5000000000000008e-102Initial program 77.1%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified89.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.4%
Simplified51.4%
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-/l/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
if -7.5000000000000008e-102 < t < -1.74999999999999989e-187Initial program 82.9%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6458.1%
Simplified58.1%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6458.1%
Applied egg-rr58.1%
if -1.74999999999999989e-187 < t < -5.8000000000000002e-284Initial program 87.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6463.7%
Simplified63.7%
if -5.8000000000000002e-284 < t < 2.1e-162Initial program 88.7%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6452.4%
Simplified52.4%
frac-2negN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6452.4%
Applied egg-rr52.4%
if 2.1e-162 < t Initial program 83.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.6%
Simplified40.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6442.7%
Applied egg-rr42.7%
Final simplification54.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 -9.5e+213)
(* a (* -4.0 (/ t c)))
(if (<= t -8e+108)
(* -4.0 (/ (* t a) c))
(if (<= t -6.8e-102)
(* (/ (* y 9.0) c) (/ x z))
(if (<= t -5.7e-187)
(* b (/ (/ 1.0 z) c))
(if (<= t -4.7e-284)
(* 9.0 (/ (/ (* y x) z) c))
(if (<= t 9.8e-163) (/ b (* z c)) (* (* t -4.0) (/ a c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.5e+213) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -8e+108) {
tmp = -4.0 * ((t * a) / c);
} else if (t <= -6.8e-102) {
tmp = ((y * 9.0) / c) * (x / z);
} else if (t <= -5.7e-187) {
tmp = b * ((1.0 / z) / c);
} else if (t <= -4.7e-284) {
tmp = 9.0 * (((y * x) / z) / c);
} else if (t <= 9.8e-163) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-9.5d+213)) then
tmp = a * ((-4.0d0) * (t / c))
else if (t <= (-8d+108)) then
tmp = (-4.0d0) * ((t * a) / c)
else if (t <= (-6.8d-102)) then
tmp = ((y * 9.0d0) / c) * (x / z)
else if (t <= (-5.7d-187)) then
tmp = b * ((1.0d0 / z) / c)
else if (t <= (-4.7d-284)) then
tmp = 9.0d0 * (((y * x) / z) / c)
else if (t <= 9.8d-163) then
tmp = b / (z * c)
else
tmp = (t * (-4.0d0)) * (a / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.5e+213) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -8e+108) {
tmp = -4.0 * ((t * a) / c);
} else if (t <= -6.8e-102) {
tmp = ((y * 9.0) / c) * (x / z);
} else if (t <= -5.7e-187) {
tmp = b * ((1.0 / z) / c);
} else if (t <= -4.7e-284) {
tmp = 9.0 * (((y * x) / z) / c);
} else if (t <= 9.8e-163) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -9.5e+213: tmp = a * (-4.0 * (t / c)) elif t <= -8e+108: tmp = -4.0 * ((t * a) / c) elif t <= -6.8e-102: tmp = ((y * 9.0) / c) * (x / z) elif t <= -5.7e-187: tmp = b * ((1.0 / z) / c) elif t <= -4.7e-284: tmp = 9.0 * (((y * x) / z) / c) elif t <= 9.8e-163: tmp = b / (z * c) else: tmp = (t * -4.0) * (a / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -9.5e+213) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (t <= -8e+108) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); elseif (t <= -6.8e-102) tmp = Float64(Float64(Float64(y * 9.0) / c) * Float64(x / z)); elseif (t <= -5.7e-187) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (t <= -4.7e-284) tmp = Float64(9.0 * Float64(Float64(Float64(y * x) / z) / c)); elseif (t <= 9.8e-163) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(t * -4.0) * Float64(a / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -9.5e+213)
tmp = a * (-4.0 * (t / c));
elseif (t <= -8e+108)
tmp = -4.0 * ((t * a) / c);
elseif (t <= -6.8e-102)
tmp = ((y * 9.0) / c) * (x / z);
elseif (t <= -5.7e-187)
tmp = b * ((1.0 / z) / c);
elseif (t <= -4.7e-284)
tmp = 9.0 * (((y * x) / z) / c);
elseif (t <= 9.8e-163)
tmp = b / (z * c);
else
tmp = (t * -4.0) * (a / 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, -9.5e+213], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8e+108], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e-102], N[(N[(N[(y * 9.0), $MachinePrecision] / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.7e-187], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.7e-284], N[(9.0 * N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e-163], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t * -4.0), $MachinePrecision] * N[(a / c), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+213}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+108}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;\frac{y \cdot 9}{c} \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq -5.7 \cdot 10^{-187}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-284}:\\
\;\;\;\;9 \cdot \frac{\frac{y \cdot x}{z}}{c}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-163}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot -4\right) \cdot \frac{a}{c}\\
\end{array}
\end{array}
if t < -9.49999999999999993e213Initial program 70.6%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6466.4%
Simplified66.4%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6480.5%
Applied egg-rr80.5%
if -9.49999999999999993e213 < t < -8.0000000000000003e108Initial program 73.6%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified91.2%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0%
Applied egg-rr91.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6477.5%
Simplified77.5%
if -8.0000000000000003e108 < t < -6.80000000000000026e-102Initial program 77.1%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified89.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.4%
Simplified51.4%
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-/l/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.3%
Applied egg-rr47.3%
if -6.80000000000000026e-102 < t < -5.6999999999999996e-187Initial program 82.9%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6458.1%
Simplified58.1%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6458.1%
Applied egg-rr58.1%
if -5.6999999999999996e-187 < t < -4.70000000000000022e-284Initial program 87.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6467.3%
Simplified67.3%
if -4.70000000000000022e-284 < t < 9.8000000000000005e-163Initial program 88.7%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6452.4%
Simplified52.4%
frac-2negN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6452.4%
Applied egg-rr52.4%
if 9.8000000000000005e-163 < t Initial program 83.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.6%
Simplified40.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6442.7%
Applied egg-rr42.7%
Final simplification54.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.35e+126)
(* a (* -4.0 (/ t c)))
(if (<= t -6.8e-102)
(/ (/ (* y (* 9.0 x)) c) z)
(if (<= t -2.25e-188)
(* b (/ (/ 1.0 z) c))
(if (<= t -5.5e-284)
(/ (* 9.0 (* y x)) (* z c))
(if (<= t 7e-163) (/ b (* z c)) (* (* t -4.0) (/ a 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.35e+126) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -6.8e-102) {
tmp = ((y * (9.0 * x)) / c) / z;
} else if (t <= -2.25e-188) {
tmp = b * ((1.0 / z) / c);
} else if (t <= -5.5e-284) {
tmp = (9.0 * (y * x)) / (z * c);
} else if (t <= 7e-163) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / 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.35d+126)) then
tmp = a * ((-4.0d0) * (t / c))
else if (t <= (-6.8d-102)) then
tmp = ((y * (9.0d0 * x)) / c) / z
else if (t <= (-2.25d-188)) then
tmp = b * ((1.0d0 / z) / c)
else if (t <= (-5.5d-284)) then
tmp = (9.0d0 * (y * x)) / (z * c)
else if (t <= 7d-163) then
tmp = b / (z * c)
else
tmp = (t * (-4.0d0)) * (a / 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.35e+126) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -6.8e-102) {
tmp = ((y * (9.0 * x)) / c) / z;
} else if (t <= -2.25e-188) {
tmp = b * ((1.0 / z) / c);
} else if (t <= -5.5e-284) {
tmp = (9.0 * (y * x)) / (z * c);
} else if (t <= 7e-163) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / 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.35e+126: tmp = a * (-4.0 * (t / c)) elif t <= -6.8e-102: tmp = ((y * (9.0 * x)) / c) / z elif t <= -2.25e-188: tmp = b * ((1.0 / z) / c) elif t <= -5.5e-284: tmp = (9.0 * (y * x)) / (z * c) elif t <= 7e-163: tmp = b / (z * c) else: tmp = (t * -4.0) * (a / 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.35e+126) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (t <= -6.8e-102) tmp = Float64(Float64(Float64(y * Float64(9.0 * x)) / c) / z); elseif (t <= -2.25e-188) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (t <= -5.5e-284) tmp = Float64(Float64(9.0 * Float64(y * x)) / Float64(z * c)); elseif (t <= 7e-163) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(t * -4.0) * Float64(a / 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.35e+126)
tmp = a * (-4.0 * (t / c));
elseif (t <= -6.8e-102)
tmp = ((y * (9.0 * x)) / c) / z;
elseif (t <= -2.25e-188)
tmp = b * ((1.0 / z) / c);
elseif (t <= -5.5e-284)
tmp = (9.0 * (y * x)) / (z * c);
elseif (t <= 7e-163)
tmp = b / (z * c);
else
tmp = (t * -4.0) * (a / 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.35e+126], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e-102], N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -2.25e-188], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-284], N[(N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-163], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t * -4.0), $MachinePrecision] * N[(a / 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.35 \cdot 10^{+126}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;\frac{\frac{y \cdot \left(9 \cdot x\right)}{c}}{z}\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-188}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-284}:\\
\;\;\;\;\frac{9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-163}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot -4\right) \cdot \frac{a}{c}\\
\end{array}
\end{array}
if t < -1.35000000000000001e126Initial program 73.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.8%
Simplified70.8%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6470.7%
Applied egg-rr70.7%
if -1.35000000000000001e126 < t < -6.80000000000000026e-102Initial program 76.1%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.1%
Applied egg-rr78.1%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr78.1%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6451.3%
Simplified51.3%
if -6.80000000000000026e-102 < t < -2.24999999999999997e-188Initial program 83.6%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6459.8%
Simplified59.8%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6459.9%
Applied egg-rr59.9%
if -2.24999999999999997e-188 < t < -5.4999999999999995e-284Initial program 87.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6462.1%
Simplified62.1%
if -5.4999999999999995e-284 < t < 7.00000000000000054e-163Initial program 88.7%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6452.4%
Simplified52.4%
frac-2negN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6452.4%
Applied egg-rr52.4%
if 7.00000000000000054e-163 < t Initial program 83.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.6%
Simplified40.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6442.7%
Applied egg-rr42.7%
Final simplification53.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 (/ (+ (* t (* a -4.0)) (* 9.0 (/ (* y x) z))) c)))
(if (<= t -3.7e+226)
(* (/ (* z -4.0) z) (/ (/ t c) (/ 1.0 a)))
(if (<= t -1.3e-68)
t_1
(if (<= t 1.95e-162) (/ (/ (+ b (* 9.0 (* y x))) z) c) t_1)))))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 = ((t * (a * -4.0)) + (9.0 * ((y * x) / z))) / c;
double tmp;
if (t <= -3.7e+226) {
tmp = ((z * -4.0) / z) * ((t / c) / (1.0 / a));
} else if (t <= -1.3e-68) {
tmp = t_1;
} else if (t <= 1.95e-162) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else {
tmp = t_1;
}
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 = ((t * (a * (-4.0d0))) + (9.0d0 * ((y * x) / z))) / c
if (t <= (-3.7d+226)) then
tmp = ((z * (-4.0d0)) / z) * ((t / c) / (1.0d0 / a))
else if (t <= (-1.3d-68)) then
tmp = t_1
else if (t <= 1.95d-162) then
tmp = ((b + (9.0d0 * (y * x))) / z) / c
else
tmp = t_1
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 = ((t * (a * -4.0)) + (9.0 * ((y * x) / z))) / c;
double tmp;
if (t <= -3.7e+226) {
tmp = ((z * -4.0) / z) * ((t / c) / (1.0 / a));
} else if (t <= -1.3e-68) {
tmp = t_1;
} else if (t <= 1.95e-162) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else {
tmp = t_1;
}
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 = ((t * (a * -4.0)) + (9.0 * ((y * x) / z))) / c tmp = 0 if t <= -3.7e+226: tmp = ((z * -4.0) / z) * ((t / c) / (1.0 / a)) elif t <= -1.3e-68: tmp = t_1 elif t <= 1.95e-162: tmp = ((b + (9.0 * (y * x))) / z) / c else: tmp = t_1 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(t * Float64(a * -4.0)) + Float64(9.0 * Float64(Float64(y * x) / z))) / c) tmp = 0.0 if (t <= -3.7e+226) tmp = Float64(Float64(Float64(z * -4.0) / z) * Float64(Float64(t / c) / Float64(1.0 / a))); elseif (t <= -1.3e-68) tmp = t_1; elseif (t <= 1.95e-162) tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) / c); else tmp = t_1; 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 = ((t * (a * -4.0)) + (9.0 * ((y * x) / z))) / c;
tmp = 0.0;
if (t <= -3.7e+226)
tmp = ((z * -4.0) / z) * ((t / c) / (1.0 / a));
elseif (t <= -1.3e-68)
tmp = t_1;
elseif (t <= 1.95e-162)
tmp = ((b + (9.0 * (y * x))) / z) / c;
else
tmp = t_1;
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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t, -3.7e+226], N[(N[(N[(z * -4.0), $MachinePrecision] / z), $MachinePrecision] * N[(N[(t / c), $MachinePrecision] / N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.3e-68], t$95$1, If[LessEqual[t, 1.95e-162], N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
\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{t \cdot \left(a \cdot -4\right) + 9 \cdot \frac{y \cdot x}{z}}{c}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+226}:\\
\;\;\;\;\frac{z \cdot -4}{z} \cdot \frac{\frac{t}{c}}{\frac{1}{a}}\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-162}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.69999999999999982e226Initial program 67.3%
Taylor expanded in z around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6451.1%
Simplified51.1%
times-fracN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.0%
Applied egg-rr68.0%
clear-numN/A
un-div-invN/A
*-commutativeN/A
associate-/l*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6484.2%
Applied egg-rr84.2%
if -3.69999999999999982e226 < t < -1.2999999999999999e-68 or 1.95e-162 < t Initial program 79.4%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified89.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6474.1%
Simplified74.1%
if -1.2999999999999999e-68 < t < 1.95e-162Initial program 87.2%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified87.3%
Taylor expanded in z around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6479.2%
Simplified79.2%
Final simplification76.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
(let* ((t_1 (+ b (* 9.0 (* y x)))) (t_2 (* t (* a -4.0))))
(if (<= z -5e-40)
(/ (+ t_2 (/ 1.0 (/ z t_1))) c)
(if (<= z 1.5e-50)
(/ (/ (- (+ b (* x (* y 9.0))) (* a (* z (* t 4.0)))) c) z)
(/ 1.0 (/ c (+ t_2 (/ t_1 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 = b + (9.0 * (y * x));
double t_2 = t * (a * -4.0);
double tmp;
if (z <= -5e-40) {
tmp = (t_2 + (1.0 / (z / t_1))) / c;
} else if (z <= 1.5e-50) {
tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z;
} else {
tmp = 1.0 / (c / (t_2 + (t_1 / 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) :: t_2
real(8) :: tmp
t_1 = b + (9.0d0 * (y * x))
t_2 = t * (a * (-4.0d0))
if (z <= (-5d-40)) then
tmp = (t_2 + (1.0d0 / (z / t_1))) / c
else if (z <= 1.5d-50) then
tmp = (((b + (x * (y * 9.0d0))) - (a * (z * (t * 4.0d0)))) / c) / z
else
tmp = 1.0d0 / (c / (t_2 + (t_1 / 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 = b + (9.0 * (y * x));
double t_2 = t * (a * -4.0);
double tmp;
if (z <= -5e-40) {
tmp = (t_2 + (1.0 / (z / t_1))) / c;
} else if (z <= 1.5e-50) {
tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z;
} else {
tmp = 1.0 / (c / (t_2 + (t_1 / 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 = b + (9.0 * (y * x)) t_2 = t * (a * -4.0) tmp = 0 if z <= -5e-40: tmp = (t_2 + (1.0 / (z / t_1))) / c elif z <= 1.5e-50: tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z else: tmp = 1.0 / (c / (t_2 + (t_1 / 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(b + Float64(9.0 * Float64(y * x))) t_2 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -5e-40) tmp = Float64(Float64(t_2 + Float64(1.0 / Float64(z / t_1))) / c); elseif (z <= 1.5e-50) tmp = Float64(Float64(Float64(Float64(b + Float64(x * Float64(y * 9.0))) - Float64(a * Float64(z * Float64(t * 4.0)))) / c) / z); else tmp = Float64(1.0 / Float64(c / Float64(t_2 + Float64(t_1 / 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 = b + (9.0 * (y * x));
t_2 = t * (a * -4.0);
tmp = 0.0;
if (z <= -5e-40)
tmp = (t_2 + (1.0 / (z / t_1))) / c;
elseif (z <= 1.5e-50)
tmp = (((b + (x * (y * 9.0))) - (a * (z * (t * 4.0)))) / c) / z;
else
tmp = 1.0 / (c / (t_2 + (t_1 / 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[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e-40], N[(N[(t$95$2 + N[(1.0 / N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.5e-50], N[(N[(N[(N[(b + N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(z * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(1.0 / N[(c / N[(t$95$2 + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := b + 9 \cdot \left(y \cdot x\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{-40}:\\
\;\;\;\;\frac{t\_2 + \frac{1}{\frac{z}{t\_1}}}{c}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{\frac{\left(b + x \cdot \left(y \cdot 9\right)\right) - a \cdot \left(z \cdot \left(t \cdot 4\right)\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{c}{t\_2 + \frac{t\_1}{z}}}\\
\end{array}
\end{array}
if z < -4.99999999999999965e-40Initial program 67.6%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified88.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.1%
Applied egg-rr88.1%
if -4.99999999999999965e-40 < z < 1.49999999999999995e-50Initial program 95.1%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.4%
Applied egg-rr94.4%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr97.1%
if 1.49999999999999995e-50 < z Initial program 71.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified93.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.1%
Applied egg-rr93.1%
Final simplification93.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
(let* ((t_1 (* 9.0 (* y x))) (t_2 (+ b t_1)) (t_3 (* t (* a -4.0))))
(if (<= z -6e-40)
(/ (+ t_3 (/ 1.0 (/ z t_2))) c)
(if (<= z 6.5e-50)
(/ (/ (+ b (- t_1 (* z (* 4.0 (* t a))))) c) z)
(/ 1.0 (/ c (+ t_3 (/ t_2 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 = 9.0 * (y * x);
double t_2 = b + t_1;
double t_3 = t * (a * -4.0);
double tmp;
if (z <= -6e-40) {
tmp = (t_3 + (1.0 / (z / t_2))) / c;
} else if (z <= 6.5e-50) {
tmp = ((b + (t_1 - (z * (4.0 * (t * a))))) / c) / z;
} else {
tmp = 1.0 / (c / (t_3 + (t_2 / 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 9.0d0 * (y * x)
t_2 = b + t_1
t_3 = t * (a * (-4.0d0))
if (z <= (-6d-40)) then
tmp = (t_3 + (1.0d0 / (z / t_2))) / c
else if (z <= 6.5d-50) then
tmp = ((b + (t_1 - (z * (4.0d0 * (t * a))))) / c) / z
else
tmp = 1.0d0 / (c / (t_3 + (t_2 / 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 = 9.0 * (y * x);
double t_2 = b + t_1;
double t_3 = t * (a * -4.0);
double tmp;
if (z <= -6e-40) {
tmp = (t_3 + (1.0 / (z / t_2))) / c;
} else if (z <= 6.5e-50) {
tmp = ((b + (t_1 - (z * (4.0 * (t * a))))) / c) / z;
} else {
tmp = 1.0 / (c / (t_3 + (t_2 / 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 = 9.0 * (y * x) t_2 = b + t_1 t_3 = t * (a * -4.0) tmp = 0 if z <= -6e-40: tmp = (t_3 + (1.0 / (z / t_2))) / c elif z <= 6.5e-50: tmp = ((b + (t_1 - (z * (4.0 * (t * a))))) / c) / z else: tmp = 1.0 / (c / (t_3 + (t_2 / 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(9.0 * Float64(y * x)) t_2 = Float64(b + t_1) t_3 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -6e-40) tmp = Float64(Float64(t_3 + Float64(1.0 / Float64(z / t_2))) / c); elseif (z <= 6.5e-50) tmp = Float64(Float64(Float64(b + Float64(t_1 - Float64(z * Float64(4.0 * Float64(t * a))))) / c) / z); else tmp = Float64(1.0 / Float64(c / Float64(t_3 + Float64(t_2 / 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 = 9.0 * (y * x);
t_2 = b + t_1;
t_3 = t * (a * -4.0);
tmp = 0.0;
if (z <= -6e-40)
tmp = (t_3 + (1.0 / (z / t_2))) / c;
elseif (z <= 6.5e-50)
tmp = ((b + (t_1 - (z * (4.0 * (t * a))))) / c) / z;
else
tmp = 1.0 / (c / (t_3 + (t_2 / 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[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e-40], N[(N[(t$95$3 + N[(1.0 / N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 6.5e-50], N[(N[(N[(b + N[(t$95$1 - N[(z * N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(1.0 / N[(c / N[(t$95$3 + N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(y \cdot x\right)\\
t_2 := b + t\_1\\
t_3 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{-40}:\\
\;\;\;\;\frac{t\_3 + \frac{1}{\frac{z}{t\_2}}}{c}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{\frac{b + \left(t\_1 - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{c}{t\_3 + \frac{t\_2}{z}}}\\
\end{array}
\end{array}
if z < -6.00000000000000039e-40Initial program 67.6%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified88.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.1%
Applied egg-rr88.1%
if -6.00000000000000039e-40 < z < 6.49999999999999987e-50Initial program 95.1%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.6%
Applied egg-rr95.6%
if 6.49999999999999987e-50 < z Initial program 71.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified93.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.1%
Applied egg-rr93.1%
Final simplification93.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ b (* 9.0 (* y x)))) (t_2 (* t (* a -4.0))))
(if (<= z -1.46e+81)
(/ (+ t_2 (/ 1.0 (/ z t_1))) c)
(if (<= z 6.5e-50)
(/ (- b (- (* t (* a (* z 4.0))) (* y (* 9.0 x)))) (* z c))
(/ 1.0 (/ c (+ t_2 (/ t_1 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 = b + (9.0 * (y * x));
double t_2 = t * (a * -4.0);
double tmp;
if (z <= -1.46e+81) {
tmp = (t_2 + (1.0 / (z / t_1))) / c;
} else if (z <= 6.5e-50) {
tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = 1.0 / (c / (t_2 + (t_1 / 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) :: t_2
real(8) :: tmp
t_1 = b + (9.0d0 * (y * x))
t_2 = t * (a * (-4.0d0))
if (z <= (-1.46d+81)) then
tmp = (t_2 + (1.0d0 / (z / t_1))) / c
else if (z <= 6.5d-50) then
tmp = (b - ((t * (a * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (z * c)
else
tmp = 1.0d0 / (c / (t_2 + (t_1 / 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 = b + (9.0 * (y * x));
double t_2 = t * (a * -4.0);
double tmp;
if (z <= -1.46e+81) {
tmp = (t_2 + (1.0 / (z / t_1))) / c;
} else if (z <= 6.5e-50) {
tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = 1.0 / (c / (t_2 + (t_1 / 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 = b + (9.0 * (y * x)) t_2 = t * (a * -4.0) tmp = 0 if z <= -1.46e+81: tmp = (t_2 + (1.0 / (z / t_1))) / c elif z <= 6.5e-50: tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c) else: tmp = 1.0 / (c / (t_2 + (t_1 / 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(b + Float64(9.0 * Float64(y * x))) t_2 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -1.46e+81) tmp = Float64(Float64(t_2 + Float64(1.0 / Float64(z / t_1))) / c); elseif (z <= 6.5e-50) tmp = Float64(Float64(b - Float64(Float64(t * Float64(a * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / Float64(z * c)); else tmp = Float64(1.0 / Float64(c / Float64(t_2 + Float64(t_1 / 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 = b + (9.0 * (y * x));
t_2 = t * (a * -4.0);
tmp = 0.0;
if (z <= -1.46e+81)
tmp = (t_2 + (1.0 / (z / t_1))) / c;
elseif (z <= 6.5e-50)
tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
else
tmp = 1.0 / (c / (t_2 + (t_1 / 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[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.46e+81], N[(N[(t$95$2 + N[(1.0 / N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 6.5e-50], N[(N[(b - N[(N[(t * N[(a * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(c / N[(t$95$2 + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := b + 9 \cdot \left(y \cdot x\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -1.46 \cdot 10^{+81}:\\
\;\;\;\;\frac{t\_2 + \frac{1}{\frac{z}{t\_1}}}{c}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{b - \left(t \cdot \left(a \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{c}{t\_2 + \frac{t\_1}{z}}}\\
\end{array}
\end{array}
if z < -1.45999999999999998e81Initial program 51.5%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified82.2%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.4%
Applied egg-rr82.4%
if -1.45999999999999998e81 < z < 6.49999999999999987e-50Initial program 95.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.2%
Applied egg-rr95.2%
if 6.49999999999999987e-50 < z Initial program 71.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified93.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.1%
Applied egg-rr93.1%
Final simplification92.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 (* t (* a -4.0))))
(if (<= z -0.0004)
(/ (+ t_1 (/ (+ b (* x (* y 9.0))) z)) c)
(if (<= z 6.5e-50)
(/ (- b (- (* t (* a (* z 4.0))) (* y (* 9.0 x)))) (* z c))
(/ 1.0 (/ c (+ t_1 (/ (+ b (* 9.0 (* y 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 = t * (a * -4.0);
double tmp;
if (z <= -0.0004) {
tmp = (t_1 + ((b + (x * (y * 9.0))) / z)) / c;
} else if (z <= 6.5e-50) {
tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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 = t * (a * (-4.0d0))
if (z <= (-0.0004d0)) then
tmp = (t_1 + ((b + (x * (y * 9.0d0))) / z)) / c
else if (z <= 6.5d-50) then
tmp = (b - ((t * (a * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (z * c)
else
tmp = 1.0d0 / (c / (t_1 + ((b + (9.0d0 * (y * 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 = t * (a * -4.0);
double tmp;
if (z <= -0.0004) {
tmp = (t_1 + ((b + (x * (y * 9.0))) / z)) / c;
} else if (z <= 6.5e-50) {
tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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 = t * (a * -4.0) tmp = 0 if z <= -0.0004: tmp = (t_1 + ((b + (x * (y * 9.0))) / z)) / c elif z <= 6.5e-50: tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c) else: tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -0.0004) tmp = Float64(Float64(t_1 + Float64(Float64(b + Float64(x * Float64(y * 9.0))) / z)) / c); elseif (z <= 6.5e-50) tmp = Float64(Float64(b - Float64(Float64(t * Float64(a * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / Float64(z * c)); else tmp = Float64(1.0 / Float64(c / Float64(t_1 + Float64(Float64(b + Float64(9.0 * Float64(y * 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 = t * (a * -4.0);
tmp = 0.0;
if (z <= -0.0004)
tmp = (t_1 + ((b + (x * (y * 9.0))) / z)) / c;
elseif (z <= 6.5e-50)
tmp = (b - ((t * (a * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
else
tmp = 1.0 / (c / (t_1 + ((b + (9.0 * (y * 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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0004], N[(N[(t$95$1 + N[(N[(b + N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 6.5e-50], N[(N[(b - N[(N[(t * N[(a * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(c / N[(t$95$1 + N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -0.0004:\\
\;\;\;\;\frac{t\_1 + \frac{b + x \cdot \left(y \cdot 9\right)}{z}}{c}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{b - \left(t \cdot \left(a \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{c}{t\_1 + \frac{b + 9 \cdot \left(y \cdot x\right)}{z}}}\\
\end{array}
\end{array}
if z < -4.00000000000000019e-4Initial program 61.8%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified86.0%
if -4.00000000000000019e-4 < z < 6.49999999999999987e-50Initial program 95.5%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.8%
Applied egg-rr94.8%
if 6.49999999999999987e-50 < z Initial program 71.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified93.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.1%
Applied egg-rr93.1%
Final simplification92.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 -9.5e+125)
(* a (* -4.0 (/ t c)))
(if (<= t -4.8e-284)
(* 9.0 (/ (/ (* y x) z) c))
(if (<= t 1.2e-162) (/ b (* z c)) (* (* t -4.0) (/ a c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.5e+125) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -4.8e-284) {
tmp = 9.0 * (((y * x) / z) / c);
} else if (t <= 1.2e-162) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-9.5d+125)) then
tmp = a * ((-4.0d0) * (t / c))
else if (t <= (-4.8d-284)) then
tmp = 9.0d0 * (((y * x) / z) / c)
else if (t <= 1.2d-162) then
tmp = b / (z * c)
else
tmp = (t * (-4.0d0)) * (a / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.5e+125) {
tmp = a * (-4.0 * (t / c));
} else if (t <= -4.8e-284) {
tmp = 9.0 * (((y * x) / z) / c);
} else if (t <= 1.2e-162) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) * (a / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -9.5e+125: tmp = a * (-4.0 * (t / c)) elif t <= -4.8e-284: tmp = 9.0 * (((y * x) / z) / c) elif t <= 1.2e-162: tmp = b / (z * c) else: tmp = (t * -4.0) * (a / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -9.5e+125) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (t <= -4.8e-284) tmp = Float64(9.0 * Float64(Float64(Float64(y * x) / z) / c)); elseif (t <= 1.2e-162) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(t * -4.0) * Float64(a / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -9.5e+125)
tmp = a * (-4.0 * (t / c));
elseif (t <= -4.8e-284)
tmp = 9.0 * (((y * x) / z) / c);
elseif (t <= 1.2e-162)
tmp = b / (z * c);
else
tmp = (t * -4.0) * (a / 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, -9.5e+125], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.8e-284], N[(9.0 * N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-162], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t * -4.0), $MachinePrecision] * N[(a / c), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+125}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-284}:\\
\;\;\;\;9 \cdot \frac{\frac{y \cdot x}{z}}{c}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-162}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot -4\right) \cdot \frac{a}{c}\\
\end{array}
\end{array}
if t < -9.50000000000000041e125Initial program 73.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.8%
Simplified70.8%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6470.7%
Applied egg-rr70.7%
if -9.50000000000000041e125 < t < -4.80000000000000006e-284Initial program 80.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6449.9%
Simplified49.9%
if -4.80000000000000006e-284 < t < 1.2000000000000001e-162Initial program 88.7%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6452.4%
Simplified52.4%
frac-2negN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6452.4%
Applied egg-rr52.4%
if 1.2000000000000001e-162 < t Initial program 83.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.6%
Simplified40.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6442.7%
Applied egg-rr42.7%
Final simplification51.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
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= t -1.75e+31)
t_1
(if (<= t 3.6e-134) (/ (/ (+ b (* 9.0 (* y x))) z) c) t_1))))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 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (t <= -1.75e+31) {
tmp = t_1;
} else if (t <= 3.6e-134) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else {
tmp = t_1;
}
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 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (t <= (-1.75d+31)) then
tmp = t_1
else if (t <= 3.6d-134) then
tmp = ((b + (9.0d0 * (y * x))) / z) / c
else
tmp = t_1
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 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (t <= -1.75e+31) {
tmp = t_1;
} else if (t <= 3.6e-134) {
tmp = ((b + (9.0 * (y * x))) / z) / c;
} else {
tmp = t_1;
}
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 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if t <= -1.75e+31: tmp = t_1 elif t <= 3.6e-134: tmp = ((b + (9.0 * (y * x))) / z) / c else: tmp = t_1 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(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (t <= -1.75e+31) tmp = t_1; elseif (t <= 3.6e-134) tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(y * x))) / z) / c); else tmp = t_1; 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 = ((t * (a * -4.0)) + (b / z)) / c;
tmp = 0.0;
if (t <= -1.75e+31)
tmp = t_1;
elseif (t <= 3.6e-134)
tmp = ((b + (9.0 * (y * x))) / z) / c;
else
tmp = t_1;
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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t, -1.75e+31], t$95$1, If[LessEqual[t, 3.6e-134], N[(N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]
\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{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-134}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.75e31 or 3.5999999999999999e-134 < t Initial program 78.3%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified87.6%
Taylor expanded in x around 0
/-lowering-/.f6471.0%
Simplified71.0%
if -1.75e31 < t < 3.5999999999999999e-134Initial program 85.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified88.3%
Taylor expanded in z around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.8%
Simplified77.8%
Final simplification74.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) c) (/ x z))))
(if (<= y -5.6e-69)
t_1
(if (<= y 2.8e+190) (/ (+ (* t (* a -4.0)) (/ b z)) c) t_1))))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) / c) * (x / z);
double tmp;
if (y <= -5.6e-69) {
tmp = t_1;
} else if (y <= 2.8e+190) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = t_1;
}
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 = ((y * 9.0d0) / c) * (x / z)
if (y <= (-5.6d-69)) then
tmp = t_1
else if (y <= 2.8d+190) then
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
else
tmp = t_1
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 = ((y * 9.0) / c) * (x / z);
double tmp;
if (y <= -5.6e-69) {
tmp = t_1;
} else if (y <= 2.8e+190) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = t_1;
}
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) / c) * (x / z) tmp = 0 if y <= -5.6e-69: tmp = t_1 elif y <= 2.8e+190: tmp = ((t * (a * -4.0)) + (b / z)) / c else: tmp = t_1 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(y * 9.0) / c) * Float64(x / z)) tmp = 0.0 if (y <= -5.6e-69) tmp = t_1; elseif (y <= 2.8e+190) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); else tmp = t_1; 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) / c) * (x / z);
tmp = 0.0;
if (y <= -5.6e-69)
tmp = t_1;
elseif (y <= 2.8e+190)
tmp = ((t * (a * -4.0)) + (b / z)) / c;
else
tmp = t_1;
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[(y * 9.0), $MachinePrecision] / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e-69], t$95$1, If[LessEqual[y, 2.8e+190], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]
\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{y \cdot 9}{c} \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+190}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.59999999999999959e-69 or 2.79999999999999997e190 < y Initial program 79.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified84.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6456.5%
Simplified56.5%
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-/l/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6463.9%
Applied egg-rr63.9%
if -5.59999999999999959e-69 < y < 2.79999999999999997e190Initial program 82.9%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified90.6%
Taylor expanded in x around 0
/-lowering-/.f6475.6%
Simplified75.6%
Final simplification70.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* (* t -4.0) (/ a c)))) (if (<= z -5e-18) t_1 (if (<= z 540.0) (* b (/ (/ 1.0 z) c)) t_1))))
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 = (t * -4.0) * (a / c);
double tmp;
if (z <= -5e-18) {
tmp = t_1;
} else if (z <= 540.0) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = t_1;
}
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 = (t * (-4.0d0)) * (a / c)
if (z <= (-5d-18)) then
tmp = t_1
else if (z <= 540.0d0) then
tmp = b * ((1.0d0 / z) / c)
else
tmp = t_1
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 = (t * -4.0) * (a / c);
double tmp;
if (z <= -5e-18) {
tmp = t_1;
} else if (z <= 540.0) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = t_1;
}
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 = (t * -4.0) * (a / c) tmp = 0 if z <= -5e-18: tmp = t_1 elif z <= 540.0: tmp = b * ((1.0 / z) / c) else: tmp = t_1 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(t * -4.0) * Float64(a / c)) tmp = 0.0 if (z <= -5e-18) tmp = t_1; elseif (z <= 540.0) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); else tmp = t_1; 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 = (t * -4.0) * (a / c);
tmp = 0.0;
if (z <= -5e-18)
tmp = t_1;
elseif (z <= 540.0)
tmp = b * ((1.0 / z) / c);
else
tmp = t_1;
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[(t * -4.0), $MachinePrecision] * N[(a / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e-18], t$95$1, If[LessEqual[z, 540.0], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(t \cdot -4\right) \cdot \frac{a}{c}\\
\mathbf{if}\;z \leq -5 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 540:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.00000000000000036e-18 or 540 < z Initial program 65.6%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6454.1%
Simplified54.1%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6457.9%
Applied egg-rr57.9%
if -5.00000000000000036e-18 < z < 540Initial program 95.6%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6455.2%
Simplified55.2%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6455.9%
Applied egg-rr55.9%
Final simplification56.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* (* t -4.0) (/ a c)))) (if (<= z -5.4e-18) t_1 (if (<= z 54.0) (/ b (* z c)) t_1))))
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 = (t * -4.0) * (a / c);
double tmp;
if (z <= -5.4e-18) {
tmp = t_1;
} else if (z <= 54.0) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = (t * (-4.0d0)) * (a / c)
if (z <= (-5.4d-18)) then
tmp = t_1
else if (z <= 54.0d0) then
tmp = b / (z * c)
else
tmp = t_1
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 = (t * -4.0) * (a / c);
double tmp;
if (z <= -5.4e-18) {
tmp = t_1;
} else if (z <= 54.0) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = (t * -4.0) * (a / c) tmp = 0 if z <= -5.4e-18: tmp = t_1 elif z <= 54.0: tmp = b / (z * c) else: tmp = t_1 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(t * -4.0) * Float64(a / c)) tmp = 0.0 if (z <= -5.4e-18) tmp = t_1; elseif (z <= 54.0) tmp = Float64(b / Float64(z * c)); else tmp = t_1; 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 = (t * -4.0) * (a / c);
tmp = 0.0;
if (z <= -5.4e-18)
tmp = t_1;
elseif (z <= 54.0)
tmp = b / (z * c);
else
tmp = t_1;
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[(t * -4.0), $MachinePrecision] * N[(a / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-18], t$95$1, If[LessEqual[z, 54.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(t \cdot -4\right) \cdot \frac{a}{c}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 54:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.39999999999999977e-18 or 54 < z Initial program 65.6%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6454.1%
Simplified54.1%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6457.9%
Applied egg-rr57.9%
if -5.39999999999999977e-18 < z < 54Initial program 95.6%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6455.2%
Simplified55.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 (<= z -3.9e-18) (* -4.0 (/ (* t a) c)) (if (<= z 3e-62) (/ b (* z c)) (* a (* -4.0 (/ t c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.9e-18) {
tmp = -4.0 * ((t * a) / c);
} else if (z <= 3e-62) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-3.9d-18)) then
tmp = (-4.0d0) * ((t * a) / c)
else if (z <= 3d-62) then
tmp = b / (z * c)
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.9e-18) {
tmp = -4.0 * ((t * a) / c);
} else if (z <= 3e-62) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -3.9e-18: tmp = -4.0 * ((t * a) / c) elif z <= 3e-62: tmp = b / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -3.9e-18) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); elseif (z <= 3e-62) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -3.9e-18)
tmp = -4.0 * ((t * a) / c);
elseif (z <= 3e-62)
tmp = b / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.9e-18], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-62], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-18}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-62}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -3.90000000000000005e-18Initial program 64.9%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified87.1%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6446.3%
Simplified46.3%
if -3.90000000000000005e-18 < z < 3.0000000000000001e-62Initial program 95.2%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6457.5%
Simplified57.5%
if 3.0000000000000001e-62 < z Initial program 72.2%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.9%
Simplified56.9%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6458.1%
Applied egg-rr58.1%
Final simplification55.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 (let* ((t_1 (* -4.0 (/ (* t a) c)))) (if (<= z -6.5e-18) t_1 (if (<= z 6400.0) (/ b (* z c)) t_1))))
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 = -4.0 * ((t * a) / c);
double tmp;
if (z <= -6.5e-18) {
tmp = t_1;
} else if (z <= 6400.0) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = (-4.0d0) * ((t * a) / c)
if (z <= (-6.5d-18)) then
tmp = t_1
else if (z <= 6400.0d0) then
tmp = b / (z * c)
else
tmp = t_1
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 = -4.0 * ((t * a) / c);
double tmp;
if (z <= -6.5e-18) {
tmp = t_1;
} else if (z <= 6400.0) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = -4.0 * ((t * a) / c) tmp = 0 if z <= -6.5e-18: tmp = t_1 elif z <= 6400.0: tmp = b / (z * c) else: tmp = t_1 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(-4.0 * Float64(Float64(t * a) / c)) tmp = 0.0 if (z <= -6.5e-18) tmp = t_1; elseif (z <= 6400.0) tmp = Float64(b / Float64(z * c)); else tmp = t_1; 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 = -4.0 * ((t * a) / c);
tmp = 0.0;
if (z <= -6.5e-18)
tmp = t_1;
elseif (z <= 6400.0)
tmp = b / (z * c);
else
tmp = t_1;
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[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e-18], t$95$1, If[LessEqual[z, 6400.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{t \cdot a}{c}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6400:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.50000000000000008e-18 or 6400 < z Initial program 65.6%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified89.6%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.5%
Applied egg-rr89.5%
Taylor expanded in z around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.1%
Simplified54.1%
if -6.50000000000000008e-18 < z < 6400Initial program 95.6%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6455.2%
Simplified55.2%
Final simplification54.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 (/ (+ (* t (* a -4.0)) (/ (+ b (* x (* y 9.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) {
return ((t * (a * -4.0)) + ((b + (x * (y * 9.0))) / 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 = ((t * (a * (-4.0d0))) + ((b + (x * (y * 9.0d0))) / 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 ((t * (a * -4.0)) + ((b + (x * (y * 9.0))) / 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 ((t * (a * -4.0)) + ((b + (x * (y * 9.0))) / 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(Float64(Float64(t * Float64(a * -4.0)) + Float64(Float64(b + Float64(x * Float64(y * 9.0))) / 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 = ((t * (a * -4.0)) + ((b + (x * (y * 9.0))) / 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[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(b + N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{t \cdot \left(a \cdot -4\right) + \frac{b + x \cdot \left(y \cdot 9\right)}{z}}{c}
\end{array}
Initial program 81.3%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified87.9%
Final simplification87.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ 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 81.3%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6439.4%
Simplified39.4%
(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 2024160
(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)))