
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 2.5e+34)
(/ (- (/ (+ b (* 9.0 (* x y))) z) (* 4.0 (* a t))) c_m)
(fma -4.0 (* a (/ t c_m)) (/ (/ (fma x (* 9.0 y) b) c_m) z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 2.5e+34) {
tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m;
} else {
tmp = fma(-4.0, (a * (t / c_m)), ((fma(x, (9.0 * y), b) / c_m) / z));
}
return c_s * tmp;
}
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 2.5e+34) tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / z) - Float64(4.0 * Float64(a * t))) / c_m); else tmp = fma(-4.0, Float64(a * Float64(t / c_m)), Float64(Float64(fma(x, Float64(9.0 * y), b) / c_m) / z)); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 2.5e+34], N[(N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot \frac{t}{c\_m}, \frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{c\_m}}{z}\right)\\
\end{array}
\end{array}
if c < 2.4999999999999999e34Initial program 83.3%
associate-+l-83.3%
*-commutative83.3%
associate-*r*82.7%
*-commutative82.7%
associate-+l-82.7%
associate-*l*82.2%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
add-cube-cbrt85.4%
pow385.4%
associate-*r*85.9%
*-commutative85.9%
associate-*l*85.9%
Applied egg-rr85.9%
Taylor expanded in z around 0 83.4%
Simplified79.7%
Taylor expanded in c around -inf 88.6%
if 2.4999999999999999e34 < c Initial program 65.8%
associate-+l-65.8%
*-commutative65.8%
associate-*r*68.0%
*-commutative68.0%
associate-+l-68.0%
associate-*l*68.0%
associate-*l*66.2%
*-commutative66.2%
Simplified66.2%
add-cube-cbrt65.9%
pow365.9%
associate-*r*65.9%
*-commutative65.9%
associate-*l*65.9%
Applied egg-rr65.9%
Taylor expanded in z around 0 77.2%
Simplified93.4%
Final simplification89.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ x c_m) (/ y z))))
(t_2 (* a (* -4.0 (/ t c_m))))
(t_3 (/ (* b (/ 1.0 z)) c_m))
(t_4 (/ b (* c_m z))))
(*
c_s
(if (<= (* 9.0 x) -5e+156)
(/ (* 9.0 (* x (/ y c_m))) z)
(if (<= (* 9.0 x) -1.3e+102)
t_4
(if (<= (* 9.0 x) -3e+71)
t_1
(if (<= (* 9.0 x) -0.005)
(* -4.0 (* t (/ a c_m)))
(if (<= (* 9.0 x) -2e-75)
t_4
(if (<= (* 9.0 x) -1e-124)
t_2
(if (<= (* 9.0 x) -1e-273)
t_3
(if (<= (* 9.0 x) -5e-305)
t_2
(if (<= (* 9.0 x) 1e-289)
t_3
(if (<= (* 9.0 x) 10000000000000.0) t_2 t_1)))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x / c_m) * (y / z));
double t_2 = a * (-4.0 * (t / c_m));
double t_3 = (b * (1.0 / z)) / c_m;
double t_4 = b / (c_m * z);
double tmp;
if ((9.0 * x) <= -5e+156) {
tmp = (9.0 * (x * (y / c_m))) / z;
} else if ((9.0 * x) <= -1.3e+102) {
tmp = t_4;
} else if ((9.0 * x) <= -3e+71) {
tmp = t_1;
} else if ((9.0 * x) <= -0.005) {
tmp = -4.0 * (t * (a / c_m));
} else if ((9.0 * x) <= -2e-75) {
tmp = t_4;
} else if ((9.0 * x) <= -1e-124) {
tmp = t_2;
} else if ((9.0 * x) <= -1e-273) {
tmp = t_3;
} else if ((9.0 * x) <= -5e-305) {
tmp = t_2;
} else if ((9.0 * x) <= 1e-289) {
tmp = t_3;
} else if ((9.0 * x) <= 10000000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 9.0d0 * ((x / c_m) * (y / z))
t_2 = a * ((-4.0d0) * (t / c_m))
t_3 = (b * (1.0d0 / z)) / c_m
t_4 = b / (c_m * z)
if ((9.0d0 * x) <= (-5d+156)) then
tmp = (9.0d0 * (x * (y / c_m))) / z
else if ((9.0d0 * x) <= (-1.3d+102)) then
tmp = t_4
else if ((9.0d0 * x) <= (-3d+71)) then
tmp = t_1
else if ((9.0d0 * x) <= (-0.005d0)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if ((9.0d0 * x) <= (-2d-75)) then
tmp = t_4
else if ((9.0d0 * x) <= (-1d-124)) then
tmp = t_2
else if ((9.0d0 * x) <= (-1d-273)) then
tmp = t_3
else if ((9.0d0 * x) <= (-5d-305)) then
tmp = t_2
else if ((9.0d0 * x) <= 1d-289) then
tmp = t_3
else if ((9.0d0 * x) <= 10000000000000.0d0) then
tmp = t_2
else
tmp = t_1
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x / c_m) * (y / z));
double t_2 = a * (-4.0 * (t / c_m));
double t_3 = (b * (1.0 / z)) / c_m;
double t_4 = b / (c_m * z);
double tmp;
if ((9.0 * x) <= -5e+156) {
tmp = (9.0 * (x * (y / c_m))) / z;
} else if ((9.0 * x) <= -1.3e+102) {
tmp = t_4;
} else if ((9.0 * x) <= -3e+71) {
tmp = t_1;
} else if ((9.0 * x) <= -0.005) {
tmp = -4.0 * (t * (a / c_m));
} else if ((9.0 * x) <= -2e-75) {
tmp = t_4;
} else if ((9.0 * x) <= -1e-124) {
tmp = t_2;
} else if ((9.0 * x) <= -1e-273) {
tmp = t_3;
} else if ((9.0 * x) <= -5e-305) {
tmp = t_2;
} else if ((9.0 * x) <= 1e-289) {
tmp = t_3;
} else if ((9.0 * x) <= 10000000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * ((x / c_m) * (y / z)) t_2 = a * (-4.0 * (t / c_m)) t_3 = (b * (1.0 / z)) / c_m t_4 = b / (c_m * z) tmp = 0 if (9.0 * x) <= -5e+156: tmp = (9.0 * (x * (y / c_m))) / z elif (9.0 * x) <= -1.3e+102: tmp = t_4 elif (9.0 * x) <= -3e+71: tmp = t_1 elif (9.0 * x) <= -0.005: tmp = -4.0 * (t * (a / c_m)) elif (9.0 * x) <= -2e-75: tmp = t_4 elif (9.0 * x) <= -1e-124: tmp = t_2 elif (9.0 * x) <= -1e-273: tmp = t_3 elif (9.0 * x) <= -5e-305: tmp = t_2 elif (9.0 * x) <= 1e-289: tmp = t_3 elif (9.0 * x) <= 10000000000000.0: tmp = t_2 else: tmp = t_1 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))) t_2 = Float64(a * Float64(-4.0 * Float64(t / c_m))) t_3 = Float64(Float64(b * Float64(1.0 / z)) / c_m) t_4 = Float64(b / Float64(c_m * z)) tmp = 0.0 if (Float64(9.0 * x) <= -5e+156) tmp = Float64(Float64(9.0 * Float64(x * Float64(y / c_m))) / z); elseif (Float64(9.0 * x) <= -1.3e+102) tmp = t_4; elseif (Float64(9.0 * x) <= -3e+71) tmp = t_1; elseif (Float64(9.0 * x) <= -0.005) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (Float64(9.0 * x) <= -2e-75) tmp = t_4; elseif (Float64(9.0 * x) <= -1e-124) tmp = t_2; elseif (Float64(9.0 * x) <= -1e-273) tmp = t_3; elseif (Float64(9.0 * x) <= -5e-305) tmp = t_2; elseif (Float64(9.0 * x) <= 1e-289) tmp = t_3; elseif (Float64(9.0 * x) <= 10000000000000.0) tmp = t_2; else tmp = t_1; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * ((x / c_m) * (y / z));
t_2 = a * (-4.0 * (t / c_m));
t_3 = (b * (1.0 / z)) / c_m;
t_4 = b / (c_m * z);
tmp = 0.0;
if ((9.0 * x) <= -5e+156)
tmp = (9.0 * (x * (y / c_m))) / z;
elseif ((9.0 * x) <= -1.3e+102)
tmp = t_4;
elseif ((9.0 * x) <= -3e+71)
tmp = t_1;
elseif ((9.0 * x) <= -0.005)
tmp = -4.0 * (t * (a / c_m));
elseif ((9.0 * x) <= -2e-75)
tmp = t_4;
elseif ((9.0 * x) <= -1e-124)
tmp = t_2;
elseif ((9.0 * x) <= -1e-273)
tmp = t_3;
elseif ((9.0 * x) <= -5e-305)
tmp = t_2;
elseif ((9.0 * x) <= 1e-289)
tmp = t_3;
elseif ((9.0 * x) <= 10000000000000.0)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$4 = N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[N[(9.0 * x), $MachinePrecision], -5e+156], N[(N[(9.0 * N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[(9.0 * x), $MachinePrecision], -1.3e+102], t$95$4, If[LessEqual[N[(9.0 * x), $MachinePrecision], -3e+71], t$95$1, If[LessEqual[N[(9.0 * x), $MachinePrecision], -0.005], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(9.0 * x), $MachinePrecision], -2e-75], t$95$4, If[LessEqual[N[(9.0 * x), $MachinePrecision], -1e-124], t$95$2, If[LessEqual[N[(9.0 * x), $MachinePrecision], -1e-273], t$95$3, If[LessEqual[N[(9.0 * x), $MachinePrecision], -5e-305], t$95$2, If[LessEqual[N[(9.0 * x), $MachinePrecision], 1e-289], t$95$3, If[LessEqual[N[(9.0 * x), $MachinePrecision], 10000000000000.0], t$95$2, t$95$1]]]]]]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
t_2 := a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
t_3 := \frac{b \cdot \frac{1}{z}}{c\_m}\\
t_4 := \frac{b}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;9 \cdot x \leq -5 \cdot 10^{+156}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot \frac{y}{c\_m}\right)}{z}\\
\mathbf{elif}\;9 \cdot x \leq -1.3 \cdot 10^{+102}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;9 \cdot x \leq -3 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;9 \cdot x \leq -0.005:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;9 \cdot x \leq -2 \cdot 10^{-75}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;9 \cdot x \leq -1 \cdot 10^{-124}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;9 \cdot x \leq -1 \cdot 10^{-273}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;9 \cdot x \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;9 \cdot x \leq 10^{-289}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;9 \cdot x \leq 10000000000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 x 9) < -4.99999999999999992e156Initial program 81.5%
associate-+l-81.5%
*-commutative81.5%
associate-*r*83.8%
*-commutative83.8%
associate-+l-83.8%
associate-*l*83.8%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in x around inf 70.1%
*-commutative70.1%
associate-/r*70.2%
associate-*l/70.2%
associate-/l*70.3%
Simplified70.3%
if -4.99999999999999992e156 < (*.f64 x 9) < -1.30000000000000003e102 or -0.0050000000000000001 < (*.f64 x 9) < -1.9999999999999999e-75Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*87.2%
*-commutative87.2%
associate-+l-87.2%
associate-*l*87.1%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in b around inf 49.2%
*-commutative49.2%
Simplified49.2%
if -1.30000000000000003e102 < (*.f64 x 9) < -3.00000000000000013e71 or 1e13 < (*.f64 x 9) Initial program 77.1%
associate-+l-77.1%
*-commutative77.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 x around inf 44.0%
times-frac54.5%
Simplified54.5%
if -3.00000000000000013e71 < (*.f64 x 9) < -0.0050000000000000001Initial program 71.8%
associate-+l-71.8%
*-commutative71.8%
associate-*r*44.6%
*-commutative44.6%
associate-+l-44.6%
associate-*l*44.8%
associate-*l*72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in z around inf 58.1%
*-commutative58.1%
*-commutative58.1%
associate-/l*44.6%
Simplified44.6%
if -1.9999999999999999e-75 < (*.f64 x 9) < -9.99999999999999933e-125 or -1e-273 < (*.f64 x 9) < -4.99999999999999985e-305 or 1e-289 < (*.f64 x 9) < 1e13Initial program 79.0%
associate-+l-79.0%
*-commutative79.0%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*76.6%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
add-cube-cbrt81.2%
pow381.2%
associate-*r*82.4%
*-commutative82.4%
associate-*l*82.4%
Applied egg-rr82.4%
Taylor expanded in z around inf 52.0%
*-commutative52.0%
associate-/l*54.3%
associate-*l*54.3%
Simplified54.3%
if -9.99999999999999933e-125 < (*.f64 x 9) < -1e-273 or -4.99999999999999985e-305 < (*.f64 x 9) < 1e-289Initial program 88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*88.9%
*-commutative88.9%
Simplified88.9%
Applied egg-rr64.5%
Taylor expanded in b around inf 60.2%
associate-*r/67.6%
Applied egg-rr67.6%
Final simplification58.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ y c_m) (/ x z))))
(t_2 (/ 1.0 (/ (* c_m z) b)))
(t_3 (/ (* b (/ 1.0 z)) c_m))
(t_4 (* a (* -4.0 (/ t c_m)))))
(*
c_s
(if (<= y -9.5e-60)
(* 9.0 (* (/ x c_m) (/ y z)))
(if (<= y -1.95e-285)
(/ b (* c_m z))
(if (<= y 6.5e-191)
(/ (* (* a t) -4.0) c_m)
(if (<= y 8.2e-134)
t_3
(if (<= y 2.5e-91)
(* -4.0 (* t (/ a c_m)))
(if (<= y 8.6e-47)
t_2
(if (<= y 5.2e+37)
t_4
(if (<= y 1.9e+99)
t_2
(if (<= y 5.2e+142)
t_1
(if (<= y 9.5e+168)
t_3
(if (<= y 3.2e+175) t_4 t_1))))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((y / c_m) * (x / z));
double t_2 = 1.0 / ((c_m * z) / b);
double t_3 = (b * (1.0 / z)) / c_m;
double t_4 = a * (-4.0 * (t / c_m));
double tmp;
if (y <= -9.5e-60) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else if (y <= -1.95e-285) {
tmp = b / (c_m * z);
} else if (y <= 6.5e-191) {
tmp = ((a * t) * -4.0) / c_m;
} else if (y <= 8.2e-134) {
tmp = t_3;
} else if (y <= 2.5e-91) {
tmp = -4.0 * (t * (a / c_m));
} else if (y <= 8.6e-47) {
tmp = t_2;
} else if (y <= 5.2e+37) {
tmp = t_4;
} else if (y <= 1.9e+99) {
tmp = t_2;
} else if (y <= 5.2e+142) {
tmp = t_1;
} else if (y <= 9.5e+168) {
tmp = t_3;
} else if (y <= 3.2e+175) {
tmp = t_4;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 9.0d0 * ((y / c_m) * (x / z))
t_2 = 1.0d0 / ((c_m * z) / b)
t_3 = (b * (1.0d0 / z)) / c_m
t_4 = a * ((-4.0d0) * (t / c_m))
if (y <= (-9.5d-60)) then
tmp = 9.0d0 * ((x / c_m) * (y / z))
else if (y <= (-1.95d-285)) then
tmp = b / (c_m * z)
else if (y <= 6.5d-191) then
tmp = ((a * t) * (-4.0d0)) / c_m
else if (y <= 8.2d-134) then
tmp = t_3
else if (y <= 2.5d-91) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (y <= 8.6d-47) then
tmp = t_2
else if (y <= 5.2d+37) then
tmp = t_4
else if (y <= 1.9d+99) then
tmp = t_2
else if (y <= 5.2d+142) then
tmp = t_1
else if (y <= 9.5d+168) then
tmp = t_3
else if (y <= 3.2d+175) then
tmp = t_4
else
tmp = t_1
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((y / c_m) * (x / z));
double t_2 = 1.0 / ((c_m * z) / b);
double t_3 = (b * (1.0 / z)) / c_m;
double t_4 = a * (-4.0 * (t / c_m));
double tmp;
if (y <= -9.5e-60) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else if (y <= -1.95e-285) {
tmp = b / (c_m * z);
} else if (y <= 6.5e-191) {
tmp = ((a * t) * -4.0) / c_m;
} else if (y <= 8.2e-134) {
tmp = t_3;
} else if (y <= 2.5e-91) {
tmp = -4.0 * (t * (a / c_m));
} else if (y <= 8.6e-47) {
tmp = t_2;
} else if (y <= 5.2e+37) {
tmp = t_4;
} else if (y <= 1.9e+99) {
tmp = t_2;
} else if (y <= 5.2e+142) {
tmp = t_1;
} else if (y <= 9.5e+168) {
tmp = t_3;
} else if (y <= 3.2e+175) {
tmp = t_4;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * ((y / c_m) * (x / z)) t_2 = 1.0 / ((c_m * z) / b) t_3 = (b * (1.0 / z)) / c_m t_4 = a * (-4.0 * (t / c_m)) tmp = 0 if y <= -9.5e-60: tmp = 9.0 * ((x / c_m) * (y / z)) elif y <= -1.95e-285: tmp = b / (c_m * z) elif y <= 6.5e-191: tmp = ((a * t) * -4.0) / c_m elif y <= 8.2e-134: tmp = t_3 elif y <= 2.5e-91: tmp = -4.0 * (t * (a / c_m)) elif y <= 8.6e-47: tmp = t_2 elif y <= 5.2e+37: tmp = t_4 elif y <= 1.9e+99: tmp = t_2 elif y <= 5.2e+142: tmp = t_1 elif y <= 9.5e+168: tmp = t_3 elif y <= 3.2e+175: tmp = t_4 else: tmp = t_1 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(Float64(y / c_m) * Float64(x / z))) t_2 = Float64(1.0 / Float64(Float64(c_m * z) / b)) t_3 = Float64(Float64(b * Float64(1.0 / z)) / c_m) t_4 = Float64(a * Float64(-4.0 * Float64(t / c_m))) tmp = 0.0 if (y <= -9.5e-60) tmp = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))); elseif (y <= -1.95e-285) tmp = Float64(b / Float64(c_m * z)); elseif (y <= 6.5e-191) tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m); elseif (y <= 8.2e-134) tmp = t_3; elseif (y <= 2.5e-91) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (y <= 8.6e-47) tmp = t_2; elseif (y <= 5.2e+37) tmp = t_4; elseif (y <= 1.9e+99) tmp = t_2; elseif (y <= 5.2e+142) tmp = t_1; elseif (y <= 9.5e+168) tmp = t_3; elseif (y <= 3.2e+175) tmp = t_4; else tmp = t_1; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * ((y / c_m) * (x / z));
t_2 = 1.0 / ((c_m * z) / b);
t_3 = (b * (1.0 / z)) / c_m;
t_4 = a * (-4.0 * (t / c_m));
tmp = 0.0;
if (y <= -9.5e-60)
tmp = 9.0 * ((x / c_m) * (y / z));
elseif (y <= -1.95e-285)
tmp = b / (c_m * z);
elseif (y <= 6.5e-191)
tmp = ((a * t) * -4.0) / c_m;
elseif (y <= 8.2e-134)
tmp = t_3;
elseif (y <= 2.5e-91)
tmp = -4.0 * (t * (a / c_m));
elseif (y <= 8.6e-47)
tmp = t_2;
elseif (y <= 5.2e+37)
tmp = t_4;
elseif (y <= 1.9e+99)
tmp = t_2;
elseif (y <= 5.2e+142)
tmp = t_1;
elseif (y <= 9.5e+168)
tmp = t_3;
elseif (y <= 3.2e+175)
tmp = t_4;
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(N[(y / c$95$m), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(N[(c$95$m * z), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -9.5e-60], N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.95e-285], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-191], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[y, 8.2e-134], t$95$3, If[LessEqual[y, 2.5e-91], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e-47], t$95$2, If[LessEqual[y, 5.2e+37], t$95$4, If[LessEqual[y, 1.9e+99], t$95$2, If[LessEqual[y, 5.2e+142], t$95$1, If[LessEqual[y, 9.5e+168], t$95$3, If[LessEqual[y, 3.2e+175], t$95$4, t$95$1]]]]]]]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{c\_m} \cdot \frac{x}{z}\right)\\
t_2 := \frac{1}{\frac{c\_m \cdot z}{b}}\\
t_3 := \frac{b \cdot \frac{1}{z}}{c\_m}\\
t_4 := a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-60}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-285}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-191}:\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-134}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-91}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+37}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+168}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+175}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if y < -9.49999999999999958e-60Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
associate-*l*81.6%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in x around inf 48.8%
times-frac49.0%
Simplified49.0%
if -9.49999999999999958e-60 < y < -1.94999999999999993e-285Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*83.2%
*-commutative83.2%
associate-+l-83.2%
associate-*l*83.2%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in b around inf 51.6%
*-commutative51.6%
Simplified51.6%
if -1.94999999999999993e-285 < y < 6.4999999999999995e-191Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*89.8%
*-commutative89.8%
associate-+l-89.8%
associate-*l*89.8%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in z around inf 45.3%
associate-*r/45.3%
Simplified45.3%
if 6.4999999999999995e-191 < y < 8.2000000000000004e-134 or 5.20000000000000043e142 < y < 9.49999999999999979e168Initial program 67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*67.9%
*-commutative67.9%
Simplified67.9%
Applied egg-rr45.7%
Taylor expanded in b around inf 36.0%
associate-*r/41.1%
Applied egg-rr41.1%
if 8.2000000000000004e-134 < y < 2.49999999999999999e-91Initial program 77.5%
associate-+l-77.5%
*-commutative77.5%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
associate-*l*66.6%
associate-*l*77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in z around inf 45.6%
*-commutative45.6%
*-commutative45.6%
associate-/l*45.7%
Simplified45.7%
if 2.49999999999999999e-91 < y < 8.5999999999999995e-47 or 5.1999999999999998e37 < y < 1.9e99Initial program 67.7%
associate-+l-67.7%
*-commutative67.7%
associate-*r*67.1%
*-commutative67.1%
associate-+l-67.1%
associate-*l*67.2%
associate-*l*67.8%
*-commutative67.8%
Simplified67.8%
Applied egg-rr54.5%
Taylor expanded in b around inf 22.7%
clear-num22.7%
frac-times22.7%
metadata-eval22.7%
Applied egg-rr22.7%
*-commutative22.7%
associate-*l/35.6%
associate-/r/35.6%
Simplified35.6%
associate-*l/35.6%
*-un-lft-identity35.6%
clear-num35.6%
*-commutative35.6%
Applied egg-rr35.6%
if 8.5999999999999995e-47 < y < 5.1999999999999998e37 or 9.49999999999999979e168 < y < 3.20000000000000022e175Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
associate-*l*79.6%
associate-*l*83.7%
*-commutative83.7%
Simplified83.7%
add-cube-cbrt83.5%
pow383.6%
associate-*r*83.6%
*-commutative83.6%
associate-*l*83.4%
Applied egg-rr83.4%
Taylor expanded in z around inf 51.3%
*-commutative51.3%
associate-/l*55.3%
associate-*l*55.3%
Simplified55.3%
if 1.9e99 < y < 5.20000000000000043e142 or 3.20000000000000022e175 < y Initial program 82.8%
associate-+l-82.8%
*-commutative82.8%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
associate-*l*75.4%
associate-*l*77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in x around inf 68.3%
*-commutative68.3%
times-frac72.8%
Simplified72.8%
Final simplification51.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ 1.0 (/ (* c_m z) b)))
(t_2 (/ (* b (/ 1.0 z)) c_m))
(t_3 (* a (* -4.0 (/ t c_m)))))
(*
c_s
(if (<= y -1.05e-60)
(* 9.0 (* (/ x c_m) (/ y z)))
(if (<= y -2.7e-285)
(/ b (* c_m z))
(if (<= y 1.28e-188)
(/ (* (* a t) -4.0) c_m)
(if (<= y 4.5e-133)
t_2
(if (<= y 1.15e-92)
(* -4.0 (* t (/ a c_m)))
(if (<= y 7.8e-47)
t_1
(if (<= y 9.8e+33)
t_3
(if (<= y 5.5e+99)
t_1
(if (<= y 5.2e+142)
(* 9.0 (* (/ y c_m) (/ x z)))
(if (<= y 3.1e+168)
t_2
(if (<= y 3e+176)
t_3
(* y (/ (* 9.0 x) (* c_m z)))))))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 1.0 / ((c_m * z) / b);
double t_2 = (b * (1.0 / z)) / c_m;
double t_3 = a * (-4.0 * (t / c_m));
double tmp;
if (y <= -1.05e-60) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else if (y <= -2.7e-285) {
tmp = b / (c_m * z);
} else if (y <= 1.28e-188) {
tmp = ((a * t) * -4.0) / c_m;
} else if (y <= 4.5e-133) {
tmp = t_2;
} else if (y <= 1.15e-92) {
tmp = -4.0 * (t * (a / c_m));
} else if (y <= 7.8e-47) {
tmp = t_1;
} else if (y <= 9.8e+33) {
tmp = t_3;
} else if (y <= 5.5e+99) {
tmp = t_1;
} else if (y <= 5.2e+142) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (y <= 3.1e+168) {
tmp = t_2;
} else if (y <= 3e+176) {
tmp = t_3;
} else {
tmp = y * ((9.0 * x) / (c_m * z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 1.0d0 / ((c_m * z) / b)
t_2 = (b * (1.0d0 / z)) / c_m
t_3 = a * ((-4.0d0) * (t / c_m))
if (y <= (-1.05d-60)) then
tmp = 9.0d0 * ((x / c_m) * (y / z))
else if (y <= (-2.7d-285)) then
tmp = b / (c_m * z)
else if (y <= 1.28d-188) then
tmp = ((a * t) * (-4.0d0)) / c_m
else if (y <= 4.5d-133) then
tmp = t_2
else if (y <= 1.15d-92) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (y <= 7.8d-47) then
tmp = t_1
else if (y <= 9.8d+33) then
tmp = t_3
else if (y <= 5.5d+99) then
tmp = t_1
else if (y <= 5.2d+142) then
tmp = 9.0d0 * ((y / c_m) * (x / z))
else if (y <= 3.1d+168) then
tmp = t_2
else if (y <= 3d+176) then
tmp = t_3
else
tmp = y * ((9.0d0 * x) / (c_m * z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 1.0 / ((c_m * z) / b);
double t_2 = (b * (1.0 / z)) / c_m;
double t_3 = a * (-4.0 * (t / c_m));
double tmp;
if (y <= -1.05e-60) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else if (y <= -2.7e-285) {
tmp = b / (c_m * z);
} else if (y <= 1.28e-188) {
tmp = ((a * t) * -4.0) / c_m;
} else if (y <= 4.5e-133) {
tmp = t_2;
} else if (y <= 1.15e-92) {
tmp = -4.0 * (t * (a / c_m));
} else if (y <= 7.8e-47) {
tmp = t_1;
} else if (y <= 9.8e+33) {
tmp = t_3;
} else if (y <= 5.5e+99) {
tmp = t_1;
} else if (y <= 5.2e+142) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (y <= 3.1e+168) {
tmp = t_2;
} else if (y <= 3e+176) {
tmp = t_3;
} else {
tmp = y * ((9.0 * x) / (c_m * z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 1.0 / ((c_m * z) / b) t_2 = (b * (1.0 / z)) / c_m t_3 = a * (-4.0 * (t / c_m)) tmp = 0 if y <= -1.05e-60: tmp = 9.0 * ((x / c_m) * (y / z)) elif y <= -2.7e-285: tmp = b / (c_m * z) elif y <= 1.28e-188: tmp = ((a * t) * -4.0) / c_m elif y <= 4.5e-133: tmp = t_2 elif y <= 1.15e-92: tmp = -4.0 * (t * (a / c_m)) elif y <= 7.8e-47: tmp = t_1 elif y <= 9.8e+33: tmp = t_3 elif y <= 5.5e+99: tmp = t_1 elif y <= 5.2e+142: tmp = 9.0 * ((y / c_m) * (x / z)) elif y <= 3.1e+168: tmp = t_2 elif y <= 3e+176: tmp = t_3 else: tmp = y * ((9.0 * x) / (c_m * z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(1.0 / Float64(Float64(c_m * z) / b)) t_2 = Float64(Float64(b * Float64(1.0 / z)) / c_m) t_3 = Float64(a * Float64(-4.0 * Float64(t / c_m))) tmp = 0.0 if (y <= -1.05e-60) tmp = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))); elseif (y <= -2.7e-285) tmp = Float64(b / Float64(c_m * z)); elseif (y <= 1.28e-188) tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m); elseif (y <= 4.5e-133) tmp = t_2; elseif (y <= 1.15e-92) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (y <= 7.8e-47) tmp = t_1; elseif (y <= 9.8e+33) tmp = t_3; elseif (y <= 5.5e+99) tmp = t_1; elseif (y <= 5.2e+142) tmp = Float64(9.0 * Float64(Float64(y / c_m) * Float64(x / z))); elseif (y <= 3.1e+168) tmp = t_2; elseif (y <= 3e+176) tmp = t_3; else tmp = Float64(y * Float64(Float64(9.0 * x) / Float64(c_m * z))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 1.0 / ((c_m * z) / b);
t_2 = (b * (1.0 / z)) / c_m;
t_3 = a * (-4.0 * (t / c_m));
tmp = 0.0;
if (y <= -1.05e-60)
tmp = 9.0 * ((x / c_m) * (y / z));
elseif (y <= -2.7e-285)
tmp = b / (c_m * z);
elseif (y <= 1.28e-188)
tmp = ((a * t) * -4.0) / c_m;
elseif (y <= 4.5e-133)
tmp = t_2;
elseif (y <= 1.15e-92)
tmp = -4.0 * (t * (a / c_m));
elseif (y <= 7.8e-47)
tmp = t_1;
elseif (y <= 9.8e+33)
tmp = t_3;
elseif (y <= 5.5e+99)
tmp = t_1;
elseif (y <= 5.2e+142)
tmp = 9.0 * ((y / c_m) * (x / z));
elseif (y <= 3.1e+168)
tmp = t_2;
elseif (y <= 3e+176)
tmp = t_3;
else
tmp = y * ((9.0 * x) / (c_m * z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(1.0 / N[(N[(c$95$m * z), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -1.05e-60], N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.7e-285], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.28e-188], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[y, 4.5e-133], t$95$2, If[LessEqual[y, 1.15e-92], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8e-47], t$95$1, If[LessEqual[y, 9.8e+33], t$95$3, If[LessEqual[y, 5.5e+99], t$95$1, If[LessEqual[y, 5.2e+142], N[(9.0 * N[(N[(y / c$95$m), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+168], t$95$2, If[LessEqual[y, 3e+176], t$95$3, N[(y * N[(N[(9.0 * x), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]), $MachinePrecision]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{c\_m \cdot z}{b}}\\
t_2 := \frac{b \cdot \frac{1}{z}}{c\_m}\\
t_3 := a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-60}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-285}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{-188}:\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-133}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-92}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+33}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+142}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c\_m} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+168}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+176}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{9 \cdot x}{c\_m \cdot z}\\
\end{array}
\end{array}
\end{array}
if y < -1.04999999999999996e-60Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
associate-*l*81.6%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in x around inf 48.8%
times-frac49.0%
Simplified49.0%
if -1.04999999999999996e-60 < y < -2.6999999999999998e-285Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*83.2%
*-commutative83.2%
associate-+l-83.2%
associate-*l*83.2%
associate-*l*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in b around inf 51.6%
*-commutative51.6%
Simplified51.6%
if -2.6999999999999998e-285 < y < 1.28e-188Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*89.8%
*-commutative89.8%
associate-+l-89.8%
associate-*l*89.8%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in z around inf 45.3%
associate-*r/45.3%
Simplified45.3%
if 1.28e-188 < y < 4.50000000000000009e-133 or 5.20000000000000043e142 < y < 3.09999999999999996e168Initial program 67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*67.9%
*-commutative67.9%
Simplified67.9%
Applied egg-rr45.7%
Taylor expanded in b around inf 36.0%
associate-*r/41.1%
Applied egg-rr41.1%
if 4.50000000000000009e-133 < y < 1.15000000000000008e-92Initial program 77.5%
associate-+l-77.5%
*-commutative77.5%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
associate-*l*66.6%
associate-*l*77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in z around inf 45.6%
*-commutative45.6%
*-commutative45.6%
associate-/l*45.7%
Simplified45.7%
if 1.15000000000000008e-92 < y < 7.79999999999999956e-47 or 9.80000000000000027e33 < y < 5.5000000000000002e99Initial program 67.7%
associate-+l-67.7%
*-commutative67.7%
associate-*r*67.1%
*-commutative67.1%
associate-+l-67.1%
associate-*l*67.2%
associate-*l*67.8%
*-commutative67.8%
Simplified67.8%
Applied egg-rr54.5%
Taylor expanded in b around inf 22.7%
clear-num22.7%
frac-times22.7%
metadata-eval22.7%
Applied egg-rr22.7%
*-commutative22.7%
associate-*l/35.6%
associate-/r/35.6%
Simplified35.6%
associate-*l/35.6%
*-un-lft-identity35.6%
clear-num35.6%
*-commutative35.6%
Applied egg-rr35.6%
if 7.79999999999999956e-47 < y < 9.80000000000000027e33 or 3.09999999999999996e168 < y < 3e176Initial program 76.4%
associate-+l-76.4%
*-commutative76.4%
associate-*r*76.5%
*-commutative76.5%
associate-+l-76.5%
associate-*l*76.5%
associate-*l*80.3%
*-commutative80.3%
Simplified80.3%
add-cube-cbrt80.2%
pow380.2%
associate-*r*80.2%
*-commutative80.2%
associate-*l*80.0%
Applied egg-rr80.0%
Taylor expanded in z around inf 49.3%
*-commutative49.3%
associate-/l*53.1%
associate-*l*53.1%
Simplified53.1%
if 5.5000000000000002e99 < y < 5.20000000000000043e142Initial program 80.0%
associate-+l-80.0%
*-commutative80.0%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
associate-*l*80.0%
associate-*l*80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in x around inf 80.3%
*-commutative80.3%
times-frac80.4%
Simplified80.4%
if 3e176 < y Initial program 85.7%
associate-+l-85.7%
*-commutative85.7%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
associate-*l*77.0%
associate-*l*79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in x around inf 68.3%
*-commutative68.3%
times-frac71.0%
Simplified71.0%
Taylor expanded in x around 0 68.3%
associate-*r/68.4%
associate-*r*68.5%
*-commutative68.5%
*-commutative68.5%
associate-/l*73.1%
*-commutative73.1%
Simplified73.1%
Final simplification51.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (* b (/ 1.0 z)) c_m))
(t_2 (/ b (* c_m z)))
(t_3 (* 9.0 (* (/ x c_m) (/ y z))))
(t_4 (* a (* -4.0 (/ t c_m)))))
(*
c_s
(if (<= x -3.1e+155)
t_3
(if (<= x -1.45e+101)
t_2
(if (<= x -2.1e+54)
t_3
(if (<= x -0.0005)
(* -4.0 (* t (/ a c_m)))
(if (<= x -4.2e-78)
t_2
(if (<= x -1.1e-125)
t_4
(if (<= x -1.6e-274)
t_1
(if (<= x -5.3e-306)
t_4
(if (<= x 6.5e-286)
t_1
(if (<= x 1080000000000.0) t_4 t_3)))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b * (1.0 / z)) / c_m;
double t_2 = b / (c_m * z);
double t_3 = 9.0 * ((x / c_m) * (y / z));
double t_4 = a * (-4.0 * (t / c_m));
double tmp;
if (x <= -3.1e+155) {
tmp = t_3;
} else if (x <= -1.45e+101) {
tmp = t_2;
} else if (x <= -2.1e+54) {
tmp = t_3;
} else if (x <= -0.0005) {
tmp = -4.0 * (t * (a / c_m));
} else if (x <= -4.2e-78) {
tmp = t_2;
} else if (x <= -1.1e-125) {
tmp = t_4;
} else if (x <= -1.6e-274) {
tmp = t_1;
} else if (x <= -5.3e-306) {
tmp = t_4;
} else if (x <= 6.5e-286) {
tmp = t_1;
} else if (x <= 1080000000000.0) {
tmp = t_4;
} else {
tmp = t_3;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (b * (1.0d0 / z)) / c_m
t_2 = b / (c_m * z)
t_3 = 9.0d0 * ((x / c_m) * (y / z))
t_4 = a * ((-4.0d0) * (t / c_m))
if (x <= (-3.1d+155)) then
tmp = t_3
else if (x <= (-1.45d+101)) then
tmp = t_2
else if (x <= (-2.1d+54)) then
tmp = t_3
else if (x <= (-0.0005d0)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (x <= (-4.2d-78)) then
tmp = t_2
else if (x <= (-1.1d-125)) then
tmp = t_4
else if (x <= (-1.6d-274)) then
tmp = t_1
else if (x <= (-5.3d-306)) then
tmp = t_4
else if (x <= 6.5d-286) then
tmp = t_1
else if (x <= 1080000000000.0d0) then
tmp = t_4
else
tmp = t_3
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b * (1.0 / z)) / c_m;
double t_2 = b / (c_m * z);
double t_3 = 9.0 * ((x / c_m) * (y / z));
double t_4 = a * (-4.0 * (t / c_m));
double tmp;
if (x <= -3.1e+155) {
tmp = t_3;
} else if (x <= -1.45e+101) {
tmp = t_2;
} else if (x <= -2.1e+54) {
tmp = t_3;
} else if (x <= -0.0005) {
tmp = -4.0 * (t * (a / c_m));
} else if (x <= -4.2e-78) {
tmp = t_2;
} else if (x <= -1.1e-125) {
tmp = t_4;
} else if (x <= -1.6e-274) {
tmp = t_1;
} else if (x <= -5.3e-306) {
tmp = t_4;
} else if (x <= 6.5e-286) {
tmp = t_1;
} else if (x <= 1080000000000.0) {
tmp = t_4;
} else {
tmp = t_3;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (b * (1.0 / z)) / c_m t_2 = b / (c_m * z) t_3 = 9.0 * ((x / c_m) * (y / z)) t_4 = a * (-4.0 * (t / c_m)) tmp = 0 if x <= -3.1e+155: tmp = t_3 elif x <= -1.45e+101: tmp = t_2 elif x <= -2.1e+54: tmp = t_3 elif x <= -0.0005: tmp = -4.0 * (t * (a / c_m)) elif x <= -4.2e-78: tmp = t_2 elif x <= -1.1e-125: tmp = t_4 elif x <= -1.6e-274: tmp = t_1 elif x <= -5.3e-306: tmp = t_4 elif x <= 6.5e-286: tmp = t_1 elif x <= 1080000000000.0: tmp = t_4 else: tmp = t_3 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(b * Float64(1.0 / z)) / c_m) t_2 = Float64(b / Float64(c_m * z)) t_3 = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))) t_4 = Float64(a * Float64(-4.0 * Float64(t / c_m))) tmp = 0.0 if (x <= -3.1e+155) tmp = t_3; elseif (x <= -1.45e+101) tmp = t_2; elseif (x <= -2.1e+54) tmp = t_3; elseif (x <= -0.0005) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (x <= -4.2e-78) tmp = t_2; elseif (x <= -1.1e-125) tmp = t_4; elseif (x <= -1.6e-274) tmp = t_1; elseif (x <= -5.3e-306) tmp = t_4; elseif (x <= 6.5e-286) tmp = t_1; elseif (x <= 1080000000000.0) tmp = t_4; else tmp = t_3; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (b * (1.0 / z)) / c_m;
t_2 = b / (c_m * z);
t_3 = 9.0 * ((x / c_m) * (y / z));
t_4 = a * (-4.0 * (t / c_m));
tmp = 0.0;
if (x <= -3.1e+155)
tmp = t_3;
elseif (x <= -1.45e+101)
tmp = t_2;
elseif (x <= -2.1e+54)
tmp = t_3;
elseif (x <= -0.0005)
tmp = -4.0 * (t * (a / c_m));
elseif (x <= -4.2e-78)
tmp = t_2;
elseif (x <= -1.1e-125)
tmp = t_4;
elseif (x <= -1.6e-274)
tmp = t_1;
elseif (x <= -5.3e-306)
tmp = t_4;
elseif (x <= 6.5e-286)
tmp = t_1;
elseif (x <= 1080000000000.0)
tmp = t_4;
else
tmp = t_3;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -3.1e+155], t$95$3, If[LessEqual[x, -1.45e+101], t$95$2, If[LessEqual[x, -2.1e+54], t$95$3, If[LessEqual[x, -0.0005], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-78], t$95$2, If[LessEqual[x, -1.1e-125], t$95$4, If[LessEqual[x, -1.6e-274], t$95$1, If[LessEqual[x, -5.3e-306], t$95$4, If[LessEqual[x, 6.5e-286], t$95$1, If[LessEqual[x, 1080000000000.0], t$95$4, t$95$3]]]]]]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{b \cdot \frac{1}{z}}{c\_m}\\
t_2 := \frac{b}{c\_m \cdot z}\\
t_3 := 9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
t_4 := a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{+155}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{+101}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{+54}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -0.0005:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-78}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-125}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{-306}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1080000000000:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
\end{array}
if x < -3.09999999999999989e155 or -1.44999999999999994e101 < x < -2.09999999999999986e54 or 1.08e12 < x Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
associate-*l*79.2%
associate-*l*79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in x around inf 53.4%
times-frac58.8%
Simplified58.8%
if -3.09999999999999989e155 < x < -1.44999999999999994e101 or -5.0000000000000001e-4 < x < -4.2000000000000001e-78Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*87.2%
*-commutative87.2%
associate-+l-87.2%
associate-*l*87.1%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in b around inf 49.2%
*-commutative49.2%
Simplified49.2%
if -2.09999999999999986e54 < x < -5.0000000000000001e-4Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*61.6%
*-commutative61.6%
associate-+l-61.6%
associate-*l*61.9%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 61.0%
*-commutative61.0%
*-commutative61.0%
associate-/l*42.1%
Simplified42.1%
if -4.2000000000000001e-78 < x < -1.09999999999999997e-125 or -1.59999999999999989e-274 < x < -5.2999999999999998e-306 or 6.5000000000000004e-286 < x < 1.08e12Initial program 79.0%
associate-+l-79.0%
*-commutative79.0%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*76.6%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
add-cube-cbrt81.2%
pow381.2%
associate-*r*82.4%
*-commutative82.4%
associate-*l*82.4%
Applied egg-rr82.4%
Taylor expanded in z around inf 52.0%
*-commutative52.0%
associate-/l*54.3%
associate-*l*54.3%
Simplified54.3%
if -1.09999999999999997e-125 < x < -1.59999999999999989e-274 or -5.2999999999999998e-306 < x < 6.5000000000000004e-286Initial program 88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*88.9%
*-commutative88.9%
Simplified88.9%
Applied egg-rr64.5%
Taylor expanded in b around inf 60.2%
associate-*r/67.6%
Applied egg-rr67.6%
Final simplification57.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* a (* -4.0 (/ t c_m))))
(t_2 (/ (* b (/ 1.0 z)) c_m))
(t_3 (/ b (* c_m z)))
(t_4 (* 9.0 (* (/ x c_m) (/ y z)))))
(*
c_s
(if (<= x -4e+155)
(* 9.0 (/ (* x y) (* c_m z)))
(if (<= x -1.45e+101)
t_3
(if (<= x -2.1e+54)
t_4
(if (<= x -6.5e-5)
(* -4.0 (* t (/ a c_m)))
(if (<= x -1.65e-78)
t_3
(if (<= x -4.1e-126)
t_1
(if (<= x -1.2e-274)
t_2
(if (<= x -5.2e-306)
t_1
(if (<= x 2.1e-276)
t_2
(if (<= x 3.6e+14) t_1 t_4)))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = a * (-4.0 * (t / c_m));
double t_2 = (b * (1.0 / z)) / c_m;
double t_3 = b / (c_m * z);
double t_4 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (x <= -4e+155) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (x <= -1.45e+101) {
tmp = t_3;
} else if (x <= -2.1e+54) {
tmp = t_4;
} else if (x <= -6.5e-5) {
tmp = -4.0 * (t * (a / c_m));
} else if (x <= -1.65e-78) {
tmp = t_3;
} else if (x <= -4.1e-126) {
tmp = t_1;
} else if (x <= -1.2e-274) {
tmp = t_2;
} else if (x <= -5.2e-306) {
tmp = t_1;
} else if (x <= 2.1e-276) {
tmp = t_2;
} else if (x <= 3.6e+14) {
tmp = t_1;
} else {
tmp = t_4;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = a * ((-4.0d0) * (t / c_m))
t_2 = (b * (1.0d0 / z)) / c_m
t_3 = b / (c_m * z)
t_4 = 9.0d0 * ((x / c_m) * (y / z))
if (x <= (-4d+155)) then
tmp = 9.0d0 * ((x * y) / (c_m * z))
else if (x <= (-1.45d+101)) then
tmp = t_3
else if (x <= (-2.1d+54)) then
tmp = t_4
else if (x <= (-6.5d-5)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (x <= (-1.65d-78)) then
tmp = t_3
else if (x <= (-4.1d-126)) then
tmp = t_1
else if (x <= (-1.2d-274)) then
tmp = t_2
else if (x <= (-5.2d-306)) then
tmp = t_1
else if (x <= 2.1d-276) then
tmp = t_2
else if (x <= 3.6d+14) then
tmp = t_1
else
tmp = t_4
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = a * (-4.0 * (t / c_m));
double t_2 = (b * (1.0 / z)) / c_m;
double t_3 = b / (c_m * z);
double t_4 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (x <= -4e+155) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (x <= -1.45e+101) {
tmp = t_3;
} else if (x <= -2.1e+54) {
tmp = t_4;
} else if (x <= -6.5e-5) {
tmp = -4.0 * (t * (a / c_m));
} else if (x <= -1.65e-78) {
tmp = t_3;
} else if (x <= -4.1e-126) {
tmp = t_1;
} else if (x <= -1.2e-274) {
tmp = t_2;
} else if (x <= -5.2e-306) {
tmp = t_1;
} else if (x <= 2.1e-276) {
tmp = t_2;
} else if (x <= 3.6e+14) {
tmp = t_1;
} else {
tmp = t_4;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = a * (-4.0 * (t / c_m)) t_2 = (b * (1.0 / z)) / c_m t_3 = b / (c_m * z) t_4 = 9.0 * ((x / c_m) * (y / z)) tmp = 0 if x <= -4e+155: tmp = 9.0 * ((x * y) / (c_m * z)) elif x <= -1.45e+101: tmp = t_3 elif x <= -2.1e+54: tmp = t_4 elif x <= -6.5e-5: tmp = -4.0 * (t * (a / c_m)) elif x <= -1.65e-78: tmp = t_3 elif x <= -4.1e-126: tmp = t_1 elif x <= -1.2e-274: tmp = t_2 elif x <= -5.2e-306: tmp = t_1 elif x <= 2.1e-276: tmp = t_2 elif x <= 3.6e+14: tmp = t_1 else: tmp = t_4 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(a * Float64(-4.0 * Float64(t / c_m))) t_2 = Float64(Float64(b * Float64(1.0 / z)) / c_m) t_3 = Float64(b / Float64(c_m * z)) t_4 = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))) tmp = 0.0 if (x <= -4e+155) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z))); elseif (x <= -1.45e+101) tmp = t_3; elseif (x <= -2.1e+54) tmp = t_4; elseif (x <= -6.5e-5) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (x <= -1.65e-78) tmp = t_3; elseif (x <= -4.1e-126) tmp = t_1; elseif (x <= -1.2e-274) tmp = t_2; elseif (x <= -5.2e-306) tmp = t_1; elseif (x <= 2.1e-276) tmp = t_2; elseif (x <= 3.6e+14) tmp = t_1; else tmp = t_4; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = a * (-4.0 * (t / c_m));
t_2 = (b * (1.0 / z)) / c_m;
t_3 = b / (c_m * z);
t_4 = 9.0 * ((x / c_m) * (y / z));
tmp = 0.0;
if (x <= -4e+155)
tmp = 9.0 * ((x * y) / (c_m * z));
elseif (x <= -1.45e+101)
tmp = t_3;
elseif (x <= -2.1e+54)
tmp = t_4;
elseif (x <= -6.5e-5)
tmp = -4.0 * (t * (a / c_m));
elseif (x <= -1.65e-78)
tmp = t_3;
elseif (x <= -4.1e-126)
tmp = t_1;
elseif (x <= -1.2e-274)
tmp = t_2;
elseif (x <= -5.2e-306)
tmp = t_1;
elseif (x <= 2.1e-276)
tmp = t_2;
elseif (x <= 3.6e+14)
tmp = t_1;
else
tmp = t_4;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$3 = N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -4e+155], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e+101], t$95$3, If[LessEqual[x, -2.1e+54], t$95$4, If[LessEqual[x, -6.5e-5], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.65e-78], t$95$3, If[LessEqual[x, -4.1e-126], t$95$1, If[LessEqual[x, -1.2e-274], t$95$2, If[LessEqual[x, -5.2e-306], t$95$1, If[LessEqual[x, 2.1e-276], t$95$2, If[LessEqual[x, 3.6e+14], t$95$1, t$95$4]]]]]]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
t_2 := \frac{b \cdot \frac{1}{z}}{c\_m}\\
t_3 := \frac{b}{c\_m \cdot z}\\
t_4 := 9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+155}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c\_m \cdot z}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{+101}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{+54}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-78}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-276}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
\end{array}
if x < -4.00000000000000003e155Initial program 81.5%
associate-+l-81.5%
*-commutative81.5%
associate-*r*83.8%
*-commutative83.8%
associate-+l-83.8%
associate-*l*83.8%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in x around inf 70.1%
if -4.00000000000000003e155 < x < -1.44999999999999994e101 or -6.49999999999999943e-5 < x < -1.64999999999999991e-78Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*87.2%
*-commutative87.2%
associate-+l-87.2%
associate-*l*87.1%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in b around inf 49.2%
*-commutative49.2%
Simplified49.2%
if -1.44999999999999994e101 < x < -2.09999999999999986e54 or 3.6e14 < x Initial program 74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*76.2%
*-commutative76.2%
associate-+l-76.2%
associate-*l*76.2%
associate-*l*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in x around inf 42.8%
times-frac54.4%
Simplified54.4%
if -2.09999999999999986e54 < x < -6.49999999999999943e-5Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*61.6%
*-commutative61.6%
associate-+l-61.6%
associate-*l*61.9%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 61.0%
*-commutative61.0%
*-commutative61.0%
associate-/l*42.1%
Simplified42.1%
if -1.64999999999999991e-78 < x < -4.0999999999999997e-126 or -1.2e-274 < x < -5.2000000000000001e-306 or 2.1e-276 < x < 3.6e14Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*77.0%
*-commutative77.0%
associate-+l-77.0%
associate-*l*75.8%
associate-*l*80.7%
*-commutative80.7%
Simplified80.7%
add-cube-cbrt80.6%
pow380.5%
associate-*r*81.7%
*-commutative81.7%
associate-*l*81.7%
Applied egg-rr81.7%
Taylor expanded in z around inf 50.2%
*-commutative50.2%
associate-/l*53.8%
associate-*l*53.8%
Simplified53.8%
if -4.0999999999999997e-126 < x < -1.2e-274 or -5.2000000000000001e-306 < x < 2.1e-276Initial program 87.3%
associate-+l-87.3%
*-commutative87.3%
associate-*r*87.1%
*-commutative87.1%
associate-+l-87.1%
associate-*l*87.1%
associate-*l*89.7%
*-commutative89.7%
Simplified89.7%
Applied egg-rr59.8%
Taylor expanded in b around inf 56.0%
associate-*r/62.8%
Applied egg-rr62.8%
Final simplification57.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* a (* -4.0 (/ t c_m))))
(t_2 (/ (* b (/ 1.0 z)) c_m))
(t_3 (/ b (* c_m z)))
(t_4 (* 9.0 (* (/ x c_m) (/ y z)))))
(*
c_s
(if (<= x -3.1e+155)
(* 9.0 (/ (* y (/ x c_m)) z))
(if (<= x -1.45e+101)
t_3
(if (<= x -9e+52)
t_4
(if (<= x -1.22e-5)
(* -4.0 (* t (/ a c_m)))
(if (<= x -5.8e-78)
t_3
(if (<= x -8.5e-126)
t_1
(if (<= x -1.95e-274)
t_2
(if (<= x -5.3e-306)
t_1
(if (<= x 4.2e-280)
t_2
(if (<= x 8200000000000.0) t_1 t_4)))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = a * (-4.0 * (t / c_m));
double t_2 = (b * (1.0 / z)) / c_m;
double t_3 = b / (c_m * z);
double t_4 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (x <= -3.1e+155) {
tmp = 9.0 * ((y * (x / c_m)) / z);
} else if (x <= -1.45e+101) {
tmp = t_3;
} else if (x <= -9e+52) {
tmp = t_4;
} else if (x <= -1.22e-5) {
tmp = -4.0 * (t * (a / c_m));
} else if (x <= -5.8e-78) {
tmp = t_3;
} else if (x <= -8.5e-126) {
tmp = t_1;
} else if (x <= -1.95e-274) {
tmp = t_2;
} else if (x <= -5.3e-306) {
tmp = t_1;
} else if (x <= 4.2e-280) {
tmp = t_2;
} else if (x <= 8200000000000.0) {
tmp = t_1;
} else {
tmp = t_4;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = a * ((-4.0d0) * (t / c_m))
t_2 = (b * (1.0d0 / z)) / c_m
t_3 = b / (c_m * z)
t_4 = 9.0d0 * ((x / c_m) * (y / z))
if (x <= (-3.1d+155)) then
tmp = 9.0d0 * ((y * (x / c_m)) / z)
else if (x <= (-1.45d+101)) then
tmp = t_3
else if (x <= (-9d+52)) then
tmp = t_4
else if (x <= (-1.22d-5)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (x <= (-5.8d-78)) then
tmp = t_3
else if (x <= (-8.5d-126)) then
tmp = t_1
else if (x <= (-1.95d-274)) then
tmp = t_2
else if (x <= (-5.3d-306)) then
tmp = t_1
else if (x <= 4.2d-280) then
tmp = t_2
else if (x <= 8200000000000.0d0) then
tmp = t_1
else
tmp = t_4
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = a * (-4.0 * (t / c_m));
double t_2 = (b * (1.0 / z)) / c_m;
double t_3 = b / (c_m * z);
double t_4 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (x <= -3.1e+155) {
tmp = 9.0 * ((y * (x / c_m)) / z);
} else if (x <= -1.45e+101) {
tmp = t_3;
} else if (x <= -9e+52) {
tmp = t_4;
} else if (x <= -1.22e-5) {
tmp = -4.0 * (t * (a / c_m));
} else if (x <= -5.8e-78) {
tmp = t_3;
} else if (x <= -8.5e-126) {
tmp = t_1;
} else if (x <= -1.95e-274) {
tmp = t_2;
} else if (x <= -5.3e-306) {
tmp = t_1;
} else if (x <= 4.2e-280) {
tmp = t_2;
} else if (x <= 8200000000000.0) {
tmp = t_1;
} else {
tmp = t_4;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = a * (-4.0 * (t / c_m)) t_2 = (b * (1.0 / z)) / c_m t_3 = b / (c_m * z) t_4 = 9.0 * ((x / c_m) * (y / z)) tmp = 0 if x <= -3.1e+155: tmp = 9.0 * ((y * (x / c_m)) / z) elif x <= -1.45e+101: tmp = t_3 elif x <= -9e+52: tmp = t_4 elif x <= -1.22e-5: tmp = -4.0 * (t * (a / c_m)) elif x <= -5.8e-78: tmp = t_3 elif x <= -8.5e-126: tmp = t_1 elif x <= -1.95e-274: tmp = t_2 elif x <= -5.3e-306: tmp = t_1 elif x <= 4.2e-280: tmp = t_2 elif x <= 8200000000000.0: tmp = t_1 else: tmp = t_4 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(a * Float64(-4.0 * Float64(t / c_m))) t_2 = Float64(Float64(b * Float64(1.0 / z)) / c_m) t_3 = Float64(b / Float64(c_m * z)) t_4 = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))) tmp = 0.0 if (x <= -3.1e+155) tmp = Float64(9.0 * Float64(Float64(y * Float64(x / c_m)) / z)); elseif (x <= -1.45e+101) tmp = t_3; elseif (x <= -9e+52) tmp = t_4; elseif (x <= -1.22e-5) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (x <= -5.8e-78) tmp = t_3; elseif (x <= -8.5e-126) tmp = t_1; elseif (x <= -1.95e-274) tmp = t_2; elseif (x <= -5.3e-306) tmp = t_1; elseif (x <= 4.2e-280) tmp = t_2; elseif (x <= 8200000000000.0) tmp = t_1; else tmp = t_4; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = a * (-4.0 * (t / c_m));
t_2 = (b * (1.0 / z)) / c_m;
t_3 = b / (c_m * z);
t_4 = 9.0 * ((x / c_m) * (y / z));
tmp = 0.0;
if (x <= -3.1e+155)
tmp = 9.0 * ((y * (x / c_m)) / z);
elseif (x <= -1.45e+101)
tmp = t_3;
elseif (x <= -9e+52)
tmp = t_4;
elseif (x <= -1.22e-5)
tmp = -4.0 * (t * (a / c_m));
elseif (x <= -5.8e-78)
tmp = t_3;
elseif (x <= -8.5e-126)
tmp = t_1;
elseif (x <= -1.95e-274)
tmp = t_2;
elseif (x <= -5.3e-306)
tmp = t_1;
elseif (x <= 4.2e-280)
tmp = t_2;
elseif (x <= 8200000000000.0)
tmp = t_1;
else
tmp = t_4;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$3 = N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -3.1e+155], N[(9.0 * N[(N[(y * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e+101], t$95$3, If[LessEqual[x, -9e+52], t$95$4, If[LessEqual[x, -1.22e-5], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.8e-78], t$95$3, If[LessEqual[x, -8.5e-126], t$95$1, If[LessEqual[x, -1.95e-274], t$95$2, If[LessEqual[x, -5.3e-306], t$95$1, If[LessEqual[x, 4.2e-280], t$95$2, If[LessEqual[x, 8200000000000.0], t$95$1, t$95$4]]]]]]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
t_2 := \frac{b \cdot \frac{1}{z}}{c\_m}\\
t_3 := \frac{b}{c\_m \cdot z}\\
t_4 := 9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{+155}:\\
\;\;\;\;9 \cdot \frac{y \cdot \frac{x}{c\_m}}{z}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{+101}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -9 \cdot 10^{+52}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq -1.22 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-78}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.95 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-280}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 8200000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
\end{array}
if x < -3.09999999999999989e155Initial program 81.5%
associate-+l-81.5%
*-commutative81.5%
associate-*r*83.8%
*-commutative83.8%
associate-+l-83.8%
associate-*l*83.8%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in x around inf 70.1%
times-frac65.7%
Simplified65.7%
associate-*r/70.3%
Applied egg-rr70.3%
if -3.09999999999999989e155 < x < -1.44999999999999994e101 or -1.22000000000000001e-5 < x < -5.8000000000000001e-78Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*87.2%
*-commutative87.2%
associate-+l-87.2%
associate-*l*87.1%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in b around inf 49.2%
*-commutative49.2%
Simplified49.2%
if -1.44999999999999994e101 < x < -8.9999999999999999e52 or 8.2e12 < x Initial program 75.2%
associate-+l-75.2%
*-commutative75.2%
associate-*r*76.5%
*-commutative76.5%
associate-+l-76.5%
associate-*l*76.6%
associate-*l*76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in x around inf 43.6%
times-frac55.0%
Simplified55.0%
if -8.9999999999999999e52 < x < -1.22000000000000001e-5Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*52.4%
*-commutative52.4%
associate-+l-52.4%
associate-*l*52.4%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 75.5%
*-commutative75.5%
*-commutative75.5%
associate-/l*51.9%
Simplified51.9%
if -5.8000000000000001e-78 < x < -8.49999999999999938e-126 or -1.94999999999999993e-274 < x < -5.2999999999999998e-306 or 4.20000000000000002e-280 < x < 8.2e12Initial program 79.0%
associate-+l-79.0%
*-commutative79.0%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*76.6%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
add-cube-cbrt81.2%
pow381.2%
associate-*r*82.4%
*-commutative82.4%
associate-*l*82.4%
Applied egg-rr82.4%
Taylor expanded in z around inf 52.0%
*-commutative52.0%
associate-/l*54.3%
associate-*l*54.3%
Simplified54.3%
if -8.49999999999999938e-126 < x < -1.94999999999999993e-274 or -5.2999999999999998e-306 < x < 4.20000000000000002e-280Initial program 88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*88.9%
*-commutative88.9%
Simplified88.9%
Applied egg-rr64.5%
Taylor expanded in b around inf 60.2%
associate-*r/67.6%
Applied egg-rr67.6%
Final simplification58.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* x y))) (t_2 (/ (- (/ b z) (* a (* 4.0 t))) c_m)))
(*
c_s
(if (<= z -2.85e+48)
t_2
(if (<= z -0.00034)
(/ (- t_1 (* 4.0 (* a (* z t)))) (* c_m z))
(if (<= z -1.7e-62)
(+ (* -4.0 (/ (* a t) c_m)) (/ b (* c_m z)))
(if (<= z 6.6e+139) (/ (+ b t_1) (* c_m z)) t_2)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * (x * y);
double t_2 = ((b / z) - (a * (4.0 * t))) / c_m;
double tmp;
if (z <= -2.85e+48) {
tmp = t_2;
} else if (z <= -0.00034) {
tmp = (t_1 - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= -1.7e-62) {
tmp = (-4.0 * ((a * t) / c_m)) + (b / (c_m * z));
} else if (z <= 6.6e+139) {
tmp = (b + t_1) / (c_m * z);
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (x * y)
t_2 = ((b / z) - (a * (4.0d0 * t))) / c_m
if (z <= (-2.85d+48)) then
tmp = t_2
else if (z <= (-0.00034d0)) then
tmp = (t_1 - (4.0d0 * (a * (z * t)))) / (c_m * z)
else if (z <= (-1.7d-62)) then
tmp = ((-4.0d0) * ((a * t) / c_m)) + (b / (c_m * z))
else if (z <= 6.6d+139) then
tmp = (b + t_1) / (c_m * z)
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * (x * y);
double t_2 = ((b / z) - (a * (4.0 * t))) / c_m;
double tmp;
if (z <= -2.85e+48) {
tmp = t_2;
} else if (z <= -0.00034) {
tmp = (t_1 - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= -1.7e-62) {
tmp = (-4.0 * ((a * t) / c_m)) + (b / (c_m * z));
} else if (z <= 6.6e+139) {
tmp = (b + t_1) / (c_m * z);
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * (x * y) t_2 = ((b / z) - (a * (4.0 * t))) / c_m tmp = 0 if z <= -2.85e+48: tmp = t_2 elif z <= -0.00034: tmp = (t_1 - (4.0 * (a * (z * t)))) / (c_m * z) elif z <= -1.7e-62: tmp = (-4.0 * ((a * t) / c_m)) + (b / (c_m * z)) elif z <= 6.6e+139: tmp = (b + t_1) / (c_m * z) else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(x * y)) t_2 = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m) tmp = 0.0 if (z <= -2.85e+48) tmp = t_2; elseif (z <= -0.00034) tmp = Float64(Float64(t_1 - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c_m * z)); elseif (z <= -1.7e-62) tmp = Float64(Float64(-4.0 * Float64(Float64(a * t) / c_m)) + Float64(b / Float64(c_m * z))); elseif (z <= 6.6e+139) tmp = Float64(Float64(b + t_1) / Float64(c_m * z)); else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * (x * y);
t_2 = ((b / z) - (a * (4.0 * t))) / c_m;
tmp = 0.0;
if (z <= -2.85e+48)
tmp = t_2;
elseif (z <= -0.00034)
tmp = (t_1 - (4.0 * (a * (z * t)))) / (c_m * z);
elseif (z <= -1.7e-62)
tmp = (-4.0 * ((a * t) / c_m)) + (b / (c_m * z));
elseif (z <= 6.6e+139)
tmp = (b + t_1) / (c_m * z);
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -2.85e+48], t$95$2, If[LessEqual[z, -0.00034], N[(N[(t$95$1 - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e-62], N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+139], N[(N[(b + t$95$1), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot y\right)\\
t_2 := \frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -0.00034:\\
\;\;\;\;\frac{t\_1 - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-62}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m} + \frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+139}:\\
\;\;\;\;\frac{b + t\_1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -2.84999999999999984e48 or 6.6000000000000003e139 < z Initial program 56.2%
associate-+l-56.2%
*-commutative56.2%
associate-*r*56.9%
*-commutative56.9%
associate-+l-56.9%
associate-*l*55.8%
associate-*l*63.3%
*-commutative63.3%
Simplified63.3%
add-cube-cbrt63.2%
pow363.3%
associate-*r*64.3%
*-commutative64.3%
associate-*l*64.3%
Applied egg-rr64.3%
Taylor expanded in z around 0 83.3%
Simplified73.1%
Taylor expanded in c around -inf 91.5%
Taylor expanded in x around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
associate-*r*81.1%
*-commutative81.1%
associate-*l*81.1%
Simplified81.1%
if -2.84999999999999984e48 < z < -3.4e-4Initial program 99.2%
associate-+l-99.2%
*-commutative99.2%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 90.9%
if -3.4e-4 < z < -1.69999999999999994e-62Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
associate-*l*99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
add-cube-cbrt99.9%
pow399.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 99.9%
Simplified92.2%
Taylor expanded in x around 0 99.9%
if -1.69999999999999994e-62 < z < 6.6000000000000003e139Initial program 93.2%
associate-+l-93.2%
*-commutative93.2%
associate-*r*92.5%
*-commutative92.5%
associate-+l-92.5%
associate-*l*92.5%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 79.7%
*-commutative79.7%
Simplified79.7%
Final simplification81.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -2.9e-37) (not (<= z 1.12e-149)))
(/ (+ (* (* a t) -4.0) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(/ (+ b (* 9.0 (* x y))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2.9e-37) || !(z <= 1.12e-149)) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + (9.0 * (x * y))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if ((z <= (-2.9d-37)) .or. (.not. (z <= 1.12d-149))) then
tmp = (((a * t) * (-4.0d0)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else
tmp = (b + (9.0d0 * (x * y))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2.9e-37) || !(z <= 1.12e-149)) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + (9.0 * (x * y))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -2.9e-37) or not (z <= 1.12e-149): tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m else: tmp = (b + (9.0 * (x * y))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -2.9e-37) || !(z <= 1.12e-149)) tmp = Float64(Float64(Float64(Float64(a * t) * -4.0) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -2.9e-37) || ~((z <= 1.12e-149)))
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
else
tmp = (b + (9.0 * (x * y))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -2.9e-37], N[Not[LessEqual[z, 1.12e-149]], $MachinePrecision]], N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-37} \lor \neg \left(z \leq 1.12 \cdot 10^{-149}\right):\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4 + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -2.90000000000000005e-37 or 1.11999999999999999e-149 < z Initial program 70.7%
associate-+l-70.7%
*-commutative70.7%
associate-*r*70.5%
*-commutative70.5%
associate-+l-70.5%
associate-*l*70.0%
associate-*l*75.5%
*-commutative75.5%
Simplified75.5%
add-cube-cbrt75.3%
pow375.3%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
Applied egg-rr75.9%
Taylor expanded in z around 0 84.4%
Simplified78.7%
Taylor expanded in c around 0 91.6%
if -2.90000000000000005e-37 < z < 1.11999999999999999e-149Initial program 96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.7%
*-commutative96.7%
associate-+l-96.7%
associate-*l*96.7%
associate-*l*93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in z around 0 87.4%
*-commutative87.4%
Simplified87.4%
Final simplification90.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -200000000000.0) (not (<= z 2e+71)))
(/ (+ (* (* a t) -4.0) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -200000000000.0) || !(z <= 2e+71)) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if ((z <= (-200000000000.0d0)) .or. (.not. (z <= 2d+71))) then
tmp = (((a * t) * (-4.0d0)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -200000000000.0) || !(z <= 2e+71)) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -200000000000.0) or not (z <= 2e+71): tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -200000000000.0) || !(z <= 2e+71)) tmp = Float64(Float64(Float64(Float64(a * t) * -4.0) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -200000000000.0) || ~((z <= 2e+71)))
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -200000000000.0], N[Not[LessEqual[z, 2e+71]], $MachinePrecision]], N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -200000000000 \lor \neg \left(z \leq 2 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4 + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -2e11 or 2.0000000000000001e71 < z Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*59.7%
*-commutative59.7%
associate-+l-59.7%
associate-*l*58.8%
associate-*l*67.2%
*-commutative67.2%
Simplified67.2%
add-cube-cbrt67.1%
pow367.1%
associate-*r*68.0%
*-commutative68.0%
associate-*l*67.9%
Applied egg-rr67.9%
Taylor expanded in z around 0 84.6%
Simplified73.9%
Taylor expanded in c around 0 92.6%
if -2e11 < z < 2.0000000000000001e71Initial program 94.7%
associate-+l-94.7%
*-commutative94.7%
associate-*r*94.7%
*-commutative94.7%
associate-+l-94.7%
associate-*l*94.7%
associate-*l*92.8%
*-commutative92.8%
Simplified92.8%
Final simplification92.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -5e+19) (not (<= z 1.3e+71)))
(/ (+ (* (* a t) -4.0) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -5e+19) || !(z <= 1.3e+71)) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if ((z <= (-5d+19)) .or. (.not. (z <= 1.3d+71))) then
tmp = (((a * t) * (-4.0d0)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -5e+19) || !(z <= 1.3e+71)) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -5e+19) or not (z <= 1.3e+71): tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -5e+19) || !(z <= 1.3e+71)) tmp = Float64(Float64(Float64(Float64(a * t) * -4.0) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -5e+19) || ~((z <= 1.3e+71)))
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -5e+19], N[Not[LessEqual[z, 1.3e+71]], $MachinePrecision]], N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+19} \lor \neg \left(z \leq 1.3 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4 + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -5e19 or 1.29999999999999996e71 < z Initial program 59.6%
associate-+l-59.6%
*-commutative59.6%
associate-*r*59.4%
*-commutative59.4%
associate-+l-59.4%
associate-*l*58.4%
associate-*l*66.9%
*-commutative66.9%
Simplified66.9%
add-cube-cbrt66.8%
pow366.8%
associate-*r*67.7%
*-commutative67.7%
associate-*l*67.7%
Applied egg-rr67.7%
Taylor expanded in z around 0 84.4%
Simplified73.6%
Taylor expanded in c around 0 92.5%
if -5e19 < z < 1.29999999999999996e71Initial program 94.7%
Final simplification93.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -2e+26)
(/ (+ (* (* a t) -4.0) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(if (<= z 1.3e+71)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* c_m z))
(/ (- (/ (+ b (* 9.0 (* x y))) z) (* 4.0 (* a t))) c_m)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -2e+26) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else if (z <= 1.3e+71) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
} else {
tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-2d+26)) then
tmp = (((a * t) * (-4.0d0)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else if (z <= 1.3d+71) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (c_m * z)
else
tmp = (((b + (9.0d0 * (x * y))) / z) - (4.0d0 * (a * t))) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -2e+26) {
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else if (z <= 1.3e+71) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
} else {
tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -2e+26: tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m elif z <= 1.3e+71: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z) else: tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -2e+26) tmp = Float64(Float64(Float64(Float64(a * t) * -4.0) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); elseif (z <= 1.3e+71) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / z) - Float64(4.0 * Float64(a * t))) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -2e+26)
tmp = (((a * t) * -4.0) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
elseif (z <= 1.3e+71)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
else
tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -2e+26], N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 1.3e+71], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+26}:\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4 + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c\_m}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+71}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\end{array}
\end{array}
if z < -2.0000000000000001e26Initial program 59.4%
associate-+l-59.4%
*-commutative59.4%
associate-*r*60.5%
*-commutative60.5%
associate-+l-60.5%
associate-*l*59.0%
associate-*l*67.1%
*-commutative67.1%
Simplified67.1%
add-cube-cbrt67.0%
pow367.0%
associate-*r*68.6%
*-commutative68.6%
associate-*l*68.5%
Applied egg-rr68.5%
Taylor expanded in z around 0 81.3%
Simplified73.7%
Taylor expanded in c around 0 90.5%
if -2.0000000000000001e26 < z < 1.29999999999999996e71Initial program 94.7%
if 1.29999999999999996e71 < z Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*57.7%
*-commutative57.7%
associate-+l-57.7%
associate-*l*57.7%
associate-*l*66.6%
*-commutative66.6%
Simplified66.6%
add-cube-cbrt66.5%
pow366.5%
associate-*r*66.5%
*-commutative66.5%
associate-*l*66.5%
Applied egg-rr66.5%
Taylor expanded in z around 0 88.9%
Simplified73.6%
Taylor expanded in c around -inf 95.4%
Final simplification93.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 2.15e+42)
(/ (- (/ (+ b (* 9.0 (* x y))) z) (* 4.0 (* a t))) c_m)
(- (/ (+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)) z) (* 4.0 (/ (* a t) c_m))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 2.15e+42) {
tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m;
} else {
tmp = (((9.0 * ((x * y) / c_m)) + (b / c_m)) / z) - (4.0 * ((a * t) / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (c_m <= 2.15d+42) then
tmp = (((b + (9.0d0 * (x * y))) / z) - (4.0d0 * (a * t))) / c_m
else
tmp = (((9.0d0 * ((x * y) / c_m)) + (b / c_m)) / z) - (4.0d0 * ((a * t) / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 2.15e+42) {
tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m;
} else {
tmp = (((9.0 * ((x * y) / c_m)) + (b / c_m)) / z) - (4.0 * ((a * t) / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 2.15e+42: tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m else: tmp = (((9.0 * ((x * y) / c_m)) + (b / c_m)) / z) - (4.0 * ((a * t) / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 2.15e+42) tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / z) - Float64(4.0 * Float64(a * t))) / c_m); else tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m)) / z) - Float64(4.0 * Float64(Float64(a * t) / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 2.15e+42)
tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (a * t))) / c_m;
else
tmp = (((9.0 * ((x * y) / c_m)) + (b / c_m)) / z) - (4.0 * ((a * t) / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 2.15e+42], N[(N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 2.15 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}}{z} - 4 \cdot \frac{a \cdot t}{c\_m}\\
\end{array}
\end{array}
if c < 2.1499999999999999e42Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*82.9%
*-commutative82.9%
associate-+l-82.9%
associate-*l*82.4%
associate-*l*85.3%
*-commutative85.3%
Simplified85.3%
add-cube-cbrt85.1%
pow385.1%
associate-*r*85.6%
*-commutative85.6%
associate-*l*85.6%
Applied egg-rr85.6%
Taylor expanded in z around 0 83.1%
Simplified79.9%
Taylor expanded in c around -inf 88.3%
if 2.1499999999999999e42 < c Initial program 64.3%
associate-+l-64.3%
*-commutative64.3%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
associate-*l*66.5%
associate-*l*66.7%
*-commutative66.7%
Simplified66.7%
add-cube-cbrt66.5%
pow366.5%
associate-*r*66.5%
*-commutative66.5%
associate-*l*66.5%
Applied egg-rr66.5%
Taylor expanded in z around 0 78.3%
Simplified93.1%
Taylor expanded in c around -inf 82.7%
Taylor expanded in z around -inf 86.4%
Final simplification87.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -3e+63) (not (<= z 8.6e+139)))
(/ (- (/ b z) (* a (* 4.0 t))) c_m)
(/ (+ b (* 9.0 (* x y))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3e+63) || !(z <= 8.6e+139)) {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
} else {
tmp = (b + (9.0 * (x * y))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if ((z <= (-3d+63)) .or. (.not. (z <= 8.6d+139))) then
tmp = ((b / z) - (a * (4.0d0 * t))) / c_m
else
tmp = (b + (9.0d0 * (x * y))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3e+63) || !(z <= 8.6e+139)) {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
} else {
tmp = (b + (9.0 * (x * y))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -3e+63) or not (z <= 8.6e+139): tmp = ((b / z) - (a * (4.0 * t))) / c_m else: tmp = (b + (9.0 * (x * y))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -3e+63) || !(z <= 8.6e+139)) tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -3e+63) || ~((z <= 8.6e+139)))
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
else
tmp = (b + (9.0 * (x * y))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -3e+63], N[Not[LessEqual[z, 8.6e+139]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+63} \lor \neg \left(z \leq 8.6 \cdot 10^{+139}\right):\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -2.99999999999999999e63 or 8.5999999999999996e139 < z Initial program 54.2%
associate-+l-54.2%
*-commutative54.2%
associate-*r*54.9%
*-commutative54.9%
associate-+l-54.9%
associate-*l*53.8%
associate-*l*61.7%
*-commutative61.7%
Simplified61.7%
add-cube-cbrt61.6%
pow361.6%
associate-*r*62.7%
*-commutative62.7%
associate-*l*62.7%
Applied egg-rr62.7%
Taylor expanded in z around 0 82.6%
Simplified74.0%
Taylor expanded in c around -inf 91.1%
Taylor expanded in x around 0 81.4%
+-commutative81.4%
mul-1-neg81.4%
unsub-neg81.4%
associate-*r*81.4%
*-commutative81.4%
associate-*l*81.4%
Simplified81.4%
if -2.99999999999999999e63 < z < 8.5999999999999996e139Initial program 94.0%
associate-+l-94.0%
*-commutative94.0%
associate-*r*93.5%
*-commutative93.5%
associate-+l-93.5%
associate-*l*93.5%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in z around 0 78.7%
*-commutative78.7%
Simplified78.7%
Final simplification79.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.16e+166)
(* a (* -4.0 (/ t c_m)))
(if (<= z 1.8e+209)
(/ (+ b (* 9.0 (* x y))) (* c_m z))
(* -4.0 (* t (/ a c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1.16e+166) {
tmp = a * (-4.0 * (t / c_m));
} else if (z <= 1.8e+209) {
tmp = (b + (9.0 * (x * y))) / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-1.16d+166)) then
tmp = a * ((-4.0d0) * (t / c_m))
else if (z <= 1.8d+209) then
tmp = (b + (9.0d0 * (x * y))) / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1.16e+166) {
tmp = a * (-4.0 * (t / c_m));
} else if (z <= 1.8e+209) {
tmp = (b + (9.0 * (x * y))) / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -1.16e+166: tmp = a * (-4.0 * (t / c_m)) elif z <= 1.8e+209: tmp = (b + (9.0 * (x * y))) / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -1.16e+166) tmp = Float64(a * Float64(-4.0 * Float64(t / c_m))); elseif (z <= 1.8e+209) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -1.16e+166)
tmp = a * (-4.0 * (t / c_m));
elseif (z <= 1.8e+209)
tmp = (b + (9.0 * (x * y))) / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -1.16e+166], N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+209], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+166}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+209}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if z < -1.16000000000000002e166Initial program 40.9%
associate-+l-40.9%
*-commutative40.9%
associate-*r*46.2%
*-commutative46.2%
associate-+l-46.2%
associate-*l*43.2%
associate-*l*52.6%
*-commutative52.6%
Simplified52.6%
add-cube-cbrt52.5%
pow352.6%
associate-*r*55.5%
*-commutative55.5%
associate-*l*55.4%
Applied egg-rr55.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/l*65.0%
associate-*l*65.0%
Simplified65.0%
if -1.16000000000000002e166 < z < 1.80000000000000006e209Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*90.1%
*-commutative90.1%
associate-+l-90.1%
associate-*l*90.1%
associate-*l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in z around 0 75.2%
*-commutative75.2%
Simplified75.2%
if 1.80000000000000006e209 < z Initial program 49.4%
associate-+l-49.4%
*-commutative49.4%
associate-*r*45.4%
*-commutative45.4%
associate-+l-45.4%
associate-*l*45.4%
associate-*l*53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in z around inf 72.8%
*-commutative72.8%
*-commutative72.8%
associate-/l*65.4%
Simplified65.4%
Final simplification72.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -6.3e+44)
(/ (/ b c_m) z)
(if (<= b 1.8e+42) (* a (* -4.0 (/ t c_m))) (/ b (* c_m z))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -6.3e+44) {
tmp = (b / c_m) / z;
} else if (b <= 1.8e+42) {
tmp = a * (-4.0 * (t / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (b <= (-6.3d+44)) then
tmp = (b / c_m) / z
else if (b <= 1.8d+42) then
tmp = a * ((-4.0d0) * (t / c_m))
else
tmp = b / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -6.3e+44) {
tmp = (b / c_m) / z;
} else if (b <= 1.8e+42) {
tmp = a * (-4.0 * (t / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -6.3e+44: tmp = (b / c_m) / z elif b <= 1.8e+42: tmp = a * (-4.0 * (t / c_m)) else: tmp = b / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -6.3e+44) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 1.8e+42) tmp = Float64(a * Float64(-4.0 * Float64(t / c_m))); else tmp = Float64(b / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -6.3e+44)
tmp = (b / c_m) / z;
elseif (b <= 1.8e+42)
tmp = a * (-4.0 * (t / c_m));
else
tmp = b / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -6.3e+44], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1.8e+42], N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -6.3 \cdot 10^{+44}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{+42}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if b < -6.3e44Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*76.4%
*-commutative76.4%
associate-+l-76.4%
associate-*l*76.4%
associate-*l*76.6%
*-commutative76.6%
Simplified76.6%
Applied egg-rr74.6%
Taylor expanded in b around inf 62.9%
associate-*l/63.0%
*-un-lft-identity63.0%
Applied egg-rr63.0%
if -6.3e44 < b < 1.8e42Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*82.5%
*-commutative82.5%
associate-+l-82.5%
associate-*l*81.7%
associate-*l*82.6%
*-commutative82.6%
Simplified82.6%
add-cube-cbrt82.4%
pow382.3%
associate-*r*83.0%
*-commutative83.0%
associate-*l*83.1%
Applied egg-rr83.1%
Taylor expanded in z around inf 47.9%
*-commutative47.9%
associate-/l*48.6%
associate-*l*48.6%
Simplified48.6%
if 1.8e42 < b Initial program 88.0%
associate-+l-88.0%
*-commutative88.0%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
associate-*l*78.0%
associate-*l*86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in b around inf 61.4%
*-commutative61.4%
Simplified61.4%
Final simplification54.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -7e+44)
(/ (/ b c_m) z)
(if (<= b 6e+42) (* a (* -4.0 (/ t c_m))) (/ 1.0 (/ (* c_m z) b))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -7e+44) {
tmp = (b / c_m) / z;
} else if (b <= 6e+42) {
tmp = a * (-4.0 * (t / c_m));
} else {
tmp = 1.0 / ((c_m * z) / b);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (b <= (-7d+44)) then
tmp = (b / c_m) / z
else if (b <= 6d+42) then
tmp = a * ((-4.0d0) * (t / c_m))
else
tmp = 1.0d0 / ((c_m * z) / b)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -7e+44) {
tmp = (b / c_m) / z;
} else if (b <= 6e+42) {
tmp = a * (-4.0 * (t / c_m));
} else {
tmp = 1.0 / ((c_m * z) / b);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -7e+44: tmp = (b / c_m) / z elif b <= 6e+42: tmp = a * (-4.0 * (t / c_m)) else: tmp = 1.0 / ((c_m * z) / b) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -7e+44) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 6e+42) tmp = Float64(a * Float64(-4.0 * Float64(t / c_m))); else tmp = Float64(1.0 / Float64(Float64(c_m * z) / b)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -7e+44)
tmp = (b / c_m) / z;
elseif (b <= 6e+42)
tmp = a * (-4.0 * (t / c_m));
else
tmp = 1.0 / ((c_m * z) / b);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -7e+44], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 6e+42], N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(c$95$m * z), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+44}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+42}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{c\_m \cdot z}{b}}\\
\end{array}
\end{array}
if b < -6.9999999999999998e44Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*76.4%
*-commutative76.4%
associate-+l-76.4%
associate-*l*76.4%
associate-*l*76.6%
*-commutative76.6%
Simplified76.6%
Applied egg-rr74.6%
Taylor expanded in b around inf 62.9%
associate-*l/63.0%
*-un-lft-identity63.0%
Applied egg-rr63.0%
if -6.9999999999999998e44 < b < 6.00000000000000058e42Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*82.5%
*-commutative82.5%
associate-+l-82.5%
associate-*l*81.7%
associate-*l*82.6%
*-commutative82.6%
Simplified82.6%
add-cube-cbrt82.4%
pow382.3%
associate-*r*83.0%
*-commutative83.0%
associate-*l*83.1%
Applied egg-rr83.1%
Taylor expanded in z around inf 47.9%
*-commutative47.9%
associate-/l*48.6%
associate-*l*48.6%
Simplified48.6%
if 6.00000000000000058e42 < b Initial program 88.0%
associate-+l-88.0%
*-commutative88.0%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
associate-*l*78.0%
associate-*l*86.3%
*-commutative86.3%
Simplified86.3%
Applied egg-rr62.7%
Taylor expanded in b around inf 55.0%
clear-num55.0%
frac-times53.3%
metadata-eval53.3%
Applied egg-rr53.3%
*-commutative53.3%
associate-*l/61.4%
associate-/r/61.3%
Simplified61.3%
associate-*l/61.4%
*-un-lft-identity61.4%
clear-num61.4%
*-commutative61.4%
Applied egg-rr61.4%
Final simplification54.7%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 1 c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* c_m z))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
code = c_s * (b / (c_m * z))
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): return c_s * (b / (c_m * z))
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) return Float64(c_s * Float64(b / Float64(c_m * z))) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
tmp = c_s * (b / (c_m * z));
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \frac{b}{c\_m \cdot z}
\end{array}
Initial program 80.2%
associate-+l-80.2%
*-commutative80.2%
associate-*r*80.1%
*-commutative80.1%
associate-+l-80.1%
associate-*l*79.7%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in b around inf 38.0%
*-commutative38.0%
Simplified38.0%
Final simplification38.0%
(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 2024047
(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)))