
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c))) (t_2 (* 4.0 (/ (* a t) c))) (t_3 (* (* 9.0 x) y)))
(if (<= z -7.8e+59)
(- (+ (/ t_3 (* z c)) t_1) t_2)
(if (<= z 2.3e-11)
(/ (- b (- (* a (* t (* z 4.0))) t_3)) (* z c))
(* x (- (/ (- t_1 t_2) x) (* -9.0 (/ y (* 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 = b / (z * c);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (9.0 * x) * y;
double tmp;
if (z <= -7.8e+59) {
tmp = ((t_3 / (z * c)) + t_1) - t_2;
} else if (z <= 2.3e-11) {
tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c);
} else {
tmp = x * (((t_1 - t_2) / x) - (-9.0 * (y / (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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = b / (z * c)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (9.0d0 * x) * y
if (z <= (-7.8d+59)) then
tmp = ((t_3 / (z * c)) + t_1) - t_2
else if (z <= 2.3d-11) then
tmp = (b - ((a * (t * (z * 4.0d0))) - t_3)) / (z * c)
else
tmp = x * (((t_1 - t_2) / x) - ((-9.0d0) * (y / (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 = b / (z * c);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (9.0 * x) * y;
double tmp;
if (z <= -7.8e+59) {
tmp = ((t_3 / (z * c)) + t_1) - t_2;
} else if (z <= 2.3e-11) {
tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c);
} else {
tmp = x * (((t_1 - t_2) / x) - (-9.0 * (y / (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 = b / (z * c) t_2 = 4.0 * ((a * t) / c) t_3 = (9.0 * x) * y tmp = 0 if z <= -7.8e+59: tmp = ((t_3 / (z * c)) + t_1) - t_2 elif z <= 2.3e-11: tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c) else: tmp = x * (((t_1 - t_2) / x) - (-9.0 * (y / (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(b / Float64(z * c)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(9.0 * x) * y) tmp = 0.0 if (z <= -7.8e+59) tmp = Float64(Float64(Float64(t_3 / Float64(z * c)) + t_1) - t_2); elseif (z <= 2.3e-11) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - t_3)) / Float64(z * c)); else tmp = Float64(x * Float64(Float64(Float64(t_1 - t_2) / x) - Float64(-9.0 * Float64(y / Float64(z * c))))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b / (z * c);
t_2 = 4.0 * ((a * t) / c);
t_3 = (9.0 * x) * y;
tmp = 0.0;
if (z <= -7.8e+59)
tmp = ((t_3 / (z * c)) + t_1) - t_2;
elseif (z <= 2.3e-11)
tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c);
else
tmp = x * (((t_1 - t_2) / x) - (-9.0 * (y / (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[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(9.0 * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -7.8e+59], N[(N[(N[(t$95$3 / N[(z * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[z, 2.3e-11], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(t$95$1 - t$95$2), $MachinePrecision] / x), $MachinePrecision] - N[(-9.0 * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(9 \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+59}:\\
\;\;\;\;\left(\frac{t\_3}{z \cdot c} + t\_1\right) - t\_2\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-11}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - t\_3\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{t\_1 - t\_2}{x} - -9 \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if z < -7.80000000000000043e59Initial program 53.0%
associate-+l-53.0%
*-commutative53.0%
associate-*r*49.3%
*-commutative49.3%
associate-+l-49.3%
associate-*l*49.3%
associate-*l*58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in x around 0 83.7%
associate-*r/83.7%
associate-*r*83.7%
Applied egg-rr83.7%
if -7.80000000000000043e59 < z < 2.30000000000000014e-11Initial program 96.6%
if 2.30000000000000014e-11 < z Initial program 51.6%
associate-+l-51.6%
*-commutative51.6%
associate-*r*58.1%
*-commutative58.1%
associate-+l-58.1%
associate-*l*58.1%
associate-*l*61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in x around -inf 72.5%
Final simplification88.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -3.8e-83)
(* a (/ (* t -4.0) c))
(if (<= z -5.5e-184)
(/ b (* z c))
(if (<= z -3.2e-301)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 6.4e-229)
(/ (/ b c) z)
(if (<= z 4e-94)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= z 3.4e-19)
(* b (/ 1.0 (* z c)))
(if (<= z 2e+97)
(* 9.0 (* y (/ (/ x c) z)))
(* (/ (* a t) c) -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.8e-83) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -5.5e-184) {
tmp = b / (z * c);
} else if (z <= -3.2e-301) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 6.4e-229) {
tmp = (b / c) / z;
} else if (z <= 4e-94) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 3.4e-19) {
tmp = b * (1.0 / (z * c));
} else if (z <= 2e+97) {
tmp = 9.0 * (y * ((x / c) / z));
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-3.8d-83)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= (-5.5d-184)) then
tmp = b / (z * c)
else if (z <= (-3.2d-301)) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 6.4d-229) then
tmp = (b / c) / z
else if (z <= 4d-94) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (z <= 3.4d-19) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 2d+97) then
tmp = 9.0d0 * (y * ((x / c) / z))
else
tmp = ((a * t) / c) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.8e-83) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -5.5e-184) {
tmp = b / (z * c);
} else if (z <= -3.2e-301) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 6.4e-229) {
tmp = (b / c) / z;
} else if (z <= 4e-94) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 3.4e-19) {
tmp = b * (1.0 / (z * c));
} else if (z <= 2e+97) {
tmp = 9.0 * (y * ((x / c) / z));
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -3.8e-83: tmp = a * ((t * -4.0) / c) elif z <= -5.5e-184: tmp = b / (z * c) elif z <= -3.2e-301: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 6.4e-229: tmp = (b / c) / z elif z <= 4e-94: tmp = 9.0 * (x * ((y / c) / z)) elif z <= 3.4e-19: tmp = b * (1.0 / (z * c)) elif z <= 2e+97: tmp = 9.0 * (y * ((x / c) / z)) else: tmp = ((a * t) / c) * -4.0 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -3.8e-83) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= -5.5e-184) tmp = Float64(b / Float64(z * c)); elseif (z <= -3.2e-301) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 6.4e-229) tmp = Float64(Float64(b / c) / z); elseif (z <= 4e-94) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (z <= 3.4e-19) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 2e+97) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); else tmp = Float64(Float64(Float64(a * t) / c) * -4.0); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -3.8e-83)
tmp = a * ((t * -4.0) / c);
elseif (z <= -5.5e-184)
tmp = b / (z * c);
elseif (z <= -3.2e-301)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 6.4e-229)
tmp = (b / c) / z;
elseif (z <= 4e-94)
tmp = 9.0 * (x * ((y / c) / z));
elseif (z <= 3.4e-19)
tmp = b * (1.0 / (z * c));
elseif (z <= 2e+97)
tmp = 9.0 * (y * ((x / c) / z));
else
tmp = ((a * t) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.8e-83], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.5e-184], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-301], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-229], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4e-94], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-19], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+97], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $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.8 \cdot 10^{-83}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-184}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-301}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-229}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-94}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-19}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+97}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\end{array}
\end{array}
if z < -3.79999999999999977e-83Initial program 61.5%
associate-+l-61.5%
*-commutative61.5%
associate-*r*58.8%
*-commutative58.8%
associate-+l-58.8%
associate-*l*58.9%
associate-*l*65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
associate-/l*63.0%
associate-*r*63.1%
associate-*l/63.1%
Simplified63.1%
if -3.79999999999999977e-83 < z < -5.4999999999999999e-184Initial program 95.7%
associate-+l-95.7%
*-commutative95.7%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.6%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in b around inf 59.4%
*-commutative59.4%
Simplified59.4%
if -5.4999999999999999e-184 < z < -3.1999999999999999e-301Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
associate-*l*99.8%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in x around inf 69.1%
if -3.1999999999999999e-301 < z < 6.4000000000000003e-229Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
associate-*l*96.8%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 79.3%
associate-/r*79.4%
Simplified79.4%
if 6.4000000000000003e-229 < z < 3.9999999999999998e-94Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.6%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in x around inf 63.1%
associate-/l*66.7%
associate-/r*62.5%
Simplified62.5%
if 3.9999999999999998e-94 < z < 3.4000000000000002e-19Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around inf 67.6%
associate-/r*62.3%
Simplified62.3%
associate-/r*67.6%
div-inv67.7%
Applied egg-rr67.7%
if 3.4000000000000002e-19 < z < 2.0000000000000001e97Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*79.5%
*-commutative79.5%
associate-+l-79.5%
associate-*l*79.5%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 37.7%
associate-/r*37.7%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in x around 0 37.7%
*-commutative37.7%
associate-/l*42.7%
associate-/r*37.5%
Simplified37.5%
if 2.0000000000000001e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in z around inf 73.6%
*-commutative73.6%
Simplified73.6%
Final simplification64.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 (<= z -5.4e-78)
(* a (/ (* t -4.0) c))
(if (<= z -2.2e-184)
(* b (* (/ 1.0 z) (/ 1.0 c)))
(if (<= z -3.1e-301)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 1.3e-231)
(/ (/ b c) z)
(if (<= z 1.25e-95)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= z 2.2e-21)
(* b (/ 1.0 (* z c)))
(if (<= z 2.5e+97)
(* 9.0 (* y (/ (/ x c) z)))
(* (/ (* a t) c) -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.4e-78) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -2.2e-184) {
tmp = b * ((1.0 / z) * (1.0 / c));
} else if (z <= -3.1e-301) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 1.3e-231) {
tmp = (b / c) / z;
} else if (z <= 1.25e-95) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 2.2e-21) {
tmp = b * (1.0 / (z * c));
} else if (z <= 2.5e+97) {
tmp = 9.0 * (y * ((x / c) / z));
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-5.4d-78)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= (-2.2d-184)) then
tmp = b * ((1.0d0 / z) * (1.0d0 / c))
else if (z <= (-3.1d-301)) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 1.3d-231) then
tmp = (b / c) / z
else if (z <= 1.25d-95) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (z <= 2.2d-21) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 2.5d+97) then
tmp = 9.0d0 * (y * ((x / c) / z))
else
tmp = ((a * t) / c) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.4e-78) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -2.2e-184) {
tmp = b * ((1.0 / z) * (1.0 / c));
} else if (z <= -3.1e-301) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 1.3e-231) {
tmp = (b / c) / z;
} else if (z <= 1.25e-95) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 2.2e-21) {
tmp = b * (1.0 / (z * c));
} else if (z <= 2.5e+97) {
tmp = 9.0 * (y * ((x / c) / z));
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5.4e-78: tmp = a * ((t * -4.0) / c) elif z <= -2.2e-184: tmp = b * ((1.0 / z) * (1.0 / c)) elif z <= -3.1e-301: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 1.3e-231: tmp = (b / c) / z elif z <= 1.25e-95: tmp = 9.0 * (x * ((y / c) / z)) elif z <= 2.2e-21: tmp = b * (1.0 / (z * c)) elif z <= 2.5e+97: tmp = 9.0 * (y * ((x / c) / z)) else: tmp = ((a * t) / c) * -4.0 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5.4e-78) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= -2.2e-184) tmp = Float64(b * Float64(Float64(1.0 / z) * Float64(1.0 / c))); elseif (z <= -3.1e-301) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 1.3e-231) tmp = Float64(Float64(b / c) / z); elseif (z <= 1.25e-95) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (z <= 2.2e-21) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 2.5e+97) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); else tmp = Float64(Float64(Float64(a * t) / c) * -4.0); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -5.4e-78)
tmp = a * ((t * -4.0) / c);
elseif (z <= -2.2e-184)
tmp = b * ((1.0 / z) * (1.0 / c));
elseif (z <= -3.1e-301)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 1.3e-231)
tmp = (b / c) / z;
elseif (z <= 1.25e-95)
tmp = 9.0 * (x * ((y / c) / z));
elseif (z <= 2.2e-21)
tmp = b * (1.0 / (z * c));
elseif (z <= 2.5e+97)
tmp = 9.0 * (y * ((x / c) / z));
else
tmp = ((a * t) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5.4e-78], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e-184], N[(b * N[(N[(1.0 / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e-301], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-231], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.25e-95], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-21], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+97], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $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.4 \cdot 10^{-78}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-184}:\\
\;\;\;\;b \cdot \left(\frac{1}{z} \cdot \frac{1}{c}\right)\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-301}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-231}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-95}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-21}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+97}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\end{array}
\end{array}
if z < -5.39999999999999987e-78Initial program 61.5%
associate-+l-61.5%
*-commutative61.5%
associate-*r*58.8%
*-commutative58.8%
associate-+l-58.8%
associate-*l*58.9%
associate-*l*65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
associate-/l*63.0%
associate-*r*63.1%
associate-*l/63.1%
Simplified63.1%
if -5.39999999999999987e-78 < z < -2.19999999999999992e-184Initial program 95.7%
associate-+l-95.7%
*-commutative95.7%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.6%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in b around inf 59.4%
associate-/r*55.4%
Simplified55.4%
associate-/r*59.4%
div-inv59.4%
Applied egg-rr59.4%
inv-pow59.4%
*-commutative59.4%
unpow-prod-down59.5%
inv-pow59.5%
inv-pow59.5%
Applied egg-rr59.5%
if -2.19999999999999992e-184 < z < -3.10000000000000014e-301Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
associate-*l*99.8%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in x around inf 69.1%
if -3.10000000000000014e-301 < z < 1.30000000000000001e-231Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
associate-*l*96.8%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 79.3%
associate-/r*79.4%
Simplified79.4%
if 1.30000000000000001e-231 < z < 1.2499999999999999e-95Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.6%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in x around inf 63.1%
associate-/l*66.7%
associate-/r*62.5%
Simplified62.5%
if 1.2499999999999999e-95 < z < 2.2000000000000001e-21Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around inf 67.6%
associate-/r*62.3%
Simplified62.3%
associate-/r*67.6%
div-inv67.7%
Applied egg-rr67.7%
if 2.2000000000000001e-21 < z < 2.49999999999999999e97Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*79.5%
*-commutative79.5%
associate-+l-79.5%
associate-*l*79.5%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 37.7%
associate-/r*37.7%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in x around 0 37.7%
*-commutative37.7%
associate-/l*42.7%
associate-/r*37.5%
Simplified37.5%
if 2.49999999999999999e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in z around inf 73.6%
*-commutative73.6%
Simplified73.6%
Final simplification64.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 (<= z -3.8e-81)
(* a (/ (* t -4.0) c))
(if (<= z -1.02e-184)
(* b (* (/ 1.0 z) (/ 1.0 c)))
(if (<= z -7.1e-301)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 2.9e-232)
(/ (/ b c) z)
(if (<= z 1.65e-97)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= z 4.5e-17)
(* b (/ 1.0 (* z c)))
(if (<= z 1.6e+97)
(/ 9.0 (/ (* c (/ z y)) x))
(* (/ (* a t) c) -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.8e-81) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -1.02e-184) {
tmp = b * ((1.0 / z) * (1.0 / c));
} else if (z <= -7.1e-301) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 2.9e-232) {
tmp = (b / c) / z;
} else if (z <= 1.65e-97) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 4.5e-17) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.6e+97) {
tmp = 9.0 / ((c * (z / y)) / x);
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-3.8d-81)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= (-1.02d-184)) then
tmp = b * ((1.0d0 / z) * (1.0d0 / c))
else if (z <= (-7.1d-301)) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 2.9d-232) then
tmp = (b / c) / z
else if (z <= 1.65d-97) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (z <= 4.5d-17) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 1.6d+97) then
tmp = 9.0d0 / ((c * (z / y)) / x)
else
tmp = ((a * t) / c) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -3.8e-81) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -1.02e-184) {
tmp = b * ((1.0 / z) * (1.0 / c));
} else if (z <= -7.1e-301) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 2.9e-232) {
tmp = (b / c) / z;
} else if (z <= 1.65e-97) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 4.5e-17) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.6e+97) {
tmp = 9.0 / ((c * (z / y)) / x);
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -3.8e-81: tmp = a * ((t * -4.0) / c) elif z <= -1.02e-184: tmp = b * ((1.0 / z) * (1.0 / c)) elif z <= -7.1e-301: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 2.9e-232: tmp = (b / c) / z elif z <= 1.65e-97: tmp = 9.0 * (x * ((y / c) / z)) elif z <= 4.5e-17: tmp = b * (1.0 / (z * c)) elif z <= 1.6e+97: tmp = 9.0 / ((c * (z / y)) / x) else: tmp = ((a * t) / c) * -4.0 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -3.8e-81) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= -1.02e-184) tmp = Float64(b * Float64(Float64(1.0 / z) * Float64(1.0 / c))); elseif (z <= -7.1e-301) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 2.9e-232) tmp = Float64(Float64(b / c) / z); elseif (z <= 1.65e-97) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (z <= 4.5e-17) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 1.6e+97) tmp = Float64(9.0 / Float64(Float64(c * Float64(z / y)) / x)); else tmp = Float64(Float64(Float64(a * t) / c) * -4.0); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -3.8e-81)
tmp = a * ((t * -4.0) / c);
elseif (z <= -1.02e-184)
tmp = b * ((1.0 / z) * (1.0 / c));
elseif (z <= -7.1e-301)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 2.9e-232)
tmp = (b / c) / z;
elseif (z <= 1.65e-97)
tmp = 9.0 * (x * ((y / c) / z));
elseif (z <= 4.5e-17)
tmp = b * (1.0 / (z * c));
elseif (z <= 1.6e+97)
tmp = 9.0 / ((c * (z / y)) / x);
else
tmp = ((a * t) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -3.8e-81], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.02e-184], N[(b * N[(N[(1.0 / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.1e-301], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-232], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.65e-97], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-17], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+97], N[(9.0 / N[(N[(c * N[(z / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $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.8 \cdot 10^{-81}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-184}:\\
\;\;\;\;b \cdot \left(\frac{1}{z} \cdot \frac{1}{c}\right)\\
\mathbf{elif}\;z \leq -7.1 \cdot 10^{-301}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-232}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-97}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-17}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+97}:\\
\;\;\;\;\frac{9}{\frac{c \cdot \frac{z}{y}}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\end{array}
\end{array}
if z < -3.7999999999999999e-81Initial program 61.5%
associate-+l-61.5%
*-commutative61.5%
associate-*r*58.8%
*-commutative58.8%
associate-+l-58.8%
associate-*l*58.9%
associate-*l*65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
associate-/l*63.0%
associate-*r*63.1%
associate-*l/63.1%
Simplified63.1%
if -3.7999999999999999e-81 < z < -1.0200000000000001e-184Initial program 95.7%
associate-+l-95.7%
*-commutative95.7%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.6%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in b around inf 59.4%
associate-/r*55.4%
Simplified55.4%
associate-/r*59.4%
div-inv59.4%
Applied egg-rr59.4%
inv-pow59.4%
*-commutative59.4%
unpow-prod-down59.5%
inv-pow59.5%
inv-pow59.5%
Applied egg-rr59.5%
if -1.0200000000000001e-184 < z < -7.1e-301Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
associate-*l*99.8%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in x around inf 69.1%
if -7.1e-301 < z < 2.8999999999999999e-232Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
associate-*l*96.8%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 79.3%
associate-/r*79.4%
Simplified79.4%
if 2.8999999999999999e-232 < z < 1.6500000000000001e-97Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.6%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in x around inf 63.1%
associate-/l*66.7%
associate-/r*62.5%
Simplified62.5%
if 1.6500000000000001e-97 < z < 4.49999999999999978e-17Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 64.3%
associate-/r*59.2%
Simplified59.2%
associate-/r*64.3%
div-inv64.4%
Applied egg-rr64.4%
if 4.49999999999999978e-17 < z < 1.60000000000000008e97Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*78.4%
*-commutative78.4%
associate-+l-78.4%
associate-*l*78.4%
associate-*l*78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in x around inf 39.6%
clear-num39.5%
inv-pow39.5%
Applied egg-rr39.5%
unpow-139.5%
times-frac41.4%
Simplified41.4%
un-div-inv41.5%
associate-*l/50.0%
Applied egg-rr50.0%
if 1.60000000000000008e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in z around inf 73.6%
*-commutative73.6%
Simplified73.6%
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
(if (<= z -1.76e-81)
(* a (/ (* t -4.0) c))
(if (<= z -3.1e-184)
(* b (* (/ 1.0 z) (/ 1.0 c)))
(if (<= z -3.1e-301)
(/ (* x (* 9.0 y)) (* z c))
(if (<= z 1.8e-229)
(/ (/ b c) z)
(if (<= z 7e-107)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= z 2.25e-17)
(* b (/ 1.0 (* z c)))
(if (<= z 1.65e+97)
(/ 9.0 (/ (* c (/ z y)) x))
(* (/ (* a t) c) -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.76e-81) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -3.1e-184) {
tmp = b * ((1.0 / z) * (1.0 / c));
} else if (z <= -3.1e-301) {
tmp = (x * (9.0 * y)) / (z * c);
} else if (z <= 1.8e-229) {
tmp = (b / c) / z;
} else if (z <= 7e-107) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 2.25e-17) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.65e+97) {
tmp = 9.0 / ((c * (z / y)) / x);
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-1.76d-81)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= (-3.1d-184)) then
tmp = b * ((1.0d0 / z) * (1.0d0 / c))
else if (z <= (-3.1d-301)) then
tmp = (x * (9.0d0 * y)) / (z * c)
else if (z <= 1.8d-229) then
tmp = (b / c) / z
else if (z <= 7d-107) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (z <= 2.25d-17) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 1.65d+97) then
tmp = 9.0d0 / ((c * (z / y)) / x)
else
tmp = ((a * t) / c) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.76e-81) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -3.1e-184) {
tmp = b * ((1.0 / z) * (1.0 / c));
} else if (z <= -3.1e-301) {
tmp = (x * (9.0 * y)) / (z * c);
} else if (z <= 1.8e-229) {
tmp = (b / c) / z;
} else if (z <= 7e-107) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 2.25e-17) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.65e+97) {
tmp = 9.0 / ((c * (z / y)) / x);
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.76e-81: tmp = a * ((t * -4.0) / c) elif z <= -3.1e-184: tmp = b * ((1.0 / z) * (1.0 / c)) elif z <= -3.1e-301: tmp = (x * (9.0 * y)) / (z * c) elif z <= 1.8e-229: tmp = (b / c) / z elif z <= 7e-107: tmp = 9.0 * (x * ((y / c) / z)) elif z <= 2.25e-17: tmp = b * (1.0 / (z * c)) elif z <= 1.65e+97: tmp = 9.0 / ((c * (z / y)) / x) else: tmp = ((a * t) / c) * -4.0 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.76e-81) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= -3.1e-184) tmp = Float64(b * Float64(Float64(1.0 / z) * Float64(1.0 / c))); elseif (z <= -3.1e-301) tmp = Float64(Float64(x * Float64(9.0 * y)) / Float64(z * c)); elseif (z <= 1.8e-229) tmp = Float64(Float64(b / c) / z); elseif (z <= 7e-107) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (z <= 2.25e-17) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 1.65e+97) tmp = Float64(9.0 / Float64(Float64(c * Float64(z / y)) / x)); else tmp = Float64(Float64(Float64(a * t) / c) * -4.0); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.76e-81)
tmp = a * ((t * -4.0) / c);
elseif (z <= -3.1e-184)
tmp = b * ((1.0 / z) * (1.0 / c));
elseif (z <= -3.1e-301)
tmp = (x * (9.0 * y)) / (z * c);
elseif (z <= 1.8e-229)
tmp = (b / c) / z;
elseif (z <= 7e-107)
tmp = 9.0 * (x * ((y / c) / z));
elseif (z <= 2.25e-17)
tmp = b * (1.0 / (z * c));
elseif (z <= 1.65e+97)
tmp = 9.0 / ((c * (z / y)) / x);
else
tmp = ((a * t) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.76e-81], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e-184], N[(b * N[(N[(1.0 / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e-301], N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-229], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7e-107], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e-17], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+97], N[(9.0 / N[(N[(c * N[(z / y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $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 -1.76 \cdot 10^{-81}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-184}:\\
\;\;\;\;b \cdot \left(\frac{1}{z} \cdot \frac{1}{c}\right)\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-301}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-229}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-107}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-17}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+97}:\\
\;\;\;\;\frac{9}{\frac{c \cdot \frac{z}{y}}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\end{array}
\end{array}
if z < -1.75999999999999989e-81Initial program 61.5%
associate-+l-61.5%
*-commutative61.5%
associate-*r*58.8%
*-commutative58.8%
associate-+l-58.8%
associate-*l*58.9%
associate-*l*65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
associate-/l*63.0%
associate-*r*63.1%
associate-*l/63.1%
Simplified63.1%
if -1.75999999999999989e-81 < z < -3.1000000000000002e-184Initial program 95.7%
associate-+l-95.7%
*-commutative95.7%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.6%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in b around inf 59.4%
associate-/r*55.4%
Simplified55.4%
associate-/r*59.4%
div-inv59.4%
Applied egg-rr59.4%
inv-pow59.4%
*-commutative59.4%
unpow-prod-down59.5%
inv-pow59.5%
inv-pow59.5%
Applied egg-rr59.5%
if -3.1000000000000002e-184 < z < -3.10000000000000014e-301Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
associate-*l*99.8%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in b around 0 74.9%
Taylor expanded in x around inf 69.1%
associate-*r*69.0%
*-commutative69.0%
associate-*r*69.1%
Simplified69.1%
if -3.10000000000000014e-301 < z < 1.80000000000000001e-229Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
associate-*l*96.8%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 79.3%
associate-/r*79.4%
Simplified79.4%
if 1.80000000000000001e-229 < z < 6.99999999999999971e-107Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.6%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in x around inf 63.1%
associate-/l*66.7%
associate-/r*62.5%
Simplified62.5%
if 6.99999999999999971e-107 < z < 2.24999999999999989e-17Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 64.3%
associate-/r*59.2%
Simplified59.2%
associate-/r*64.3%
div-inv64.4%
Applied egg-rr64.4%
if 2.24999999999999989e-17 < z < 1.6500000000000001e97Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*78.4%
*-commutative78.4%
associate-+l-78.4%
associate-*l*78.4%
associate-*l*78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in x around inf 39.6%
clear-num39.5%
inv-pow39.5%
Applied egg-rr39.5%
unpow-139.5%
times-frac41.4%
Simplified41.4%
un-div-inv41.5%
associate-*l/50.0%
Applied egg-rr50.0%
if 1.6500000000000001e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in z around inf 73.6%
*-commutative73.6%
Simplified73.6%
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 (* y (/ (/ x c) z)))))
(if (<= z -1.9e-33)
(* a (/ (* t -4.0) c))
(if (<= z -3.7e-301)
t_1
(if (<= z 4.5e-232)
(/ (/ b c) z)
(if (<= z 1.2e-102)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= z 7.6e-22)
(* b (/ 1.0 (* z c)))
(if (<= z 1.65e+97) t_1 (* (/ (* a t) c) -4.0)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (y * ((x / c) / z));
double tmp;
if (z <= -1.9e-33) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -3.7e-301) {
tmp = t_1;
} else if (z <= 4.5e-232) {
tmp = (b / c) / z;
} else if (z <= 1.2e-102) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 7.6e-22) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.65e+97) {
tmp = t_1;
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (y * ((x / c) / z))
if (z <= (-1.9d-33)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= (-3.7d-301)) then
tmp = t_1
else if (z <= 4.5d-232) then
tmp = (b / c) / z
else if (z <= 1.2d-102) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (z <= 7.6d-22) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 1.65d+97) then
tmp = t_1
else
tmp = ((a * t) / c) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (y * ((x / c) / z));
double tmp;
if (z <= -1.9e-33) {
tmp = a * ((t * -4.0) / c);
} else if (z <= -3.7e-301) {
tmp = t_1;
} else if (z <= 4.5e-232) {
tmp = (b / c) / z;
} else if (z <= 1.2e-102) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 7.6e-22) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.65e+97) {
tmp = t_1;
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (y * ((x / c) / z)) tmp = 0 if z <= -1.9e-33: tmp = a * ((t * -4.0) / c) elif z <= -3.7e-301: tmp = t_1 elif z <= 4.5e-232: tmp = (b / c) / z elif z <= 1.2e-102: tmp = 9.0 * (x * ((y / c) / z)) elif z <= 7.6e-22: tmp = b * (1.0 / (z * c)) elif z <= 1.65e+97: tmp = t_1 else: tmp = ((a * t) / c) * -4.0 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))) tmp = 0.0 if (z <= -1.9e-33) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= -3.7e-301) tmp = t_1; elseif (z <= 4.5e-232) tmp = Float64(Float64(b / c) / z); elseif (z <= 1.2e-102) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (z <= 7.6e-22) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 1.65e+97) tmp = t_1; else tmp = Float64(Float64(Float64(a * t) / c) * -4.0); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (y * ((x / c) / z));
tmp = 0.0;
if (z <= -1.9e-33)
tmp = a * ((t * -4.0) / c);
elseif (z <= -3.7e-301)
tmp = t_1;
elseif (z <= 4.5e-232)
tmp = (b / c) / z;
elseif (z <= 1.2e-102)
tmp = 9.0 * (x * ((y / c) / z));
elseif (z <= 7.6e-22)
tmp = b * (1.0 / (z * c));
elseif (z <= 1.65e+97)
tmp = t_1;
else
tmp = ((a * t) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e-33], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.7e-301], t$95$1, If[LessEqual[z, 4.5e-232], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.2e-102], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-22], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+97], t$95$1, N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{-33}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-232}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-102}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-22}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\end{array}
\end{array}
if z < -1.89999999999999997e-33Initial program 59.4%
associate-+l-59.4%
*-commutative59.4%
associate-*r*56.5%
*-commutative56.5%
associate-+l-56.5%
associate-*l*56.5%
associate-*l*63.8%
*-commutative63.8%
Simplified63.8%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*64.1%
associate-*r*64.2%
associate-*l/64.2%
Simplified64.2%
if -1.89999999999999997e-33 < z < -3.6999999999999998e-301 or 7.60000000000000046e-22 < z < 1.6500000000000001e97Initial program 92.7%
associate-+l-92.7%
*-commutative92.7%
associate-*r*92.7%
*-commutative92.7%
associate-+l-92.7%
associate-*l*92.7%
associate-*l*87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in x around inf 51.1%
associate-/r*46.5%
associate-/l*51.1%
Simplified51.1%
Taylor expanded in x around 0 51.1%
*-commutative51.1%
associate-/l*52.2%
associate-/r*48.6%
Simplified48.6%
if -3.6999999999999998e-301 < z < 4.49999999999999967e-232Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
associate-*l*96.8%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 79.3%
associate-/r*79.4%
Simplified79.4%
if 4.49999999999999967e-232 < z < 1.2e-102Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.6%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in x around inf 63.1%
associate-/l*66.7%
associate-/r*62.5%
Simplified62.5%
if 1.2e-102 < z < 7.60000000000000046e-22Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around inf 67.6%
associate-/r*62.3%
Simplified62.3%
associate-/r*67.6%
div-inv67.7%
Applied egg-rr67.7%
if 1.6500000000000001e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in z around inf 73.6%
*-commutative73.6%
Simplified73.6%
Final simplification62.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 (* a (/ (* t -4.0) c))) (t_2 (* 9.0 (* x (/ (/ y c) z)))))
(if (<= z -9.5e-79)
t_1
(if (<= z -9.4e-194)
(/ b (* z c))
(if (<= z -3.5e-301)
t_2
(if (<= z 2.9e-232)
(/ (/ b c) z)
(if (<= z 6.3e-114)
t_2
(if (<= z 8.6e-22) (* b (/ 1.0 (* z c))) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double t_2 = 9.0 * (x * ((y / c) / z));
double tmp;
if (z <= -9.5e-79) {
tmp = t_1;
} else if (z <= -9.4e-194) {
tmp = b / (z * c);
} else if (z <= -3.5e-301) {
tmp = t_2;
} else if (z <= 2.9e-232) {
tmp = (b / c) / z;
} else if (z <= 6.3e-114) {
tmp = t_2;
} else if (z <= 8.6e-22) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
t_2 = 9.0d0 * (x * ((y / c) / z))
if (z <= (-9.5d-79)) then
tmp = t_1
else if (z <= (-9.4d-194)) then
tmp = b / (z * c)
else if (z <= (-3.5d-301)) then
tmp = t_2
else if (z <= 2.9d-232) then
tmp = (b / c) / z
else if (z <= 6.3d-114) then
tmp = t_2
else if (z <= 8.6d-22) then
tmp = b * (1.0d0 / (z * c))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double t_2 = 9.0 * (x * ((y / c) / z));
double tmp;
if (z <= -9.5e-79) {
tmp = t_1;
} else if (z <= -9.4e-194) {
tmp = b / (z * c);
} else if (z <= -3.5e-301) {
tmp = t_2;
} else if (z <= 2.9e-232) {
tmp = (b / c) / z;
} else if (z <= 6.3e-114) {
tmp = t_2;
} else if (z <= 8.6e-22) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * ((t * -4.0) / c) t_2 = 9.0 * (x * ((y / c) / z)) tmp = 0 if z <= -9.5e-79: tmp = t_1 elif z <= -9.4e-194: tmp = b / (z * c) elif z <= -3.5e-301: tmp = t_2 elif z <= 2.9e-232: tmp = (b / c) / z elif z <= 6.3e-114: tmp = t_2 elif z <= 8.6e-22: tmp = b * (1.0 / (z * c)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(t * -4.0) / c)) t_2 = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))) tmp = 0.0 if (z <= -9.5e-79) tmp = t_1; elseif (z <= -9.4e-194) tmp = Float64(b / Float64(z * c)); elseif (z <= -3.5e-301) tmp = t_2; elseif (z <= 2.9e-232) tmp = Float64(Float64(b / c) / z); elseif (z <= 6.3e-114) tmp = t_2; elseif (z <= 8.6e-22) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * ((t * -4.0) / c);
t_2 = 9.0 * (x * ((y / c) / z));
tmp = 0.0;
if (z <= -9.5e-79)
tmp = t_1;
elseif (z <= -9.4e-194)
tmp = b / (z * c);
elseif (z <= -3.5e-301)
tmp = t_2;
elseif (z <= 2.9e-232)
tmp = (b / c) / z;
elseif (z <= 6.3e-114)
tmp = t_2;
elseif (z <= 8.6e-22)
tmp = b * (1.0 / (z * c));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-79], t$95$1, If[LessEqual[z, -9.4e-194], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-301], t$95$2, If[LessEqual[z, 2.9e-232], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6.3e-114], t$95$2, If[LessEqual[z, 8.6e-22], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.4 \cdot 10^{-194}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-301}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-232}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{-114}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-22}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.4999999999999997e-79 or 8.60000000000000075e-22 < z Initial program 58.1%
associate-+l-58.1%
*-commutative58.1%
associate-*r*59.4%
*-commutative59.4%
associate-+l-59.4%
associate-*l*59.5%
associate-*l*64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*58.4%
associate-*r*58.4%
associate-*l/58.4%
Simplified58.4%
if -9.4999999999999997e-79 < z < -9.4000000000000005e-194Initial program 96.2%
associate-+l-96.2%
*-commutative96.2%
associate-*r*96.2%
*-commutative96.2%
associate-+l-96.2%
associate-*l*96.1%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in b around inf 56.6%
*-commutative56.6%
Simplified56.6%
if -9.4000000000000005e-194 < z < -3.49999999999999992e-301 or 2.8999999999999999e-232 < z < 6.30000000000000014e-114Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.7%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in x around inf 67.8%
associate-/l*69.6%
associate-/r*67.5%
Simplified67.5%
if -3.49999999999999992e-301 < z < 2.8999999999999999e-232Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
associate-*l*96.8%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 79.3%
associate-/r*79.4%
Simplified79.4%
if 6.30000000000000014e-114 < z < 8.60000000000000075e-22Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around inf 67.6%
associate-/r*62.3%
Simplified62.3%
associate-/r*67.6%
div-inv67.7%
Applied egg-rr67.7%
Final simplification62.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 (/ (* a t) c))))
(if (<= z -4.8e+95)
(- (* 9.0 (/ (* x y) (* z c))) t_1)
(if (<= z 1.9e+125)
(/ (- b (- (* (* z 4.0) (* a t)) (* x (* 9.0 y)))) (* z c))
(- (/ 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 * ((a * t) / c);
double tmp;
if (z <= -4.8e+95) {
tmp = (9.0 * ((x * y) / (z * c))) - t_1;
} else if (z <= 1.9e+125) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = (b / (z * c)) - 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 * ((a * t) / c)
if (z <= (-4.8d+95)) then
tmp = (9.0d0 * ((x * y) / (z * c))) - t_1
else if (z <= 1.9d+125) then
tmp = (b - (((z * 4.0d0) * (a * t)) - (x * (9.0d0 * y)))) / (z * c)
else
tmp = (b / (z * c)) - 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 * t) / c);
double tmp;
if (z <= -4.8e+95) {
tmp = (9.0 * ((x * y) / (z * c))) - t_1;
} else if (z <= 1.9e+125) {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
} else {
tmp = (b / (z * c)) - 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 * t) / c) tmp = 0 if z <= -4.8e+95: tmp = (9.0 * ((x * y) / (z * c))) - t_1 elif z <= 1.9e+125: tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c) else: tmp = (b / (z * c)) - t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(4.0 * Float64(Float64(a * t) / c)) tmp = 0.0 if (z <= -4.8e+95) tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))) - t_1); elseif (z <= 1.9e+125) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(a * t)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c)); else tmp = Float64(Float64(b / Float64(z * c)) - 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 * t) / c);
tmp = 0.0;
if (z <= -4.8e+95)
tmp = (9.0 * ((x * y) / (z * c))) - t_1;
elseif (z <= 1.9e+125)
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * y)))) / (z * c);
else
tmp = (b / (z * c)) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+95], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 1.9e+125], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+95}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c} - t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+125}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(a \cdot t\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} - t\_1\\
\end{array}
\end{array}
if z < -4.8000000000000001e95Initial program 46.2%
associate-+l-46.2%
*-commutative46.2%
associate-*r*46.2%
*-commutative46.2%
associate-+l-46.2%
associate-*l*46.2%
associate-*l*53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in x around 0 84.4%
Taylor expanded in b around 0 82.3%
if -4.8000000000000001e95 < z < 1.90000000000000001e125Initial program 90.9%
associate-+l-90.9%
*-commutative90.9%
associate-*r*91.1%
*-commutative91.1%
associate-+l-91.1%
associate-*l*91.1%
associate-*l*88.7%
*-commutative88.7%
Simplified88.7%
if 1.90000000000000001e125 < z Initial program 45.5%
associate-+l-45.5%
*-commutative45.5%
associate-*r*47.8%
*-commutative47.8%
associate-+l-47.8%
associate-*l*47.8%
associate-*l*54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in x around 0 84.7%
Taylor expanded in x around 0 90.9%
Final simplification88.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 4.0 (/ (* a t) c))))
(if (<= z -1.62e+94)
(- (* 9.0 (/ (* x y) (* z c))) t_1)
(if (<= z 2e+97)
(/ (- b (- (* a (* t (* z 4.0))) (* (* 9.0 x) y))) (* z c))
(- (/ 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 * ((a * t) / c);
double tmp;
if (z <= -1.62e+94) {
tmp = (9.0 * ((x * y) / (z * c))) - t_1;
} else if (z <= 2e+97) {
tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c);
} else {
tmp = (b / (z * c)) - 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 * ((a * t) / c)
if (z <= (-1.62d+94)) then
tmp = (9.0d0 * ((x * y) / (z * c))) - t_1
else if (z <= 2d+97) then
tmp = (b - ((a * (t * (z * 4.0d0))) - ((9.0d0 * x) * y))) / (z * c)
else
tmp = (b / (z * c)) - 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 * t) / c);
double tmp;
if (z <= -1.62e+94) {
tmp = (9.0 * ((x * y) / (z * c))) - t_1;
} else if (z <= 2e+97) {
tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c);
} else {
tmp = (b / (z * c)) - 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 * t) / c) tmp = 0 if z <= -1.62e+94: tmp = (9.0 * ((x * y) / (z * c))) - t_1 elif z <= 2e+97: tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c) else: tmp = (b / (z * c)) - t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(4.0 * Float64(Float64(a * t) / c)) tmp = 0.0 if (z <= -1.62e+94) tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))) - t_1); elseif (z <= 2e+97) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(Float64(9.0 * x) * y))) / Float64(z * c)); else tmp = Float64(Float64(b / Float64(z * c)) - 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 * t) / c);
tmp = 0.0;
if (z <= -1.62e+94)
tmp = (9.0 * ((x * y) / (z * c))) - t_1;
elseif (z <= 2e+97)
tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c);
else
tmp = (b / (z * c)) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.62e+94], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 2e+97], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(9.0 * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+94}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c} - t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+97}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - \left(9 \cdot x\right) \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} - t\_1\\
\end{array}
\end{array}
if z < -1.61999999999999997e94Initial program 46.2%
associate-+l-46.2%
*-commutative46.2%
associate-*r*46.2%
*-commutative46.2%
associate-+l-46.2%
associate-*l*46.2%
associate-*l*53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in x around 0 84.4%
Taylor expanded in b around 0 82.3%
if -1.61999999999999997e94 < z < 2.0000000000000001e97Initial program 93.8%
if 2.0000000000000001e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in x around 0 82.8%
Taylor expanded in x around 0 85.4%
Final simplification90.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 (/ (* a t) c))) (t_2 (/ b (* z c))))
(if (<= z -1.08e+71)
(- (+ t_2 (* 9.0 (/ (* x y) (* z c)))) t_1)
(if (<= z 2.95e+97)
(/ (- b (- (* a (* t (* z 4.0))) (* (* 9.0 x) y))) (* z c))
(- t_2 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 * t) / c);
double t_2 = b / (z * c);
double tmp;
if (z <= -1.08e+71) {
tmp = (t_2 + (9.0 * ((x * y) / (z * c)))) - t_1;
} else if (z <= 2.95e+97) {
tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c);
} else {
tmp = t_2 - 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 * t) / c)
t_2 = b / (z * c)
if (z <= (-1.08d+71)) then
tmp = (t_2 + (9.0d0 * ((x * y) / (z * c)))) - t_1
else if (z <= 2.95d+97) then
tmp = (b - ((a * (t * (z * 4.0d0))) - ((9.0d0 * x) * y))) / (z * c)
else
tmp = t_2 - 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 * t) / c);
double t_2 = b / (z * c);
double tmp;
if (z <= -1.08e+71) {
tmp = (t_2 + (9.0 * ((x * y) / (z * c)))) - t_1;
} else if (z <= 2.95e+97) {
tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c);
} else {
tmp = t_2 - 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 * t) / c) t_2 = b / (z * c) tmp = 0 if z <= -1.08e+71: tmp = (t_2 + (9.0 * ((x * y) / (z * c)))) - t_1 elif z <= 2.95e+97: tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c) else: tmp = t_2 - t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(4.0 * Float64(Float64(a * t) / c)) t_2 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -1.08e+71) tmp = Float64(Float64(t_2 + Float64(9.0 * Float64(Float64(x * y) / Float64(z * c)))) - t_1); elseif (z <= 2.95e+97) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(Float64(9.0 * x) * y))) / Float64(z * c)); else tmp = Float64(t_2 - 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 * t) / c);
t_2 = b / (z * c);
tmp = 0.0;
if (z <= -1.08e+71)
tmp = (t_2 + (9.0 * ((x * y) / (z * c)))) - t_1;
elseif (z <= 2.95e+97)
tmp = (b - ((a * (t * (z * 4.0))) - ((9.0 * x) * y))) / (z * c);
else
tmp = t_2 - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.08e+71], N[(N[(t$95$2 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 2.95e+97], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(9.0 * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - t$95$1), $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 \frac{a \cdot t}{c}\\
t_2 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{+71}:\\
\;\;\;\;\left(t\_2 + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - t\_1\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{+97}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - \left(9 \cdot x\right) \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t\_1\\
\end{array}
\end{array}
if z < -1.08e71Initial program 51.0%
associate-+l-51.0%
*-commutative51.0%
associate-*r*46.7%
*-commutative46.7%
associate-+l-46.7%
associate-*l*46.7%
associate-*l*57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in x around 0 85.7%
if -1.08e71 < z < 2.95000000000000005e97Initial program 93.6%
if 2.95000000000000005e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in x around 0 82.8%
Taylor expanded in x around 0 85.4%
Final simplification91.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c))) (t_2 (* 4.0 (/ (* a t) c))) (t_3 (* (* 9.0 x) y)))
(if (<= z -8.2e+70)
(- (+ (/ t_3 (* z c)) t_1) t_2)
(if (<= z 3.2e+97)
(/ (- b (- (* a (* t (* z 4.0))) t_3)) (* z c))
(- t_1 t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (9.0 * x) * y;
double tmp;
if (z <= -8.2e+70) {
tmp = ((t_3 / (z * c)) + t_1) - t_2;
} else if (z <= 3.2e+97) {
tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c);
} else {
tmp = t_1 - t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = b / (z * c)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (9.0d0 * x) * y
if (z <= (-8.2d+70)) then
tmp = ((t_3 / (z * c)) + t_1) - t_2
else if (z <= 3.2d+97) then
tmp = (b - ((a * (t * (z * 4.0d0))) - t_3)) / (z * c)
else
tmp = t_1 - 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 = b / (z * c);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (9.0 * x) * y;
double tmp;
if (z <= -8.2e+70) {
tmp = ((t_3 / (z * c)) + t_1) - t_2;
} else if (z <= 3.2e+97) {
tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c);
} else {
tmp = t_1 - 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 = b / (z * c) t_2 = 4.0 * ((a * t) / c) t_3 = (9.0 * x) * y tmp = 0 if z <= -8.2e+70: tmp = ((t_3 / (z * c)) + t_1) - t_2 elif z <= 3.2e+97: tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c) else: tmp = t_1 - 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(b / Float64(z * c)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(9.0 * x) * y) tmp = 0.0 if (z <= -8.2e+70) tmp = Float64(Float64(Float64(t_3 / Float64(z * c)) + t_1) - t_2); elseif (z <= 3.2e+97) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - t_3)) / Float64(z * c)); else tmp = Float64(t_1 - 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 = b / (z * c);
t_2 = 4.0 * ((a * t) / c);
t_3 = (9.0 * x) * y;
tmp = 0.0;
if (z <= -8.2e+70)
tmp = ((t_3 / (z * c)) + t_1) - t_2;
elseif (z <= 3.2e+97)
tmp = (b - ((a * (t * (z * 4.0))) - t_3)) / (z * c);
else
tmp = t_1 - 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[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(9.0 * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -8.2e+70], N[(N[(N[(t$95$3 / N[(z * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[z, 3.2e+97], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(9 \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+70}:\\
\;\;\;\;\left(\frac{t\_3}{z \cdot c} + t\_1\right) - t\_2\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+97}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - t\_3\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_2\\
\end{array}
\end{array}
if z < -8.2000000000000004e70Initial program 51.0%
associate-+l-51.0%
*-commutative51.0%
associate-*r*46.7%
*-commutative46.7%
associate-+l-46.7%
associate-*l*46.7%
associate-*l*57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in x around 0 85.7%
associate-*r/85.7%
associate-*r*85.8%
Applied egg-rr85.8%
if -8.2000000000000004e70 < z < 3.20000000000000016e97Initial program 93.6%
if 3.20000000000000016e97 < z Initial program 41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*51.0%
*-commutative51.0%
associate-+l-51.0%
associate-*l*51.0%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in x around 0 82.8%
Taylor expanded in x around 0 85.4%
Final simplification91.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= z -5.1e-82)
(and (not (<= z 2.55e-138)) (or (<= z 5.2e-73) (not (<= z 9.5e-22)))))
(* a (/ (* t -4.0) c))
(/ b (* z c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5.1e-82) || (!(z <= 2.55e-138) && ((z <= 5.2e-73) || !(z <= 9.5e-22)))) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-5.1d-82)) .or. (.not. (z <= 2.55d-138)) .and. (z <= 5.2d-73) .or. (.not. (z <= 9.5d-22))) then
tmp = a * ((t * (-4.0d0)) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5.1e-82) || (!(z <= 2.55e-138) && ((z <= 5.2e-73) || !(z <= 9.5e-22)))) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -5.1e-82) or (not (z <= 2.55e-138) and ((z <= 5.2e-73) or not (z <= 9.5e-22))): tmp = a * ((t * -4.0) / c) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -5.1e-82) || (!(z <= 2.55e-138) && ((z <= 5.2e-73) || !(z <= 9.5e-22)))) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -5.1e-82) || (~((z <= 2.55e-138)) && ((z <= 5.2e-73) || ~((z <= 9.5e-22)))))
tmp = a * ((t * -4.0) / c);
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -5.1e-82], And[N[Not[LessEqual[z, 2.55e-138]], $MachinePrecision], Or[LessEqual[z, 5.2e-73], N[Not[LessEqual[z, 9.5e-22]], $MachinePrecision]]]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{-82} \lor \neg \left(z \leq 2.55 \cdot 10^{-138}\right) \land \left(z \leq 5.2 \cdot 10^{-73} \lor \neg \left(z \leq 9.5 \cdot 10^{-22}\right)\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.09999999999999992e-82 or 2.5500000000000001e-138 < z < 5.2000000000000002e-73 or 9.4999999999999994e-22 < z Initial program 61.6%
associate-+l-61.6%
*-commutative61.6%
associate-*r*62.8%
*-commutative62.8%
associate-+l-62.8%
associate-*l*62.8%
associate-*l*66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*59.1%
associate-*r*59.1%
associate-*l/59.1%
Simplified59.1%
if -5.09999999999999992e-82 < z < 2.5500000000000001e-138 or 5.2000000000000002e-73 < z < 9.4999999999999994e-22Initial program 98.9%
associate-+l-98.9%
*-commutative98.9%
associate-*r*98.3%
*-commutative98.3%
associate-+l-98.3%
associate-*l*98.3%
associate-*l*93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in b around inf 56.0%
*-commutative56.0%
Simplified56.0%
Final simplification57.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 (* a (/ (* t -4.0) c))))
(if (<= z -6.4e-83)
t_1
(if (<= z 3.4e-138)
(/ b (* z c))
(if (or (<= z 4.7e-76) (not (<= z 3e-21)))
t_1
(* b (/ 1.0 (* z c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (z <= -6.4e-83) {
tmp = t_1;
} else if (z <= 3.4e-138) {
tmp = b / (z * c);
} else if ((z <= 4.7e-76) || !(z <= 3e-21)) {
tmp = t_1;
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
if (z <= (-6.4d-83)) then
tmp = t_1
else if (z <= 3.4d-138) then
tmp = b / (z * c)
else if ((z <= 4.7d-76) .or. (.not. (z <= 3d-21))) then
tmp = t_1
else
tmp = b * (1.0d0 / (z * c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * ((t * -4.0) / c);
double tmp;
if (z <= -6.4e-83) {
tmp = t_1;
} else if (z <= 3.4e-138) {
tmp = b / (z * c);
} else if ((z <= 4.7e-76) || !(z <= 3e-21)) {
tmp = t_1;
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * ((t * -4.0) / c) tmp = 0 if z <= -6.4e-83: tmp = t_1 elif z <= 3.4e-138: tmp = b / (z * c) elif (z <= 4.7e-76) or not (z <= 3e-21): tmp = t_1 else: tmp = b * (1.0 / (z * c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(Float64(t * -4.0) / c)) tmp = 0.0 if (z <= -6.4e-83) tmp = t_1; elseif (z <= 3.4e-138) tmp = Float64(b / Float64(z * c)); elseif ((z <= 4.7e-76) || !(z <= 3e-21)) tmp = t_1; else tmp = Float64(b * Float64(1.0 / Float64(z * c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * ((t * -4.0) / c);
tmp = 0.0;
if (z <= -6.4e-83)
tmp = t_1;
elseif (z <= 3.4e-138)
tmp = b / (z * c);
elseif ((z <= 4.7e-76) || ~((z <= 3e-21)))
tmp = t_1;
else
tmp = b * (1.0 / (z * c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e-83], t$95$1, If[LessEqual[z, 3.4e-138], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.7e-76], N[Not[LessEqual[z, 3e-21]], $MachinePrecision]], t$95$1, N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
\mathbf{if}\;z \leq -6.4 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-138}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-76} \lor \neg \left(z \leq 3 \cdot 10^{-21}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.4000000000000002e-83 or 3.4000000000000001e-138 < z < 4.7000000000000002e-76 or 2.99999999999999991e-21 < z Initial program 61.6%
associate-+l-61.6%
*-commutative61.6%
associate-*r*62.8%
*-commutative62.8%
associate-+l-62.8%
associate-*l*62.8%
associate-*l*66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*59.1%
associate-*r*59.1%
associate-*l/59.1%
Simplified59.1%
if -6.4000000000000002e-83 < z < 3.4000000000000001e-138Initial program 98.8%
associate-+l-98.8%
*-commutative98.8%
associate-*r*98.1%
*-commutative98.1%
associate-+l-98.1%
associate-*l*98.1%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in b around inf 53.2%
*-commutative53.2%
Simplified53.2%
if 4.7000000000000002e-76 < z < 2.99999999999999991e-21Initial program 99.4%
associate-+l-99.4%
*-commutative99.4%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in b around inf 77.6%
associate-/r*77.6%
Simplified77.6%
associate-/r*77.6%
div-inv77.8%
Applied egg-rr77.8%
Final simplification57.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.45e-79)
(- (* 9.0 (/ (* x y) (* z c))) (* 4.0 (/ (* a t) c)))
(if (<= z 6.5e-122)
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ (+ (/ b z) (* a (* t -4.0))) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.45e-79) {
tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c));
} else if (z <= 6.5e-122) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((b / z) + (a * (t * -4.0))) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-2.45d-79)) then
tmp = (9.0d0 * ((x * y) / (z * c))) - (4.0d0 * ((a * t) / c))
else if (z <= 6.5d-122) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = ((b / z) + (a * (t * (-4.0d0)))) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.45e-79) {
tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c));
} else if (z <= 6.5e-122) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((b / z) + (a * (t * -4.0))) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.45e-79: tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c)) elif z <= 6.5e-122: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = ((b / z) + (a * (t * -4.0))) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.45e-79) tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))) - Float64(4.0 * Float64(Float64(a * t) / c))); elseif (z <= 6.5e-122) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(Float64(b / z) + Float64(a * Float64(t * -4.0))) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -2.45e-79)
tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c));
elseif (z <= 6.5e-122)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = ((b / z) + (a * (t * -4.0))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.45e-79], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-122], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{-79}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-122}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\
\end{array}
\end{array}
if z < -2.45e-79Initial program 61.5%
associate-+l-61.5%
*-commutative61.5%
associate-*r*58.8%
*-commutative58.8%
associate-+l-58.8%
associate-*l*58.9%
associate-*l*65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in x around 0 80.5%
Taylor expanded in b around 0 73.9%
if -2.45e-79 < z < 6.49999999999999965e-122Initial program 98.8%
associate-+l-98.8%
*-commutative98.8%
associate-*r*98.2%
*-commutative98.2%
associate-+l-98.2%
associate-*l*98.2%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around inf 89.0%
if 6.49999999999999965e-122 < z Initial program 65.5%
associate-+l-65.5%
*-commutative65.5%
associate-*r*70.2%
*-commutative70.2%
associate-+l-70.2%
associate-*l*70.2%
associate-*l*72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in x around 0 83.9%
Taylor expanded in x around 0 74.1%
*-commutative74.1%
associate-/r*74.1%
associate-*r/74.1%
div-sub76.6%
cancel-sign-sub-inv76.6%
metadata-eval76.6%
*-commutative76.6%
associate-*l*76.6%
Simplified76.6%
Final simplification80.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 (or (<= z -2.2e+25) (not (<= z 6.2e-122))) (/ (+ (/ b z) (* a (* t -4.0))) c) (/ (+ b (* 9.0 (* x y))) (* 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 ((z <= -2.2e+25) || !(z <= 6.2e-122)) {
tmp = ((b / z) + (a * (t * -4.0))) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (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 ((z <= (-2.2d+25)) .or. (.not. (z <= 6.2d-122))) then
tmp = ((b / z) + (a * (t * (-4.0d0)))) / c
else
tmp = (b + (9.0d0 * (x * y))) / (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 ((z <= -2.2e+25) || !(z <= 6.2e-122)) {
tmp = ((b / z) + (a * (t * -4.0))) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (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 (z <= -2.2e+25) or not (z <= 6.2e-122): tmp = ((b / z) + (a * (t * -4.0))) / c else: tmp = (b + (9.0 * (x * y))) / (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 ((z <= -2.2e+25) || !(z <= 6.2e-122)) tmp = Float64(Float64(Float64(b / z) + Float64(a * Float64(t * -4.0))) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.2e+25) || ~((z <= 6.2e-122)))
tmp = ((b / z) + (a * (t * -4.0))) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.2e+25], N[Not[LessEqual[z, 6.2e-122]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+25} \lor \neg \left(z \leq 6.2 \cdot 10^{-122}\right):\\
\;\;\;\;\frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.2000000000000001e25 or 6.1999999999999997e-122 < z Initial program 61.5%
associate-+l-61.5%
*-commutative61.5%
associate-*r*62.8%
*-commutative62.8%
associate-+l-62.8%
associate-*l*62.9%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in x around 0 83.4%
Taylor expanded in x around 0 72.7%
*-commutative72.7%
associate-/r*73.0%
associate-*r/73.0%
div-sub75.3%
cancel-sign-sub-inv75.3%
metadata-eval75.3%
*-commutative75.3%
associate-*l*75.3%
Simplified75.3%
if -2.2000000000000001e25 < z < 6.1999999999999997e-122Initial program 96.0%
associate-+l-96.0%
*-commutative96.0%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.4%
associate-*l*90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in x around inf 84.4%
Final simplification79.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 (<= z -5.5e+95)
(* a (/ (* t -4.0) c))
(if (<= z 3.5e+125)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* (/ (* a t) c) -4.0))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.5e+95) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 3.5e+125) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-5.5d+95)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= 3.5d+125) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = ((a * t) / c) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.5e+95) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 3.5e+125) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((a * t) / c) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5.5e+95: tmp = a * ((t * -4.0) / c) elif z <= 3.5e+125: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = ((a * t) / c) * -4.0 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5.5e+95) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= 3.5e+125) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(Float64(a * t) / c) * -4.0); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -5.5e+95)
tmp = a * ((t * -4.0) / c);
elseif (z <= 3.5e+125)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = ((a * t) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5.5e+95], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+125], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $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.5 \cdot 10^{+95}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+125}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\end{array}
\end{array}
if z < -5.4999999999999997e95Initial program 47.4%
associate-+l-47.4%
*-commutative47.4%
associate-*r*47.3%
*-commutative47.3%
associate-+l-47.3%
associate-*l*47.3%
associate-*l*54.6%
*-commutative54.6%
Simplified54.6%
Taylor expanded in z around inf 76.0%
*-commutative76.0%
associate-/l*78.4%
associate-*r*78.4%
associate-*l/78.4%
Simplified78.4%
if -5.4999999999999997e95 < z < 3.50000000000000011e125Initial program 90.5%
associate-+l-90.5%
*-commutative90.5%
associate-*r*90.6%
*-commutative90.6%
associate-+l-90.6%
associate-*l*90.7%
associate-*l*88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in x around inf 75.9%
if 3.50000000000000011e125 < z Initial program 43.7%
associate-+l-43.7%
*-commutative43.7%
associate-*r*46.1%
*-commutative46.1%
associate-+l-46.1%
associate-*l*46.1%
associate-*l*52.6%
*-commutative52.6%
Simplified52.6%
Taylor expanded in z around inf 84.7%
*-commutative84.7%
Simplified84.7%
Final simplification77.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 78.1%
associate-+l-78.1%
*-commutative78.1%
associate-*r*78.5%
*-commutative78.5%
associate-+l-78.5%
associate-*l*78.5%
associate-*l*78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in b around inf 35.9%
*-commutative35.9%
Simplified35.9%
Final simplification35.9%
(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 2024079
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(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)))