
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (/ (+ (* x (* 9.0 y)) b) z) (* t (* a -4.0))) c)))
(if (<= z -1e-85)
t_1
(if (<= z 2.75e-95)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
double tmp;
if (z <= -1e-85) {
tmp = t_1;
} else if (z <= 2.75e-95) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.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 = ((((x * (9.0d0 * y)) + b) / z) + (t * (a * (-4.0d0)))) / c
if (z <= (-1d-85)) then
tmp = t_1
else if (z <= 2.75d-95) then
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
double tmp;
if (z <= -1e-85) {
tmp = t_1;
} else if (z <= 2.75e-95) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c tmp = 0 if z <= -1e-85: tmp = t_1 elif z <= 2.75e-95: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.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(Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / z) + Float64(t * Float64(a * -4.0))) / c) tmp = 0.0 if (z <= -1e-85) tmp = t_1; elseif (z <= 2.75e-95) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / 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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
tmp = 0.0;
if (z <= -1e-85)
tmp = t_1;
elseif (z <= 2.75e-95)
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.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[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1e-85], t$95$1, If[LessEqual[z, 2.75e-95], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 := \frac{\frac{x \cdot \left(9 \cdot y\right) + b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{-95}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.9999999999999998e-86 or 2.75000000000000001e-95 < z Initial program 69.1%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified92.3%
if -9.9999999999999998e-86 < z < 2.75000000000000001e-95Initial program 97.8%
Final simplification94.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
(let* ((t_1 (* t (* a -4.0)))
(t_2 (/ (+ t_1 (* y (* x (/ 9.0 z)))) c))
(t_3 (/ (+ t_1 (/ b z)) c)))
(if (<= z -1e+103)
t_2
(if (<= z -9e-12)
t_3
(if (<= z 9e+26)
(/ (+ b (* 9.0 (* x y))) (* z c))
(if (<= z 1.9e+191) t_3 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * -4.0);
double t_2 = (t_1 + (y * (x * (9.0 / z)))) / c;
double t_3 = (t_1 + (b / z)) / c;
double tmp;
if (z <= -1e+103) {
tmp = t_2;
} else if (z <= -9e-12) {
tmp = t_3;
} else if (z <= 9e+26) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else if (z <= 1.9e+191) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = (t_1 + (y * (x * (9.0d0 / z)))) / c
t_3 = (t_1 + (b / z)) / c
if (z <= (-1d+103)) then
tmp = t_2
else if (z <= (-9d-12)) then
tmp = t_3
else if (z <= 9d+26) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else if (z <= 1.9d+191) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * -4.0);
double t_2 = (t_1 + (y * (x * (9.0 / z)))) / c;
double t_3 = (t_1 + (b / z)) / c;
double tmp;
if (z <= -1e+103) {
tmp = t_2;
} else if (z <= -9e-12) {
tmp = t_3;
} else if (z <= 9e+26) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else if (z <= 1.9e+191) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = t * (a * -4.0) t_2 = (t_1 + (y * (x * (9.0 / z)))) / c t_3 = (t_1 + (b / z)) / c tmp = 0 if z <= -1e+103: tmp = t_2 elif z <= -9e-12: tmp = t_3 elif z <= 9e+26: tmp = (b + (9.0 * (x * y))) / (z * c) elif z <= 1.9e+191: tmp = t_3 else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(Float64(t_1 + Float64(y * Float64(x * Float64(9.0 / z)))) / c) t_3 = Float64(Float64(t_1 + Float64(b / z)) / c) tmp = 0.0 if (z <= -1e+103) tmp = t_2; elseif (z <= -9e-12) tmp = t_3; elseif (z <= 9e+26) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); elseif (z <= 1.9e+191) tmp = t_3; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = t * (a * -4.0);
t_2 = (t_1 + (y * (x * (9.0 / z)))) / c;
t_3 = (t_1 + (b / z)) / c;
tmp = 0.0;
if (z <= -1e+103)
tmp = t_2;
elseif (z <= -9e-12)
tmp = t_3;
elseif (z <= 9e+26)
tmp = (b + (9.0 * (x * y))) / (z * c);
elseif (z <= 1.9e+191)
tmp = t_3;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(y * N[(x * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1e+103], t$95$2, If[LessEqual[z, -9e-12], t$95$3, If[LessEqual[z, 9e+26], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+191], t$95$3, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := \frac{t\_1 + y \cdot \left(x \cdot \frac{9}{z}\right)}{c}\\
t_3 := \frac{t\_1 + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-12}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+26}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+191}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1e103 or 1.8999999999999999e191 < z Initial program 46.4%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified86.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6475.4%
Simplified75.4%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6482.3%
Applied egg-rr82.3%
if -1e103 < z < -8.99999999999999962e-12 or 8.99999999999999957e26 < z < 1.8999999999999999e191Initial program 82.3%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified98.2%
Taylor expanded in x around 0
/-lowering-/.f6487.0%
Simplified87.0%
if -8.99999999999999962e-12 < z < 8.99999999999999957e26Initial program 96.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6483.3%
Simplified83.3%
Final simplification83.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 (* a (/ -4.0 c)))))
(if (<= x -1.65e+56)
(* 9.0 (* y (/ x (* z c))))
(if (<= x -7.6e-147)
t_1
(if (<= x -4.5e-224)
(/ (/ b c) z)
(if (<= x 1.2e-89) t_1 (* (/ x z) (/ 9.0 (/ c y)))))))))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 / c));
double tmp;
if (x <= -1.65e+56) {
tmp = 9.0 * (y * (x / (z * c)));
} else if (x <= -7.6e-147) {
tmp = t_1;
} else if (x <= -4.5e-224) {
tmp = (b / c) / z;
} else if (x <= 1.2e-89) {
tmp = t_1;
} else {
tmp = (x / z) * (9.0 / (c / y));
}
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) / c))
if (x <= (-1.65d+56)) then
tmp = 9.0d0 * (y * (x / (z * c)))
else if (x <= (-7.6d-147)) then
tmp = t_1
else if (x <= (-4.5d-224)) then
tmp = (b / c) / z
else if (x <= 1.2d-89) then
tmp = t_1
else
tmp = (x / z) * (9.0d0 / (c / y))
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 / c));
double tmp;
if (x <= -1.65e+56) {
tmp = 9.0 * (y * (x / (z * c)));
} else if (x <= -7.6e-147) {
tmp = t_1;
} else if (x <= -4.5e-224) {
tmp = (b / c) / z;
} else if (x <= 1.2e-89) {
tmp = t_1;
} else {
tmp = (x / z) * (9.0 / (c / y));
}
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 / c)) tmp = 0 if x <= -1.65e+56: tmp = 9.0 * (y * (x / (z * c))) elif x <= -7.6e-147: tmp = t_1 elif x <= -4.5e-224: tmp = (b / c) / z elif x <= 1.2e-89: tmp = t_1 else: tmp = (x / z) * (9.0 / (c / y)) 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 * Float64(-4.0 / c))) tmp = 0.0 if (x <= -1.65e+56) tmp = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))); elseif (x <= -7.6e-147) tmp = t_1; elseif (x <= -4.5e-224) tmp = Float64(Float64(b / c) / z); elseif (x <= 1.2e-89) tmp = t_1; else tmp = Float64(Float64(x / z) * Float64(9.0 / Float64(c / y))); 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 / c));
tmp = 0.0;
if (x <= -1.65e+56)
tmp = 9.0 * (y * (x / (z * c)));
elseif (x <= -7.6e-147)
tmp = t_1;
elseif (x <= -4.5e-224)
tmp = (b / c) / z;
elseif (x <= 1.2e-89)
tmp = t_1;
else
tmp = (x / z) * (9.0 / (c / y));
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 * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+56], N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.6e-147], t$95$1, If[LessEqual[x, -4.5e-224], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 1.2e-89], t$95$1, N[(N[(x / z), $MachinePrecision] * N[(9.0 / N[(c / y), $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 \frac{-4}{c}\right)\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+56}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-224}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{9}{\frac{c}{y}}\\
\end{array}
\end{array}
if x < -1.65000000000000001e56Initial program 77.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6456.4%
Simplified56.4%
associate-/r*N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6461.5%
Applied egg-rr61.5%
if -1.65000000000000001e56 < x < -7.60000000000000055e-147 or -4.5000000000000004e-224 < x < 1.20000000000000008e-89Initial program 80.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-*.f6448.0%
Simplified48.0%
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6448.3%
Applied egg-rr48.3%
if -7.60000000000000055e-147 < x < -4.5000000000000004e-224Initial program 82.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6457.8%
Simplified57.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6463.8%
Applied egg-rr63.8%
if 1.20000000000000008e-89 < x Initial program 78.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6444.9%
Simplified44.9%
associate-*r/N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/r*N/A
clear-numN/A
un-div-invN/A
associate-/l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6449.4%
Applied egg-rr49.4%
Final simplification52.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* a (/ -4.0 c)))))
(if (<= x -4.3e+55)
(* 9.0 (* y (/ x (* z c))))
(if (<= x -7.2e-147)
t_1
(if (<= x -6.5e-224)
(/ (/ b c) z)
(if (<= x 4.8e-89) t_1 (* 9.0 (* (/ x z) (/ y c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * (-4.0 / c));
double tmp;
if (x <= -4.3e+55) {
tmp = 9.0 * (y * (x / (z * c)));
} else if (x <= -7.2e-147) {
tmp = t_1;
} else if (x <= -6.5e-224) {
tmp = (b / c) / z;
} else if (x <= 4.8e-89) {
tmp = t_1;
} else {
tmp = 9.0 * ((x / z) * (y / 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) :: t_1
real(8) :: tmp
t_1 = t * (a * ((-4.0d0) / c))
if (x <= (-4.3d+55)) then
tmp = 9.0d0 * (y * (x / (z * c)))
else if (x <= (-7.2d-147)) then
tmp = t_1
else if (x <= (-6.5d-224)) then
tmp = (b / c) / z
else if (x <= 4.8d-89) then
tmp = t_1
else
tmp = 9.0d0 * ((x / z) * (y / 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 t_1 = t * (a * (-4.0 / c));
double tmp;
if (x <= -4.3e+55) {
tmp = 9.0 * (y * (x / (z * c)));
} else if (x <= -7.2e-147) {
tmp = t_1;
} else if (x <= -6.5e-224) {
tmp = (b / c) / z;
} else if (x <= 4.8e-89) {
tmp = t_1;
} else {
tmp = 9.0 * ((x / z) * (y / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = t * (a * (-4.0 / c)) tmp = 0 if x <= -4.3e+55: tmp = 9.0 * (y * (x / (z * c))) elif x <= -7.2e-147: tmp = t_1 elif x <= -6.5e-224: tmp = (b / c) / z elif x <= 4.8e-89: tmp = t_1 else: tmp = 9.0 * ((x / z) * (y / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * Float64(-4.0 / c))) tmp = 0.0 if (x <= -4.3e+55) tmp = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))); elseif (x <= -7.2e-147) tmp = t_1; elseif (x <= -6.5e-224) tmp = Float64(Float64(b / c) / z); elseif (x <= 4.8e-89) tmp = t_1; else tmp = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = t * (a * (-4.0 / c));
tmp = 0.0;
if (x <= -4.3e+55)
tmp = 9.0 * (y * (x / (z * c)));
elseif (x <= -7.2e-147)
tmp = t_1;
elseif (x <= -6.5e-224)
tmp = (b / c) / z;
elseif (x <= 4.8e-89)
tmp = t_1;
else
tmp = 9.0 * ((x / z) * (y / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e+55], N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.2e-147], t$95$1, If[LessEqual[x, -6.5e-224], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 4.8e-89], t$95$1, N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+55}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-224}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\end{array}
\end{array}
if x < -4.2999999999999999e55Initial program 77.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6456.4%
Simplified56.4%
associate-/r*N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6461.5%
Applied egg-rr61.5%
if -4.2999999999999999e55 < x < -7.20000000000000023e-147 or -6.5e-224 < x < 4.80000000000000032e-89Initial program 80.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-*.f6448.0%
Simplified48.0%
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6448.3%
Applied egg-rr48.3%
if -7.20000000000000023e-147 < x < -6.5e-224Initial program 82.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6457.8%
Simplified57.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6463.8%
Applied egg-rr63.8%
if 4.80000000000000032e-89 < x Initial program 78.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6444.9%
Simplified44.9%
associate-/l/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6449.4%
Applied egg-rr49.4%
Final simplification52.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* a (/ -4.0 c)))) (t_2 (* 9.0 (* y (/ x (* z c))))))
(if (<= x -1.06e+57)
t_2
(if (<= x -2.9e-146)
t_1
(if (<= x -7.5e-224) (/ (/ b c) z) (if (<= x 2.9e-89) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * (-4.0 / c));
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (x <= -1.06e+57) {
tmp = t_2;
} else if (x <= -2.9e-146) {
tmp = t_1;
} else if (x <= -7.5e-224) {
tmp = (b / c) / z;
} else if (x <= 2.9e-89) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (a * ((-4.0d0) / c))
t_2 = 9.0d0 * (y * (x / (z * c)))
if (x <= (-1.06d+57)) then
tmp = t_2
else if (x <= (-2.9d-146)) then
tmp = t_1
else if (x <= (-7.5d-224)) then
tmp = (b / c) / z
else if (x <= 2.9d-89) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * (-4.0 / c));
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (x <= -1.06e+57) {
tmp = t_2;
} else if (x <= -2.9e-146) {
tmp = t_1;
} else if (x <= -7.5e-224) {
tmp = (b / c) / z;
} else if (x <= 2.9e-89) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = t * (a * (-4.0 / c)) t_2 = 9.0 * (y * (x / (z * c))) tmp = 0 if x <= -1.06e+57: tmp = t_2 elif x <= -2.9e-146: tmp = t_1 elif x <= -7.5e-224: tmp = (b / c) / z elif x <= 2.9e-89: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * Float64(-4.0 / c))) t_2 = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))) tmp = 0.0 if (x <= -1.06e+57) tmp = t_2; elseif (x <= -2.9e-146) tmp = t_1; elseif (x <= -7.5e-224) tmp = Float64(Float64(b / c) / z); elseif (x <= 2.9e-89) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = t * (a * (-4.0 / c));
t_2 = 9.0 * (y * (x / (z * c)));
tmp = 0.0;
if (x <= -1.06e+57)
tmp = t_2;
elseif (x <= -2.9e-146)
tmp = t_1;
elseif (x <= -7.5e-224)
tmp = (b / c) / z;
elseif (x <= 2.9e-89)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.06e+57], t$95$2, If[LessEqual[x, -2.9e-146], t$95$1, If[LessEqual[x, -7.5e-224], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 2.9e-89], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot \frac{-4}{c}\right)\\
t_2 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{if}\;x \leq -1.06 \cdot 10^{+57}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-224}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.06e57 or 2.89999999999999992e-89 < x Initial program 78.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6449.5%
Simplified49.5%
associate-/r*N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6455.1%
Applied egg-rr55.1%
if -1.06e57 < x < -2.90000000000000011e-146 or -7.49999999999999978e-224 < x < 2.89999999999999992e-89Initial program 80.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-*.f6448.0%
Simplified48.0%
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6448.3%
Applied egg-rr48.3%
if -2.90000000000000011e-146 < x < -7.49999999999999978e-224Initial program 82.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6457.8%
Simplified57.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6463.8%
Applied egg-rr63.8%
Final simplification52.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 (/ (+ (/ (+ (* x (* 9.0 y)) b) z) (* t (* a -4.0))) c)))
(if (<= z -4e-85)
t_1
(if (<= z 1.25e-56)
(/ (+ b (- (* y (* x 9.0)) (* t (* a (* z 4.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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
double tmp;
if (z <= -4e-85) {
tmp = t_1;
} else if (z <= 1.25e-56) {
tmp = (b + ((y * (x * 9.0)) - (t * (a * (z * 4.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 = ((((x * (9.0d0 * y)) + b) / z) + (t * (a * (-4.0d0)))) / c
if (z <= (-4d-85)) then
tmp = t_1
else if (z <= 1.25d-56) then
tmp = (b + ((y * (x * 9.0d0)) - (t * (a * (z * 4.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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
double tmp;
if (z <= -4e-85) {
tmp = t_1;
} else if (z <= 1.25e-56) {
tmp = (b + ((y * (x * 9.0)) - (t * (a * (z * 4.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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c tmp = 0 if z <= -4e-85: tmp = t_1 elif z <= 1.25e-56: tmp = (b + ((y * (x * 9.0)) - (t * (a * (z * 4.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(Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / z) + Float64(t * Float64(a * -4.0))) / c) tmp = 0.0 if (z <= -4e-85) tmp = t_1; elseif (z <= 1.25e-56) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(t * Float64(a * Float64(z * 4.0))))) / 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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
tmp = 0.0;
if (z <= -4e-85)
tmp = t_1;
elseif (z <= 1.25e-56)
tmp = (b + ((y * (x * 9.0)) - (t * (a * (z * 4.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[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -4e-85], t$95$1, If[LessEqual[z, 1.25e-56], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 := \frac{\frac{x \cdot \left(9 \cdot y\right) + b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{if}\;z \leq -4 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-56}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - t \cdot \left(a \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.9999999999999999e-85 or 1.24999999999999999e-56 < z Initial program 68.1%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified91.9%
if -3.9999999999999999e-85 < z < 1.24999999999999999e-56Initial program 97.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.0%
Applied egg-rr98.0%
Final simplification94.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= x -5e+68)
(+ (* -4.0 (/ (* t a) c)) (* x (* 9.0 (/ y (* z c)))))
(if (<= x 7.2e-104)
(/ (+ t_1 (/ b z)) c)
(/ (+ t_1 (* y (* x (/ 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) {
double t_1 = t * (a * -4.0);
double tmp;
if (x <= -5e+68) {
tmp = (-4.0 * ((t * a) / c)) + (x * (9.0 * (y / (z * c))));
} else if (x <= 7.2e-104) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = (t_1 + (y * (x * (9.0 / z)))) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
if (x <= (-5d+68)) then
tmp = ((-4.0d0) * ((t * a) / c)) + (x * (9.0d0 * (y / (z * c))))
else if (x <= 7.2d-104) then
tmp = (t_1 + (b / z)) / c
else
tmp = (t_1 + (y * (x * (9.0d0 / z)))) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * -4.0);
double tmp;
if (x <= -5e+68) {
tmp = (-4.0 * ((t * a) / c)) + (x * (9.0 * (y / (z * c))));
} else if (x <= 7.2e-104) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = (t_1 + (y * (x * (9.0 / z)))) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = t * (a * -4.0) tmp = 0 if x <= -5e+68: tmp = (-4.0 * ((t * a) / c)) + (x * (9.0 * (y / (z * c)))) elif x <= 7.2e-104: tmp = (t_1 + (b / z)) / c else: tmp = (t_1 + (y * (x * (9.0 / z)))) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (x <= -5e+68) tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) / c)) + Float64(x * Float64(9.0 * Float64(y / Float64(z * c))))); elseif (x <= 7.2e-104) tmp = Float64(Float64(t_1 + Float64(b / z)) / c); else tmp = Float64(Float64(t_1 + Float64(y * Float64(x * Float64(9.0 / z)))) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = t * (a * -4.0);
tmp = 0.0;
if (x <= -5e+68)
tmp = (-4.0 * ((t * a) / c)) + (x * (9.0 * (y / (z * c))));
elseif (x <= 7.2e-104)
tmp = (t_1 + (b / z)) / c;
else
tmp = (t_1 + (y * (x * (9.0 / z)))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+68], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(x * N[(9.0 * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.2e-104], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(t$95$1 + N[(y * N[(x * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $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}\;x \leq -5 \cdot 10^{+68}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c} + x \cdot \left(9 \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-104}:\\
\;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1 + y \cdot \left(x \cdot \frac{9}{z}\right)}{c}\\
\end{array}
\end{array}
if x < -5.0000000000000004e68Initial program 76.5%
Taylor expanded in b around 0
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6469.3%
Simplified69.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6483.8%
Simplified83.8%
if -5.0000000000000004e68 < x < 7.1999999999999996e-104Initial program 81.2%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified91.8%
Taylor expanded in x around 0
/-lowering-/.f6478.7%
Simplified78.7%
if 7.1999999999999996e-104 < x Initial program 78.3%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified85.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6466.8%
Simplified66.8%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.7%
Applied egg-rr68.7%
Final simplification76.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 (<= y 3.3e+217) (/ (+ (/ (+ (* x (* 9.0 y)) b) z) (* t (* a -4.0))) c) (* y (+ (* -4.0 (/ (/ (* t a) c) y)) (/ (* 9.0 (/ x z)) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 3.3e+217) {
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = y * ((-4.0 * (((t * a) / c) / y)) + ((9.0 * (x / z)) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= 3.3d+217) then
tmp = ((((x * (9.0d0 * y)) + b) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = y * (((-4.0d0) * (((t * a) / c) / y)) + ((9.0d0 * (x / z)) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 3.3e+217) {
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = y * ((-4.0 * (((t * a) / c) / y)) + ((9.0 * (x / z)) / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if y <= 3.3e+217: tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c else: tmp = y * ((-4.0 * (((t * a) / c) / y)) + ((9.0 * (x / z)) / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= 3.3e+217) tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(y * Float64(Float64(-4.0 * Float64(Float64(Float64(t * a) / c) / y)) + Float64(Float64(9.0 * Float64(x / z)) / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (y <= 3.3e+217)
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
else
tmp = y * ((-4.0 * (((t * a) / c) / y)) + ((9.0 * (x / z)) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, 3.3e+217], N[(N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(y * N[(N[(-4.0 * N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.3 \cdot 10^{+217}:\\
\;\;\;\;\frac{\frac{x \cdot \left(9 \cdot y\right) + b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-4 \cdot \frac{\frac{t \cdot a}{c}}{y} + \frac{9 \cdot \frac{x}{z}}{c}\right)\\
\end{array}
\end{array}
if y < 3.3e217Initial program 79.5%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified88.7%
if 3.3e217 < y Initial program 76.5%
Taylor expanded in b around 0
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.6%
Simplified76.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6493.2%
Simplified93.2%
Final simplification89.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 (<= z -1.55e-13)
t_1
(if (<= z 1.26e+28) (/ (+ b (* 9.0 (* x y))) (* 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 (z <= -1.55e-13) {
tmp = t_1;
} else if (z <= 1.26e+28) {
tmp = (b + (9.0 * (x * y))) / (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 (z <= (-1.55d-13)) then
tmp = t_1
else if (z <= 1.26d+28) then
tmp = (b + (9.0d0 * (x * y))) / (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 (z <= -1.55e-13) {
tmp = t_1;
} else if (z <= 1.26e+28) {
tmp = (b + (9.0 * (x * y))) / (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 z <= -1.55e-13: tmp = t_1 elif z <= 1.26e+28: tmp = (b + (9.0 * (x * y))) / (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 (z <= -1.55e-13) tmp = t_1; elseif (z <= 1.26e+28) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / 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 * (a * -4.0)) + (b / z)) / c;
tmp = 0.0;
if (z <= -1.55e-13)
tmp = t_1;
elseif (z <= 1.26e+28)
tmp = (b + (9.0 * (x * y))) / (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[z, -1.55e-13], t$95$1, If[LessEqual[z, 1.26e+28], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{+28}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.55e-13 or 1.26e28 < z Initial program 63.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified91.7%
Taylor expanded in x around 0
/-lowering-/.f6475.5%
Simplified75.5%
if -1.55e-13 < z < 1.26e28Initial program 96.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6483.3%
Simplified83.3%
Final simplification79.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -4.2e+48)
(/ (* a (* t -4.0)) c)
(if (<= z 2.1e+138)
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ a (/ c (* t -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -4.2e+48) {
tmp = (a * (t * -4.0)) / c;
} else if (z <= 2.1e+138) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = a / (c / (t * -4.0));
}
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 <= (-4.2d+48)) then
tmp = (a * (t * (-4.0d0))) / c
else if (z <= 2.1d+138) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = a / (c / (t * (-4.0d0)))
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 <= -4.2e+48) {
tmp = (a * (t * -4.0)) / c;
} else if (z <= 2.1e+138) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = a / (c / (t * -4.0));
}
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 <= -4.2e+48: tmp = (a * (t * -4.0)) / c elif z <= 2.1e+138: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = a / (c / (t * -4.0)) 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 <= -4.2e+48) tmp = Float64(Float64(a * Float64(t * -4.0)) / c); elseif (z <= 2.1e+138) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(a / Float64(c / Float64(t * -4.0))); 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 <= -4.2e+48)
tmp = (a * (t * -4.0)) / c;
elseif (z <= 2.1e+138)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = a / (c / (t * -4.0));
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, -4.2e+48], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.1e+138], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a / N[(c / N[(t * -4.0), $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 -4.2 \cdot 10^{+48}:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+138}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\
\end{array}
\end{array}
if z < -4.1999999999999997e48Initial program 58.9%
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-*.f6460.6%
Simplified60.6%
if -4.1999999999999997e48 < z < 2.10000000000000007e138Initial program 94.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6478.7%
Simplified78.7%
if 2.10000000000000007e138 < z Initial program 41.9%
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.9%
Simplified54.9%
associate-*r/N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.9%
Applied egg-rr54.9%
Final simplification71.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* t (* a (/ -4.0 c))))) (if (<= a -2.5e-185) t_1 (if (<= a 2.6e+50) (/ 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 * (a * (-4.0 / c));
double tmp;
if (a <= -2.5e-185) {
tmp = t_1;
} else if (a <= 2.6e+50) {
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 * (a * ((-4.0d0) / c))
if (a <= (-2.5d-185)) then
tmp = t_1
else if (a <= 2.6d+50) 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 * (a * (-4.0 / c));
double tmp;
if (a <= -2.5e-185) {
tmp = t_1;
} else if (a <= 2.6e+50) {
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 * (a * (-4.0 / c)) tmp = 0 if a <= -2.5e-185: tmp = t_1 elif a <= 2.6e+50: 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(t * Float64(a * Float64(-4.0 / c))) tmp = 0.0 if (a <= -2.5e-185) tmp = t_1; elseif (a <= 2.6e+50) 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 * (a * (-4.0 / c));
tmp = 0.0;
if (a <= -2.5e-185)
tmp = t_1;
elseif (a <= 2.6e+50)
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[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e-185], t$95$1, If[LessEqual[a, 2.6e+50], 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 := t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+50}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.5000000000000001e-185 or 2.6000000000000002e50 < a Initial program 76.5%
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-*.f6445.8%
Simplified45.8%
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6448.7%
Applied egg-rr48.7%
if -2.5000000000000001e-185 < a < 2.6000000000000002e50Initial program 84.5%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6444.0%
Simplified44.0%
Final simplification47.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 (/ (+ (/ (+ (* x (* 9.0 y)) b) z) (* t (* a -4.0))) c))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / 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 = ((((x * (9.0d0 * y)) + b) / z) + (t * (a * (-4.0d0)))) / 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 ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / 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 ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / 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(Float64(Float64(x * Float64(9.0 * y)) + b) / z) + Float64(t * Float64(a * -4.0))) / 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 = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / 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[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{x \cdot \left(9 \cdot y\right) + b}{z} + t \cdot \left(a \cdot -4\right)}{c}
\end{array}
Initial program 79.3%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified88.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= c 4e+25) (/ b (* z c)) (/ (/ b c) z)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 4e+25) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 4d+25) then
tmp = b / (z * c)
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 4e+25) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if c <= 4e+25: tmp = b / (z * c) else: tmp = (b / c) / z return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 4e+25) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (c <= 4e+25)
tmp = b / (z * c);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 4e+25], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 4 \cdot 10^{+25}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if c < 4.00000000000000036e25Initial program 83.2%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6435.1%
Simplified35.1%
if 4.00000000000000036e25 < c Initial program 64.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6417.2%
Simplified17.2%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6423.3%
Applied egg-rr23.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 79.3%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6431.4%
Simplified31.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 2024145
(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)))