
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ (fma x (/ (* y -9.0) z) (- (* t (* a 4.0)) (/ b z))) (- 0.0 c))))
(if (<= z -1.6e+23)
t_1
(if (<= z 4e-35)
(/ (fma (* a (* z -4.0)) t (fma x (* y 9.0) b)) (* z c))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, ((y * -9.0) / z), ((t * (a * 4.0)) - (b / z))) / (0.0 - c);
double tmp;
if (z <= -1.6e+23) {
tmp = t_1;
} else if (z <= 4e-35) {
tmp = fma((a * (z * -4.0)), t, fma(x, (y * 9.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]) 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(fma(x, Float64(Float64(y * -9.0) / z), Float64(Float64(t * Float64(a * 4.0)) - Float64(b / z))) / Float64(0.0 - c)) tmp = 0.0 if (z <= -1.6e+23) tmp = t_1; elseif (z <= 4e-35) tmp = Float64(fma(Float64(a * Float64(z * -4.0)), t, fma(x, Float64(y * 9.0), b)) / Float64(z * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * N[(N[(y * -9.0), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision] - N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+23], t$95$1, If[LessEqual[z, 4e-35], N[(N[(N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(x * N[(y * 9.0), $MachinePrecision] + b), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(x, \frac{y \cdot -9}{z}, t \cdot \left(a \cdot 4\right) - \frac{b}{z}\right)}{0 - c}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-35}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot \left(z \cdot -4\right), t, \mathsf{fma}\left(x, y \cdot 9, b\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.6e23 or 4.00000000000000003e-35 < z Initial program 64.8%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified84.4%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
Simplified95.6%
if -1.6e23 < z < 4.00000000000000003e-35Initial program 94.7%
sub-negN/A
+-commutativeN/A
associate-+l+N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6494.9%
Applied egg-rr94.9%
Final simplification95.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -4.5e+116)
(/ (fma x (/ (* y -9.0) z) (* 4.0 (* t a))) (- 0.0 c))
(if (<= z 3.4e-71)
(/ (fma (* a (* z -4.0)) t (fma x (* y 9.0) b)) (* z c))
(/ (fma 9.0 (/ (* x y) z) (fma -4.0 (* t a) (/ b z))) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -4.5e+116) {
tmp = fma(x, ((y * -9.0) / z), (4.0 * (t * a))) / (0.0 - c);
} else if (z <= 3.4e-71) {
tmp = fma((a * (z * -4.0)), t, fma(x, (y * 9.0), b)) / (z * c);
} else {
tmp = fma(9.0, ((x * y) / z), fma(-4.0, (t * a), (b / z))) / c;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -4.5e+116) tmp = Float64(fma(x, Float64(Float64(y * -9.0) / z), Float64(4.0 * Float64(t * a))) / Float64(0.0 - c)); elseif (z <= 3.4e-71) tmp = Float64(fma(Float64(a * Float64(z * -4.0)), t, fma(x, Float64(y * 9.0), b)) / Float64(z * c)); else tmp = Float64(fma(9.0, Float64(Float64(x * y) / z), fma(-4.0, Float64(t * a), Float64(b / z))) / c); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -4.5e+116], N[(N[(x * N[(N[(y * -9.0), $MachinePrecision] / z), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-71], N[(N[(N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(x * N[(y * 9.0), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+116}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \frac{y \cdot -9}{z}, 4 \cdot \left(t \cdot a\right)\right)}{0 - c}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-71}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot \left(z \cdot -4\right), t, \mathsf{fma}\left(x, y \cdot 9, b\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, \frac{x \cdot y}{z}, \mathsf{fma}\left(-4, t \cdot a, \frac{b}{z}\right)\right)}{c}\\
\end{array}
\end{array}
if z < -4.50000000000000016e116Initial program 52.5%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified82.5%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
Simplified99.8%
Taylor expanded in t around inf
*-lowering-*.f64N/A
*-lowering-*.f6479.6%
Simplified79.6%
if -4.50000000000000016e116 < z < 3.40000000000000003e-71Initial program 94.2%
sub-negN/A
+-commutativeN/A
associate-+l+N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6494.4%
Applied egg-rr94.4%
if 3.40000000000000003e-71 < z Initial program 68.4%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified87.9%
Taylor expanded in c around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6491.6%
Simplified91.6%
Final simplification91.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma x (/ y (* z 0.1111111111111111)) (* -4.0 (* t a))) c)))
(if (<= (* x 9.0) -2e+16)
t_1
(if (<= (* x 9.0) 2e-97) (fma a (* t (/ -4.0 c)) (/ b (* z c))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, (y / (z * 0.1111111111111111)), (-4.0 * (t * a))) / c;
double tmp;
if ((x * 9.0) <= -2e+16) {
tmp = t_1;
} else if ((x * 9.0) <= 2e-97) {
tmp = fma(a, (t * (-4.0 / c)), (b / (z * c)));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(fma(x, Float64(y / Float64(z * 0.1111111111111111)), Float64(-4.0 * Float64(t * a))) / c) tmp = 0.0 if (Float64(x * 9.0) <= -2e+16) tmp = t_1; elseif (Float64(x * 9.0) <= 2e-97) tmp = fma(a, Float64(t * Float64(-4.0 / c)), Float64(b / Float64(z * c))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * N[(y / N[(z * 0.1111111111111111), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[N[(x * 9.0), $MachinePrecision], -2e+16], t$95$1, If[LessEqual[N[(x * 9.0), $MachinePrecision], 2e-97], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(x, \frac{y}{z \cdot 0.1111111111111111}, -4 \cdot \left(t \cdot a\right)\right)}{c}\\
\mathbf{if}\;x \cdot 9 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot 9 \leq 2 \cdot 10^{-97}:\\
\;\;\;\;\mathsf{fma}\left(a, t \cdot \frac{-4}{c}, \frac{b}{z \cdot c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x #s(literal 9 binary64)) < -2e16 or 2.00000000000000007e-97 < (*.f64 x #s(literal 9 binary64)) Initial program 74.2%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified78.5%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
Simplified83.6%
Taylor expanded in t around inf
*-lowering-*.f64N/A
*-lowering-*.f6475.0%
Simplified75.0%
distribute-frac-neg2N/A
distribute-frac-negN/A
/-lowering-/.f64N/A
Applied egg-rr75.0%
if -2e16 < (*.f64 x #s(literal 9 binary64)) < 2.00000000000000007e-97Initial program 84.4%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified89.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6487.2%
Simplified87.2%
Final simplification79.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma x (/ (* y -9.0) z) (* 4.0 (* t a))) (- 0.0 c))))
(if (<= z -2.1e+121)
t_1
(if (<= z 1.15e+111)
(/ (fma (* a (* z -4.0)) t (fma x (* y 9.0) b)) (* z c))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, ((y * -9.0) / z), (4.0 * (t * a))) / (0.0 - c);
double tmp;
if (z <= -2.1e+121) {
tmp = t_1;
} else if (z <= 1.15e+111) {
tmp = fma((a * (z * -4.0)), t, fma(x, (y * 9.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]) 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(fma(x, Float64(Float64(y * -9.0) / z), Float64(4.0 * Float64(t * a))) / Float64(0.0 - c)) tmp = 0.0 if (z <= -2.1e+121) tmp = t_1; elseif (z <= 1.15e+111) tmp = Float64(fma(Float64(a * Float64(z * -4.0)), t, fma(x, Float64(y * 9.0), b)) / Float64(z * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * N[(N[(y * -9.0), $MachinePrecision] / z), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+121], t$95$1, If[LessEqual[z, 1.15e+111], N[(N[(N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(x * N[(y * 9.0), $MachinePrecision] + b), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(x, \frac{y \cdot -9}{z}, 4 \cdot \left(t \cdot a\right)\right)}{0 - c}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+111}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot \left(z \cdot -4\right), t, \mathsf{fma}\left(x, y \cdot 9, b\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1000000000000002e121 or 1.15000000000000001e111 < z Initial program 52.5%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified85.0%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
Simplified97.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
*-lowering-*.f6481.7%
Simplified81.7%
if -2.1000000000000002e121 < z < 1.15000000000000001e111Initial program 92.6%
sub-negN/A
+-commutativeN/A
associate-+l+N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6493.4%
Applied egg-rr93.4%
Final simplification89.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma (* a (* z -4.0)) t b) (* z c)))
(t_2 (/ (* -4.0 (* t a)) c)))
(if (<= z -3.5e+204)
t_2
(if (<= z -3.5e-133)
t_1
(if (<= z 1.85e-50)
(/ (fma 9.0 (* x y) b) (* z c))
(if (<= z 1.42e+112) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((a * (z * -4.0)), t, b) / (z * c);
double t_2 = (-4.0 * (t * a)) / c;
double tmp;
if (z <= -3.5e+204) {
tmp = t_2;
} else if (z <= -3.5e-133) {
tmp = t_1;
} else if (z <= 1.85e-50) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else if (z <= 1.42e+112) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(fma(Float64(a * Float64(z * -4.0)), t, b) / Float64(z * c)) t_2 = Float64(Float64(-4.0 * Float64(t * a)) / c) tmp = 0.0 if (z <= -3.5e+204) tmp = t_2; elseif (z <= -3.5e-133) tmp = t_1; elseif (z <= 1.85e-50) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); elseif (z <= 1.42e+112) tmp = t_1; else tmp = t_2; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision] * t + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -3.5e+204], t$95$2, If[LessEqual[z, -3.5e-133], t$95$1, If[LessEqual[z, 1.85e-50], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e+112], 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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(a \cdot \left(z \cdot -4\right), t, b\right)}{z \cdot c}\\
t_2 := \frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+204}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-50}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.49999999999999989e204 or 1.4200000000000001e112 < z Initial program 50.8%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.9%
Simplified68.9%
if -3.49999999999999989e204 < z < -3.50000000000000003e-133 or 1.85e-50 < z < 1.4200000000000001e112Initial program 83.1%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6%
Simplified67.6%
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.0%
Applied egg-rr67.0%
if -3.50000000000000003e-133 < z < 1.85e-50Initial program 96.4%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6486.1%
Simplified86.1%
Final simplification73.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma a (* -4.0 (* z t)) b) (* z c)))
(t_2 (/ (* -4.0 (* t a)) c)))
(if (<= z -5.5e+206)
t_2
(if (<= z -1.6e-132)
t_1
(if (<= z 1.3e-52)
(/ (fma 9.0 (* x y) b) (* z c))
(if (<= z 3.35e+155) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(a, (-4.0 * (z * t)), b) / (z * c);
double t_2 = (-4.0 * (t * a)) / c;
double tmp;
if (z <= -5.5e+206) {
tmp = t_2;
} else if (z <= -1.6e-132) {
tmp = t_1;
} else if (z <= 1.3e-52) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else if (z <= 3.35e+155) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(fma(a, Float64(-4.0 * Float64(z * t)), b) / Float64(z * c)) t_2 = Float64(Float64(-4.0 * Float64(t * a)) / c) tmp = 0.0 if (z <= -5.5e+206) tmp = t_2; elseif (z <= -1.6e-132) tmp = t_1; elseif (z <= 1.3e-52) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); elseif (z <= 3.35e+155) tmp = t_1; else tmp = t_2; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * N[(-4.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -5.5e+206], t$95$2, If[LessEqual[z, -1.6e-132], t$95$1, If[LessEqual[z, 1.3e-52], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.35e+155], 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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(a, -4 \cdot \left(z \cdot t\right), b\right)}{z \cdot c}\\
t_2 := \frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+206}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-52}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 3.35 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.50000000000000021e206 or 3.35e155 < z Initial program 45.9%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.7%
Simplified70.7%
if -5.50000000000000021e206 < z < -1.6000000000000001e-132 or 1.2999999999999999e-52 < z < 3.35e155Initial program 82.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6467.4%
Simplified67.4%
if -1.6000000000000001e-132 < z < 1.2999999999999999e-52Initial program 96.4%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6486.1%
Simplified86.1%
Final simplification74.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma x (/ y (* z 0.1111111111111111)) (* -4.0 (* t a))) c)))
(if (<= z -1.02e+120)
t_1
(if (<= z 6.8e+109)
(/ (fma (* a (* z -4.0)) t (fma x (* y 9.0) b)) (* z c))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, (y / (z * 0.1111111111111111)), (-4.0 * (t * a))) / c;
double tmp;
if (z <= -1.02e+120) {
tmp = t_1;
} else if (z <= 6.8e+109) {
tmp = fma((a * (z * -4.0)), t, fma(x, (y * 9.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]) 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(fma(x, Float64(y / Float64(z * 0.1111111111111111)), Float64(-4.0 * Float64(t * a))) / c) tmp = 0.0 if (z <= -1.02e+120) tmp = t_1; elseif (z <= 6.8e+109) tmp = Float64(fma(Float64(a * Float64(z * -4.0)), t, fma(x, Float64(y * 9.0), b)) / Float64(z * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * N[(y / N[(z * 0.1111111111111111), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.02e+120], t$95$1, If[LessEqual[z, 6.8e+109], N[(N[(N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(x * N[(y * 9.0), $MachinePrecision] + b), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(x, \frac{y}{z \cdot 0.1111111111111111}, -4 \cdot \left(t \cdot a\right)\right)}{c}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+109}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot \left(z \cdot -4\right), t, \mathsf{fma}\left(x, y \cdot 9, b\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.01999999999999997e120 or 6.80000000000000013e109 < z Initial program 52.5%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified85.0%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
Simplified97.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
*-lowering-*.f6481.7%
Simplified81.7%
distribute-frac-neg2N/A
distribute-frac-negN/A
/-lowering-/.f64N/A
Applied egg-rr81.6%
if -1.01999999999999997e120 < z < 6.80000000000000013e109Initial program 92.6%
sub-negN/A
+-commutativeN/A
associate-+l+N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6493.4%
Applied egg-rr93.4%
Final simplification89.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c))))
(if (<= z -1.6e-132)
(fma -4.0 (/ (* t a) c) t_1)
(if (<= z 1.5e-34)
(/ (fma 9.0 (* x y) b) (* z c))
(fma a (* t (/ -4.0 c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (z <= -1.6e-132) {
tmp = fma(-4.0, ((t * a) / c), t_1);
} else if (z <= 1.5e-34) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else {
tmp = fma(a, (t * (-4.0 / c)), t_1);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -1.6e-132) tmp = fma(-4.0, Float64(Float64(t * a) / c), t_1); elseif (z <= 1.5e-34) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); else tmp = fma(a, Float64(t * Float64(-4.0 / c)), t_1); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-132], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 1.5e-34], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-132}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t \cdot a}{c}, t\_1\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t \cdot \frac{-4}{c}, t\_1\right)\\
\end{array}
\end{array}
if z < -1.6000000000000001e-132Initial program 72.7%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified84.1%
Taylor expanded in x around 0
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6467.0%
Simplified67.0%
if -1.6000000000000001e-132 < z < 1.5e-34Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6484.4%
Simplified84.4%
if 1.5e-34 < z Initial program 65.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified87.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6476.3%
Simplified76.3%
Final simplification75.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma -4.0 (/ (* t a) c) (/ b (* z c)))))
(if (<= z -1.6e-132)
t_1
(if (<= z 1.25e-49) (/ (fma 9.0 (* x y) b) (* z c)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(-4.0, ((t * a) / c), (b / (z * c)));
double tmp;
if (z <= -1.6e-132) {
tmp = t_1;
} else if (z <= 1.25e-49) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = fma(-4.0, Float64(Float64(t * a) / c), Float64(b / Float64(z * c))) tmp = 0.0 if (z <= -1.6e-132) tmp = t_1; elseif (z <= 1.25e-49) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-132], t$95$1, If[LessEqual[z, 1.25e-49], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{b}{z \cdot c}\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-49}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.6000000000000001e-132 or 1.25e-49 < z Initial program 69.5%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified86.1%
Taylor expanded in x around 0
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.2%
Simplified71.2%
if -1.6000000000000001e-132 < z < 1.25e-49Initial program 96.4%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6486.1%
Simplified86.1%
Final simplification76.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= b -2.1e+130)
t_1
(if (<= b -6.6e-87)
(* y (* 9.0 (/ x (fma z c 0.0))))
(if (<= b 1.9e+152) (/ (* -4.0 (* t a)) c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -2.1e+130) {
tmp = t_1;
} else if (b <= -6.6e-87) {
tmp = y * (9.0 * (x / fma(z, c, 0.0)));
} else if (b <= 1.9e+152) {
tmp = (-4.0 * (t * a)) / c;
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -2.1e+130) tmp = t_1; elseif (b <= -6.6e-87) tmp = Float64(y * Float64(9.0 * Float64(x / fma(z, c, 0.0)))); elseif (b <= 1.9e+152) tmp = Float64(Float64(-4.0 * Float64(t * a)) / c); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -2.1e+130], t$95$1, If[LessEqual[b, -6.6e-87], N[(y * N[(9.0 * N[(x / N[(z * c + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+152], N[(N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -2.1 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6.6 \cdot 10^{-87}:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{x}{\mathsf{fma}\left(z, c, 0\right)}\right)\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+152}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.0999999999999999e130 or 1.9e152 < b Initial program 82.8%
Taylor expanded in b around inf
Simplified61.6%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6468.5%
Applied egg-rr68.5%
if -2.0999999999999999e130 < b < -6.6000000000000001e-87Initial program 85.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified78.3%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.2%
Simplified51.2%
associate-/l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
+-rgt-identityN/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f6451.6%
Applied egg-rr51.6%
if -6.6000000000000001e-87 < b < 1.9e152Initial program 74.4%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.7%
Simplified51.7%
Final simplification56.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= b -2.5e+130)
t_1
(if (<= b -1.75e-91)
(* y (/ x (* z (* c 0.1111111111111111))))
(if (<= b 5.5e+151) (/ (* -4.0 (* t a)) c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -2.5e+130) {
tmp = t_1;
} else if (b <= -1.75e-91) {
tmp = y * (x / (z * (c * 0.1111111111111111)));
} else if (b <= 5.5e+151) {
tmp = (-4.0 * (t * a)) / 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.
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 = (b / c) / z
if (b <= (-2.5d+130)) then
tmp = t_1
else if (b <= (-1.75d-91)) then
tmp = y * (x / (z * (c * 0.1111111111111111d0)))
else if (b <= 5.5d+151) then
tmp = ((-4.0d0) * (t * a)) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -2.5e+130) {
tmp = t_1;
} else if (b <= -1.75e-91) {
tmp = y * (x / (z * (c * 0.1111111111111111)));
} else if (b <= 5.5e+151) {
tmp = (-4.0 * (t * a)) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -2.5e+130: tmp = t_1 elif b <= -1.75e-91: tmp = y * (x / (z * (c * 0.1111111111111111))) elif b <= 5.5e+151: tmp = (-4.0 * (t * a)) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -2.5e+130) tmp = t_1; elseif (b <= -1.75e-91) tmp = Float64(y * Float64(x / Float64(z * Float64(c * 0.1111111111111111)))); elseif (b <= 5.5e+151) tmp = Float64(Float64(-4.0 * Float64(t * a)) / 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])){:}
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 / c) / z;
tmp = 0.0;
if (b <= -2.5e+130)
tmp = t_1;
elseif (b <= -1.75e-91)
tmp = y * (x / (z * (c * 0.1111111111111111)));
elseif (b <= 5.5e+151)
tmp = (-4.0 * (t * a)) / 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.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -2.5e+130], t$95$1, If[LessEqual[b, -1.75e-91], N[(y * N[(x / N[(z * N[(c * 0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+151], N[(N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.75 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \frac{x}{z \cdot \left(c \cdot 0.1111111111111111\right)}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+151}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.4999999999999998e130 or 5.4999999999999994e151 < b Initial program 82.8%
Taylor expanded in b around inf
Simplified61.6%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6468.5%
Applied egg-rr68.5%
if -2.4999999999999998e130 < b < -1.7499999999999999e-91Initial program 85.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified78.3%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
Simplified93.8%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6448.6%
Simplified48.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-invN/A
*-lowering-*.f64N/A
metadata-eval51.5%
Applied egg-rr51.5%
if -1.7499999999999999e-91 < b < 5.4999999999999994e151Initial program 74.4%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.7%
Simplified51.7%
Final simplification56.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* -4.0 (* t a)) c)))
(if (<= z -1.48e+23)
t_1
(if (<= z 1e+104) (/ (fma 9.0 (* x y) b) (* z c)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (-4.0 * (t * a)) / c;
double tmp;
if (z <= -1.48e+23) {
tmp = t_1;
} else if (z <= 1e+104) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(-4.0 * Float64(t * a)) / c) tmp = 0.0 if (z <= -1.48e+23) tmp = t_1; elseif (z <= 1e+104) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.48e+23], t$95$1, If[LessEqual[z, 1e+104], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{if}\;z \leq -1.48 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{+104}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4799999999999999e23 or 1e104 < z Initial program 60.1%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.5%
Simplified61.5%
if -1.4799999999999999e23 < z < 1e104Initial program 92.3%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6473.9%
Simplified73.9%
Final simplification68.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ (/ b c) z))) (if (<= b -2.4e+142) t_1 (if (<= b 1.9e+152) (/ (* -4.0 (* t a)) c) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -2.4e+142) {
tmp = t_1;
} else if (b <= 1.9e+152) {
tmp = (-4.0 * (t * a)) / 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.
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 = (b / c) / z
if (b <= (-2.4d+142)) then
tmp = t_1
else if (b <= 1.9d+152) then
tmp = ((-4.0d0) * (t * a)) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -2.4e+142) {
tmp = t_1;
} else if (b <= 1.9e+152) {
tmp = (-4.0 * (t * a)) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -2.4e+142: tmp = t_1 elif b <= 1.9e+152: tmp = (-4.0 * (t * a)) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -2.4e+142) tmp = t_1; elseif (b <= 1.9e+152) tmp = Float64(Float64(-4.0 * Float64(t * a)) / 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])){:}
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 / c) / z;
tmp = 0.0;
if (b <= -2.4e+142)
tmp = t_1;
elseif (b <= 1.9e+152)
tmp = (-4.0 * (t * a)) / 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.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -2.4e+142], t$95$1, If[LessEqual[b, 1.9e+152], N[(N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -2.4 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+152}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.3999999999999999e142 or 1.9e152 < b Initial program 81.8%
Taylor expanded in b around inf
Simplified63.5%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6469.5%
Applied egg-rr69.5%
if -2.3999999999999999e142 < b < 1.9e152Initial program 76.9%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.0%
Simplified49.0%
Final simplification54.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ b (* z c)))) (if (<= b -6e+145) t_1 (if (<= b 7.5e+152) (/ (* -4.0 (* t a)) c) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -6e+145) {
tmp = t_1;
} else if (b <= 7.5e+152) {
tmp = (-4.0 * (t * a)) / 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.
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 = b / (z * c)
if (b <= (-6d+145)) then
tmp = t_1
else if (b <= 7.5d+152) then
tmp = ((-4.0d0) * (t * a)) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -6e+145) {
tmp = t_1;
} else if (b <= 7.5e+152) {
tmp = (-4.0 * (t * a)) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = b / (z * c) tmp = 0 if b <= -6e+145: tmp = t_1 elif b <= 7.5e+152: tmp = (-4.0 * (t * a)) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (b <= -6e+145) tmp = t_1; elseif (b <= 7.5e+152) tmp = Float64(Float64(-4.0 * Float64(t * a)) / 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])){:}
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 / (z * c);
tmp = 0.0;
if (b <= -6e+145)
tmp = t_1;
elseif (b <= 7.5e+152)
tmp = (-4.0 * (t * a)) / 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.
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[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6e+145], t$95$1, If[LessEqual[b, 7.5e+152], N[(N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;b \leq -6 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+152}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.0000000000000005e145 or 7.50000000000000046e152 < b Initial program 81.8%
Taylor expanded in b around inf
Simplified63.5%
if -6.0000000000000005e145 < b < 7.50000000000000046e152Initial program 76.9%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.0%
Simplified49.0%
Final simplification52.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 78.2%
Taylor expanded in b around inf
Simplified32.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024193
(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)))