
(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.
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 (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e+131)
(/ (+ (fma x (* 9.0 y) (* z (* a (* -4.0 t)))) b) (* c_m z))
(if (<= t_1 0.0)
(/ (/ (+ b (fma x (* 9.0 y) (* a (* z (* -4.0 t))))) c_m) z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
(fma (/ x c_m) (* 9.0 (/ y z)) (* t (/ (* -4.0 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);
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_1 <= -1e+131) {
tmp = (fma(x, (9.0 * y), (z * (a * (-4.0 * t)))) + b) / (c_m * z);
} else if (t_1 <= 0.0) {
tmp = ((b + fma(x, (9.0 * y), (a * (z * (-4.0 * t))))) / c_m) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
} else {
tmp = fma((x / c_m), (9.0 * (y / z)), (t * ((-4.0 * 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]) 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(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e+131) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(z * Float64(a * Float64(-4.0 * t)))) + b) / Float64(c_m * z)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(a * Float64(z * Float64(-4.0 * t))))) / c_m) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z)); else tmp = fma(Float64(x / c_m), Float64(9.0 * Float64(y / z)), Float64(t * Float64(Float64(-4.0 * a) / c_m))); 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.
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[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e+131], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(a * N[(z * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / c$95$m), $MachinePrecision] * N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(-4.0 * a), $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])\\\\
[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 + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+131}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(-4 \cdot t\right)\right)\right) + b}{c_m \cdot z}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(z \cdot \left(-4 \cdot t\right)\right)\right)}{c_m}}{z}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{c_m}, 9 \cdot \frac{y}{z}, t \cdot \frac{-4 \cdot a}{c_m}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.9999999999999991e130Initial program 85.2%
+-commutative85.2%
associate-+r-85.2%
*-commutative85.2%
associate-*r*92.0%
*-commutative92.0%
associate-+r-92.0%
+-commutative92.0%
Simplified90.8%
if -9.9999999999999991e130 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 80.4%
associate-+l-80.4%
*-commutative80.4%
associate-*r*72.0%
*-commutative72.0%
associate-+l-72.0%
*-commutative72.0%
associate-*r*80.4%
*-commutative80.4%
associate-*l*80.2%
associate-*l*79.0%
Simplified79.0%
Applied egg-rr92.9%
associate-*l/92.9%
*-un-lft-identity92.9%
+-commutative92.9%
Applied egg-rr92.9%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.5%
associate-+l-89.5%
*-commutative89.5%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
*-commutative89.5%
associate-*r*89.5%
*-commutative89.5%
associate-*l*89.5%
associate-*l*93.1%
Simplified93.1%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.1%
*-commutative1.1%
associate-+l-1.1%
*-commutative1.1%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*1.1%
Simplified1.1%
Applied egg-rr15.2%
Taylor expanded in b around 0 11.0%
Taylor expanded in z around 0 62.7%
associate-*r/62.7%
associate-*l/62.6%
+-commutative62.6%
*-commutative62.6%
times-frac91.2%
associate-*l*91.3%
fma-def91.3%
*-commutative91.3%
*-commutative91.3%
associate-*l*83.5%
*-commutative83.5%
associate-*l/83.7%
Simplified83.7%
Final simplification91.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.
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 1.8e-45)
(/ (+ (fma x (* 9.0 y) (* z (* a (* -4.0 t)))) b) (* c_m z))
(fma
-4.0
(/ a (/ c_m t))
(fma 9.0 (* (/ x c_m) (/ y z)) (/ 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);
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 <= 1.8e-45) {
tmp = (fma(x, (9.0 * y), (z * (a * (-4.0 * t)))) + b) / (c_m * z);
} else {
tmp = fma(-4.0, (a / (c_m / t)), fma(9.0, ((x / c_m) * (y / z)), (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]) 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 <= 1.8e-45) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(z * Float64(a * Float64(-4.0 * t)))) + b) / Float64(c_m * z)); else tmp = fma(-4.0, Float64(a / Float64(c_m / t)), fma(9.0, Float64(Float64(x / c_m) * Float64(y / z)), Float64(b / Float64(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.
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, 1.8e-45], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $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])\\\\
[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 1.8 \cdot 10^{-45}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(-4 \cdot t\right)\right)\right) + b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c_m}{t}}, \mathsf{fma}\left(9, \frac{x}{c_m} \cdot \frac{y}{z}, \frac{b}{c_m \cdot z}\right)\right)\\
\end{array}
\end{array}
if c < 1.8e-45Initial program 83.4%
+-commutative83.4%
associate-+r-83.4%
*-commutative83.4%
associate-*r*83.5%
*-commutative83.5%
associate-+r-83.5%
+-commutative83.5%
Simplified86.8%
if 1.8e-45 < c Initial program 65.6%
associate-+l-65.6%
*-commutative65.6%
associate-*r*65.7%
*-commutative65.7%
associate-+l-65.7%
*-commutative65.7%
associate-*r*65.6%
*-commutative65.6%
associate-*l*65.5%
associate-*l*68.2%
Simplified68.2%
Taylor expanded in x around 0 81.6%
cancel-sign-sub-inv81.6%
metadata-eval81.6%
+-commutative81.6%
fma-def81.6%
associate-/l*83.9%
fma-def83.9%
times-frac91.0%
*-commutative91.0%
Simplified91.0%
Final simplification88.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.
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 (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e+131)
t_2
(if (<= t_1 0.0)
(/
(+
(* -4.0 (/ (* a (* z t)) c_m))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(if (<= t_1 INFINITY)
t_2
(fma (/ x c_m) (* 9.0 (/ y z)) (* t (/ (* -4.0 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);
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
double tmp;
if (t_1 <= -1e+131) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = fma((x / c_m), (9.0 * (y / z)), (t * ((-4.0 * 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]) 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(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e+131) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); elseif (t_1 <= Inf) tmp = t_2; else tmp = fma(Float64(x / c_m), Float64(9.0 * Float64(y / z)), Float64(t * Float64(Float64(-4.0 * a) / c_m))); 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.
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[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e+131], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(N[(x / c$95$m), $MachinePrecision] * N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(-4.0 * a), $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])\\\\
[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 + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+131}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c_m} + \left(9 \cdot \frac{x \cdot y}{c_m} + \frac{b}{c_m}\right)}{z}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{c_m}, 9 \cdot \frac{y}{z}, t \cdot \frac{-4 \cdot a}{c_m}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.9999999999999991e130 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 87.8%
associate-+l-87.8%
*-commutative87.8%
associate-*r*90.5%
*-commutative90.5%
associate-+l-90.5%
*-commutative90.5%
associate-*r*87.8%
*-commutative87.8%
associate-*l*87.8%
associate-*l*92.1%
Simplified92.1%
if -9.9999999999999991e130 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 80.4%
associate-+l-80.4%
*-commutative80.4%
associate-*r*72.0%
*-commutative72.0%
associate-+l-72.0%
*-commutative72.0%
associate-*r*80.4%
*-commutative80.4%
associate-*l*80.2%
associate-*l*79.0%
Simplified79.0%
Applied egg-rr92.9%
associate-*l/92.9%
*-un-lft-identity92.9%
+-commutative92.9%
Applied egg-rr92.9%
Taylor expanded in b around 0 92.9%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.1%
*-commutative1.1%
associate-+l-1.1%
*-commutative1.1%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*1.1%
Simplified1.1%
Applied egg-rr15.2%
Taylor expanded in b around 0 11.0%
Taylor expanded in z around 0 62.7%
associate-*r/62.7%
associate-*l/62.6%
+-commutative62.6%
*-commutative62.6%
times-frac91.2%
associate-*l*91.3%
fma-def91.3%
*-commutative91.3%
*-commutative91.3%
associate-*l*83.5%
*-commutative83.5%
associate-*l/83.7%
Simplified83.7%
Final simplification91.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.
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 (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e+131)
(/ (+ (fma x (* 9.0 y) (* z (* a (* -4.0 t)))) b) (* c_m z))
(if (<= t_1 0.0)
(/
(+
(* -4.0 (/ (* a (* z t)) c_m))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
(fma (/ x c_m) (* 9.0 (/ y z)) (* t (/ (* -4.0 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);
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_1 <= -1e+131) {
tmp = (fma(x, (9.0 * y), (z * (a * (-4.0 * t)))) + b) / (c_m * z);
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
} else {
tmp = fma((x / c_m), (9.0 * (y / z)), (t * ((-4.0 * 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]) 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(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e+131) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(z * Float64(a * Float64(-4.0 * t)))) + b) / Float64(c_m * z)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z)); else tmp = fma(Float64(x / c_m), Float64(9.0 * Float64(y / z)), Float64(t * Float64(Float64(-4.0 * a) / c_m))); 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.
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[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e+131], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / c$95$m), $MachinePrecision] * N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(-4.0 * a), $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])\\\\
[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 + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+131}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(-4 \cdot t\right)\right)\right) + b}{c_m \cdot z}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c_m} + \left(9 \cdot \frac{x \cdot y}{c_m} + \frac{b}{c_m}\right)}{z}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{c_m}, 9 \cdot \frac{y}{z}, t \cdot \frac{-4 \cdot a}{c_m}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.9999999999999991e130Initial program 85.2%
+-commutative85.2%
associate-+r-85.2%
*-commutative85.2%
associate-*r*92.0%
*-commutative92.0%
associate-+r-92.0%
+-commutative92.0%
Simplified90.8%
if -9.9999999999999991e130 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 80.4%
associate-+l-80.4%
*-commutative80.4%
associate-*r*72.0%
*-commutative72.0%
associate-+l-72.0%
*-commutative72.0%
associate-*r*80.4%
*-commutative80.4%
associate-*l*80.2%
associate-*l*79.0%
Simplified79.0%
Applied egg-rr92.9%
associate-*l/92.9%
*-un-lft-identity92.9%
+-commutative92.9%
Applied egg-rr92.9%
Taylor expanded in b around 0 92.9%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.5%
associate-+l-89.5%
*-commutative89.5%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
*-commutative89.5%
associate-*r*89.5%
*-commutative89.5%
associate-*l*89.5%
associate-*l*93.1%
Simplified93.1%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.1%
*-commutative1.1%
associate-+l-1.1%
*-commutative1.1%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*1.1%
Simplified1.1%
Applied egg-rr15.2%
Taylor expanded in b around 0 11.0%
Taylor expanded in z around 0 62.7%
associate-*r/62.7%
associate-*l/62.6%
+-commutative62.6%
*-commutative62.6%
times-frac91.2%
associate-*l*91.3%
fma-def91.3%
*-commutative91.3%
*-commutative91.3%
associate-*l*83.5%
*-commutative83.5%
associate-*l/83.7%
Simplified83.7%
Final simplification91.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.
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 (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e-195)
t_2
(if (<= t_1 0.0)
(* (/ 1.0 z) (/ (+ (* -4.0 (* a (* z t))) (* 9.0 (* x y))) c_m))
(if (<= t_1 INFINITY) t_2 (* -4.0 (/ a (/ c_m t)))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
double tmp;
if (t_1 <= -1e-195) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = -4.0 * (a / (c_m / t));
}
return c_s * tmp;
}
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;
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
double tmp;
if (t_1 <= -1e-195) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = -4.0 * (a / (c_m / t));
}
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]) [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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z) t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z) tmp = 0 if t_1 <= -1e-195: tmp = t_2 elif t_1 <= 0.0: tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m) elif t_1 <= math.inf: tmp = t_2 else: tmp = -4.0 * (a / (c_m / t)) 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]) 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(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e-195) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(1.0 / z) * Float64(Float64(Float64(-4.0 * Float64(a * Float64(z * t))) + Float64(9.0 * Float64(x * y))) / c_m)); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); 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])){:}
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
tmp = 0.0;
if (t_1 <= -1e-195)
tmp = t_2;
elseif (t_1 <= 0.0)
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = -4.0 * (a / (c_m / t));
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.
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[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e-195], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(N[(-4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(-4.0 * N[(a / N[(c$95$m / t), $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])\\\\
[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 + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-195}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{1}{z} \cdot \frac{-4 \cdot \left(a \cdot \left(z \cdot t\right)\right) + 9 \cdot \left(x \cdot y\right)}{c_m}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1.0000000000000001e-195 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.4%
associate-+l-89.4%
*-commutative89.4%
associate-*r*89.9%
*-commutative89.9%
associate-+l-89.9%
*-commutative89.9%
associate-*r*89.4%
*-commutative89.4%
associate-*l*89.4%
associate-*l*93.1%
Simplified93.1%
if -1.0000000000000001e-195 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 50.8%
associate-+l-50.8%
*-commutative50.8%
associate-*r*45.5%
*-commutative45.5%
associate-+l-45.5%
*-commutative45.5%
associate-*r*50.8%
*-commutative50.8%
associate-*l*50.8%
associate-*l*46.5%
Simplified46.5%
Applied egg-rr99.4%
Taylor expanded in b around 0 77.1%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.1%
*-commutative1.1%
associate-+l-1.1%
*-commutative1.1%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*1.1%
Simplified1.1%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/l*71.5%
Simplified71.5%
Final simplification89.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.
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 (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e+131)
t_2
(if (<= t_1 0.0)
(/
(+
(* -4.0 (/ (* a (* z t)) c_m))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(if (<= t_1 INFINITY) t_2 (* -4.0 (/ a (/ c_m t)))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
double tmp;
if (t_1 <= -1e+131) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = -4.0 * (a / (c_m / t));
}
return c_s * tmp;
}
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;
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
double tmp;
if (t_1 <= -1e+131) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = -4.0 * (a / (c_m / t));
}
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]) [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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z) t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z) tmp = 0 if t_1 <= -1e+131: tmp = t_2 elif t_1 <= 0.0: tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z elif t_1 <= math.inf: tmp = t_2 else: tmp = -4.0 * (a / (c_m / t)) 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]) 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(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e+131) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); 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])){:}
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 + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
tmp = 0.0;
if (t_1 <= -1e+131)
tmp = t_2;
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = -4.0 * (a / (c_m / t));
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.
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[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e+131], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(-4.0 * N[(a / N[(c$95$m / t), $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])\\\\
[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 + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+131}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c_m} + \left(9 \cdot \frac{x \cdot y}{c_m} + \frac{b}{c_m}\right)}{z}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.9999999999999991e130 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 87.8%
associate-+l-87.8%
*-commutative87.8%
associate-*r*90.5%
*-commutative90.5%
associate-+l-90.5%
*-commutative90.5%
associate-*r*87.8%
*-commutative87.8%
associate-*l*87.8%
associate-*l*92.1%
Simplified92.1%
if -9.9999999999999991e130 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 80.4%
associate-+l-80.4%
*-commutative80.4%
associate-*r*72.0%
*-commutative72.0%
associate-+l-72.0%
*-commutative72.0%
associate-*r*80.4%
*-commutative80.4%
associate-*l*80.2%
associate-*l*79.0%
Simplified79.0%
Applied egg-rr92.9%
associate-*l/92.9%
*-un-lft-identity92.9%
+-commutative92.9%
Applied egg-rr92.9%
Taylor expanded in b around 0 92.9%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.1%
*-commutative1.1%
associate-+l-1.1%
*-commutative1.1%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*1.1%
Simplified1.1%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/l*71.5%
Simplified71.5%
Final simplification90.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.
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 (* z (* t (* a 4.0)))) (* c_m z)))
(t_2 (/ (+ b (* y (* x 9.0))) (* c_m z))))
(*
c_s
(if (<= x -7.2e+149)
t_2
(if (<= x -7.8e+108)
t_1
(if (<= x -5.2e-29)
t_2
(if (<= x 2.9e-22) t_1 (/ (* 9.0 (/ x (/ c_m y))) 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);
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 - (z * (t * (a * 4.0)))) / (c_m * z);
double t_2 = (b + (y * (x * 9.0))) / (c_m * z);
double tmp;
if (x <= -7.2e+149) {
tmp = t_2;
} else if (x <= -7.8e+108) {
tmp = t_1;
} else if (x <= -5.2e-29) {
tmp = t_2;
} else if (x <= 2.9e-22) {
tmp = t_1;
} else {
tmp = (9.0 * (x / (c_m / y))) / 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.
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 = (b - (z * (t * (a * 4.0d0)))) / (c_m * z)
t_2 = (b + (y * (x * 9.0d0))) / (c_m * z)
if (x <= (-7.2d+149)) then
tmp = t_2
else if (x <= (-7.8d+108)) then
tmp = t_1
else if (x <= (-5.2d-29)) then
tmp = t_2
else if (x <= 2.9d-22) then
tmp = t_1
else
tmp = (9.0d0 * (x / (c_m / y))) / 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;
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 - (z * (t * (a * 4.0)))) / (c_m * z);
double t_2 = (b + (y * (x * 9.0))) / (c_m * z);
double tmp;
if (x <= -7.2e+149) {
tmp = t_2;
} else if (x <= -7.8e+108) {
tmp = t_1;
} else if (x <= -5.2e-29) {
tmp = t_2;
} else if (x <= 2.9e-22) {
tmp = t_1;
} else {
tmp = (9.0 * (x / (c_m / y))) / 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]) [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 - (z * (t * (a * 4.0)))) / (c_m * z) t_2 = (b + (y * (x * 9.0))) / (c_m * z) tmp = 0 if x <= -7.2e+149: tmp = t_2 elif x <= -7.8e+108: tmp = t_1 elif x <= -5.2e-29: tmp = t_2 elif x <= 2.9e-22: tmp = t_1 else: tmp = (9.0 * (x / (c_m / y))) / 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]) 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(z * Float64(t * Float64(a * 4.0)))) / Float64(c_m * z)) t_2 = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)) tmp = 0.0 if (x <= -7.2e+149) tmp = t_2; elseif (x <= -7.8e+108) tmp = t_1; elseif (x <= -5.2e-29) tmp = t_2; elseif (x <= 2.9e-22) tmp = t_1; else tmp = Float64(Float64(9.0 * Float64(x / Float64(c_m / y))) / 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])){:}
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 - (z * (t * (a * 4.0)))) / (c_m * z);
t_2 = (b + (y * (x * 9.0))) / (c_m * z);
tmp = 0.0;
if (x <= -7.2e+149)
tmp = t_2;
elseif (x <= -7.8e+108)
tmp = t_1;
elseif (x <= -5.2e-29)
tmp = t_2;
elseif (x <= 2.9e-22)
tmp = t_1;
else
tmp = (9.0 * (x / (c_m / y))) / 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.
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[(z * N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -7.2e+149], t$95$2, If[LessEqual[x, -7.8e+108], t$95$1, If[LessEqual[x, -5.2e-29], t$95$2, If[LessEqual[x, 2.9e-22], t$95$1, N[(N[(9.0 * N[(x / N[(c$95$m / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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])\\\\
[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 - z \cdot \left(t \cdot \left(a \cdot 4\right)\right)}{c_m \cdot z}\\
t_2 := \frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+149}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \frac{x}{\frac{c_m}{y}}}{z}\\
\end{array}
\end{array}
\end{array}
if x < -7.1999999999999999e149 or -7.79999999999999969e108 < x < -5.2000000000000004e-29Initial program 67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*73.1%
*-commutative73.1%
associate-+l-73.1%
*-commutative73.1%
associate-*r*67.5%
*-commutative67.5%
associate-*l*67.5%
associate-*l*71.7%
Simplified71.7%
Taylor expanded in x around inf 62.4%
associate-*r*62.4%
Simplified62.4%
if -7.1999999999999999e149 < x < -7.79999999999999969e108 or -5.2000000000000004e-29 < x < 2.9000000000000002e-22Initial program 82.7%
associate-+l-82.7%
*-commutative82.7%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*82.7%
*-commutative82.7%
associate-*l*82.7%
associate-*l*85.6%
Simplified85.6%
Taylor expanded in x around 0 76.7%
expm1-log1p-u55.3%
expm1-udef50.3%
*-commutative50.3%
Applied egg-rr50.3%
expm1-def55.3%
expm1-log1p76.7%
associate-*r*76.7%
*-commutative76.7%
associate-*l*78.8%
*-commutative78.8%
Simplified78.8%
if 2.9000000000000002e-22 < x Initial program 80.2%
associate-+l-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-+l-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-*l*80.1%
associate-*l*81.3%
Simplified81.3%
Applied egg-rr81.7%
associate-*l/81.7%
*-un-lft-identity81.7%
+-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in x around inf 41.2%
associate-/l*45.1%
Simplified45.1%
Final simplification64.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.
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 (* y (* x 9.0))) (* c_m z))))
(*
c_s
(if (<= x -2.05e+154)
t_1
(if (<= x -3.7e+108)
(/ (- b (* z (* t (* a 4.0)))) (* c_m z))
(if (<= x -1.4e-28)
t_1
(if (<= x 1.05e-21)
(/ (/ (+ b (* -4.0 (* a (* z t)))) c_m) z)
(/ (* 9.0 (/ x (/ c_m y))) 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);
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 + (y * (x * 9.0))) / (c_m * z);
double tmp;
if (x <= -2.05e+154) {
tmp = t_1;
} else if (x <= -3.7e+108) {
tmp = (b - (z * (t * (a * 4.0)))) / (c_m * z);
} else if (x <= -1.4e-28) {
tmp = t_1;
} else if (x <= 1.05e-21) {
tmp = ((b + (-4.0 * (a * (z * t)))) / c_m) / z;
} else {
tmp = (9.0 * (x / (c_m / y))) / 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.
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) :: tmp
t_1 = (b + (y * (x * 9.0d0))) / (c_m * z)
if (x <= (-2.05d+154)) then
tmp = t_1
else if (x <= (-3.7d+108)) then
tmp = (b - (z * (t * (a * 4.0d0)))) / (c_m * z)
else if (x <= (-1.4d-28)) then
tmp = t_1
else if (x <= 1.05d-21) then
tmp = ((b + ((-4.0d0) * (a * (z * t)))) / c_m) / z
else
tmp = (9.0d0 * (x / (c_m / y))) / 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;
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 + (y * (x * 9.0))) / (c_m * z);
double tmp;
if (x <= -2.05e+154) {
tmp = t_1;
} else if (x <= -3.7e+108) {
tmp = (b - (z * (t * (a * 4.0)))) / (c_m * z);
} else if (x <= -1.4e-28) {
tmp = t_1;
} else if (x <= 1.05e-21) {
tmp = ((b + (-4.0 * (a * (z * t)))) / c_m) / z;
} else {
tmp = (9.0 * (x / (c_m / y))) / 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]) [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 + (y * (x * 9.0))) / (c_m * z) tmp = 0 if x <= -2.05e+154: tmp = t_1 elif x <= -3.7e+108: tmp = (b - (z * (t * (a * 4.0)))) / (c_m * z) elif x <= -1.4e-28: tmp = t_1 elif x <= 1.05e-21: tmp = ((b + (-4.0 * (a * (z * t)))) / c_m) / z else: tmp = (9.0 * (x / (c_m / y))) / 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]) 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(y * Float64(x * 9.0))) / Float64(c_m * z)) tmp = 0.0 if (x <= -2.05e+154) tmp = t_1; elseif (x <= -3.7e+108) tmp = Float64(Float64(b - Float64(z * Float64(t * Float64(a * 4.0)))) / Float64(c_m * z)); elseif (x <= -1.4e-28) tmp = t_1; elseif (x <= 1.05e-21) tmp = Float64(Float64(Float64(b + Float64(-4.0 * Float64(a * Float64(z * t)))) / c_m) / z); else tmp = Float64(Float64(9.0 * Float64(x / Float64(c_m / y))) / 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])){:}
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 + (y * (x * 9.0))) / (c_m * z);
tmp = 0.0;
if (x <= -2.05e+154)
tmp = t_1;
elseif (x <= -3.7e+108)
tmp = (b - (z * (t * (a * 4.0)))) / (c_m * z);
elseif (x <= -1.4e-28)
tmp = t_1;
elseif (x <= 1.05e-21)
tmp = ((b + (-4.0 * (a * (z * t)))) / c_m) / z;
else
tmp = (9.0 * (x / (c_m / y))) / 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.
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[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -2.05e+154], t$95$1, If[LessEqual[x, -3.7e+108], N[(N[(b - N[(z * N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.4e-28], t$95$1, If[LessEqual[x, 1.05e-21], N[(N[(N[(b + N[(-4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], N[(N[(9.0 * N[(x / N[(c$95$m / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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])\\\\
[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 + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2.05 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.7 \cdot 10^{+108}:\\
\;\;\;\;\frac{b - z \cdot \left(t \cdot \left(a \cdot 4\right)\right)}{c_m \cdot z}\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-21}:\\
\;\;\;\;\frac{\frac{b + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \frac{x}{\frac{c_m}{y}}}{z}\\
\end{array}
\end{array}
\end{array}
if x < -2.05e154 or -3.6999999999999998e108 < x < -1.3999999999999999e-28Initial program 67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*73.1%
*-commutative73.1%
associate-+l-73.1%
*-commutative73.1%
associate-*r*67.5%
*-commutative67.5%
associate-*l*67.5%
associate-*l*71.7%
Simplified71.7%
Taylor expanded in x around inf 62.4%
associate-*r*62.4%
Simplified62.4%
if -2.05e154 < x < -3.6999999999999998e108Initial program 57.6%
associate-+l-57.6%
*-commutative57.6%
associate-*r*58.0%
*-commutative58.0%
associate-+l-58.0%
*-commutative58.0%
associate-*r*57.6%
*-commutative57.6%
associate-*l*57.6%
associate-*l*71.7%
Simplified71.7%
Taylor expanded in x around 0 58.1%
expm1-log1p-u41.8%
expm1-udef41.8%
*-commutative41.8%
Applied egg-rr41.8%
expm1-def41.8%
expm1-log1p58.1%
associate-*r*58.1%
*-commutative58.1%
associate-*l*72.2%
*-commutative72.2%
Simplified72.2%
if -1.3999999999999999e-28 < x < 1.05000000000000006e-21Initial program 84.3%
associate-+l-84.3%
*-commutative84.3%
associate-*r*80.8%
*-commutative80.8%
associate-+l-80.8%
*-commutative80.8%
associate-*r*84.3%
*-commutative84.3%
associate-*l*84.3%
associate-*l*86.5%
Simplified86.5%
Applied egg-rr83.5%
associate-*l/83.5%
*-un-lft-identity83.5%
+-commutative83.5%
Applied egg-rr83.5%
Taylor expanded in x around 0 78.0%
if 1.05000000000000006e-21 < x Initial program 80.2%
associate-+l-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-+l-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-*l*80.1%
associate-*l*81.3%
Simplified81.3%
Applied egg-rr81.7%
associate-*l/81.7%
*-un-lft-identity81.7%
+-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in x around inf 41.2%
associate-/l*45.1%
Simplified45.1%
Final simplification64.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.
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 (* z (* t (* a 4.0)))) (* c_m z))))
(*
c_s
(if (<= b -2.6e+80)
t_1
(if (<= b 4.8e-58)
(/ (- (* 9.0 (* x y)) (* 4.0 (* a (* z t)))) (* c_m z))
(if (<= b 6.8e-19)
(/ (+ b (* y (* x 9.0))) (* c_m z))
(if (<= b 1.7e+91) (* -4.0 (* t (/ a c_m))) 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);
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 - (z * (t * (a * 4.0)))) / (c_m * z);
double tmp;
if (b <= -2.6e+80) {
tmp = t_1;
} else if (b <= 4.8e-58) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (b <= 6.8e-19) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (b <= 1.7e+91) {
tmp = -4.0 * (t * (a / c_m));
} 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.
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) :: tmp
t_1 = (b - (z * (t * (a * 4.0d0)))) / (c_m * z)
if (b <= (-2.6d+80)) then
tmp = t_1
else if (b <= 4.8d-58) then
tmp = ((9.0d0 * (x * y)) - (4.0d0 * (a * (z * t)))) / (c_m * z)
else if (b <= 6.8d-19) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else if (b <= 1.7d+91) then
tmp = (-4.0d0) * (t * (a / c_m))
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;
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 - (z * (t * (a * 4.0)))) / (c_m * z);
double tmp;
if (b <= -2.6e+80) {
tmp = t_1;
} else if (b <= 4.8e-58) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (b <= 6.8e-19) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (b <= 1.7e+91) {
tmp = -4.0 * (t * (a / c_m));
} 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]) [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 - (z * (t * (a * 4.0)))) / (c_m * z) tmp = 0 if b <= -2.6e+80: tmp = t_1 elif b <= 4.8e-58: tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (c_m * z) elif b <= 6.8e-19: tmp = (b + (y * (x * 9.0))) / (c_m * z) elif b <= 1.7e+91: tmp = -4.0 * (t * (a / c_m)) 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]) 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(z * Float64(t * Float64(a * 4.0)))) / Float64(c_m * z)) tmp = 0.0 if (b <= -2.6e+80) tmp = t_1; elseif (b <= 4.8e-58) tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c_m * z)); elseif (b <= 6.8e-19) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); elseif (b <= 1.7e+91) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); 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])){:}
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 - (z * (t * (a * 4.0)))) / (c_m * z);
tmp = 0.0;
if (b <= -2.6e+80)
tmp = t_1;
elseif (b <= 4.8e-58)
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (c_m * z);
elseif (b <= 6.8e-19)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
elseif (b <= 1.7e+91)
tmp = -4.0 * (t * (a / c_m));
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.
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[(z * N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[b, -2.6e+80], t$95$1, If[LessEqual[b, 4.8e-58], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e-19], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e+91], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\\\
[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 - z \cdot \left(t \cdot \left(a \cdot 4\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{-58}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c_m \cdot z}\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{-19}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{+91}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if b < -2.59999999999999982e80 or 1.7e91 < b Initial program 77.6%
associate-+l-77.6%
*-commutative77.6%
associate-*r*74.3%
*-commutative74.3%
associate-+l-74.3%
*-commutative74.3%
associate-*r*77.6%
*-commutative77.6%
associate-*l*77.6%
associate-*l*79.9%
Simplified79.9%
Taylor expanded in x around 0 70.9%
expm1-log1p-u55.2%
expm1-udef55.2%
*-commutative55.2%
Applied egg-rr55.2%
expm1-def55.2%
expm1-log1p70.9%
associate-*r*70.9%
*-commutative70.9%
associate-*l*73.2%
*-commutative73.2%
Simplified73.2%
if -2.59999999999999982e80 < b < 4.8000000000000001e-58Initial program 78.9%
associate-+l-78.9%
*-commutative78.9%
associate-*r*82.1%
*-commutative82.1%
associate-+l-82.1%
*-commutative82.1%
associate-*r*78.9%
*-commutative78.9%
associate-*l*78.9%
associate-*l*82.1%
Simplified82.1%
Taylor expanded in b around 0 73.7%
if 4.8000000000000001e-58 < b < 6.8000000000000004e-19Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*86.5%
*-commutative86.5%
associate-+l-86.5%
*-commutative86.5%
associate-*r*93.1%
*-commutative93.1%
associate-*l*93.1%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in x around inf 93.3%
associate-*r*93.3%
Simplified93.3%
if 6.8000000000000004e-19 < b < 1.7e91Initial program 63.4%
associate-+l-63.4%
*-commutative63.4%
associate-*r*63.2%
*-commutative63.2%
associate-+l-63.2%
*-commutative63.2%
associate-*r*63.4%
*-commutative63.4%
associate-*l*63.4%
associate-*l*67.4%
Simplified67.4%
Applied egg-rr71.7%
Taylor expanded in z around inf 66.1%
associate-/l*66.3%
associate-/r/70.1%
Simplified70.1%
Final simplification74.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.
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 (* -4.0 (/ a (/ c_m t)))))
(*
c_s
(if (<= t -4.7e+182)
t_1
(if (<= t 5.1e-197)
(/ (+ b (* y (* x 9.0))) (* c_m z))
(if (<= t 2.26e-41)
(/ (- b (* 4.0 (* a (* z t)))) (* c_m z))
(if (<= t 3.05e+16) (* (/ 1.0 z) (* 9.0 (* x (/ y c_m)))) 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);
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 = -4.0 * (a / (c_m / t));
double tmp;
if (t <= -4.7e+182) {
tmp = t_1;
} else if (t <= 5.1e-197) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (t <= 2.26e-41) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (t <= 3.05e+16) {
tmp = (1.0 / z) * (9.0 * (x * (y / c_m)));
} 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.
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) :: tmp
t_1 = (-4.0d0) * (a / (c_m / t))
if (t <= (-4.7d+182)) then
tmp = t_1
else if (t <= 5.1d-197) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else if (t <= 2.26d-41) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c_m * z)
else if (t <= 3.05d+16) then
tmp = (1.0d0 / z) * (9.0d0 * (x * (y / c_m)))
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;
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 = -4.0 * (a / (c_m / t));
double tmp;
if (t <= -4.7e+182) {
tmp = t_1;
} else if (t <= 5.1e-197) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (t <= 2.26e-41) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (t <= 3.05e+16) {
tmp = (1.0 / z) * (9.0 * (x * (y / c_m)));
} 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]) [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 = -4.0 * (a / (c_m / t)) tmp = 0 if t <= -4.7e+182: tmp = t_1 elif t <= 5.1e-197: tmp = (b + (y * (x * 9.0))) / (c_m * z) elif t <= 2.26e-41: tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z) elif t <= 3.05e+16: tmp = (1.0 / z) * (9.0 * (x * (y / c_m))) 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]) 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(-4.0 * Float64(a / Float64(c_m / t))) tmp = 0.0 if (t <= -4.7e+182) tmp = t_1; elseif (t <= 5.1e-197) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); elseif (t <= 2.26e-41) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c_m * z)); elseif (t <= 3.05e+16) tmp = Float64(Float64(1.0 / z) * Float64(9.0 * Float64(x * Float64(y / c_m)))); 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])){:}
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 = -4.0 * (a / (c_m / t));
tmp = 0.0;
if (t <= -4.7e+182)
tmp = t_1;
elseif (t <= 5.1e-197)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
elseif (t <= 2.26e-41)
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
elseif (t <= 3.05e+16)
tmp = (1.0 / z) * (9.0 * (x * (y / c_m)));
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.
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[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t, -4.7e+182], t$95$1, If[LessEqual[t, 5.1e-197], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.26e-41], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.05e+16], N[(N[(1.0 / z), $MachinePrecision] * N[(9.0 * N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c_m}{t}}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{+182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{-197}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\
\mathbf{elif}\;t \leq 2.26 \cdot 10^{-41}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c_m \cdot z}\\
\mathbf{elif}\;t \leq 3.05 \cdot 10^{+16}:\\
\;\;\;\;\frac{1}{z} \cdot \left(9 \cdot \left(x \cdot \frac{y}{c_m}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if t < -4.69999999999999983e182 or 3.05e16 < t Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*78.5%
*-commutative78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
associate-*l*78.3%
Simplified78.3%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*64.1%
Simplified64.1%
if -4.69999999999999983e182 < t < 5.1000000000000003e-197Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
*-commutative78.0%
associate-*r*81.6%
*-commutative81.6%
associate-*l*81.6%
associate-*l*82.4%
Simplified82.4%
Taylor expanded in x around inf 68.7%
associate-*r*68.7%
Simplified68.7%
if 5.1000000000000003e-197 < t < 2.26000000000000011e-41Initial program 83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*73.3%
*-commutative73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*83.0%
*-commutative83.0%
associate-*l*82.9%
associate-*l*80.2%
Simplified80.2%
Taylor expanded in x around 0 58.6%
if 2.26000000000000011e-41 < t < 3.05e16Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*83.5%
*-commutative83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*83.5%
*-commutative83.5%
associate-*l*83.4%
associate-*l*83.4%
Simplified83.4%
Applied egg-rr91.3%
Taylor expanded in x around inf 43.5%
*-commutative43.5%
associate-/l*35.5%
Simplified35.5%
associate-/r/43.7%
Applied egg-rr43.7%
Final simplification64.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.
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)))))
(*
c_s
(if (<= y -7.5e-56)
t_1
(if (<= y 7.8e-75)
(* (/ b c_m) (/ 1.0 z))
(if (<= y 1.02e+152) (* -4.0 (* t (/ a c_m))) 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);
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 tmp;
if (y <= -7.5e-56) {
tmp = t_1;
} else if (y <= 7.8e-75) {
tmp = (b / c_m) * (1.0 / z);
} else if (y <= 1.02e+152) {
tmp = -4.0 * (t * (a / c_m));
} 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.
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) :: tmp
t_1 = 9.0d0 * ((x / c_m) * (y / z))
if (y <= (-7.5d-56)) then
tmp = t_1
else if (y <= 7.8d-75) then
tmp = (b / c_m) * (1.0d0 / z)
else if (y <= 1.02d+152) then
tmp = (-4.0d0) * (t * (a / c_m))
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;
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 tmp;
if (y <= -7.5e-56) {
tmp = t_1;
} else if (y <= 7.8e-75) {
tmp = (b / c_m) * (1.0 / z);
} else if (y <= 1.02e+152) {
tmp = -4.0 * (t * (a / c_m));
} 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]) [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)) tmp = 0 if y <= -7.5e-56: tmp = t_1 elif y <= 7.8e-75: tmp = (b / c_m) * (1.0 / z) elif y <= 1.02e+152: tmp = -4.0 * (t * (a / c_m)) 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]) 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))) tmp = 0.0 if (y <= -7.5e-56) tmp = t_1; elseif (y <= 7.8e-75) tmp = Float64(Float64(b / c_m) * Float64(1.0 / z)); elseif (y <= 1.02e+152) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); 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])){:}
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));
tmp = 0.0;
if (y <= -7.5e-56)
tmp = t_1;
elseif (y <= 7.8e-75)
tmp = (b / c_m) * (1.0 / z);
elseif (y <= 1.02e+152)
tmp = -4.0 * (t * (a / c_m));
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.
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]}, N[(c$95$s * If[LessEqual[y, -7.5e-56], t$95$1, If[LessEqual[y, 7.8e-75], N[(N[(b / c$95$m), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+152], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\\\
[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)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-75}:\\
\;\;\;\;\frac{b}{c_m} \cdot \frac{1}{z}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+152}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if y < -7.50000000000000041e-56 or 1.01999999999999999e152 < y Initial program 71.2%
associate-+l-71.2%
*-commutative71.2%
associate-*r*74.1%
*-commutative74.1%
associate-+l-74.1%
*-commutative74.1%
associate-*r*71.2%
*-commutative71.2%
associate-*l*71.2%
associate-*l*76.0%
Simplified76.0%
Applied egg-rr73.3%
Taylor expanded in x around inf 43.6%
times-frac54.2%
Simplified54.2%
if -7.50000000000000041e-56 < y < 7.8000000000000003e-75Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*81.3%
*-commutative81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*84.0%
*-commutative84.0%
associate-*l*84.0%
associate-*l*85.1%
Simplified85.1%
Applied egg-rr85.1%
Taylor expanded in b around inf 50.1%
if 7.8000000000000003e-75 < y < 1.01999999999999999e152Initial program 78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*78.5%
*-commutative78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*78.2%
*-commutative78.2%
associate-*l*78.1%
associate-*l*80.4%
Simplified80.4%
Applied egg-rr78.3%
Taylor expanded in z around inf 54.3%
associate-/l*55.4%
associate-/r/56.6%
Simplified56.6%
Final simplification53.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.
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 (* (/ c_m y) (/ z x)))))
(*
c_s
(if (<= y -1e-58)
t_1
(if (<= y 3.6e-75)
(* (/ b c_m) (/ 1.0 z))
(if (<= y 5.5e+151) (* -4.0 (* t (/ a c_m))) 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);
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 / ((c_m / y) * (z / x));
double tmp;
if (y <= -1e-58) {
tmp = t_1;
} else if (y <= 3.6e-75) {
tmp = (b / c_m) * (1.0 / z);
} else if (y <= 5.5e+151) {
tmp = -4.0 * (t * (a / c_m));
} 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.
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) :: tmp
t_1 = 9.0d0 / ((c_m / y) * (z / x))
if (y <= (-1d-58)) then
tmp = t_1
else if (y <= 3.6d-75) then
tmp = (b / c_m) * (1.0d0 / z)
else if (y <= 5.5d+151) then
tmp = (-4.0d0) * (t * (a / c_m))
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;
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 / ((c_m / y) * (z / x));
double tmp;
if (y <= -1e-58) {
tmp = t_1;
} else if (y <= 3.6e-75) {
tmp = (b / c_m) * (1.0 / z);
} else if (y <= 5.5e+151) {
tmp = -4.0 * (t * (a / c_m));
} 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]) [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 / ((c_m / y) * (z / x)) tmp = 0 if y <= -1e-58: tmp = t_1 elif y <= 3.6e-75: tmp = (b / c_m) * (1.0 / z) elif y <= 5.5e+151: tmp = -4.0 * (t * (a / c_m)) 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]) 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(c_m / y) * Float64(z / x))) tmp = 0.0 if (y <= -1e-58) tmp = t_1; elseif (y <= 3.6e-75) tmp = Float64(Float64(b / c_m) * Float64(1.0 / z)); elseif (y <= 5.5e+151) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); 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])){:}
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 / ((c_m / y) * (z / x));
tmp = 0.0;
if (y <= -1e-58)
tmp = t_1;
elseif (y <= 3.6e-75)
tmp = (b / c_m) * (1.0 / z);
elseif (y <= 5.5e+151)
tmp = -4.0 * (t * (a / c_m));
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.
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[(c$95$m / y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -1e-58], t$95$1, If[LessEqual[y, 3.6e-75], N[(N[(b / c$95$m), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+151], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{9}{\frac{c_m}{y} \cdot \frac{z}{x}}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-75}:\\
\;\;\;\;\frac{b}{c_m} \cdot \frac{1}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+151}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if y < -1e-58 or 5.4999999999999994e151 < y Initial program 71.5%
associate-+l-71.5%
*-commutative71.5%
associate-*r*74.4%
*-commutative74.4%
associate-+l-74.4%
*-commutative74.4%
associate-*r*71.5%
*-commutative71.5%
associate-*l*71.5%
associate-*l*76.2%
Simplified76.2%
Taylor expanded in x around inf 43.1%
associate-*r/43.1%
*-commutative43.1%
*-commutative43.1%
associate-/l*43.1%
*-commutative43.1%
Simplified43.1%
Taylor expanded in z around 0 43.1%
*-commutative43.1%
times-frac58.9%
Simplified58.9%
if -1e-58 < y < 3.6e-75Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*83.9%
*-commutative83.9%
associate-*l*83.9%
associate-*l*85.0%
Simplified85.0%
Applied egg-rr85.0%
Taylor expanded in b around inf 50.6%
if 3.6e-75 < y < 5.4999999999999994e151Initial program 78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*78.5%
*-commutative78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*78.2%
*-commutative78.2%
associate-*l*78.1%
associate-*l*80.4%
Simplified80.4%
Applied egg-rr78.3%
Taylor expanded in z around inf 54.3%
associate-/l*55.4%
associate-/r/56.6%
Simplified56.6%
Final simplification55.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.
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 (<= t -2.2e+182) (not (<= t 5.3e+16)))
(* -4.0 (/ a (/ c_m t)))
(/ (+ b (* y (* x 9.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);
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 ((t <= -2.2e+182) || !(t <= 5.3e+16)) {
tmp = -4.0 * (a / (c_m / t));
} else {
tmp = (b + (y * (x * 9.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.
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 ((t <= (-2.2d+182)) .or. (.not. (t <= 5.3d+16))) then
tmp = (-4.0d0) * (a / (c_m / t))
else
tmp = (b + (y * (x * 9.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;
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 ((t <= -2.2e+182) || !(t <= 5.3e+16)) {
tmp = -4.0 * (a / (c_m / t));
} else {
tmp = (b + (y * (x * 9.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]) [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 (t <= -2.2e+182) or not (t <= 5.3e+16): tmp = -4.0 * (a / (c_m / t)) else: tmp = (b + (y * (x * 9.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]) 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 ((t <= -2.2e+182) || !(t <= 5.3e+16)) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); else tmp = Float64(Float64(b + Float64(y * Float64(x * 9.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])){:}
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 ((t <= -2.2e+182) || ~((t <= 5.3e+16)))
tmp = -4.0 * (a / (c_m / t));
else
tmp = (b + (y * (x * 9.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.
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[t, -2.2e+182], N[Not[LessEqual[t, 5.3e+16]], $MachinePrecision]], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(y * N[(x * 9.0), $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])\\\\
[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}\;t \leq -2.2 \cdot 10^{+182} \lor \neg \left(t \leq 5.3 \cdot 10^{+16}\right):\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\
\end{array}
\end{array}
if t < -2.19999999999999997e182 or 5.3e16 < t Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*78.5%
*-commutative78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
associate-*l*78.3%
Simplified78.3%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*64.1%
Simplified64.1%
if -2.19999999999999997e182 < t < 5.3e16Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*77.6%
*-commutative77.6%
associate-+l-77.6%
*-commutative77.6%
associate-*r*82.0%
*-commutative82.0%
associate-*l*81.9%
associate-*l*82.1%
Simplified82.1%
Taylor expanded in x around inf 66.3%
associate-*r*66.3%
Simplified66.3%
Final simplification65.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.
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 -1.35e-43) (not (<= z 1.15e+17)))
(* -4.0 (* t (/ a 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);
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.35e-43) || !(z <= 1.15e+17)) {
tmp = -4.0 * (t * (a / 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.
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.35d-43)) .or. (.not. (z <= 1.15d+17))) then
tmp = (-4.0d0) * (t * (a / 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;
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.35e-43) || !(z <= 1.15e+17)) {
tmp = -4.0 * (t * (a / 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]) [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.35e-43) or not (z <= 1.15e+17): tmp = -4.0 * (t * (a / 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]) 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.35e-43) || !(z <= 1.15e+17)) tmp = Float64(-4.0 * Float64(t * Float64(a / 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])){:}
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.35e-43) || ~((z <= 1.15e+17)))
tmp = -4.0 * (t * (a / 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.
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, -1.35e-43], N[Not[LessEqual[z, 1.15e+17]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / 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])\\\\
[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.35 \cdot 10^{-43} \lor \neg \left(z \leq 1.15 \cdot 10^{+17}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\end{array}
\end{array}
if z < -1.34999999999999996e-43 or 1.15e17 < z Initial program 62.4%
associate-+l-62.4%
*-commutative62.4%
associate-*r*63.1%
*-commutative63.1%
associate-+l-63.1%
*-commutative63.1%
associate-*r*62.4%
*-commutative62.4%
associate-*l*62.4%
associate-*l*67.9%
Simplified67.9%
Applied egg-rr64.7%
Taylor expanded in z around inf 54.9%
associate-/l*56.1%
associate-/r/53.9%
Simplified53.9%
if -1.34999999999999996e-43 < z < 1.15e17Initial program 98.0%
associate-+l-98.0%
*-commutative98.0%
associate-*r*97.3%
*-commutative97.3%
associate-+l-97.3%
*-commutative97.3%
associate-*r*98.0%
*-commutative98.0%
associate-*l*98.0%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in b around inf 55.0%
*-commutative55.0%
Simplified55.0%
Final simplification54.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.
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 -2.8e-42)
(* -4.0 (* t (/ a c_m)))
(if (<= z 1.06e+19) (/ b (* 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);
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.8e-42) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 1.06e+19) {
tmp = b / (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.
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.8d-42)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= 1.06d+19) then
tmp = b / (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;
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.8e-42) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 1.06e+19) {
tmp = b / (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]) [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.8e-42: tmp = -4.0 * (t * (a / c_m)) elif z <= 1.06e+19: tmp = b / (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]) 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.8e-42) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= 1.06e+19) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(Float64(t * 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])){:}
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.8e-42)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= 1.06e+19)
tmp = b / (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.
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, -2.8e-42], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e+19], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $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])\\\\
[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.8 \cdot 10^{-42}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+19}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c_m}\\
\end{array}
\end{array}
if z < -2.79999999999999998e-42Initial program 66.3%
associate-+l-66.3%
*-commutative66.3%
associate-*r*70.7%
*-commutative70.7%
associate-+l-70.7%
*-commutative70.7%
associate-*r*66.3%
*-commutative66.3%
associate-*l*66.3%
associate-*l*72.8%
Simplified72.8%
Applied egg-rr65.3%
Taylor expanded in z around inf 55.1%
associate-/l*57.7%
associate-/r/55.4%
Simplified55.4%
if -2.79999999999999998e-42 < z < 1.06e19Initial program 98.0%
associate-+l-98.0%
*-commutative98.0%
associate-*r*97.3%
*-commutative97.3%
associate-+l-97.3%
*-commutative97.3%
associate-*r*98.0%
*-commutative98.0%
associate-*l*98.0%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in b around inf 55.0%
*-commutative55.0%
Simplified55.0%
if 1.06e19 < z Initial program 56.3%
associate-+l-56.3%
*-commutative56.3%
associate-*r*51.1%
*-commutative51.1%
associate-+l-51.1%
*-commutative51.1%
associate-*r*56.3%
*-commutative56.3%
associate-*l*56.2%
associate-*l*59.9%
Simplified59.9%
Taylor expanded in z around inf 54.4%
Final simplification55.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.
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 -7.2e-88)
(* -4.0 (/ a (/ c_m t)))
(if (<= z 5e+23) (/ b (* 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);
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 <= -7.2e-88) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 5e+23) {
tmp = b / (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.
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 <= (-7.2d-88)) then
tmp = (-4.0d0) * (a / (c_m / t))
else if (z <= 5d+23) then
tmp = b / (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;
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 <= -7.2e-88) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 5e+23) {
tmp = b / (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]) [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 <= -7.2e-88: tmp = -4.0 * (a / (c_m / t)) elif z <= 5e+23: tmp = b / (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]) 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 <= -7.2e-88) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); elseif (z <= 5e+23) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(Float64(t * 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])){:}
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 <= -7.2e-88)
tmp = -4.0 * (a / (c_m / t));
elseif (z <= 5e+23)
tmp = b / (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.
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, -7.2e-88], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+23], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $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])\\\\
[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 -7.2 \cdot 10^{-88}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+23}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c_m}\\
\end{array}
\end{array}
if z < -7.1999999999999999e-88Initial program 69.9%
associate-+l-69.9%
*-commutative69.9%
associate-*r*73.9%
*-commutative73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*69.9%
*-commutative69.9%
associate-*l*69.9%
associate-*l*75.8%
Simplified75.8%
Taylor expanded in z around inf 51.4%
*-commutative51.4%
associate-/l*53.7%
Simplified53.7%
if -7.1999999999999999e-88 < z < 4.9999999999999999e23Initial program 97.9%
associate-+l-97.9%
*-commutative97.9%
associate-*r*97.1%
*-commutative97.1%
associate-+l-97.1%
*-commutative97.1%
associate-*r*97.9%
*-commutative97.9%
associate-*l*97.8%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in b around inf 57.9%
*-commutative57.9%
Simplified57.9%
if 4.9999999999999999e23 < z Initial program 56.3%
associate-+l-56.3%
*-commutative56.3%
associate-*r*51.1%
*-commutative51.1%
associate-+l-51.1%
*-commutative51.1%
associate-*r*56.3%
*-commutative56.3%
associate-*l*56.2%
associate-*l*59.9%
Simplified59.9%
Taylor expanded in z around inf 54.4%
Final simplification55.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. 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 1.95e+119) (/ b (* c_m z)) (/ (/ 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);
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 <= 1.95e+119) {
tmp = b / (c_m * z);
} 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.
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 <= 1.95d+119) then
tmp = b / (c_m * z)
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;
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 <= 1.95e+119) {
tmp = b / (c_m * z);
} 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]) [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 <= 1.95e+119: tmp = b / (c_m * z) 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]) 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 <= 1.95e+119) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(Float64(b / 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])){:}
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 <= 1.95e+119)
tmp = b / (c_m * z);
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.
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, 1.95e+119], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(b / c$95$m), $MachinePrecision] / z), $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])\\\\
[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 1.95 \cdot 10^{+119}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\
\end{array}
\end{array}
if c < 1.9499999999999999e119Initial program 81.9%
associate-+l-81.9%
*-commutative81.9%
associate-*r*81.9%
*-commutative81.9%
associate-+l-81.9%
*-commutative81.9%
associate-*r*81.9%
*-commutative81.9%
associate-*l*81.9%
associate-*l*84.7%
Simplified84.7%
Taylor expanded in b around inf 35.3%
*-commutative35.3%
Simplified35.3%
if 1.9499999999999999e119 < c Initial program 59.4%
associate-+l-59.4%
*-commutative59.4%
associate-*r*59.7%
*-commutative59.7%
associate-+l-59.7%
*-commutative59.7%
associate-*r*59.4%
*-commutative59.4%
associate-*l*59.3%
associate-*l*61.8%
Simplified61.8%
Applied egg-rr72.3%
associate-*l/72.3%
*-un-lft-identity72.3%
+-commutative72.3%
Applied egg-rr72.3%
Taylor expanded in b around inf 41.7%
Final simplification36.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. 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);
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.
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;
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]) [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]) 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])){:}
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.
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])\\\\
[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 77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*77.9%
*-commutative77.9%
associate-*l*77.8%
associate-*l*80.6%
Simplified80.6%
Taylor expanded in b around inf 35.4%
*-commutative35.4%
Simplified35.4%
Final simplification35.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\
\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\
\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\
\end{array}
\end{array}
herbie shell --seed 2023332
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))