
(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 21 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 #s(literal 1 binary64) 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 -5e-251)
t_1
(if (<= t_1 0.0)
(/
(+
(* -4.0 (/ (* a (* t z)) c_m))
(+ (/ b c_m) (* 9.0 (/ (* x y) c_m))))
z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
(*
y
(-
(/ (fma (* a (/ t c_m)) -4.0 (/ b (* c_m z))) y)
(* -9.0 (/ (/ x c_m) z))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -5e-251) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (t * z)) / c_m)) + ((b / c_m) + (9.0 * ((x * y) / 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 = y * ((fma((a * (t / c_m)), -4.0, (b / (c_m * z))) / y) - (-9.0 * ((x / c_m) / z)));
}
return c_s * tmp;
}
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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 <= -5e-251) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(t * z)) / c_m)) + Float64(Float64(b / c_m) + Float64(9.0 * Float64(Float64(x * y) / 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 = Float64(y * Float64(Float64(fma(Float64(a * Float64(t / c_m)), -4.0, Float64(b / Float64(c_m * z))) / y) - Float64(-9.0 * Float64(Float64(x / 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_] := 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, -5e-251], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $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[(y * N[(N[(N[(N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(-9.0 * N[(N[(x / c$95$m), $MachinePrecision] / 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])\\
\\
\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 -5 \cdot 10^{-251}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(t \cdot z\right)}{c\_m} + \left(\frac{b}{c\_m} + 9 \cdot \frac{x \cdot y}{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}:\\
\;\;\;\;y \cdot \left(\frac{\mathsf{fma}\left(a \cdot \frac{t}{c\_m}, -4, \frac{b}{c\_m \cdot z}\right)}{y} - -9 \cdot \frac{\frac{x}{c\_m}}{z}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -5.0000000000000003e-251Initial program 92.6%
if -5.0000000000000003e-251 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*57.3%
*-commutative57.3%
associate-+l-57.3%
associate-*l*57.3%
associate-*l*57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in z around 0 95.5%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
associate-*l*87.5%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*4.9%
*-commutative4.9%
associate-+l-4.9%
associate-*l*4.9%
associate-*l*4.9%
*-commutative4.9%
Simplified4.9%
Taylor expanded in y around -inf 45.0%
mul-1-neg45.0%
*-commutative45.0%
distribute-rgt-neg-in45.0%
Simplified70.1%
Final simplification88.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 7.5e+32)
(/ (+ (fma x (* 9.0 y) (* t (* a (* z -4.0)))) b) (* c_m z))
(/
(fma -4.0 (* z (* a (/ t c_m))) (fma 9.0 (* x (/ y 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 (c_m <= 7.5e+32) {
tmp = (fma(x, (9.0 * y), (t * (a * (z * -4.0)))) + b) / (c_m * z);
} else {
tmp = fma(-4.0, (z * (a * (t / c_m))), fma(9.0, (x * (y / c_m)), (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 <= 7.5e+32) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0)))) + b) / Float64(c_m * z)); else tmp = Float64(fma(-4.0, Float64(z * Float64(a * Float64(t / c_m))), fma(9.0, Float64(x * Float64(y / c_m)), Float64(b / c_m))) / z); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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, 7.5e+32], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(z * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 7.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, z \cdot \left(a \cdot \frac{t}{c\_m}\right), \mathsf{fma}\left(9, x \cdot \frac{y}{c\_m}, \frac{b}{c\_m}\right)\right)}{z}\\
\end{array}
\end{array}
if c < 7.49999999999999959e32Initial program 85.9%
Simplified87.3%
if 7.49999999999999959e32 < c Initial program 57.1%
associate-+l-57.1%
*-commutative57.1%
associate-*r*56.5%
*-commutative56.5%
associate-+l-56.5%
associate-*l*56.5%
associate-*l*55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in z around 0 67.3%
fma-define67.3%
*-commutative67.3%
*-commutative67.3%
associate-*r*68.9%
*-commutative68.9%
associate-/l*78.3%
associate-/l*79.8%
fma-define79.8%
associate-/l*84.5%
Simplified84.5%
Final simplification86.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 -5e-251)
t_1
(if (<= t_1 0.0)
(/
(+
(* -4.0 (/ (* a (* t z)) c_m))
(+ (/ b c_m) (* 9.0 (/ (* x y) c_m))))
z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
(/ (* x (fma 9.0 (/ y z) (* (* t a) (/ -4.0 x)))) 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 <= -5e-251) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (t * z)) / c_m)) + ((b / c_m) + (9.0 * ((x * y) / 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 = (x * fma(9.0, (y / z), ((t * a) * (-4.0 / x)))) / 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 <= -5e-251) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(t * z)) / c_m)) + Float64(Float64(b / c_m) + Float64(9.0 * Float64(Float64(x * y) / 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 = Float64(Float64(x * fma(9.0, Float64(y / z), Float64(Float64(t * a) * Float64(-4.0 / x)))) / 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, -5e-251], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $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 * N[(9.0 * N[(y / z), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * N[(-4.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[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 -5 \cdot 10^{-251}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(t \cdot z\right)}{c\_m} + \left(\frac{b}{c\_m} + 9 \cdot \frac{x \cdot y}{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}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(9, \frac{y}{z}, \left(t \cdot a\right) \cdot \frac{-4}{x}\right)}{c\_m}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -5.0000000000000003e-251Initial program 92.6%
if -5.0000000000000003e-251 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*57.3%
*-commutative57.3%
associate-+l-57.3%
associate-*l*57.3%
associate-*l*57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in z around 0 95.5%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
associate-*l*87.5%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*4.9%
*-commutative4.9%
associate-+l-4.9%
associate-*l*4.9%
associate-*l*4.9%
*-commutative4.9%
Simplified4.9%
Taylor expanded in z around inf 9.4%
Taylor expanded in b around 0 44.9%
Taylor expanded in x around inf 70.5%
+-commutative70.5%
fma-define70.5%
associate-*r/70.5%
*-commutative70.5%
associate-/l*70.5%
Simplified70.5%
Final simplification88.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 -300000000.0)
(*
x
(-
(+ (* 9.0 (/ y (* c_m z))) (/ b (* c_m (* x z))))
(* 4.0 (/ (* t a) (* c_m x)))))
(if (<= z 1.8e+141)
(/ (+ (fma x (* 9.0 y) (* t (* a (* z -4.0)))) b) (* c_m z))
(/ (* x (fma 9.0 (/ y z) (* (* t a) (/ -4.0 x)))) 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 <= -300000000.0) {
tmp = x * (((9.0 * (y / (c_m * z))) + (b / (c_m * (x * z)))) - (4.0 * ((t * a) / (c_m * x))));
} else if (z <= 1.8e+141) {
tmp = (fma(x, (9.0 * y), (t * (a * (z * -4.0)))) + b) / (c_m * z);
} else {
tmp = (x * fma(9.0, (y / z), ((t * a) * (-4.0 / x)))) / 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 <= -300000000.0) tmp = Float64(x * Float64(Float64(Float64(9.0 * Float64(y / Float64(c_m * z))) + Float64(b / Float64(c_m * Float64(x * z)))) - Float64(4.0 * Float64(Float64(t * a) / Float64(c_m * x))))); elseif (z <= 1.8e+141) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0)))) + b) / Float64(c_m * z)); else tmp = Float64(Float64(x * fma(9.0, Float64(y / z), Float64(Float64(t * a) * Float64(-4.0 / x)))) / 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_] := N[(c$95$s * If[LessEqual[z, -300000000.0], N[(x * N[(N[(N[(9.0 * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / N[(c$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+141], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(9.0 * N[(y / z), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * N[(-4.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[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 -300000000:\\
\;\;\;\;x \cdot \left(\left(9 \cdot \frac{y}{c\_m \cdot z} + \frac{b}{c\_m \cdot \left(x \cdot z\right)}\right) - 4 \cdot \frac{t \cdot a}{c\_m \cdot x}\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+141}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(9, \frac{y}{z}, \left(t \cdot a\right) \cdot \frac{-4}{x}\right)}{c\_m}\\
\end{array}
\end{array}
if z < -3e8Initial program 59.3%
associate-+l-59.3%
*-commutative59.3%
associate-*r*57.6%
*-commutative57.6%
associate-+l-57.6%
associate-*l*57.6%
associate-*l*62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in x around inf 73.4%
if -3e8 < z < 1.8000000000000001e141Initial program 93.5%
Simplified94.5%
if 1.8000000000000001e141 < z Initial program 45.1%
associate-+l-45.1%
*-commutative45.1%
associate-*r*41.7%
*-commutative41.7%
associate-+l-41.7%
associate-*l*41.8%
associate-*l*51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in z around inf 54.4%
Taylor expanded in b around 0 67.1%
Taylor expanded in x around inf 76.0%
+-commutative76.0%
fma-define75.9%
associate-*r/75.9%
*-commutative75.9%
associate-/l*75.9%
Simplified75.9%
Final simplification86.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 -5e-251)
t_1
(if (<= t_1 0.0)
(/
(+
(* -4.0 (/ (* a (* t z)) c_m))
(+ (/ b c_m) (* 9.0 (/ (* x y) c_m))))
z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
(*
y
(+ (* -4.0 (/ (* t a) (* c_m y))) (* 9.0 (/ x (* c_m z)))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -5e-251) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (t * z)) / c_m)) + ((b / c_m) + (9.0 * ((x * y) / 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 = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z))));
}
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 tmp;
if (t_1 <= -5e-251) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (t * z)) / c_m)) + ((b / c_m) + (9.0 * ((x * y) / c_m)))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
} else {
tmp = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z))));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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) tmp = 0 if t_1 <= -5e-251: tmp = t_1 elif t_1 <= 0.0: tmp = ((-4.0 * ((a * (t * z)) / c_m)) + ((b / c_m) + (9.0 * ((x * y) / c_m)))) / z elif t_1 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z) else: tmp = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z)))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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 <= -5e-251) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(t * z)) / c_m)) + Float64(Float64(b / c_m) + Float64(9.0 * Float64(Float64(x * y) / 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 = Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / Float64(c_m * y))) + Float64(9.0 * Float64(x / Float64(c_m * z))))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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);
tmp = 0.0;
if (t_1 <= -5e-251)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a * (t * z)) / c_m)) + ((b / c_m) + (9.0 * ((x * y) / c_m)))) / z;
elseif (t_1 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
else
tmp = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z))));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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, -5e-251], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $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[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / N[(c$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x / N[(c$95$m * z), $MachinePrecision]), $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])\\
\\
\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 -5 \cdot 10^{-251}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(t \cdot z\right)}{c\_m} + \left(\frac{b}{c\_m} + 9 \cdot \frac{x \cdot y}{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}:\\
\;\;\;\;y \cdot \left(-4 \cdot \frac{t \cdot a}{c\_m \cdot y} + 9 \cdot \frac{x}{c\_m \cdot z}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -5.0000000000000003e-251Initial program 92.6%
if -5.0000000000000003e-251 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*57.3%
*-commutative57.3%
associate-+l-57.3%
associate-*l*57.3%
associate-*l*57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in z around 0 95.5%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
associate-*l*87.5%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*4.9%
*-commutative4.9%
associate-+l-4.9%
associate-*l*4.9%
associate-*l*4.9%
*-commutative4.9%
Simplified4.9%
Taylor expanded in z around inf 9.4%
Taylor expanded in b around 0 44.9%
Taylor expanded in y around inf 49.5%
Final simplification86.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* y (* x 9.0)))
(t_2 (/ (+ b (- t_1 (* a (* t (* z 4.0))))) (* c_m z))))
(*
c_s
(if (<= t_2 -1e-300)
t_2
(if (<= t_2 0.0)
(/ (/ (+ b t_1) c_m) z)
(if (<= t_2 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
(*
y
(+ (* -4.0 (/ (* t a) (* c_m y))) (* 9.0 (/ x (* c_m z)))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 = y * (x * 9.0);
double t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_2 <= -1e-300) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((b + t_1) / c_m) / z;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
} else {
tmp = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z))));
}
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 = y * (x * 9.0);
double t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_2 <= -1e-300) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((b + t_1) / c_m) / z;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
} else {
tmp = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z))));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 = y * (x * 9.0) t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (c_m * z) tmp = 0 if t_2 <= -1e-300: tmp = t_2 elif t_2 <= 0.0: tmp = ((b + t_1) / c_m) / z elif t_2 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z) else: tmp = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z)))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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(y * Float64(x * 9.0)) t_2 = Float64(Float64(b + Float64(t_1 - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) tmp = 0.0 if (t_2 <= -1e-300) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(b + t_1) / c_m) / z); elseif (t_2 <= 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 = Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / Float64(c_m * y))) + Float64(9.0 * Float64(x / Float64(c_m * z))))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 = y * (x * 9.0);
t_2 = (b + (t_1 - (a * (t * (z * 4.0))))) / (c_m * z);
tmp = 0.0;
if (t_2 <= -1e-300)
tmp = t_2;
elseif (t_2 <= 0.0)
tmp = ((b + t_1) / c_m) / z;
elseif (t_2 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
else
tmp = y * ((-4.0 * ((t * a) / (c_m * y))) + (9.0 * (x / (c_m * z))));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(t$95$1 - 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$2, -1e-300], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(b + t$95$1), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 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[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / N[(c$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x / N[(c$95$m * z), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 9\right)\\
t_2 := \frac{b + \left(t\_1 - 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\_2 \leq -1 \cdot 10^{-300}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{b + t\_1}{c\_m}}{z}\\
\mathbf{elif}\;t\_2 \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}:\\
\;\;\;\;y \cdot \left(-4 \cdot \frac{t \cdot a}{c\_m \cdot y} + 9 \cdot \frac{x}{c\_m \cdot z}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.00000000000000003e-300Initial program 92.7%
if -1.00000000000000003e-300 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 53.8%
associate-+l-53.8%
*-commutative53.8%
associate-*r*53.1%
*-commutative53.1%
associate-+l-53.1%
associate-*l*53.1%
associate-*l*53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in a around 0 83.2%
Taylor expanded in c around 0 83.2%
associate-*r*83.2%
Simplified83.2%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
associate-*l*87.5%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*4.9%
*-commutative4.9%
associate-+l-4.9%
associate-*l*4.9%
associate-*l*4.9%
*-commutative4.9%
Simplified4.9%
Taylor expanded in z around inf 9.4%
Taylor expanded in b around 0 44.9%
Taylor expanded in y around inf 49.5%
Final simplification85.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* c_m z))) (t_2 (* 9.0 (* x (/ (/ y z) c_m)))))
(*
c_s
(if (<= y -2.25e-13)
t_2
(if (<= y -6.2e-208)
(* y (* a (* (/ t c_m) (/ -4.0 y))))
(if (<= y 2.85e-267)
t_1
(if (<= y 1.1e-90)
(* -4.0 (/ (* t a) c_m))
(if (<= y 3.3e-24)
t_1
(if (<= y 6.4e+65)
(* y (* -4.0 (/ (* a (/ t y)) c_m)))
t_2)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 / (c_m * z);
double t_2 = 9.0 * (x * ((y / z) / c_m));
double tmp;
if (y <= -2.25e-13) {
tmp = t_2;
} else if (y <= -6.2e-208) {
tmp = y * (a * ((t / c_m) * (-4.0 / y)));
} else if (y <= 2.85e-267) {
tmp = t_1;
} else if (y <= 1.1e-90) {
tmp = -4.0 * ((t * a) / c_m);
} else if (y <= 3.3e-24) {
tmp = t_1;
} else if (y <= 6.4e+65) {
tmp = y * (-4.0 * ((a * (t / y)) / c_m));
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 / (c_m * z)
t_2 = 9.0d0 * (x * ((y / z) / c_m))
if (y <= (-2.25d-13)) then
tmp = t_2
else if (y <= (-6.2d-208)) then
tmp = y * (a * ((t / c_m) * ((-4.0d0) / y)))
else if (y <= 2.85d-267) then
tmp = t_1
else if (y <= 1.1d-90) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (y <= 3.3d-24) then
tmp = t_1
else if (y <= 6.4d+65) then
tmp = y * ((-4.0d0) * ((a * (t / y)) / c_m))
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 / (c_m * z);
double t_2 = 9.0 * (x * ((y / z) / c_m));
double tmp;
if (y <= -2.25e-13) {
tmp = t_2;
} else if (y <= -6.2e-208) {
tmp = y * (a * ((t / c_m) * (-4.0 / y)));
} else if (y <= 2.85e-267) {
tmp = t_1;
} else if (y <= 1.1e-90) {
tmp = -4.0 * ((t * a) / c_m);
} else if (y <= 3.3e-24) {
tmp = t_1;
} else if (y <= 6.4e+65) {
tmp = y * (-4.0 * ((a * (t / y)) / c_m));
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 / (c_m * z) t_2 = 9.0 * (x * ((y / z) / c_m)) tmp = 0 if y <= -2.25e-13: tmp = t_2 elif y <= -6.2e-208: tmp = y * (a * ((t / c_m) * (-4.0 / y))) elif y <= 2.85e-267: tmp = t_1 elif y <= 1.1e-90: tmp = -4.0 * ((t * a) / c_m) elif y <= 3.3e-24: tmp = t_1 elif y <= 6.4e+65: tmp = y * (-4.0 * ((a * (t / y)) / c_m)) else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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(b / Float64(c_m * z)) t_2 = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c_m))) tmp = 0.0 if (y <= -2.25e-13) tmp = t_2; elseif (y <= -6.2e-208) tmp = Float64(y * Float64(a * Float64(Float64(t / c_m) * Float64(-4.0 / y)))); elseif (y <= 2.85e-267) tmp = t_1; elseif (y <= 1.1e-90) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (y <= 3.3e-24) tmp = t_1; elseif (y <= 6.4e+65) tmp = Float64(y * Float64(-4.0 * Float64(Float64(a * Float64(t / y)) / c_m))); else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 / (c_m * z);
t_2 = 9.0 * (x * ((y / z) / c_m));
tmp = 0.0;
if (y <= -2.25e-13)
tmp = t_2;
elseif (y <= -6.2e-208)
tmp = y * (a * ((t / c_m) * (-4.0 / y)));
elseif (y <= 2.85e-267)
tmp = t_1;
elseif (y <= 1.1e-90)
tmp = -4.0 * ((t * a) / c_m);
elseif (y <= 3.3e-24)
tmp = t_1;
elseif (y <= 6.4e+65)
tmp = y * (-4.0 * ((a * (t / y)) / c_m));
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -2.25e-13], t$95$2, If[LessEqual[y, -6.2e-208], N[(y * N[(a * N[(N[(t / c$95$m), $MachinePrecision] * N[(-4.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e-267], t$95$1, If[LessEqual[y, 1.1e-90], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-24], t$95$1, If[LessEqual[y, 6.4e+65], N[(y * N[(-4.0 * N[(N[(a * N[(t / y), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[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}{c\_m \cdot z}\\
t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-208}:\\
\;\;\;\;y \cdot \left(a \cdot \left(\frac{t}{c\_m} \cdot \frac{-4}{y}\right)\right)\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{-267}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-90}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \left(-4 \cdot \frac{a \cdot \frac{t}{y}}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -2.25e-13 or 6.40000000000000014e65 < y Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*68.7%
*-commutative68.7%
associate-+l-68.7%
associate-*l*68.7%
associate-*l*67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x around inf 68.9%
+-commutative68.9%
fma-define68.9%
*-commutative68.9%
associate-/l*66.2%
associate-*l*66.2%
*-commutative66.2%
associate-/l*66.3%
Simplified66.3%
fma-undefine66.3%
associate-*l*66.3%
Applied egg-rr66.3%
Taylor expanded in x around inf 47.3%
*-commutative47.3%
associate-*r/53.1%
associate-/r*56.5%
Simplified56.5%
if -2.25e-13 < y < -6.1999999999999996e-208Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*89.9%
*-commutative89.9%
associate-+l-89.9%
associate-*l*89.9%
associate-*l*92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in z around inf 87.5%
Taylor expanded in b around 0 59.6%
Taylor expanded in y around inf 45.1%
Taylor expanded in a around inf 52.3%
*-commutative52.3%
associate-/l*57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*r/57.3%
*-commutative57.3%
times-frac54.7%
Simplified54.7%
if -6.1999999999999996e-208 < y < 2.8500000000000001e-267 or 1.09999999999999993e-90 < y < 3.29999999999999984e-24Initial program 89.8%
associate-+l-89.8%
*-commutative89.8%
associate-*r*89.8%
*-commutative89.8%
associate-+l-89.8%
associate-*l*89.8%
associate-*l*87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in b around inf 61.6%
*-commutative61.6%
Simplified61.6%
if 2.8500000000000001e-267 < y < 1.09999999999999993e-90Initial program 79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*83.5%
*-commutative83.5%
associate-+l-83.5%
associate-*l*83.5%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in z around inf 61.2%
*-commutative61.2%
Simplified61.2%
if 3.29999999999999984e-24 < y < 6.40000000000000014e65Initial program 89.9%
associate-+l-89.9%
*-commutative89.9%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in z around inf 84.8%
Taylor expanded in b around 0 69.1%
Taylor expanded in y around inf 73.6%
Taylor expanded in a around inf 51.5%
times-frac56.3%
associate-*l/56.5%
Simplified56.5%
Final simplification57.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* c_m z))) (t_2 (* 9.0 (* x (/ (/ y z) c_m)))))
(*
c_s
(if (<= y -1.1e-13)
t_2
(if (<= y -2.7e-208)
(* a (/ (* t -4.0) c_m))
(if (<= y 4.4e-268)
t_1
(if (<= y 4.4e-89)
(* -4.0 (/ (* t a) c_m))
(if (<= y 4.5e-25)
t_1
(if (<= y 4.2e+63)
(* y (* -4.0 (/ (* a (/ t y)) c_m)))
t_2)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 / (c_m * z);
double t_2 = 9.0 * (x * ((y / z) / c_m));
double tmp;
if (y <= -1.1e-13) {
tmp = t_2;
} else if (y <= -2.7e-208) {
tmp = a * ((t * -4.0) / c_m);
} else if (y <= 4.4e-268) {
tmp = t_1;
} else if (y <= 4.4e-89) {
tmp = -4.0 * ((t * a) / c_m);
} else if (y <= 4.5e-25) {
tmp = t_1;
} else if (y <= 4.2e+63) {
tmp = y * (-4.0 * ((a * (t / y)) / c_m));
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 / (c_m * z)
t_2 = 9.0d0 * (x * ((y / z) / c_m))
if (y <= (-1.1d-13)) then
tmp = t_2
else if (y <= (-2.7d-208)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (y <= 4.4d-268) then
tmp = t_1
else if (y <= 4.4d-89) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (y <= 4.5d-25) then
tmp = t_1
else if (y <= 4.2d+63) then
tmp = y * ((-4.0d0) * ((a * (t / y)) / c_m))
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 / (c_m * z);
double t_2 = 9.0 * (x * ((y / z) / c_m));
double tmp;
if (y <= -1.1e-13) {
tmp = t_2;
} else if (y <= -2.7e-208) {
tmp = a * ((t * -4.0) / c_m);
} else if (y <= 4.4e-268) {
tmp = t_1;
} else if (y <= 4.4e-89) {
tmp = -4.0 * ((t * a) / c_m);
} else if (y <= 4.5e-25) {
tmp = t_1;
} else if (y <= 4.2e+63) {
tmp = y * (-4.0 * ((a * (t / y)) / c_m));
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 / (c_m * z) t_2 = 9.0 * (x * ((y / z) / c_m)) tmp = 0 if y <= -1.1e-13: tmp = t_2 elif y <= -2.7e-208: tmp = a * ((t * -4.0) / c_m) elif y <= 4.4e-268: tmp = t_1 elif y <= 4.4e-89: tmp = -4.0 * ((t * a) / c_m) elif y <= 4.5e-25: tmp = t_1 elif y <= 4.2e+63: tmp = y * (-4.0 * ((a * (t / y)) / c_m)) else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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(b / Float64(c_m * z)) t_2 = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c_m))) tmp = 0.0 if (y <= -1.1e-13) tmp = t_2; elseif (y <= -2.7e-208) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (y <= 4.4e-268) tmp = t_1; elseif (y <= 4.4e-89) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (y <= 4.5e-25) tmp = t_1; elseif (y <= 4.2e+63) tmp = Float64(y * Float64(-4.0 * Float64(Float64(a * Float64(t / y)) / c_m))); else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 / (c_m * z);
t_2 = 9.0 * (x * ((y / z) / c_m));
tmp = 0.0;
if (y <= -1.1e-13)
tmp = t_2;
elseif (y <= -2.7e-208)
tmp = a * ((t * -4.0) / c_m);
elseif (y <= 4.4e-268)
tmp = t_1;
elseif (y <= 4.4e-89)
tmp = -4.0 * ((t * a) / c_m);
elseif (y <= 4.5e-25)
tmp = t_1;
elseif (y <= 4.2e+63)
tmp = y * (-4.0 * ((a * (t / y)) / c_m));
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -1.1e-13], t$95$2, If[LessEqual[y, -2.7e-208], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e-268], t$95$1, If[LessEqual[y, 4.4e-89], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-25], t$95$1, If[LessEqual[y, 4.2e+63], N[(y * N[(-4.0 * N[(N[(a * N[(t / y), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[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}{c\_m \cdot z}\\
t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-208}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-89}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+63}:\\
\;\;\;\;y \cdot \left(-4 \cdot \frac{a \cdot \frac{t}{y}}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -1.09999999999999998e-13 or 4.2000000000000004e63 < y Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*68.7%
*-commutative68.7%
associate-+l-68.7%
associate-*l*68.7%
associate-*l*67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x around inf 68.9%
+-commutative68.9%
fma-define68.9%
*-commutative68.9%
associate-/l*66.2%
associate-*l*66.2%
*-commutative66.2%
associate-/l*66.3%
Simplified66.3%
fma-undefine66.3%
associate-*l*66.3%
Applied egg-rr66.3%
Taylor expanded in x around inf 47.3%
*-commutative47.3%
associate-*r/53.1%
associate-/r*56.5%
Simplified56.5%
if -1.09999999999999998e-13 < y < -2.7e-208Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*89.9%
*-commutative89.9%
associate-+l-89.9%
associate-*l*89.9%
associate-*l*92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in z around inf 52.4%
associate-/l*57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*l/57.3%
Simplified57.3%
if -2.7e-208 < y < 4.40000000000000008e-268 or 4.40000000000000024e-89 < y < 4.5000000000000001e-25Initial program 89.8%
associate-+l-89.8%
*-commutative89.8%
associate-*r*89.8%
*-commutative89.8%
associate-+l-89.8%
associate-*l*89.8%
associate-*l*87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in b around inf 61.6%
*-commutative61.6%
Simplified61.6%
if 4.40000000000000008e-268 < y < 4.40000000000000024e-89Initial program 79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*83.5%
*-commutative83.5%
associate-+l-83.5%
associate-*l*83.5%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in z around inf 61.2%
*-commutative61.2%
Simplified61.2%
if 4.5000000000000001e-25 < y < 4.2000000000000004e63Initial program 89.9%
associate-+l-89.9%
*-commutative89.9%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in z around inf 84.8%
Taylor expanded in b around 0 69.1%
Taylor expanded in y around inf 73.6%
Taylor expanded in a around inf 51.5%
times-frac56.3%
associate-*l/56.5%
Simplified56.5%
Final simplification58.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (/ y z) c_m)))))
(*
c_s
(if (<= y -5.3e-12)
t_1
(if (<= y -1.2e-206)
(* a (/ (* t -4.0) c_m))
(if (<= y 2e-267)
(/ b (* c_m z))
(if (<= y 3.2e+66) (* -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 * ((y / z) / c_m));
double tmp;
if (y <= -5.3e-12) {
tmp = t_1;
} else if (y <= -1.2e-206) {
tmp = a * ((t * -4.0) / c_m);
} else if (y <= 2e-267) {
tmp = b / (c_m * z);
} else if (y <= 3.2e+66) {
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 * ((y / z) / c_m))
if (y <= (-5.3d-12)) then
tmp = t_1
else if (y <= (-1.2d-206)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (y <= 2d-267) then
tmp = b / (c_m * z)
else if (y <= 3.2d+66) 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 * ((y / z) / c_m));
double tmp;
if (y <= -5.3e-12) {
tmp = t_1;
} else if (y <= -1.2e-206) {
tmp = a * ((t * -4.0) / c_m);
} else if (y <= 2e-267) {
tmp = b / (c_m * z);
} else if (y <= 3.2e+66) {
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 * ((y / z) / c_m)) tmp = 0 if y <= -5.3e-12: tmp = t_1 elif y <= -1.2e-206: tmp = a * ((t * -4.0) / c_m) elif y <= 2e-267: tmp = b / (c_m * z) elif y <= 3.2e+66: 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(x * Float64(Float64(y / z) / c_m))) tmp = 0.0 if (y <= -5.3e-12) tmp = t_1; elseif (y <= -1.2e-206) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (y <= 2e-267) tmp = Float64(b / Float64(c_m * z)); elseif (y <= 3.2e+66) tmp = Float64(-4.0 * Float64(Float64(t * 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 * ((y / z) / c_m));
tmp = 0.0;
if (y <= -5.3e-12)
tmp = t_1;
elseif (y <= -1.2e-206)
tmp = a * ((t * -4.0) / c_m);
elseif (y <= 2e-267)
tmp = b / (c_m * z);
elseif (y <= 3.2e+66)
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[(x * N[(N[(y / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -5.3e-12], t$95$1, If[LessEqual[y, -1.2e-206], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-267], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+66], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $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(x \cdot \frac{\frac{y}{z}}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-206}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-267}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+66}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if y < -5.29999999999999963e-12 or 3.2e66 < y Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*68.7%
*-commutative68.7%
associate-+l-68.7%
associate-*l*68.7%
associate-*l*67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in x around inf 68.9%
+-commutative68.9%
fma-define68.9%
*-commutative68.9%
associate-/l*66.2%
associate-*l*66.2%
*-commutative66.2%
associate-/l*66.3%
Simplified66.3%
fma-undefine66.3%
associate-*l*66.3%
Applied egg-rr66.3%
Taylor expanded in x around inf 47.3%
*-commutative47.3%
associate-*r/53.1%
associate-/r*56.5%
Simplified56.5%
if -5.29999999999999963e-12 < y < -1.2e-206Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*89.9%
*-commutative89.9%
associate-+l-89.9%
associate-*l*89.9%
associate-*l*92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in z around inf 52.4%
associate-/l*57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*l/57.3%
Simplified57.3%
if -1.2e-206 < y < 2e-267Initial program 83.7%
associate-+l-83.7%
*-commutative83.7%
associate-*r*83.7%
*-commutative83.7%
associate-+l-83.7%
associate-*l*83.7%
associate-*l*87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in b around inf 68.0%
*-commutative68.0%
Simplified68.0%
if 2e-267 < y < 3.2e66Initial program 85.9%
associate-+l-85.9%
*-commutative85.9%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
associate-*l*86.8%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around inf 51.9%
*-commutative51.9%
Simplified51.9%
Final simplification56.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (/ y z) c_m)))))
(*
c_s
(if (<= y -3.1e-9)
t_1
(if (<= y 4.2e+63)
(/ (- b (* z (* a (* t 4.0)))) (* c_m z))
(if (<= y 1.8e+192) (/ (/ (+ b (* y (* x 9.0))) c_m) z) 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 * ((y / z) / c_m));
double tmp;
if (y <= -3.1e-9) {
tmp = t_1;
} else if (y <= 4.2e+63) {
tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z);
} else if (y <= 1.8e+192) {
tmp = ((b + (y * (x * 9.0))) / c_m) / z;
} 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 * ((y / z) / c_m))
if (y <= (-3.1d-9)) then
tmp = t_1
else if (y <= 4.2d+63) then
tmp = (b - (z * (a * (t * 4.0d0)))) / (c_m * z)
else if (y <= 1.8d+192) then
tmp = ((b + (y * (x * 9.0d0))) / c_m) / z
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 * ((y / z) / c_m));
double tmp;
if (y <= -3.1e-9) {
tmp = t_1;
} else if (y <= 4.2e+63) {
tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z);
} else if (y <= 1.8e+192) {
tmp = ((b + (y * (x * 9.0))) / c_m) / z;
} 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 * ((y / z) / c_m)) tmp = 0 if y <= -3.1e-9: tmp = t_1 elif y <= 4.2e+63: tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z) elif y <= 1.8e+192: tmp = ((b + (y * (x * 9.0))) / c_m) / z 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(x * Float64(Float64(y / z) / c_m))) tmp = 0.0 if (y <= -3.1e-9) tmp = t_1; elseif (y <= 4.2e+63) tmp = Float64(Float64(b - Float64(z * Float64(a * Float64(t * 4.0)))) / Float64(c_m * z)); elseif (y <= 1.8e+192) tmp = Float64(Float64(Float64(b + Float64(y * Float64(x * 9.0))) / c_m) / z); 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 * ((y / z) / c_m));
tmp = 0.0;
if (y <= -3.1e-9)
tmp = t_1;
elseif (y <= 4.2e+63)
tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z);
elseif (y <= 1.8e+192)
tmp = ((b + (y * (x * 9.0))) / c_m) / z;
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[(x * N[(N[(y / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -3.1e-9], t$95$1, If[LessEqual[y, 4.2e+63], N[(N[(b - N[(z * N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+192], N[(N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $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(x \cdot \frac{\frac{y}{z}}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+63}:\\
\;\;\;\;\frac{b - z \cdot \left(a \cdot \left(t \cdot 4\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+192}:\\
\;\;\;\;\frac{\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if y < -3.10000000000000005e-9 or 1.8000000000000001e192 < y Initial program 66.0%
associate-+l-66.0%
*-commutative66.0%
associate-*r*64.9%
*-commutative64.9%
associate-+l-64.9%
associate-*l*64.9%
associate-*l*63.8%
*-commutative63.8%
Simplified63.8%
Taylor expanded in x around inf 67.3%
+-commutative67.3%
fma-define67.3%
*-commutative67.3%
associate-/l*64.1%
associate-*l*64.1%
*-commutative64.1%
associate-/l*63.0%
Simplified63.0%
fma-undefine63.0%
associate-*l*63.0%
Applied egg-rr63.0%
Taylor expanded in x around inf 46.3%
*-commutative46.3%
associate-*r/53.9%
associate-/r*57.3%
Simplified57.3%
if -3.10000000000000005e-9 < y < 4.2000000000000004e63Initial program 87.6%
associate-+l-87.6%
*-commutative87.6%
associate-*r*87.2%
*-commutative87.2%
associate-+l-87.2%
associate-*l*87.2%
associate-*l*88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in x around 0 77.7%
associate-*r*78.8%
associate-*r*78.8%
*-commutative78.8%
*-commutative78.8%
associate-*r*78.8%
*-commutative78.8%
Simplified78.8%
if 4.2000000000000004e63 < y < 1.8000000000000001e192Initial program 77.1%
associate-+l-77.1%
*-commutative77.1%
associate-*r*80.5%
*-commutative80.5%
associate-+l-80.5%
associate-*l*80.5%
associate-*l*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in z around 0 72.8%
Taylor expanded in a around 0 61.1%
Taylor expanded in c around 0 71.5%
associate-*r*71.5%
Simplified71.5%
Final simplification70.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= b -7.5e-92)
(/ (+ b (* y (* x 9.0))) (* c_m z))
(if (<= b 1.08e+68)
(/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* t a))) c_m)
(/ (- b (* z (* a (* t 4.0)))) (* c_m z))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -7.5e-92) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (b <= 1.08e+68) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
} else {
tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-7.5d-92)) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else if (b <= 1.08d+68) then
tmp = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (t * a))) / c_m
else
tmp = (b - (z * (a * (t * 4.0d0)))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -7.5e-92) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (b <= 1.08e+68) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
} else {
tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -7.5e-92: tmp = (b + (y * (x * 9.0))) / (c_m * z) elif b <= 1.08e+68: tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m else: tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -7.5e-92) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); elseif (b <= 1.08e+68) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(t * a))) / c_m); else tmp = Float64(Float64(b - Float64(z * Float64(a * Float64(t * 4.0)))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -7.5e-92)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
elseif (b <= 1.08e+68)
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
else
tmp = (b - (z * (a * (t * 4.0)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -7.5e-92], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.08e+68], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b - N[(z * N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 1.08 \cdot 10^{+68}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - z \cdot \left(a \cdot \left(t \cdot 4\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if b < -7.5000000000000005e-92Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*73.2%
*-commutative73.2%
associate-+l-73.2%
associate-*l*73.2%
associate-*l*70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in x around inf 72.0%
+-commutative72.0%
fma-define72.0%
*-commutative72.0%
associate-/l*68.1%
associate-*l*68.1%
*-commutative68.1%
associate-/l*69.5%
Simplified69.5%
fma-undefine69.5%
associate-*l*69.5%
Applied egg-rr69.5%
Taylor expanded in x around inf 67.5%
associate-*r*67.5%
Simplified67.5%
if -7.5000000000000005e-92 < b < 1.08e68Initial program 80.1%
associate-+l-80.1%
*-commutative80.1%
associate-*r*79.0%
*-commutative79.0%
associate-+l-79.0%
associate-*l*79.1%
associate-*l*80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in z around inf 79.9%
Taylor expanded in b around 0 78.8%
if 1.08e68 < b Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in x around 0 79.3%
associate-*r*79.2%
associate-*r*79.2%
*-commutative79.2%
*-commutative79.2%
associate-*r*79.2%
*-commutative79.2%
Simplified79.2%
Final simplification75.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= x -3.6e+73)
(* 9.0 (* x (/ (/ y z) c_m)))
(if (<= x -1.2e-94)
(* (* -4.0 (* t a)) (/ 1.0 c_m))
(if (<= x 2.9e-83)
(* b (/ 1.0 (* c_m z)))
(* y (* 9.0 (/ (/ x z) 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 (x <= -3.6e+73) {
tmp = 9.0 * (x * ((y / z) / c_m));
} else if (x <= -1.2e-94) {
tmp = (-4.0 * (t * a)) * (1.0 / c_m);
} else if (x <= 2.9e-83) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = y * (9.0 * ((x / z) / 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 (x <= (-3.6d+73)) then
tmp = 9.0d0 * (x * ((y / z) / c_m))
else if (x <= (-1.2d-94)) then
tmp = ((-4.0d0) * (t * a)) * (1.0d0 / c_m)
else if (x <= 2.9d-83) then
tmp = b * (1.0d0 / (c_m * z))
else
tmp = y * (9.0d0 * ((x / z) / 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 (x <= -3.6e+73) {
tmp = 9.0 * (x * ((y / z) / c_m));
} else if (x <= -1.2e-94) {
tmp = (-4.0 * (t * a)) * (1.0 / c_m);
} else if (x <= 2.9e-83) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = y * (9.0 * ((x / z) / 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 x <= -3.6e+73: tmp = 9.0 * (x * ((y / z) / c_m)) elif x <= -1.2e-94: tmp = (-4.0 * (t * a)) * (1.0 / c_m) elif x <= 2.9e-83: tmp = b * (1.0 / (c_m * z)) else: tmp = y * (9.0 * ((x / z) / 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 (x <= -3.6e+73) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c_m))); elseif (x <= -1.2e-94) tmp = Float64(Float64(-4.0 * Float64(t * a)) * Float64(1.0 / c_m)); elseif (x <= 2.9e-83) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); else tmp = Float64(y * Float64(9.0 * Float64(Float64(x / z) / 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 (x <= -3.6e+73)
tmp = 9.0 * (x * ((y / z) / c_m));
elseif (x <= -1.2e-94)
tmp = (-4.0 * (t * a)) * (1.0 / c_m);
elseif (x <= 2.9e-83)
tmp = b * (1.0 / (c_m * z));
else
tmp = y * (9.0 * ((x / z) / 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[x, -3.6e+73], N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-94], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e-83], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(9.0 * N[(N[(x / z), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+73}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c\_m}\right)\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-94}:\\
\;\;\;\;\left(-4 \cdot \left(t \cdot a\right)\right) \cdot \frac{1}{c\_m}\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-83}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{\frac{x}{z}}{c\_m}\right)\\
\end{array}
\end{array}
if x < -3.5999999999999999e73Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
associate-*l*74.8%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in x around inf 82.1%
+-commutative82.1%
fma-define82.1%
*-commutative82.1%
associate-/l*79.6%
associate-*l*79.6%
*-commutative79.6%
associate-/l*83.3%
Simplified83.3%
fma-undefine83.3%
associate-*l*83.3%
Applied egg-rr83.3%
Taylor expanded in x around inf 54.2%
*-commutative54.2%
associate-*r/58.9%
associate-/r*58.8%
Simplified58.8%
if -3.5999999999999999e73 < x < -1.2e-94Initial program 75.4%
associate-+l-75.4%
*-commutative75.4%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 79.9%
Taylor expanded in b around 0 70.2%
Taylor expanded in x around 0 47.2%
associate-*r*47.2%
Simplified47.2%
div-inv47.2%
associate-*l*47.2%
Applied egg-rr47.2%
if -1.2e-94 < x < 2.8999999999999999e-83Initial program 83.4%
associate-+l-83.4%
*-commutative83.4%
associate-*r*84.1%
*-commutative84.1%
associate-+l-84.1%
associate-*l*84.1%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in b around inf 54.7%
*-commutative54.7%
Simplified54.7%
div-inv54.7%
Applied egg-rr54.7%
if 2.8999999999999999e-83 < x Initial program 75.5%
associate-+l-75.5%
*-commutative75.5%
associate-*r*75.4%
*-commutative75.4%
associate-+l-75.4%
associate-*l*75.5%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in z around inf 68.9%
Taylor expanded in b around 0 59.6%
Taylor expanded in y around inf 62.0%
Taylor expanded in a around 0 50.9%
*-commutative50.9%
associate-/r*54.9%
Simplified54.9%
Final simplification54.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= x -2.4e+72)
(* 9.0 (* x (/ (/ y z) c_m)))
(if (<= x -4.5e-94)
(* -4.0 (/ (* t a) c_m))
(if (<= x 4.5e-83)
(* b (/ 1.0 (* c_m z)))
(* y (* 9.0 (/ (/ x z) 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 (x <= -2.4e+72) {
tmp = 9.0 * (x * ((y / z) / c_m));
} else if (x <= -4.5e-94) {
tmp = -4.0 * ((t * a) / c_m);
} else if (x <= 4.5e-83) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = y * (9.0 * ((x / z) / 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 (x <= (-2.4d+72)) then
tmp = 9.0d0 * (x * ((y / z) / c_m))
else if (x <= (-4.5d-94)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (x <= 4.5d-83) then
tmp = b * (1.0d0 / (c_m * z))
else
tmp = y * (9.0d0 * ((x / z) / 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 (x <= -2.4e+72) {
tmp = 9.0 * (x * ((y / z) / c_m));
} else if (x <= -4.5e-94) {
tmp = -4.0 * ((t * a) / c_m);
} else if (x <= 4.5e-83) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = y * (9.0 * ((x / z) / 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 x <= -2.4e+72: tmp = 9.0 * (x * ((y / z) / c_m)) elif x <= -4.5e-94: tmp = -4.0 * ((t * a) / c_m) elif x <= 4.5e-83: tmp = b * (1.0 / (c_m * z)) else: tmp = y * (9.0 * ((x / z) / 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 (x <= -2.4e+72) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / z) / c_m))); elseif (x <= -4.5e-94) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (x <= 4.5e-83) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); else tmp = Float64(y * Float64(9.0 * Float64(Float64(x / z) / 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 (x <= -2.4e+72)
tmp = 9.0 * (x * ((y / z) / c_m));
elseif (x <= -4.5e-94)
tmp = -4.0 * ((t * a) / c_m);
elseif (x <= 4.5e-83)
tmp = b * (1.0 / (c_m * z));
else
tmp = y * (9.0 * ((x / z) / 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[x, -2.4e+72], N[(9.0 * N[(x * N[(N[(y / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.5e-94], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e-83], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(9.0 * N[(N[(x / z), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+72}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{z}}{c\_m}\right)\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-94}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-83}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{\frac{x}{z}}{c\_m}\right)\\
\end{array}
\end{array}
if x < -2.4000000000000001e72Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
associate-*l*74.8%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in x around inf 82.1%
+-commutative82.1%
fma-define82.1%
*-commutative82.1%
associate-/l*79.6%
associate-*l*79.6%
*-commutative79.6%
associate-/l*83.3%
Simplified83.3%
fma-undefine83.3%
associate-*l*83.3%
Applied egg-rr83.3%
Taylor expanded in x around inf 54.2%
*-commutative54.2%
associate-*r/58.9%
associate-/r*58.8%
Simplified58.8%
if -2.4000000000000001e72 < x < -4.5000000000000002e-94Initial program 75.4%
associate-+l-75.4%
*-commutative75.4%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around inf 47.2%
*-commutative47.2%
Simplified47.2%
if -4.5000000000000002e-94 < x < 4.49999999999999997e-83Initial program 83.4%
associate-+l-83.4%
*-commutative83.4%
associate-*r*84.1%
*-commutative84.1%
associate-+l-84.1%
associate-*l*84.1%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in b around inf 54.7%
*-commutative54.7%
Simplified54.7%
div-inv54.7%
Applied egg-rr54.7%
if 4.49999999999999997e-83 < x Initial program 75.5%
associate-+l-75.5%
*-commutative75.5%
associate-*r*75.4%
*-commutative75.4%
associate-+l-75.4%
associate-*l*75.5%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in z around inf 68.9%
Taylor expanded in b around 0 59.6%
Taylor expanded in y around inf 62.0%
Taylor expanded in a around 0 50.9%
*-commutative50.9%
associate-/r*54.9%
Simplified54.9%
Final simplification54.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= t -1.6e+209)
(/ (* t (- (* 9.0 (/ (* x y) (* t z))) (* a 4.0))) c_m)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* 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 <= -1.6e+209) {
tmp = (t * ((9.0 * ((x * y) / (t * z))) - (a * 4.0))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (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 <= (-1.6d+209)) then
tmp = (t * ((9.0d0 * ((x * y) / (t * z))) - (a * 4.0d0))) / c_m
else
tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (t * a)))) / (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 <= -1.6e+209) {
tmp = (t * ((9.0 * ((x * y) / (t * z))) - (a * 4.0))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (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 <= -1.6e+209: tmp = (t * ((9.0 * ((x * y) / (t * z))) - (a * 4.0))) / c_m else: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (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 <= -1.6e+209) tmp = Float64(Float64(t * Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(t * z))) - Float64(a * 4.0))) / c_m); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / 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 <= -1.6e+209)
tmp = (t * ((9.0 * ((x * y) / (t * z))) - (a * 4.0))) / c_m;
else
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (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[t, -1.6e+209], N[(N[(t * N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], 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]]), $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 -1.6 \cdot 10^{+209}:\\
\;\;\;\;\frac{t \cdot \left(9 \cdot \frac{x \cdot y}{t \cdot z} - a \cdot 4\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if t < -1.6e209Initial program 72.2%
associate-+l-72.2%
*-commutative72.2%
associate-*r*72.4%
*-commutative72.4%
associate-+l-72.4%
associate-*l*72.4%
associate-*l*53.7%
*-commutative53.7%
Simplified53.7%
Taylor expanded in z around inf 49.0%
Taylor expanded in b around 0 71.5%
Taylor expanded in t around inf 85.7%
if -1.6e209 < t Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*79.2%
*-commutative79.2%
associate-+l-79.2%
associate-*l*79.2%
associate-*l*80.6%
*-commutative80.6%
Simplified80.6%
Final simplification81.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= b -2.9e-77)
(* b (/ 1.0 (* c_m z)))
(if (<= b -2.1e-184)
(* 9.0 (* x (/ y (* c_m z))))
(if (<= b 4.5e+86) (* -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 (b <= -2.9e-77) {
tmp = b * (1.0 / (c_m * z));
} else if (b <= -2.1e-184) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (b <= 4.5e+86) {
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 (b <= (-2.9d-77)) then
tmp = b * (1.0d0 / (c_m * z))
else if (b <= (-2.1d-184)) then
tmp = 9.0d0 * (x * (y / (c_m * z)))
else if (b <= 4.5d+86) 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 (b <= -2.9e-77) {
tmp = b * (1.0 / (c_m * z));
} else if (b <= -2.1e-184) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (b <= 4.5e+86) {
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 b <= -2.9e-77: tmp = b * (1.0 / (c_m * z)) elif b <= -2.1e-184: tmp = 9.0 * (x * (y / (c_m * z))) elif b <= 4.5e+86: 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 (b <= -2.9e-77) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (b <= -2.1e-184) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))); elseif (b <= 4.5e+86) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); 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 (b <= -2.9e-77)
tmp = b * (1.0 / (c_m * z));
elseif (b <= -2.1e-184)
tmp = 9.0 * (x * (y / (c_m * z)));
elseif (b <= 4.5e+86)
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[LessEqual[b, -2.9e-77], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.1e-184], N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+86], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $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}\;b \leq -2.9 \cdot 10^{-77}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{-184}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+86}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -2.8999999999999999e-77Initial program 71.7%
associate-+l-71.7%
*-commutative71.7%
associate-*r*71.7%
*-commutative71.7%
associate-+l-71.7%
associate-*l*71.6%
associate-*l*69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in b around inf 47.2%
*-commutative47.2%
Simplified47.2%
div-inv47.2%
Applied egg-rr47.2%
if -2.8999999999999999e-77 < b < -2.0999999999999999e-184Initial program 84.1%
associate-+l-84.1%
*-commutative84.1%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
associate-*l*80.9%
associate-*l*84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in x around inf 59.6%
associate-/l*60.1%
*-commutative60.1%
Simplified60.1%
if -2.0999999999999999e-184 < b < 4.49999999999999993e86Initial program 79.9%
associate-+l-79.9%
*-commutative79.9%
associate-*r*79.5%
*-commutative79.5%
associate-+l-79.5%
associate-*l*79.5%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in z around inf 55.7%
*-commutative55.7%
Simplified55.7%
if 4.49999999999999993e86 < b Initial program 83.3%
associate-+l-83.3%
*-commutative83.3%
associate-*r*85.0%
*-commutative85.0%
associate-+l-85.0%
associate-*l*85.0%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around inf 77.4%
Taylor expanded in b around inf 71.4%
associate-/r*74.2%
Simplified74.2%
Final simplification57.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= t -3.1e+185)
(* a (/ (* t -4.0) c_m))
(if (<= t 1e-64)
(/ (+ b (* y (* x 9.0))) (* 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 (t <= -3.1e+185) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= 1e-64) {
tmp = (b + (y * (x * 9.0))) / (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 (t <= (-3.1d+185)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (t <= 1d-64) then
tmp = (b + (y * (x * 9.0d0))) / (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 (t <= -3.1e+185) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= 1e-64) {
tmp = (b + (y * (x * 9.0))) / (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 t <= -3.1e+185: tmp = a * ((t * -4.0) / c_m) elif t <= 1e-64: tmp = (b + (y * (x * 9.0))) / (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 (t <= -3.1e+185) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (t <= 1e-64) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 <= -3.1e+185)
tmp = a * ((t * -4.0) / c_m);
elseif (t <= 1e-64)
tmp = (b + (y * (x * 9.0))) / (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[t, -3.1e+185], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-64], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[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 -3.1 \cdot 10^{+185}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;t \leq 10^{-64}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if t < -3.1e185Initial program 73.6%
associate-+l-73.6%
*-commutative73.6%
associate-*r*73.7%
*-commutative73.7%
associate-+l-73.7%
associate-*l*73.6%
associate-*l*58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in z around inf 70.0%
associate-/l*66.6%
associate-*r*66.6%
*-commutative66.6%
associate-*r*66.6%
*-commutative66.6%
associate-*l/66.6%
Simplified66.6%
if -3.1e185 < t < 9.99999999999999965e-65Initial program 82.5%
associate-+l-82.5%
*-commutative82.5%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
associate-*l*80.1%
associate-*l*82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in x around inf 77.2%
+-commutative77.2%
fma-define77.2%
*-commutative77.2%
associate-/l*73.6%
associate-*l*73.6%
*-commutative73.6%
associate-/l*73.3%
Simplified73.3%
fma-undefine73.3%
associate-*l*73.3%
Applied egg-rr73.3%
Taylor expanded in x around inf 67.1%
associate-*r*67.1%
Simplified67.1%
if 9.99999999999999965e-65 < t Initial program 74.5%
associate-+l-74.5%
*-commutative74.5%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
associate-*l*77.9%
associate-*l*76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in z around inf 74.7%
Taylor expanded in z around inf 41.5%
*-commutative41.5%
associate-/l*46.9%
Simplified46.9%
Final simplification60.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= t -7.2e+187)
(* a (/ (* t -4.0) c_m))
(if (<= t 9.2e-65)
(/ (+ b (* x (* 9.0 y))) (* c_m z))
(* -4.0 (* t (/ a c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -7.2e+187) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= 9.2e-65) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 <= (-7.2d+187)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (t <= 9.2d-65) then
tmp = (b + (x * (9.0d0 * y))) / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 <= -7.2e+187) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= 9.2e-65) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 <= -7.2e+187: tmp = a * ((t * -4.0) / c_m) elif t <= 9.2e-65: tmp = (b + (x * (9.0 * y))) / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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 <= -7.2e+187) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (t <= 9.2e-65) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 <= -7.2e+187)
tmp = a * ((t * -4.0) / c_m);
elseif (t <= 9.2e-65)
tmp = (b + (x * (9.0 * y))) / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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[t, -7.2e+187], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e-65], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[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 -7.2 \cdot 10^{+187}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if t < -7.20000000000000072e187Initial program 73.6%
associate-+l-73.6%
*-commutative73.6%
associate-*r*73.7%
*-commutative73.7%
associate-+l-73.7%
associate-*l*73.6%
associate-*l*58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in z around inf 70.0%
associate-/l*66.6%
associate-*r*66.6%
*-commutative66.6%
associate-*r*66.6%
*-commutative66.6%
associate-*l/66.6%
Simplified66.6%
if -7.20000000000000072e187 < t < 9.1999999999999999e-65Initial program 82.5%
associate-+l-82.5%
*-commutative82.5%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
associate-*l*80.1%
associate-*l*82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in x around inf 67.1%
associate-*r*67.1%
*-commutative67.1%
associate-*r*67.1%
Simplified67.1%
if 9.1999999999999999e-65 < t Initial program 74.5%
associate-+l-74.5%
*-commutative74.5%
associate-*r*77.9%
*-commutative77.9%
associate-+l-77.9%
associate-*l*77.9%
associate-*l*76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in z around inf 74.7%
Taylor expanded in z around inf 41.5%
*-commutative41.5%
associate-/l*46.9%
Simplified46.9%
Final simplification60.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= b -9e+123)
(/ b (* c_m z))
(if (<= b 1.65e+81) (* (/ t c_m) (* a -4.0)) (/ (/ 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 (b <= -9e+123) {
tmp = b / (c_m * z);
} else if (b <= 1.65e+81) {
tmp = (t / c_m) * (a * -4.0);
} 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 (b <= (-9d+123)) then
tmp = b / (c_m * z)
else if (b <= 1.65d+81) then
tmp = (t / c_m) * (a * (-4.0d0))
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 (b <= -9e+123) {
tmp = b / (c_m * z);
} else if (b <= 1.65e+81) {
tmp = (t / c_m) * (a * -4.0);
} 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 b <= -9e+123: tmp = b / (c_m * z) elif b <= 1.65e+81: tmp = (t / c_m) * (a * -4.0) 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 (b <= -9e+123) tmp = Float64(b / Float64(c_m * z)); elseif (b <= 1.65e+81) tmp = Float64(Float64(t / c_m) * Float64(a * -4.0)); 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 (b <= -9e+123)
tmp = b / (c_m * z);
elseif (b <= 1.65e+81)
tmp = (t / c_m) * (a * -4.0);
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[b, -9e+123], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.65e+81], N[(N[(t / c$95$m), $MachinePrecision] * N[(a * -4.0), $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}\;b \leq -9 \cdot 10^{+123}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{+81}:\\
\;\;\;\;\frac{t}{c\_m} \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -8.99999999999999965e123Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*78.4%
*-commutative78.4%
associate-+l-78.4%
associate-*l*78.4%
associate-*l*78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in b around inf 65.5%
*-commutative65.5%
Simplified65.5%
if -8.99999999999999965e123 < b < 1.65e81Initial program 77.7%
associate-+l-77.7%
*-commutative77.7%
associate-*r*76.8%
*-commutative76.8%
associate-+l-76.8%
associate-*l*76.8%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in z around inf 75.3%
Taylor expanded in b around 0 72.4%
Taylor expanded in x around 0 49.1%
associate-*r*49.1%
Simplified49.1%
associate-/l*48.0%
Applied egg-rr48.0%
if 1.65e81 < b Initial program 83.3%
associate-+l-83.3%
*-commutative83.3%
associate-*r*85.0%
*-commutative85.0%
associate-+l-85.0%
associate-*l*85.0%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around inf 77.4%
Taylor expanded in b around inf 71.4%
associate-/r*74.2%
Simplified74.2%
Final simplification55.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= b -9e+123)
(/ b (* c_m z))
(if (<= b 8.8e+80) (* a (/ (* t -4.0) 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 (b <= -9e+123) {
tmp = b / (c_m * z);
} else if (b <= 8.8e+80) {
tmp = a * ((t * -4.0) / 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 (b <= (-9d+123)) then
tmp = b / (c_m * z)
else if (b <= 8.8d+80) then
tmp = a * ((t * (-4.0d0)) / 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 (b <= -9e+123) {
tmp = b / (c_m * z);
} else if (b <= 8.8e+80) {
tmp = a * ((t * -4.0) / 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 b <= -9e+123: tmp = b / (c_m * z) elif b <= 8.8e+80: tmp = a * ((t * -4.0) / 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 (b <= -9e+123) tmp = Float64(b / Float64(c_m * z)); elseif (b <= 8.8e+80) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); 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 (b <= -9e+123)
tmp = b / (c_m * z);
elseif (b <= 8.8e+80)
tmp = a * ((t * -4.0) / 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[LessEqual[b, -9e+123], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.8e+80], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $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}\;b \leq -9 \cdot 10^{+123}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+80}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -8.99999999999999965e123Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*78.4%
*-commutative78.4%
associate-+l-78.4%
associate-*l*78.4%
associate-*l*78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in b around inf 65.5%
*-commutative65.5%
Simplified65.5%
if -8.99999999999999965e123 < b < 8.80000000000000011e80Initial program 77.7%
associate-+l-77.7%
*-commutative77.7%
associate-*r*76.8%
*-commutative76.8%
associate-+l-76.8%
associate-*l*76.8%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in z around inf 49.1%
associate-/l*48.0%
associate-*r*48.0%
*-commutative48.0%
associate-*r*48.0%
*-commutative48.0%
associate-*l/48.0%
Simplified48.0%
if 8.80000000000000011e80 < b Initial program 83.3%
associate-+l-83.3%
*-commutative83.3%
associate-*r*85.0%
*-commutative85.0%
associate-+l-85.0%
associate-*l*85.0%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around inf 77.4%
Taylor expanded in b around inf 71.4%
associate-/r*74.2%
Simplified74.2%
Final simplification55.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= b -1.18e-23)
(/ b (* c_m z))
(if (<= b 1.5e+81) (* -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 (b <= -1.18e-23) {
tmp = b / (c_m * z);
} else if (b <= 1.5e+81) {
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 (b <= (-1.18d-23)) then
tmp = b / (c_m * z)
else if (b <= 1.5d+81) 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 (b <= -1.18e-23) {
tmp = b / (c_m * z);
} else if (b <= 1.5e+81) {
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 b <= -1.18e-23: tmp = b / (c_m * z) elif b <= 1.5e+81: 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 (b <= -1.18e-23) tmp = Float64(b / Float64(c_m * z)); elseif (b <= 1.5e+81) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); 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 (b <= -1.18e-23)
tmp = b / (c_m * z);
elseif (b <= 1.5e+81)
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[LessEqual[b, -1.18e-23], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+81], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $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}\;b \leq -1.18 \cdot 10^{-23}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+81}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -1.18e-23Initial program 70.4%
associate-+l-70.4%
*-commutative70.4%
associate-*r*70.4%
*-commutative70.4%
associate-+l-70.4%
associate-*l*70.4%
associate-*l*70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in b around inf 49.8%
*-commutative49.8%
Simplified49.8%
if -1.18e-23 < b < 1.49999999999999999e81Initial program 80.8%
associate-+l-80.8%
*-commutative80.8%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
associate-*l*79.8%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in z around inf 78.6%
Taylor expanded in z around inf 52.0%
*-commutative52.0%
associate-/l*53.4%
Simplified53.4%
if 1.49999999999999999e81 < b Initial program 83.3%
associate-+l-83.3%
*-commutative83.3%
associate-*r*85.0%
*-commutative85.0%
associate-+l-85.0%
associate-*l*85.0%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around inf 77.4%
Taylor expanded in b around inf 71.4%
associate-/r*74.2%
Simplified74.2%
Final simplification56.8%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) 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 78.9%
associate-+l-78.9%
*-commutative78.9%
associate-*r*78.7%
*-commutative78.7%
associate-+l-78.7%
associate-*l*78.7%
associate-*l*78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in b around inf 38.5%
*-commutative38.5%
Simplified38.5%
Final simplification38.5%
(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 2024137
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))