
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -5e-17) (not (<= z 1.12e-69))) (/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* 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 ((z <= -5e-17) || !(z <= 1.12e-69)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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 ((z <= (-5d-17)) .or. (.not. (z <= 1.12d-69))) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (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 ((z <= -5e-17) || !(z <= 1.12e-69)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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 (z <= -5e-17) or not (z <= 1.12e-69): tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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 ((z <= -5e-17) || !(z <= 1.12e-69)) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(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 ((z <= -5e-17) || ~((z <= 1.12e-69)))
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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[Or[LessEqual[z, -5e-17], N[Not[LessEqual[z, 1.12e-69]], $MachinePrecision]], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-17} \lor \neg \left(z \leq 1.12 \cdot 10^{-69}\right):\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c \cdot z}\\
\end{array}
\end{array}
if z < -4.9999999999999999e-17 or 1.12e-69 < z Initial program 63.9%
associate-+l-63.9%
*-commutative63.9%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
*-commutative66.5%
associate-*r*63.9%
*-commutative63.9%
associate-*l*64.6%
associate-*l*72.5%
Simplified72.5%
associate-+l-72.5%
div-sub70.4%
*-commutative70.4%
associate-*l*70.5%
associate-*l*70.5%
fma-neg70.5%
Applied egg-rr70.5%
associate-*r*70.4%
times-frac67.2%
fma-udef67.2%
unsub-neg67.2%
*-commutative67.2%
*-commutative67.2%
associate-*l*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in c around 0 89.4%
if -4.9999999999999999e-17 < z < 1.12e-69Initial program 96.6%
Final simplification92.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 (* -4.0 (/ a (/ c t)))) (t_2 (* 9.0 (* (/ y c) (/ x z)))))
(if (<= t -5.5e+213)
(* -4.0 (* t (/ a c)))
(if (<= t -3.15e+16)
t_1
(if (<= t -4e-118)
t_2
(if (<= t -1.05e-264)
(/ (/ b z) c)
(if (<= t 2.1e-276)
t_2
(if (<= t 1.95e-135) (/ b (* c z)) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (t <= -5.5e+213) {
tmp = -4.0 * (t * (a / c));
} else if (t <= -3.15e+16) {
tmp = t_1;
} else if (t <= -4e-118) {
tmp = t_2;
} else if (t <= -1.05e-264) {
tmp = (b / z) / c;
} else if (t <= 2.1e-276) {
tmp = t_2;
} else if (t <= 1.95e-135) {
tmp = b / (c * z);
} 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) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (a / (c / t))
t_2 = 9.0d0 * ((y / c) * (x / z))
if (t <= (-5.5d+213)) then
tmp = (-4.0d0) * (t * (a / c))
else if (t <= (-3.15d+16)) then
tmp = t_1
else if (t <= (-4d-118)) then
tmp = t_2
else if (t <= (-1.05d-264)) then
tmp = (b / z) / c
else if (t <= 2.1d-276) then
tmp = t_2
else if (t <= 1.95d-135) then
tmp = b / (c * z)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (t <= -5.5e+213) {
tmp = -4.0 * (t * (a / c));
} else if (t <= -3.15e+16) {
tmp = t_1;
} else if (t <= -4e-118) {
tmp = t_2;
} else if (t <= -1.05e-264) {
tmp = (b / z) / c;
} else if (t <= 2.1e-276) {
tmp = t_2;
} else if (t <= 1.95e-135) {
tmp = b / (c * z);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) t_2 = 9.0 * ((y / c) * (x / z)) tmp = 0 if t <= -5.5e+213: tmp = -4.0 * (t * (a / c)) elif t <= -3.15e+16: tmp = t_1 elif t <= -4e-118: tmp = t_2 elif t <= -1.05e-264: tmp = (b / z) / c elif t <= 2.1e-276: tmp = t_2 elif t <= 1.95e-135: tmp = b / (c * z) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) t_2 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))) tmp = 0.0 if (t <= -5.5e+213) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (t <= -3.15e+16) tmp = t_1; elseif (t <= -4e-118) tmp = t_2; elseif (t <= -1.05e-264) tmp = Float64(Float64(b / z) / c); elseif (t <= 2.1e-276) tmp = t_2; elseif (t <= 1.95e-135) tmp = Float64(b / Float64(c * z)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a / (c / t));
t_2 = 9.0 * ((y / c) * (x / z));
tmp = 0.0;
if (t <= -5.5e+213)
tmp = -4.0 * (t * (a / c));
elseif (t <= -3.15e+16)
tmp = t_1;
elseif (t <= -4e-118)
tmp = t_2;
elseif (t <= -1.05e-264)
tmp = (b / z) / c;
elseif (t <= 2.1e-276)
tmp = t_2;
elseif (t <= 1.95e-135)
tmp = b / (c * z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+213], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.15e+16], t$95$1, If[LessEqual[t, -4e-118], t$95$2, If[LessEqual[t, -1.05e-264], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, 2.1e-276], t$95$2, If[LessEqual[t, 1.95e-135], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
t_2 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+213}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;t \leq -3.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-118}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-264}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-276}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-135}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.50000000000000059e213Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*93.2%
*-commutative93.2%
associate-+l-93.2%
*-commutative93.2%
associate-*r*73.3%
*-commutative73.3%
associate-*l*73.3%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in x around 0 85.5%
cancel-sign-sub-inv85.5%
metadata-eval85.5%
+-commutative85.5%
*-commutative85.5%
fma-def85.5%
associate-/l*58.6%
associate-/r/84.8%
fma-def84.8%
*-commutative84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in a around inf 78.9%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
if -5.50000000000000059e213 < t < -3.15e16 or 1.95000000000000011e-135 < t Initial program 70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*77.7%
*-commutative77.7%
associate-+l-77.7%
*-commutative77.7%
associate-*r*70.9%
*-commutative70.9%
associate-*l*71.6%
associate-*l*72.6%
Simplified72.6%
Taylor expanded in z around inf 47.3%
*-commutative47.3%
associate-/l*55.0%
Simplified55.0%
if -3.15e16 < t < -3.99999999999999994e-118 or -1.0500000000000001e-264 < t < 2.1e-276Initial program 78.8%
associate-+l-78.8%
*-commutative78.8%
associate-*r*74.1%
*-commutative74.1%
associate-+l-74.1%
*-commutative74.1%
associate-*r*78.8%
*-commutative78.8%
associate-*l*78.8%
associate-*l*78.8%
Simplified78.8%
Taylor expanded in x around 0 71.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
+-commutative71.3%
*-commutative71.3%
fma-def71.3%
associate-/l*71.3%
associate-/r/69.0%
fma-def69.0%
*-commutative69.0%
*-commutative69.0%
Simplified69.0%
Taylor expanded in x around inf 51.5%
*-commutative51.5%
times-frac58.6%
Simplified58.6%
if -3.99999999999999994e-118 < t < -1.0500000000000001e-264Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*83.6%
*-commutative83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*91.7%
*-commutative91.7%
associate-*l*91.7%
associate-*l*91.6%
Simplified91.6%
associate-+l-91.6%
div-sub86.0%
*-commutative86.0%
associate-*l*85.9%
associate-*l*85.9%
fma-neg85.9%
Applied egg-rr85.9%
associate-*r*86.0%
times-frac77.4%
fma-udef77.4%
unsub-neg77.4%
*-commutative77.4%
*-commutative77.4%
associate-*l*77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in c around 0 94.3%
Taylor expanded in b around inf 59.6%
if 2.1e-276 < t < 1.95000000000000011e-135Initial program 91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*82.7%
*-commutative82.7%
associate-+l-82.7%
*-commutative82.7%
associate-*r*91.5%
*-commutative91.5%
associate-*l*91.4%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in b around inf 52.4%
*-commutative52.4%
Simplified52.4%
Final simplification57.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 (* 9.0 (/ x (/ c (/ y z))))) (t_2 (* -4.0 (* t (/ a c)))))
(if (<= a -1.4e-80)
t_2
(if (<= a 1.8e-204)
t_1
(if (<= a 1.1e-112)
(* (/ b z) (/ 1.0 c))
(if (<= a 2.1e-32) t_1 (if (<= a 8.5e+59) (/ (/ b z) c) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x / (c / (y / z)));
double t_2 = -4.0 * (t * (a / c));
double tmp;
if (a <= -1.4e-80) {
tmp = t_2;
} else if (a <= 1.8e-204) {
tmp = t_1;
} else if (a <= 1.1e-112) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 2.1e-32) {
tmp = t_1;
} else if (a <= 8.5e+59) {
tmp = (b / z) / c;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (x / (c / (y / z)))
t_2 = (-4.0d0) * (t * (a / c))
if (a <= (-1.4d-80)) then
tmp = t_2
else if (a <= 1.8d-204) then
tmp = t_1
else if (a <= 1.1d-112) then
tmp = (b / z) * (1.0d0 / c)
else if (a <= 2.1d-32) then
tmp = t_1
else if (a <= 8.5d+59) then
tmp = (b / z) / c
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x / (c / (y / z)));
double t_2 = -4.0 * (t * (a / c));
double tmp;
if (a <= -1.4e-80) {
tmp = t_2;
} else if (a <= 1.8e-204) {
tmp = t_1;
} else if (a <= 1.1e-112) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 2.1e-32) {
tmp = t_1;
} else if (a <= 8.5e+59) {
tmp = (b / z) / c;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x / (c / (y / z))) t_2 = -4.0 * (t * (a / c)) tmp = 0 if a <= -1.4e-80: tmp = t_2 elif a <= 1.8e-204: tmp = t_1 elif a <= 1.1e-112: tmp = (b / z) * (1.0 / c) elif a <= 2.1e-32: tmp = t_1 elif a <= 8.5e+59: tmp = (b / z) / c else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x / Float64(c / Float64(y / z)))) t_2 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (a <= -1.4e-80) tmp = t_2; elseif (a <= 1.8e-204) tmp = t_1; elseif (a <= 1.1e-112) tmp = Float64(Float64(b / z) * Float64(1.0 / c)); elseif (a <= 2.1e-32) tmp = t_1; elseif (a <= 8.5e+59) tmp = Float64(Float64(b / z) / c); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x / (c / (y / z)));
t_2 = -4.0 * (t * (a / c));
tmp = 0.0;
if (a <= -1.4e-80)
tmp = t_2;
elseif (a <= 1.8e-204)
tmp = t_1;
elseif (a <= 1.1e-112)
tmp = (b / z) * (1.0 / c);
elseif (a <= 2.1e-32)
tmp = t_1;
elseif (a <= 8.5e+59)
tmp = (b / z) / c;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x / N[(c / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e-80], t$95$2, If[LessEqual[a, 1.8e-204], t$95$1, If[LessEqual[a, 1.1e-112], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e-32], t$95$1, If[LessEqual[a, 8.5e+59], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \frac{x}{\frac{c}{\frac{y}{z}}}\\
t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{-80}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-112}:\\
\;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+59}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.39999999999999995e-80 or 8.4999999999999999e59 < a Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*72.6%
*-commutative72.6%
associate-+l-72.6%
*-commutative72.6%
associate-*r*77.4%
*-commutative77.4%
associate-*l*78.1%
associate-*l*72.9%
Simplified72.9%
Taylor expanded in x around 0 72.3%
cancel-sign-sub-inv72.3%
metadata-eval72.3%
+-commutative72.3%
*-commutative72.3%
fma-def72.3%
associate-/l*76.2%
associate-/r/77.1%
fma-def77.1%
*-commutative77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in a around inf 45.7%
associate-*l/54.2%
*-commutative54.2%
Simplified54.2%
if -1.39999999999999995e-80 < a < 1.79999999999999982e-204 or 1.10000000000000011e-112 < a < 2.0999999999999999e-32Initial program 77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
*-commutative89.4%
associate-*r*77.9%
*-commutative77.9%
associate-*l*77.8%
associate-*l*90.4%
Simplified90.4%
associate-+l-90.4%
div-sub86.8%
*-commutative86.8%
associate-*l*86.9%
associate-*l*86.9%
fma-neg86.9%
Applied egg-rr86.9%
associate-*r*86.8%
times-frac82.4%
fma-udef82.4%
unsub-neg82.4%
*-commutative82.4%
*-commutative82.4%
associate-*l*82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in c around 0 90.4%
Taylor expanded in x around inf 50.7%
associate-*r/50.7%
*-commutative50.7%
associate-*r/50.7%
*-commutative50.7%
associate-/l*49.6%
associate-/l*48.1%
Simplified48.1%
if 1.79999999999999982e-204 < a < 1.10000000000000011e-112Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*73.0%
*-commutative73.0%
associate-*l*73.0%
associate-*l*79.4%
Simplified79.4%
associate-+l-79.4%
div-sub78.9%
*-commutative78.9%
associate-*l*78.9%
associate-*l*78.9%
fma-neg78.9%
Applied egg-rr78.9%
associate-*r*78.9%
times-frac85.2%
fma-udef85.2%
unsub-neg85.2%
*-commutative85.2%
*-commutative85.2%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in c around 0 87.5%
Taylor expanded in b around inf 51.0%
div-inv51.1%
Applied egg-rr51.1%
if 2.0999999999999999e-32 < a < 8.4999999999999999e59Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.5%
*-commutative91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*91.7%
*-commutative91.7%
associate-*l*91.7%
associate-*l*91.5%
Simplified91.5%
associate-+l-91.5%
div-sub91.5%
*-commutative91.5%
associate-*l*91.5%
associate-*l*91.5%
fma-neg91.5%
Applied egg-rr91.5%
associate-*r*91.5%
times-frac83.2%
fma-udef83.2%
unsub-neg83.2%
*-commutative83.2%
*-commutative83.2%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in c around 0 91.9%
Taylor expanded in b around inf 67.6%
Final simplification52.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= a -2.7e-80)
t_1
(if (<= a 7.2e-204)
(* 9.0 (/ x (/ c (/ y z))))
(if (<= a 4.3e-113)
(* (/ b z) (/ 1.0 c))
(if (<= a 3.4e-29)
(* 9.0 (/ (* x y) (* c z)))
(if (<= a 1.75e+61) (/ (/ b z) c) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -2.7e-80) {
tmp = t_1;
} else if (a <= 7.2e-204) {
tmp = 9.0 * (x / (c / (y / z)));
} else if (a <= 4.3e-113) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 3.4e-29) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (a <= 1.75e+61) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (a <= (-2.7d-80)) then
tmp = t_1
else if (a <= 7.2d-204) then
tmp = 9.0d0 * (x / (c / (y / z)))
else if (a <= 4.3d-113) then
tmp = (b / z) * (1.0d0 / c)
else if (a <= 3.4d-29) then
tmp = 9.0d0 * ((x * y) / (c * z))
else if (a <= 1.75d+61) then
tmp = (b / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -2.7e-80) {
tmp = t_1;
} else if (a <= 7.2e-204) {
tmp = 9.0 * (x / (c / (y / z)));
} else if (a <= 4.3e-113) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 3.4e-29) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (a <= 1.75e+61) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if a <= -2.7e-80: tmp = t_1 elif a <= 7.2e-204: tmp = 9.0 * (x / (c / (y / z))) elif a <= 4.3e-113: tmp = (b / z) * (1.0 / c) elif a <= 3.4e-29: tmp = 9.0 * ((x * y) / (c * z)) elif a <= 1.75e+61: tmp = (b / z) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (a <= -2.7e-80) tmp = t_1; elseif (a <= 7.2e-204) tmp = Float64(9.0 * Float64(x / Float64(c / Float64(y / z)))); elseif (a <= 4.3e-113) tmp = Float64(Float64(b / z) * Float64(1.0 / c)); elseif (a <= 3.4e-29) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z))); elseif (a <= 1.75e+61) tmp = Float64(Float64(b / z) / c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
tmp = 0.0;
if (a <= -2.7e-80)
tmp = t_1;
elseif (a <= 7.2e-204)
tmp = 9.0 * (x / (c / (y / z)));
elseif (a <= 4.3e-113)
tmp = (b / z) * (1.0 / c);
elseif (a <= 3.4e-29)
tmp = 9.0 * ((x * y) / (c * z));
elseif (a <= 1.75e+61)
tmp = (b / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e-80], t$95$1, If[LessEqual[a, 7.2e-204], N[(9.0 * N[(x / N[(c / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.3e-113], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-29], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75e+61], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-204}:\\
\;\;\;\;9 \cdot \frac{x}{\frac{c}{\frac{y}{z}}}\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{-113}:\\
\;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-29}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{+61}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.7000000000000002e-80 or 1.75000000000000009e61 < a Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*72.6%
*-commutative72.6%
associate-+l-72.6%
*-commutative72.6%
associate-*r*77.4%
*-commutative77.4%
associate-*l*78.1%
associate-*l*72.9%
Simplified72.9%
Taylor expanded in x around 0 72.3%
cancel-sign-sub-inv72.3%
metadata-eval72.3%
+-commutative72.3%
*-commutative72.3%
fma-def72.3%
associate-/l*76.2%
associate-/r/77.1%
fma-def77.1%
*-commutative77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in a around inf 45.7%
associate-*l/54.2%
*-commutative54.2%
Simplified54.2%
if -2.7000000000000002e-80 < a < 7.1999999999999993e-204Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*76.9%
*-commutative76.9%
associate-*l*76.9%
associate-*l*88.9%
Simplified88.9%
associate-+l-88.9%
div-sub87.5%
*-commutative87.5%
associate-*l*87.6%
associate-*l*87.6%
fma-neg87.6%
Applied egg-rr87.6%
associate-*r*87.5%
times-frac80.9%
fma-udef80.9%
unsub-neg80.9%
*-commutative80.9%
*-commutative80.9%
associate-*l*80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in c around 0 90.2%
Taylor expanded in x around inf 51.2%
associate-*r/51.2%
*-commutative51.2%
associate-*r/51.2%
*-commutative51.2%
associate-/l*48.6%
associate-/l*48.2%
Simplified48.2%
if 7.1999999999999993e-204 < a < 4.3e-113Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*73.0%
*-commutative73.0%
associate-*l*73.0%
associate-*l*79.4%
Simplified79.4%
associate-+l-79.4%
div-sub78.9%
*-commutative78.9%
associate-*l*78.9%
associate-*l*78.9%
fma-neg78.9%
Applied egg-rr78.9%
associate-*r*78.9%
times-frac85.2%
fma-udef85.2%
unsub-neg85.2%
*-commutative85.2%
*-commutative85.2%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in c around 0 87.5%
Taylor expanded in b around inf 51.0%
div-inv51.1%
Applied egg-rr51.1%
if 4.3e-113 < a < 3.39999999999999972e-29Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*83.6%
*-commutative83.6%
associate-*l*83.5%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around inf 47.5%
if 3.39999999999999972e-29 < a < 1.75000000000000009e61Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.5%
*-commutative91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*91.7%
*-commutative91.7%
associate-*l*91.7%
associate-*l*91.5%
Simplified91.5%
associate-+l-91.5%
div-sub91.5%
*-commutative91.5%
associate-*l*91.5%
associate-*l*91.5%
fma-neg91.5%
Applied egg-rr91.5%
associate-*r*91.5%
times-frac83.2%
fma-udef83.2%
unsub-neg83.2%
*-commutative83.2%
*-commutative83.2%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in c around 0 91.9%
Taylor expanded in b around inf 67.6%
Final simplification52.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= a -2.2e-95)
t_1
(if (<= a 3.4e-204)
(* (* x (/ y z)) (/ 9.0 c))
(if (<= a 4.5e-113)
(* (/ b z) (/ 1.0 c))
(if (<= a 1.25e-33)
(* 9.0 (/ (* x y) (* c z)))
(if (<= a 1.15e+60) (/ (/ b z) c) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -2.2e-95) {
tmp = t_1;
} else if (a <= 3.4e-204) {
tmp = (x * (y / z)) * (9.0 / c);
} else if (a <= 4.5e-113) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 1.25e-33) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (a <= 1.15e+60) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (a <= (-2.2d-95)) then
tmp = t_1
else if (a <= 3.4d-204) then
tmp = (x * (y / z)) * (9.0d0 / c)
else if (a <= 4.5d-113) then
tmp = (b / z) * (1.0d0 / c)
else if (a <= 1.25d-33) then
tmp = 9.0d0 * ((x * y) / (c * z))
else if (a <= 1.15d+60) then
tmp = (b / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -2.2e-95) {
tmp = t_1;
} else if (a <= 3.4e-204) {
tmp = (x * (y / z)) * (9.0 / c);
} else if (a <= 4.5e-113) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 1.25e-33) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (a <= 1.15e+60) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if a <= -2.2e-95: tmp = t_1 elif a <= 3.4e-204: tmp = (x * (y / z)) * (9.0 / c) elif a <= 4.5e-113: tmp = (b / z) * (1.0 / c) elif a <= 1.25e-33: tmp = 9.0 * ((x * y) / (c * z)) elif a <= 1.15e+60: tmp = (b / z) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (a <= -2.2e-95) tmp = t_1; elseif (a <= 3.4e-204) tmp = Float64(Float64(x * Float64(y / z)) * Float64(9.0 / c)); elseif (a <= 4.5e-113) tmp = Float64(Float64(b / z) * Float64(1.0 / c)); elseif (a <= 1.25e-33) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z))); elseif (a <= 1.15e+60) tmp = Float64(Float64(b / z) / c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
tmp = 0.0;
if (a <= -2.2e-95)
tmp = t_1;
elseif (a <= 3.4e-204)
tmp = (x * (y / z)) * (9.0 / c);
elseif (a <= 4.5e-113)
tmp = (b / z) * (1.0 / c);
elseif (a <= 1.25e-33)
tmp = 9.0 * ((x * y) / (c * z));
elseif (a <= 1.15e+60)
tmp = (b / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e-95], t$95$1, If[LessEqual[a, 3.4e-204], N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] * N[(9.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e-113], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-33], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e+60], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-204}:\\
\;\;\;\;\left(x \cdot \frac{y}{z}\right) \cdot \frac{9}{c}\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-113}:\\
\;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-33}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+60}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.1999999999999999e-95 or 1.15000000000000008e60 < a Initial program 77.5%
associate-+l-77.5%
*-commutative77.5%
associate-*r*72.8%
*-commutative72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*77.5%
*-commutative77.5%
associate-*l*78.2%
associate-*l*73.1%
Simplified73.1%
Taylor expanded in x around 0 72.5%
cancel-sign-sub-inv72.5%
metadata-eval72.5%
+-commutative72.5%
*-commutative72.5%
fma-def72.5%
associate-/l*76.4%
associate-/r/77.2%
fma-def77.2%
*-commutative77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in a around inf 45.4%
associate-*l/53.8%
*-commutative53.8%
Simplified53.8%
if -2.1999999999999999e-95 < a < 3.4000000000000002e-204Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*87.6%
*-commutative87.6%
associate-+l-87.6%
*-commutative87.6%
associate-*r*76.6%
*-commutative76.6%
associate-*l*76.5%
associate-*l*88.8%
Simplified88.8%
associate-+l-88.8%
div-sub87.3%
*-commutative87.3%
associate-*l*87.4%
associate-*l*87.4%
fma-neg87.4%
Applied egg-rr87.4%
associate-*r*87.3%
times-frac80.7%
fma-udef80.7%
unsub-neg80.7%
*-commutative80.7%
*-commutative80.7%
associate-*l*80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in c around 0 90.1%
Taylor expanded in z around -inf 92.9%
mul-1-neg92.9%
unsub-neg92.9%
*-commutative92.9%
associate-*l*92.9%
neg-mul-192.9%
unsub-neg92.9%
*-commutative92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around inf 50.5%
associate-*r/50.5%
*-commutative50.5%
*-commutative50.5%
times-frac49.8%
associate-*r/49.4%
Simplified49.4%
if 3.4000000000000002e-204 < a < 4.5000000000000001e-113Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*73.0%
*-commutative73.0%
associate-*l*73.0%
associate-*l*79.4%
Simplified79.4%
associate-+l-79.4%
div-sub78.9%
*-commutative78.9%
associate-*l*78.9%
associate-*l*78.9%
fma-neg78.9%
Applied egg-rr78.9%
associate-*r*78.9%
times-frac85.2%
fma-udef85.2%
unsub-neg85.2%
*-commutative85.2%
*-commutative85.2%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in c around 0 87.5%
Taylor expanded in b around inf 51.0%
div-inv51.1%
Applied egg-rr51.1%
if 4.5000000000000001e-113 < a < 1.25000000000000007e-33Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*83.6%
*-commutative83.6%
associate-*l*83.5%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around inf 47.5%
if 1.25000000000000007e-33 < a < 1.15000000000000008e60Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.5%
*-commutative91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*91.7%
*-commutative91.7%
associate-*l*91.7%
associate-*l*91.5%
Simplified91.5%
associate-+l-91.5%
div-sub91.5%
*-commutative91.5%
associate-*l*91.5%
associate-*l*91.5%
fma-neg91.5%
Applied egg-rr91.5%
associate-*r*91.5%
times-frac83.2%
fma-udef83.2%
unsub-neg83.2%
*-commutative83.2%
*-commutative83.2%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in c around 0 91.9%
Taylor expanded in b around inf 67.6%
Final simplification52.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= a -6.1e-80)
t_1
(if (<= a 1.75e-202)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= a 5.5e-113)
(* (/ b z) (/ 1.0 c))
(if (<= a 1.42e-24)
(* 9.0 (/ (* x y) (* c z)))
(if (<= a 1.6e+60) (/ (/ b z) c) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -6.1e-80) {
tmp = t_1;
} else if (a <= 1.75e-202) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (a <= 5.5e-113) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 1.42e-24) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (a <= 1.6e+60) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (a <= (-6.1d-80)) then
tmp = t_1
else if (a <= 1.75d-202) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (a <= 5.5d-113) then
tmp = (b / z) * (1.0d0 / c)
else if (a <= 1.42d-24) then
tmp = 9.0d0 * ((x * y) / (c * z))
else if (a <= 1.6d+60) then
tmp = (b / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (a <= -6.1e-80) {
tmp = t_1;
} else if (a <= 1.75e-202) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (a <= 5.5e-113) {
tmp = (b / z) * (1.0 / c);
} else if (a <= 1.42e-24) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (a <= 1.6e+60) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if a <= -6.1e-80: tmp = t_1 elif a <= 1.75e-202: tmp = 9.0 * ((x / c) * (y / z)) elif a <= 5.5e-113: tmp = (b / z) * (1.0 / c) elif a <= 1.42e-24: tmp = 9.0 * ((x * y) / (c * z)) elif a <= 1.6e+60: tmp = (b / z) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (a <= -6.1e-80) tmp = t_1; elseif (a <= 1.75e-202) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (a <= 5.5e-113) tmp = Float64(Float64(b / z) * Float64(1.0 / c)); elseif (a <= 1.42e-24) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z))); elseif (a <= 1.6e+60) tmp = Float64(Float64(b / z) / c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
tmp = 0.0;
if (a <= -6.1e-80)
tmp = t_1;
elseif (a <= 1.75e-202)
tmp = 9.0 * ((x / c) * (y / z));
elseif (a <= 5.5e-113)
tmp = (b / z) * (1.0 / c);
elseif (a <= 1.42e-24)
tmp = 9.0 * ((x * y) / (c * z));
elseif (a <= 1.6e+60)
tmp = (b / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.1e-80], t$95$1, If[LessEqual[a, 1.75e-202], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-113], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.42e-24], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+60], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;a \leq -6.1 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-202}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-113}:\\
\;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;a \leq 1.42 \cdot 10^{-24}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+60}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.1000000000000002e-80 or 1.59999999999999995e60 < a Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*72.6%
*-commutative72.6%
associate-+l-72.6%
*-commutative72.6%
associate-*r*77.4%
*-commutative77.4%
associate-*l*78.1%
associate-*l*72.9%
Simplified72.9%
Taylor expanded in x around 0 72.3%
cancel-sign-sub-inv72.3%
metadata-eval72.3%
+-commutative72.3%
*-commutative72.3%
fma-def72.3%
associate-/l*76.2%
associate-/r/77.1%
fma-def77.1%
*-commutative77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in a around inf 45.7%
associate-*l/54.2%
*-commutative54.2%
Simplified54.2%
if -6.1000000000000002e-80 < a < 1.75e-202Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*76.9%
*-commutative76.9%
associate-*l*76.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in x around 0 91.5%
cancel-sign-sub-inv91.5%
metadata-eval91.5%
+-commutative91.5%
*-commutative91.5%
fma-def91.5%
associate-/l*81.0%
associate-/r/89.0%
fma-def89.0%
*-commutative89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in x around inf 51.2%
*-commutative51.2%
times-frac48.7%
Simplified48.7%
if 1.75e-202 < a < 5.50000000000000053e-113Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*73.0%
*-commutative73.0%
associate-*l*73.0%
associate-*l*79.4%
Simplified79.4%
associate-+l-79.4%
div-sub78.9%
*-commutative78.9%
associate-*l*78.9%
associate-*l*78.9%
fma-neg78.9%
Applied egg-rr78.9%
associate-*r*78.9%
times-frac85.2%
fma-udef85.2%
unsub-neg85.2%
*-commutative85.2%
*-commutative85.2%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in c around 0 87.5%
Taylor expanded in b around inf 51.0%
div-inv51.1%
Applied egg-rr51.1%
if 5.50000000000000053e-113 < a < 1.42e-24Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*83.6%
*-commutative83.6%
associate-*l*83.5%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around inf 47.5%
if 1.42e-24 < a < 1.59999999999999995e60Initial program 91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*91.5%
*-commutative91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*91.7%
*-commutative91.7%
associate-*l*91.7%
associate-*l*91.5%
Simplified91.5%
associate-+l-91.5%
div-sub91.5%
*-commutative91.5%
associate-*l*91.5%
associate-*l*91.5%
fma-neg91.5%
Applied egg-rr91.5%
associate-*r*91.5%
times-frac83.2%
fma-udef83.2%
unsub-neg83.2%
*-commutative83.2%
*-commutative83.2%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in c around 0 91.9%
Taylor expanded in b around inf 67.6%
Final simplification52.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.2e+56)
(/ (- (* t (* a -4.0)) (/ x (/ z (* y -9.0)))) c)
(if (<= z 3.9e-135)
(/ (+ b (* 9.0 (* x y))) (* c z))
(if (<= z 1.8e-36)
(/ (- b (* 4.0 (* a (* z t)))) (* c z))
(- (* (/ (* 9.0 y) z) (/ x c)) (* t (* 4.0 (/ a c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.2e+56) {
tmp = ((t * (a * -4.0)) - (x / (z / (y * -9.0)))) / c;
} else if (z <= 3.9e-135) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if (z <= 1.8e-36) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} else {
tmp = (((9.0 * y) / z) * (x / c)) - (t * (4.0 * (a / c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-2.2d+56)) then
tmp = ((t * (a * (-4.0d0))) - (x / (z / (y * (-9.0d0))))) / c
else if (z <= 3.9d-135) then
tmp = (b + (9.0d0 * (x * y))) / (c * z)
else if (z <= 1.8d-36) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c * z)
else
tmp = (((9.0d0 * y) / z) * (x / c)) - (t * (4.0d0 * (a / c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.2e+56) {
tmp = ((t * (a * -4.0)) - (x / (z / (y * -9.0)))) / c;
} else if (z <= 3.9e-135) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if (z <= 1.8e-36) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} else {
tmp = (((9.0 * y) / z) * (x / c)) - (t * (4.0 * (a / c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.2e+56: tmp = ((t * (a * -4.0)) - (x / (z / (y * -9.0)))) / c elif z <= 3.9e-135: tmp = (b + (9.0 * (x * y))) / (c * z) elif z <= 1.8e-36: tmp = (b - (4.0 * (a * (z * t)))) / (c * z) else: tmp = (((9.0 * y) / z) * (x / c)) - (t * (4.0 * (a / c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.2e+56) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) - Float64(x / Float64(z / Float64(y * -9.0)))) / c); elseif (z <= 3.9e-135) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); elseif (z <= 1.8e-36) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c * z)); else tmp = Float64(Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)) - Float64(t * Float64(4.0 * Float64(a / c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -2.2e+56)
tmp = ((t * (a * -4.0)) - (x / (z / (y * -9.0)))) / c;
elseif (z <= 3.9e-135)
tmp = (b + (9.0 * (x * y))) / (c * z);
elseif (z <= 1.8e-36)
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
else
tmp = (((9.0 * y) / z) * (x / c)) - (t * (4.0 * (a / c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.2e+56], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z / N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.9e-135], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-36], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision] - N[(t * N[(4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+56}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) - \frac{x}{\frac{z}{y \cdot -9}}}{c}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-135}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-36}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot y}{z} \cdot \frac{x}{c} - t \cdot \left(4 \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -2.20000000000000016e56Initial program 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*65.1%
*-commutative65.1%
associate-+l-65.1%
*-commutative65.1%
associate-*r*57.9%
*-commutative57.9%
associate-*l*57.9%
associate-*l*70.5%
Simplified70.5%
associate-+l-70.5%
div-sub70.5%
*-commutative70.5%
associate-*l*70.4%
associate-*l*70.4%
fma-neg70.4%
Applied egg-rr70.4%
associate-*r*70.5%
times-frac61.4%
fma-udef61.4%
unsub-neg61.4%
*-commutative61.4%
*-commutative61.4%
associate-*l*61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in c around 0 92.8%
Taylor expanded in z around -inf 92.8%
mul-1-neg92.8%
unsub-neg92.8%
*-commutative92.8%
associate-*l*92.8%
neg-mul-192.8%
unsub-neg92.8%
*-commutative92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in b around 0 78.7%
associate-*r*78.7%
associate-*r/78.8%
*-commutative78.8%
associate-*r*78.8%
associate-/l*82.4%
*-commutative82.4%
Simplified82.4%
if -2.20000000000000016e56 < z < 3.90000000000000022e-135Initial program 94.7%
associate-+l-94.7%
*-commutative94.7%
associate-*r*96.4%
*-commutative96.4%
associate-+l-96.4%
*-commutative96.4%
associate-*r*94.7%
*-commutative94.7%
associate-*l*94.7%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in x around inf 82.2%
if 3.90000000000000022e-135 < z < 1.80000000000000016e-36Initial program 94.2%
associate-+l-94.2%
*-commutative94.2%
associate-*r*91.1%
*-commutative91.1%
associate-+l-91.1%
*-commutative91.1%
associate-*r*94.2%
*-commutative94.2%
associate-*l*94.2%
associate-*l*84.5%
Simplified84.5%
Taylor expanded in x around 0 84.0%
if 1.80000000000000016e-36 < z Initial program 57.1%
associate-+l-57.1%
*-commutative57.1%
associate-*r*55.5%
*-commutative55.5%
associate-+l-55.5%
*-commutative55.5%
associate-*r*57.1%
*-commutative57.1%
associate-*l*58.7%
associate-*l*65.2%
Simplified65.2%
associate-+l-65.2%
div-sub61.9%
*-commutative61.9%
associate-*l*61.9%
associate-*l*61.9%
fma-neg61.9%
Applied egg-rr61.9%
associate-*r*61.9%
times-frac66.6%
fma-udef66.6%
unsub-neg66.6%
*-commutative66.6%
*-commutative66.6%
associate-*l*66.6%
*-commutative66.6%
Simplified66.6%
Taylor expanded in z around inf 76.6%
associate-*l/76.4%
*-commutative76.4%
*-commutative76.4%
associate-*l*76.4%
Simplified76.4%
Final simplification81.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -9.5e+212)
(* -4.0 (* t (/ a c)))
(if (or (<= t -1.05e+184) (and (not (<= t -2.7e+104)) (<= t 3.2e-135)))
(/ (+ b (* 9.0 (* x y))) (* c z))
(* -4.0 (/ a (/ c t))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.5e+212) {
tmp = -4.0 * (t * (a / c));
} else if ((t <= -1.05e+184) || (!(t <= -2.7e+104) && (t <= 3.2e-135))) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-9.5d+212)) then
tmp = (-4.0d0) * (t * (a / c))
else if ((t <= (-1.05d+184)) .or. (.not. (t <= (-2.7d+104))) .and. (t <= 3.2d-135)) then
tmp = (b + (9.0d0 * (x * y))) / (c * z)
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.5e+212) {
tmp = -4.0 * (t * (a / c));
} else if ((t <= -1.05e+184) || (!(t <= -2.7e+104) && (t <= 3.2e-135))) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -9.5e+212: tmp = -4.0 * (t * (a / c)) elif (t <= -1.05e+184) or (not (t <= -2.7e+104) and (t <= 3.2e-135)): tmp = (b + (9.0 * (x * y))) / (c * z) else: tmp = -4.0 * (a / (c / t)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -9.5e+212) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif ((t <= -1.05e+184) || (!(t <= -2.7e+104) && (t <= 3.2e-135))) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -9.5e+212)
tmp = -4.0 * (t * (a / c));
elseif ((t <= -1.05e+184) || (~((t <= -2.7e+104)) && (t <= 3.2e-135)))
tmp = (b + (9.0 * (x * y))) / (c * z);
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -9.5e+212], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.05e+184], And[N[Not[LessEqual[t, -2.7e+104]], $MachinePrecision], LessEqual[t, 3.2e-135]]], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+212}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+184} \lor \neg \left(t \leq -2.7 \cdot 10^{+104}\right) \land t \leq 3.2 \cdot 10^{-135}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if t < -9.4999999999999993e212Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*93.2%
*-commutative93.2%
associate-+l-93.2%
*-commutative93.2%
associate-*r*73.3%
*-commutative73.3%
associate-*l*73.3%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in x around 0 85.5%
cancel-sign-sub-inv85.5%
metadata-eval85.5%
+-commutative85.5%
*-commutative85.5%
fma-def85.5%
associate-/l*58.6%
associate-/r/84.8%
fma-def84.8%
*-commutative84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in a around inf 78.9%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
if -9.4999999999999993e212 < t < -1.05e184 or -2.69999999999999985e104 < t < 3.2e-135Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*79.9%
*-commutative79.9%
associate-+l-79.9%
*-commutative79.9%
associate-*r*84.8%
*-commutative84.8%
associate-*l*85.5%
associate-*l*84.8%
Simplified84.8%
Taylor expanded in x around inf 72.5%
if -1.05e184 < t < -2.69999999999999985e104 or 3.2e-135 < t Initial program 69.0%
associate-+l-69.0%
*-commutative69.0%
associate-*r*76.9%
*-commutative76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*69.0%
*-commutative69.0%
associate-*l*69.0%
associate-*l*71.2%
Simplified71.2%
Taylor expanded in z around inf 46.8%
*-commutative46.8%
associate-/l*54.3%
Simplified54.3%
Final simplification65.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* a t))) c)))
(if (<= z -7.5e+58)
t_1
(if (<= z 3.9e-135)
(/ (+ b (* 9.0 (* x y))) (* c z))
(if (<= z 1.26e-29) (/ (- b (* 4.0 (* a (* z t)))) (* c z)) 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 = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
double tmp;
if (z <= -7.5e+58) {
tmp = t_1;
} else if (z <= 3.9e-135) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if (z <= 1.26e-29) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} 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 = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (a * t))) / c
if (z <= (-7.5d+58)) then
tmp = t_1
else if (z <= 3.9d-135) then
tmp = (b + (9.0d0 * (x * y))) / (c * z)
else if (z <= 1.26d-29) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c * z)
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 = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
double tmp;
if (z <= -7.5e+58) {
tmp = t_1;
} else if (z <= 3.9e-135) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if (z <= 1.26e-29) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} 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 = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c tmp = 0 if z <= -7.5e+58: tmp = t_1 elif z <= 3.9e-135: tmp = (b + (9.0 * (x * y))) / (c * z) elif z <= 1.26e-29: tmp = (b - (4.0 * (a * (z * t)))) / (c * z) 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(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(a * t))) / c) tmp = 0.0 if (z <= -7.5e+58) tmp = t_1; elseif (z <= 3.9e-135) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); elseif (z <= 1.26e-29) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c * z)); 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 = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
tmp = 0.0;
if (z <= -7.5e+58)
tmp = t_1;
elseif (z <= 3.9e-135)
tmp = (b + (9.0 * (x * y))) / (c * z);
elseif (z <= 1.26e-29)
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
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[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -7.5e+58], t$95$1, If[LessEqual[z, 3.9e-135], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.26e-29], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $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{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-135}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{-29}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.5000000000000001e58 or 1.25999999999999996e-29 < z Initial program 57.5%
associate-+l-57.5%
*-commutative57.5%
associate-*r*60.0%
*-commutative60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*57.5%
*-commutative57.5%
associate-*l*58.3%
associate-*l*67.7%
Simplified67.7%
associate-+l-67.7%
div-sub65.9%
*-commutative65.9%
associate-*l*65.9%
associate-*l*65.9%
fma-neg65.9%
Applied egg-rr65.9%
associate-*r*65.9%
times-frac64.1%
fma-udef64.1%
unsub-neg64.1%
*-commutative64.1%
*-commutative64.1%
associate-*l*64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in c around 0 89.0%
Taylor expanded in b around 0 76.1%
if -7.5000000000000001e58 < z < 3.90000000000000022e-135Initial program 94.7%
associate-+l-94.7%
*-commutative94.7%
associate-*r*96.4%
*-commutative96.4%
associate-+l-96.4%
*-commutative96.4%
associate-*r*94.7%
*-commutative94.7%
associate-*l*94.7%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in x around inf 82.2%
if 3.90000000000000022e-135 < z < 1.25999999999999996e-29Initial program 94.2%
associate-+l-94.2%
*-commutative94.2%
associate-*r*91.1%
*-commutative91.1%
associate-+l-91.1%
*-commutative91.1%
associate-*r*94.2%
*-commutative94.2%
associate-*l*94.2%
associate-*l*84.5%
Simplified84.5%
Taylor expanded in x around 0 84.0%
Final simplification79.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (- (* t (* a -4.0)) (/ x (/ z (* y -9.0)))) c)))
(if (<= z -1.2e+56)
t_1
(if (<= z 3.9e-135)
(/ (+ b (* 9.0 (* x y))) (* c z))
(if (<= z 1.35e-36) (/ (- b (* 4.0 (* a (* z t)))) (* c z)) 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)) - (x / (z / (y * -9.0)))) / c;
double tmp;
if (z <= -1.2e+56) {
tmp = t_1;
} else if (z <= 3.9e-135) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if (z <= 1.35e-36) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} 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))) - (x / (z / (y * (-9.0d0))))) / c
if (z <= (-1.2d+56)) then
tmp = t_1
else if (z <= 3.9d-135) then
tmp = (b + (9.0d0 * (x * y))) / (c * z)
else if (z <= 1.35d-36) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c * z)
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)) - (x / (z / (y * -9.0)))) / c;
double tmp;
if (z <= -1.2e+56) {
tmp = t_1;
} else if (z <= 3.9e-135) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if (z <= 1.35e-36) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} 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)) - (x / (z / (y * -9.0)))) / c tmp = 0 if z <= -1.2e+56: tmp = t_1 elif z <= 3.9e-135: tmp = (b + (9.0 * (x * y))) / (c * z) elif z <= 1.35e-36: tmp = (b - (4.0 * (a * (z * t)))) / (c * z) 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(x / Float64(z / Float64(y * -9.0)))) / c) tmp = 0.0 if (z <= -1.2e+56) tmp = t_1; elseif (z <= 3.9e-135) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); elseif (z <= 1.35e-36) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c * z)); 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)) - (x / (z / (y * -9.0)))) / c;
tmp = 0.0;
if (z <= -1.2e+56)
tmp = t_1;
elseif (z <= 3.9e-135)
tmp = (b + (9.0 * (x * y))) / (c * z);
elseif (z <= 1.35e-36)
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
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[(x / N[(z / N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.2e+56], t$95$1, If[LessEqual[z, 3.9e-135], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-36], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $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{x}{\frac{z}{y \cdot -9}}}{c}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-135}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-36}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.20000000000000007e56 or 1.35000000000000004e-36 < z Initial program 57.5%
associate-+l-57.5%
*-commutative57.5%
associate-*r*60.0%
*-commutative60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*57.5%
*-commutative57.5%
associate-*l*58.3%
associate-*l*67.7%
Simplified67.7%
associate-+l-67.7%
div-sub65.9%
*-commutative65.9%
associate-*l*65.9%
associate-*l*65.9%
fma-neg65.9%
Applied egg-rr65.9%
associate-*r*65.9%
times-frac64.1%
fma-udef64.1%
unsub-neg64.1%
*-commutative64.1%
*-commutative64.1%
associate-*l*64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in c around 0 89.0%
Taylor expanded in z around -inf 88.9%
mul-1-neg88.9%
unsub-neg88.9%
*-commutative88.9%
associate-*l*88.9%
neg-mul-188.9%
unsub-neg88.9%
*-commutative88.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in b around 0 76.1%
associate-*r*76.1%
associate-*r/76.0%
*-commutative76.0%
associate-*r*76.0%
associate-/l*79.5%
*-commutative79.5%
Simplified79.5%
if -1.20000000000000007e56 < z < 3.90000000000000022e-135Initial program 94.7%
associate-+l-94.7%
*-commutative94.7%
associate-*r*96.4%
*-commutative96.4%
associate-+l-96.4%
*-commutative96.4%
associate-*r*94.7%
*-commutative94.7%
associate-*l*94.7%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in x around inf 82.2%
if 3.90000000000000022e-135 < z < 1.35000000000000004e-36Initial program 94.2%
associate-+l-94.2%
*-commutative94.2%
associate-*r*91.1%
*-commutative91.1%
associate-+l-91.1%
*-commutative91.1%
associate-*r*94.2%
*-commutative94.2%
associate-*l*94.2%
associate-*l*84.5%
Simplified84.5%
Taylor expanded in x around 0 84.0%
Final simplification81.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.2e+63) (not (<= z 4e-71))) (/ (+ (* a (* t -4.0)) (/ (- b (* x (* y -9.0))) z)) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* 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 ((z <= -3.2e+63) || !(z <= 4e-71)) {
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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 ((z <= (-3.2d+63)) .or. (.not. (z <= 4d-71))) then
tmp = ((a * (t * (-4.0d0))) + ((b - (x * (y * (-9.0d0)))) / z)) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (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 ((z <= -3.2e+63) || !(z <= 4e-71)) {
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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 (z <= -3.2e+63) or not (z <= 4e-71): tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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 ((z <= -3.2e+63) || !(z <= 4e-71)) tmp = Float64(Float64(Float64(a * Float64(t * -4.0)) + Float64(Float64(b - Float64(x * Float64(y * -9.0))) / z)) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(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 ((z <= -3.2e+63) || ~((z <= 4e-71)))
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (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[Or[LessEqual[z, -3.2e+63], N[Not[LessEqual[z, 4e-71]], $MachinePrecision]], N[(N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(b - N[(x * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+63} \lor \neg \left(z \leq 4 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b - x \cdot \left(y \cdot -9\right)}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c \cdot z}\\
\end{array}
\end{array}
if z < -3.20000000000000011e63 or 3.9999999999999997e-71 < z Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*63.0%
*-commutative63.0%
associate-+l-63.0%
*-commutative63.0%
associate-*r*60.7%
*-commutative60.7%
associate-*l*61.5%
associate-*l*69.9%
Simplified69.9%
associate-+l-69.9%
div-sub68.3%
*-commutative68.3%
associate-*l*68.3%
associate-*l*68.3%
fma-neg68.3%
Applied egg-rr68.3%
associate-*r*68.3%
times-frac66.0%
fma-udef66.0%
unsub-neg66.0%
*-commutative66.0%
*-commutative66.0%
associate-*l*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in c around 0 89.3%
Taylor expanded in z around -inf 89.2%
mul-1-neg89.2%
unsub-neg89.2%
*-commutative89.2%
associate-*l*89.2%
neg-mul-189.2%
unsub-neg89.2%
*-commutative89.2%
associate-*l*89.2%
Simplified89.2%
if -3.20000000000000011e63 < z < 3.9999999999999997e-71Initial program 94.9%
Final simplification92.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -5e+68)
(/ (+ (* a (* t -4.0)) (/ (- b (* x (* y -9.0))) z)) c)
(if (<= z 9.6e+122)
(/ (- b (- (* (* a t) (* z 4.0)) (* x (* 9.0 y)))) (* c z))
(- (/ (* x (/ 9.0 (/ z y))) c) (* t (* 4.0 (/ a c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5e+68) {
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
} else if (z <= 9.6e+122) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (c * z);
} else {
tmp = ((x * (9.0 / (z / y))) / c) - (t * (4.0 * (a / c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-5d+68)) then
tmp = ((a * (t * (-4.0d0))) + ((b - (x * (y * (-9.0d0)))) / z)) / c
else if (z <= 9.6d+122) then
tmp = (b - (((a * t) * (z * 4.0d0)) - (x * (9.0d0 * y)))) / (c * z)
else
tmp = ((x * (9.0d0 / (z / y))) / c) - (t * (4.0d0 * (a / c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5e+68) {
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
} else if (z <= 9.6e+122) {
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (c * z);
} else {
tmp = ((x * (9.0 / (z / y))) / c) - (t * (4.0 * (a / c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5e+68: tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c elif z <= 9.6e+122: tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (c * z) else: tmp = ((x * (9.0 / (z / y))) / c) - (t * (4.0 * (a / c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5e+68) tmp = Float64(Float64(Float64(a * Float64(t * -4.0)) + Float64(Float64(b - Float64(x * Float64(y * -9.0))) / z)) / c); elseif (z <= 9.6e+122) tmp = Float64(Float64(b - Float64(Float64(Float64(a * t) * Float64(z * 4.0)) - Float64(x * Float64(9.0 * y)))) / Float64(c * z)); else tmp = Float64(Float64(Float64(x * Float64(9.0 / Float64(z / y))) / c) - Float64(t * Float64(4.0 * Float64(a / c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -5e+68)
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
elseif (z <= 9.6e+122)
tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (c * z);
else
tmp = ((x * (9.0 / (z / y))) / c) - (t * (4.0 * (a / c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5e+68], N[(N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(b - N[(x * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 9.6e+122], N[(N[(b - N[(N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[(9.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] - N[(t * N[(4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+68}:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b - x \cdot \left(y \cdot -9\right)}{z}}{c}\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+122}:\\
\;\;\;\;\frac{b - \left(\left(a \cdot t\right) \cdot \left(z \cdot 4\right) - x \cdot \left(9 \cdot y\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{9}{\frac{z}{y}}}{c} - t \cdot \left(4 \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -5.0000000000000004e68Initial program 57.3%
associate-+l-57.3%
*-commutative57.3%
associate-*r*63.1%
*-commutative63.1%
associate-+l-63.1%
*-commutative63.1%
associate-*r*57.3%
*-commutative57.3%
associate-*l*57.3%
associate-*l*68.7%
Simplified68.7%
associate-+l-68.7%
div-sub68.7%
*-commutative68.7%
associate-*l*68.7%
associate-*l*68.7%
fma-neg68.7%
Applied egg-rr68.7%
associate-*r*68.7%
times-frac59.1%
fma-udef59.1%
unsub-neg59.1%
*-commutative59.1%
*-commutative59.1%
associate-*l*59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in c around 0 92.4%
Taylor expanded in z around -inf 92.4%
mul-1-neg92.4%
unsub-neg92.4%
*-commutative92.4%
associate-*l*92.4%
neg-mul-192.4%
unsub-neg92.4%
*-commutative92.4%
associate-*l*92.4%
Simplified92.4%
if -5.0000000000000004e68 < z < 9.6000000000000007e122Initial program 92.7%
associate-+l-92.7%
*-commutative92.7%
associate-*r*93.8%
*-commutative93.8%
associate-+l-93.8%
*-commutative93.8%
associate-*r*92.7%
*-commutative92.7%
associate-*l*92.7%
associate-*l*89.9%
Simplified89.9%
if 9.6000000000000007e122 < z Initial program 34.7%
associate-+l-34.7%
*-commutative34.7%
associate-*r*32.0%
*-commutative32.0%
associate-+l-32.0%
*-commutative32.0%
associate-*r*34.7%
*-commutative34.7%
associate-*l*37.6%
associate-*l*46.6%
Simplified46.6%
associate-+l-46.6%
div-sub43.6%
*-commutative43.6%
associate-*l*43.6%
associate-*l*43.6%
fma-neg43.6%
Applied egg-rr43.6%
associate-*r*43.6%
times-frac49.2%
fma-udef49.2%
unsub-neg49.2%
*-commutative49.2%
*-commutative49.2%
associate-*l*49.2%
*-commutative49.2%
Simplified49.2%
associate-*r/54.8%
associate-/l*54.8%
Applied egg-rr54.8%
Taylor expanded in z around inf 82.8%
associate-*l/79.6%
*-commutative79.6%
*-commutative79.6%
associate-*l*79.6%
Simplified79.8%
Final simplification89.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= t -1.26e+37)
t_1
(if (<= t -4500000.0)
(/ b (* c z))
(if (or (<= t -3.6e-46) (not (<= t 1.45e-135))) t_1 (/ (/ b z) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (t <= -1.26e+37) {
tmp = t_1;
} else if (t <= -4500000.0) {
tmp = b / (c * z);
} else if ((t <= -3.6e-46) || !(t <= 1.45e-135)) {
tmp = t_1;
} else {
tmp = (b / z) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (t <= (-1.26d+37)) then
tmp = t_1
else if (t <= (-4500000.0d0)) then
tmp = b / (c * z)
else if ((t <= (-3.6d-46)) .or. (.not. (t <= 1.45d-135))) then
tmp = t_1
else
tmp = (b / z) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (t <= -1.26e+37) {
tmp = t_1;
} else if (t <= -4500000.0) {
tmp = b / (c * z);
} else if ((t <= -3.6e-46) || !(t <= 1.45e-135)) {
tmp = t_1;
} else {
tmp = (b / z) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if t <= -1.26e+37: tmp = t_1 elif t <= -4500000.0: tmp = b / (c * z) elif (t <= -3.6e-46) or not (t <= 1.45e-135): tmp = t_1 else: tmp = (b / z) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (t <= -1.26e+37) tmp = t_1; elseif (t <= -4500000.0) tmp = Float64(b / Float64(c * z)); elseif ((t <= -3.6e-46) || !(t <= 1.45e-135)) tmp = t_1; else tmp = Float64(Float64(b / 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 = -4.0 * (t * (a / c));
tmp = 0.0;
if (t <= -1.26e+37)
tmp = t_1;
elseif (t <= -4500000.0)
tmp = b / (c * z);
elseif ((t <= -3.6e-46) || ~((t <= 1.45e-135)))
tmp = t_1;
else
tmp = (b / z) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.26e+37], t$95$1, If[LessEqual[t, -4500000.0], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3.6e-46], N[Not[LessEqual[t, 1.45e-135]], $MachinePrecision]], t$95$1, N[(N[(b / z), $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 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;t \leq -1.26 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4500000:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-46} \lor \neg \left(t \leq 1.45 \cdot 10^{-135}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if t < -1.26e37 or -4.5e6 < t < -3.6e-46 or 1.4500000000000001e-135 < t Initial program 72.0%
associate-+l-72.0%
*-commutative72.0%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*72.0%
*-commutative72.0%
associate-*l*72.6%
associate-*l*75.3%
Simplified75.3%
Taylor expanded in x around 0 78.1%
cancel-sign-sub-inv78.1%
metadata-eval78.1%
+-commutative78.1%
*-commutative78.1%
fma-def78.1%
associate-/l*78.1%
associate-/r/84.1%
fma-def84.1%
*-commutative84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in a around inf 49.8%
associate-*l/57.2%
*-commutative57.2%
Simplified57.2%
if -1.26e37 < t < -4.5e6Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*67.6%
*-commutative67.6%
associate-+l-67.6%
*-commutative67.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*67.6%
Simplified67.6%
Taylor expanded in b around inf 4.9%
*-commutative4.9%
Simplified4.9%
if -3.6e-46 < t < 1.4500000000000001e-135Initial program 87.4%
associate-+l-87.4%
*-commutative87.4%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*87.4%
*-commutative87.4%
associate-*l*87.4%
associate-*l*87.4%
Simplified87.4%
associate-+l-87.4%
div-sub79.3%
*-commutative79.3%
associate-*l*79.3%
associate-*l*79.3%
fma-neg79.3%
Applied egg-rr79.3%
associate-*r*79.3%
times-frac75.4%
fma-udef75.4%
unsub-neg75.4%
*-commutative75.4%
*-commutative75.4%
associate-*l*75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in c around 0 86.3%
Taylor expanded in b around inf 47.6%
Final simplification52.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= t -1.2e+37)
t_1
(if (<= t -215000.0)
(/ b (* c z))
(if (<= t -3.8e-46)
(* -4.0 (/ (* a t) c))
(if (<= t 1.9e-135) (/ (/ b z) c) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (t <= -1.2e+37) {
tmp = t_1;
} else if (t <= -215000.0) {
tmp = b / (c * z);
} else if (t <= -3.8e-46) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= 1.9e-135) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (t <= (-1.2d+37)) then
tmp = t_1
else if (t <= (-215000.0d0)) then
tmp = b / (c * z)
else if (t <= (-3.8d-46)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (t <= 1.9d-135) then
tmp = (b / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (t <= -1.2e+37) {
tmp = t_1;
} else if (t <= -215000.0) {
tmp = b / (c * z);
} else if (t <= -3.8e-46) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= 1.9e-135) {
tmp = (b / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if t <= -1.2e+37: tmp = t_1 elif t <= -215000.0: tmp = b / (c * z) elif t <= -3.8e-46: tmp = -4.0 * ((a * t) / c) elif t <= 1.9e-135: tmp = (b / z) / c else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (t <= -1.2e+37) tmp = t_1; elseif (t <= -215000.0) tmp = Float64(b / Float64(c * z)); elseif (t <= -3.8e-46) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (t <= 1.9e-135) tmp = Float64(Float64(b / z) / c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (t * (a / c));
tmp = 0.0;
if (t <= -1.2e+37)
tmp = t_1;
elseif (t <= -215000.0)
tmp = b / (c * z);
elseif (t <= -3.8e-46)
tmp = -4.0 * ((a * t) / c);
elseif (t <= 1.9e-135)
tmp = (b / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e+37], t$95$1, If[LessEqual[t, -215000.0], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-46], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-135], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -215000:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-46}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-135}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.2e37 or 1.9000000000000001e-135 < t Initial program 70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*70.9%
*-commutative70.9%
associate-*l*71.6%
associate-*l*74.5%
Simplified74.5%
Taylor expanded in x around 0 76.8%
cancel-sign-sub-inv76.8%
metadata-eval76.8%
+-commutative76.8%
*-commutative76.8%
fma-def76.8%
associate-/l*76.7%
associate-/r/83.1%
fma-def83.1%
*-commutative83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in a around inf 50.0%
associate-*l/58.0%
*-commutative58.0%
Simplified58.0%
if -1.2e37 < t < -215000Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*67.6%
*-commutative67.6%
associate-+l-67.6%
*-commutative67.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*67.6%
Simplified67.6%
Taylor expanded in b around inf 4.9%
*-commutative4.9%
Simplified4.9%
if -215000 < t < -3.7999999999999997e-46Initial program 88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*88.8%
*-commutative88.8%
associate-+l-88.8%
*-commutative88.8%
associate-*r*88.9%
*-commutative88.9%
associate-*l*88.8%
associate-*l*88.7%
Simplified88.7%
Taylor expanded in z around inf 45.9%
if -3.7999999999999997e-46 < t < 1.9000000000000001e-135Initial program 87.4%
associate-+l-87.4%
*-commutative87.4%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*87.4%
*-commutative87.4%
associate-*l*87.4%
associate-*l*87.4%
Simplified87.4%
associate-+l-87.4%
div-sub79.3%
*-commutative79.3%
associate-*l*79.3%
associate-*l*79.3%
fma-neg79.3%
Applied egg-rr79.3%
associate-*r*79.3%
times-frac75.4%
fma-udef75.4%
unsub-neg75.4%
*-commutative75.4%
*-commutative75.4%
associate-*l*75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in c around 0 86.3%
Taylor expanded in b around inf 47.6%
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 (if (<= c 2.3e-41) (/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c) (+ (* -4.0 (* t (/ a c))) (/ (- (/ b c) (* -9.0 (* x (/ y 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 <= 2.3e-41) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (-4.0 * (t * (a / c))) + (((b / c) - (-9.0 * (x * (y / 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 <= 2.3d-41) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c
else
tmp = ((-4.0d0) * (t * (a / c))) + (((b / c) - ((-9.0d0) * (x * (y / 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 <= 2.3e-41) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (-4.0 * (t * (a / c))) + (((b / c) - (-9.0 * (x * (y / 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 <= 2.3e-41: tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c else: tmp = (-4.0 * (t * (a / c))) + (((b / c) - (-9.0 * (x * (y / 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 <= 2.3e-41) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c))) + Float64(Float64(Float64(b / c) - Float64(-9.0 * Float64(x * Float64(y / 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 <= 2.3e-41)
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c;
else
tmp = (-4.0 * (t * (a / c))) + (((b / c) - (-9.0 * (x * (y / 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, 2.3e-41], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / c), $MachinePrecision] - N[(-9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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}\;c \leq 2.3 \cdot 10^{-41}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right) + \frac{\frac{b}{c} - -9 \cdot \left(x \cdot \frac{y}{c}\right)}{z}\\
\end{array}
\end{array}
if c < 2.3000000000000001e-41Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*81.9%
*-commutative81.9%
associate-+l-81.9%
*-commutative81.9%
associate-*r*79.3%
*-commutative79.3%
associate-*l*79.8%
associate-*l*84.7%
Simplified84.7%
associate-+l-84.7%
div-sub77.4%
*-commutative77.4%
associate-*l*77.4%
associate-*l*77.4%
fma-neg77.4%
Applied egg-rr77.4%
associate-*r*77.4%
times-frac71.0%
fma-udef71.0%
unsub-neg71.0%
*-commutative71.0%
*-commutative71.0%
associate-*l*71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in c around 0 88.6%
if 2.3000000000000001e-41 < c Initial program 74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*73.7%
*-commutative73.7%
associate-+l-73.7%
*-commutative73.7%
associate-*r*74.8%
*-commutative74.8%
associate-*l*74.8%
associate-*l*68.9%
Simplified68.9%
Taylor expanded in x around 0 78.5%
cancel-sign-sub-inv78.5%
metadata-eval78.5%
+-commutative78.5%
*-commutative78.5%
fma-def78.5%
associate-/l*86.0%
associate-/r/85.6%
fma-def85.6%
*-commutative85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in z around -inf 82.8%
mul-1-neg82.8%
unsub-neg82.8%
associate-*l/89.9%
*-commutative89.9%
mul-1-neg89.9%
sub-neg89.9%
associate-*r/88.3%
Simplified88.3%
Final simplification88.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* 9.0 x) -2e-21)
(/ (+ b (* 9.0 (* x y))) (* c z))
(if (<= (* 9.0 x) 5e+94)
(/ (- (/ b z) (* a (* 4.0 t))) c)
(* 9.0 (* (/ y c) (/ x z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((9.0 * x) <= -2e-21) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if ((9.0 * x) <= 5e+94) {
tmp = ((b / z) - (a * (4.0 * t))) / c;
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((9.0d0 * x) <= (-2d-21)) then
tmp = (b + (9.0d0 * (x * y))) / (c * z)
else if ((9.0d0 * x) <= 5d+94) then
tmp = ((b / z) - (a * (4.0d0 * t))) / c
else
tmp = 9.0d0 * ((y / c) * (x / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((9.0 * x) <= -2e-21) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else if ((9.0 * x) <= 5e+94) {
tmp = ((b / z) - (a * (4.0 * t))) / c;
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (9.0 * x) <= -2e-21: tmp = (b + (9.0 * (x * y))) / (c * z) elif (9.0 * x) <= 5e+94: tmp = ((b / z) - (a * (4.0 * t))) / c else: tmp = 9.0 * ((y / c) * (x / z)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(9.0 * x) <= -2e-21) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); elseif (Float64(9.0 * x) <= 5e+94) tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c); else tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((9.0 * x) <= -2e-21)
tmp = (b + (9.0 * (x * y))) / (c * z);
elseif ((9.0 * x) <= 5e+94)
tmp = ((b / z) - (a * (4.0 * t))) / c;
else
tmp = 9.0 * ((y / c) * (x / z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(9.0 * x), $MachinePrecision], -2e-21], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(9.0 * x), $MachinePrecision], 5e+94], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;9 \cdot x \leq -2 \cdot 10^{-21}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\mathbf{elif}\;9 \cdot x \leq 5 \cdot 10^{+94}:\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if (*.f64 x 9) < -1.99999999999999982e-21Initial program 77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*77.2%
*-commutative77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*77.2%
*-commutative77.2%
associate-*l*78.8%
associate-*l*72.5%
Simplified72.5%
Taylor expanded in x around inf 64.5%
if -1.99999999999999982e-21 < (*.f64 x 9) < 5.0000000000000001e94Initial program 80.9%
associate-+l-80.9%
*-commutative80.9%
associate-*r*82.3%
*-commutative82.3%
associate-+l-82.3%
*-commutative82.3%
associate-*r*80.9%
*-commutative80.9%
associate-*l*80.9%
associate-*l*83.1%
Simplified83.1%
associate-+l-83.1%
div-sub75.8%
*-commutative75.8%
associate-*l*75.8%
associate-*l*75.8%
fma-neg75.8%
Applied egg-rr75.8%
associate-*r*75.8%
times-frac71.7%
fma-udef71.7%
unsub-neg71.7%
*-commutative71.7%
*-commutative71.7%
associate-*l*71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in c around 0 89.5%
Taylor expanded in x around 0 75.9%
associate-*r*75.9%
*-commutative75.9%
associate-*r*75.9%
Simplified75.9%
if 5.0000000000000001e94 < (*.f64 x 9) Initial program 71.7%
associate-+l-71.7%
*-commutative71.7%
associate-*r*75.0%
*-commutative75.0%
associate-+l-75.0%
*-commutative75.0%
associate-*r*71.7%
*-commutative71.7%
associate-*l*71.6%
associate-*l*79.9%
Simplified79.9%
Taylor expanded in x around 0 81.7%
cancel-sign-sub-inv81.7%
metadata-eval81.7%
+-commutative81.7%
*-commutative81.7%
fma-def81.7%
associate-/l*78.5%
associate-/r/79.4%
fma-def79.4%
*-commutative79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in x around inf 53.3%
*-commutative53.3%
times-frac58.6%
Simplified58.6%
Final simplification69.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 (<= t -1.02e+214)
(* -4.0 (* t (/ a c)))
(if (or (<= t -3.35e-46) (not (<= t 1.95e-135)))
(* -4.0 (/ a (/ c t)))
(/ (/ b z) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.02e+214) {
tmp = -4.0 * (t * (a / c));
} else if ((t <= -3.35e-46) || !(t <= 1.95e-135)) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / z) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.02d+214)) then
tmp = (-4.0d0) * (t * (a / c))
else if ((t <= (-3.35d-46)) .or. (.not. (t <= 1.95d-135))) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = (b / z) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.02e+214) {
tmp = -4.0 * (t * (a / c));
} else if ((t <= -3.35e-46) || !(t <= 1.95e-135)) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / z) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.02e+214: tmp = -4.0 * (t * (a / c)) elif (t <= -3.35e-46) or not (t <= 1.95e-135): tmp = -4.0 * (a / (c / t)) else: tmp = (b / z) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.02e+214) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif ((t <= -3.35e-46) || !(t <= 1.95e-135)) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(Float64(b / z) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.02e+214)
tmp = -4.0 * (t * (a / c));
elseif ((t <= -3.35e-46) || ~((t <= 1.95e-135)))
tmp = -4.0 * (a / (c / t));
else
tmp = (b / z) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.02e+214], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3.35e-46], N[Not[LessEqual[t, 1.95e-135]], $MachinePrecision]], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $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}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+214}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;t \leq -3.35 \cdot 10^{-46} \lor \neg \left(t \leq 1.95 \cdot 10^{-135}\right):\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if t < -1.02e214Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*93.2%
*-commutative93.2%
associate-+l-93.2%
*-commutative93.2%
associate-*r*73.3%
*-commutative73.3%
associate-*l*73.3%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in x around 0 85.5%
cancel-sign-sub-inv85.5%
metadata-eval85.5%
+-commutative85.5%
*-commutative85.5%
fma-def85.5%
associate-/l*58.6%
associate-/r/84.8%
fma-def84.8%
*-commutative84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in a around inf 78.9%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
if -1.02e214 < t < -3.35e-46 or 1.95000000000000011e-135 < t Initial program 71.7%
associate-+l-71.7%
*-commutative71.7%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
*-commutative78.0%
associate-*r*71.7%
*-commutative71.7%
associate-*l*72.4%
associate-*l*73.4%
Simplified73.4%
Taylor expanded in z around inf 46.6%
*-commutative46.6%
associate-/l*53.7%
Simplified53.7%
if -3.35e-46 < t < 1.95000000000000011e-135Initial program 87.4%
associate-+l-87.4%
*-commutative87.4%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*87.4%
*-commutative87.4%
associate-*l*87.4%
associate-*l*87.4%
Simplified87.4%
associate-+l-87.4%
div-sub79.3%
*-commutative79.3%
associate-*l*79.3%
associate-*l*79.3%
fma-neg79.3%
Applied egg-rr79.3%
associate-*r*79.3%
times-frac75.4%
fma-udef75.4%
unsub-neg75.4%
*-commutative75.4%
*-commutative75.4%
associate-*l*75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in c around 0 86.3%
Taylor expanded in b around inf 47.6%
Final simplification52.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= t 3.25e+63) (/ (+ (* a (* t -4.0)) (/ (- b (* x (* y -9.0))) z)) c) (* -4.0 (* t (/ a c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 3.25e+63) {
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 3.25d+63) then
tmp = ((a * (t * (-4.0d0))) + ((b - (x * (y * (-9.0d0)))) / z)) / c
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 3.25e+63) {
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= 3.25e+63: tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c else: tmp = -4.0 * (t * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 3.25e+63) tmp = Float64(Float64(Float64(a * Float64(t * -4.0)) + Float64(Float64(b - Float64(x * Float64(y * -9.0))) / z)) / c); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= 3.25e+63)
tmp = ((a * (t * -4.0)) + ((b - (x * (y * -9.0))) / z)) / c;
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 3.25e+63], N[(N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(b - N[(x * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.25 \cdot 10^{+63}:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b - x \cdot \left(y \cdot -9\right)}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if t < 3.24999999999999996e63Initial program 81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*80.3%
*-commutative80.3%
associate-+l-80.3%
*-commutative80.3%
associate-*r*81.2%
*-commutative81.2%
associate-*l*81.7%
associate-*l*82.7%
Simplified82.7%
associate-+l-82.7%
div-sub77.5%
*-commutative77.5%
associate-*l*77.4%
associate-*l*77.4%
fma-neg77.4%
Applied egg-rr77.4%
associate-*r*77.5%
times-frac72.4%
fma-udef72.4%
unsub-neg72.4%
*-commutative72.4%
*-commutative72.4%
associate-*l*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in c around 0 85.8%
Taylor expanded in z around -inf 87.2%
mul-1-neg87.2%
unsub-neg87.2%
*-commutative87.2%
associate-*l*87.2%
neg-mul-187.2%
unsub-neg87.2%
*-commutative87.2%
associate-*l*87.2%
Simplified87.2%
if 3.24999999999999996e63 < t Initial program 62.0%
associate-+l-62.0%
*-commutative62.0%
associate-*r*75.5%
*-commutative75.5%
associate-+l-75.5%
*-commutative75.5%
associate-*r*62.0%
*-commutative62.0%
associate-*l*62.0%
associate-*l*66.7%
Simplified66.7%
Taylor expanded in x around 0 68.7%
cancel-sign-sub-inv68.7%
metadata-eval68.7%
+-commutative68.7%
*-commutative68.7%
fma-def68.7%
associate-/l*70.7%
associate-/r/72.9%
fma-def72.9%
*-commutative72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in a around inf 54.3%
associate-*l/60.4%
*-commutative60.4%
Simplified60.4%
Final simplification82.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (c * z)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (c * z)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(c * z)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (c * z);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{c \cdot z}
\end{array}
Initial program 77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*79.5%
*-commutative79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*77.9%
*-commutative77.9%
associate-*l*78.3%
associate-*l*79.9%
Simplified79.9%
Taylor expanded in b around inf 32.3%
*-commutative32.3%
Simplified32.3%
Final simplification32.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 2024026
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))