
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 2.7e-61)
(/ (+ (fma x (* 9.0 y) (* z (* (* -4.0 t) a))) b) (* c_m z))
(fma
-4.0
(/ a (/ c_m t))
(fma 9.0 (* (/ x c_m) (/ y z)) (/ b (* c_m z)))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 2.7e-61) {
tmp = (fma(x, (9.0 * y), (z * ((-4.0 * t) * a))) + b) / (c_m * z);
} else {
tmp = fma(-4.0, (a / (c_m / t)), fma(9.0, ((x / c_m) * (y / z)), (b / (c_m * z))));
}
return c_s * tmp;
}
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 2.7e-61) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(z * Float64(Float64(-4.0 * t) * a))) + b) / Float64(c_m * z)); else tmp = fma(-4.0, Float64(a / Float64(c_m / t)), fma(9.0, Float64(Float64(x / c_m) * Float64(y / z)), Float64(b / Float64(c_m * z)))); end return Float64(c_s * tmp) end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 2.7e-61], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(N[(-4.0 * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;c_m \leq 2.7 \cdot 10^{-61}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c_m}{t}}, \mathsf{fma}\left(9, \frac{x}{c_m} \cdot \frac{y}{z}, \frac{b}{c_m \cdot z}\right)\right)\\
\end{array}
\end{array}
if c < 2.69999999999999993e-61Initial program 81.4%
associate-+l-81.4%
*-commutative81.4%
associate-*r*80.7%
*-commutative80.7%
associate-+l-80.7%
Simplified84.8%
if 2.69999999999999993e-61 < c Initial program 73.5%
associate-+l-73.5%
*-commutative73.5%
associate-*r*74.5%
*-commutative74.5%
associate-+l-74.5%
*-commutative74.5%
associate-*r*73.5%
*-commutative73.5%
associate-*l*73.5%
associate-*l*73.5%
Simplified73.5%
Taylor expanded in x around 0 81.0%
cancel-sign-sub-inv81.0%
metadata-eval81.0%
+-commutative81.0%
fma-def81.0%
associate-/l*86.4%
fma-def86.4%
times-frac84.0%
*-commutative84.0%
Simplified84.0%
Final simplification84.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 7.4e-31)
(/ (+ (fma x (* 9.0 y) (* z (* (* -4.0 t) a))) b) (* c_m z))
(-
(+ (/ b (* c_m z)) (* 9.0 (/ (* x y) (* c_m z))))
(* 4.0 (/ (* t a) c_m))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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.4e-31) {
tmp = (fma(x, (9.0 * y), (z * ((-4.0 * t) * a))) + b) / (c_m * z);
} else {
tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (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 (c_m <= 7.4e-31) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(z * Float64(Float64(-4.0 * t) * a))) + b) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(b / Float64(c_m * z)) + Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z)))) - Float64(4.0 * Float64(Float64(t * a) / c_m))); end return Float64(c_s * tmp) end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 7.4e-31], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(N[(-4.0 * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;c_m \leq 7.4 \cdot 10^{-31}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{c_m \cdot z} + 9 \cdot \frac{x \cdot y}{c_m \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c_m}\\
\end{array}
\end{array}
if c < 7.3999999999999996e-31Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*81.0%
*-commutative81.0%
associate-+l-81.0%
Simplified84.9%
if 7.3999999999999996e-31 < c Initial program 72.5%
associate-+l-72.5%
*-commutative72.5%
associate-*r*73.6%
*-commutative73.6%
associate-+l-73.6%
*-commutative73.6%
associate-*r*72.5%
*-commutative72.5%
associate-*l*72.5%
associate-*l*72.5%
Simplified72.5%
Taylor expanded in x around 0 80.6%
Final simplification83.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))))
(*
c_s
(if (<= t_1 -5e-287)
t_2
(if (<= t_1 0.0)
(* (/ 1.0 z) (/ (+ (* -4.0 (* a (* z t))) (* 9.0 (* x y))) c_m))
(if (<= t_1 INFINITY) t_2 (* -4.0 (* 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 t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
double tmp;
if (t_1 <= -5e-287) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
double tmp;
if (t_1 <= -5e-287) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = -4.0 * (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): t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z) t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z) tmp = 0 if t_1 <= -5e-287: tmp = t_2 elif t_1 <= 0.0: tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m) elif t_1 <= math.inf: tmp = t_2 else: tmp = -4.0 * (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) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -5e-287) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(1.0 / z) * Float64(Float64(Float64(-4.0 * Float64(a * Float64(z * t))) + Float64(9.0 * Float64(x * y))) / c_m)); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(-4.0 * Float64(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)
t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
tmp = 0.0;
if (t_1 <= -5e-287)
tmp = t_2;
elseif (t_1 <= 0.0)
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = -4.0 * (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_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -5e-287], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(N[(-4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(-4.0 * N[(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])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{1}{z} \cdot \frac{-4 \cdot \left(a \cdot \left(z \cdot t\right)\right) + 9 \cdot \left(x \cdot y\right)}{c_m}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -5.00000000000000025e-287 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 87.9%
associate-+l-87.9%
*-commutative87.9%
associate-*r*87.9%
*-commutative87.9%
associate-+l-87.9%
*-commutative87.9%
associate-*r*87.9%
*-commutative87.9%
associate-*l*87.9%
associate-*l*89.6%
Simplified89.6%
if -5.00000000000000025e-287 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 45.3%
associate-+l-45.3%
*-commutative45.3%
associate-*r*44.6%
*-commutative44.6%
associate-+l-44.6%
*-commutative44.6%
associate-*r*45.3%
*-commutative45.3%
associate-*l*45.3%
associate-*l*45.3%
Simplified45.3%
Applied egg-rr99.6%
Taylor expanded in b around 0 84.8%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*0.2%
*-commutative0.2%
associate-+l-0.2%
*-commutative0.2%
associate-*r*0.0%
*-commutative0.0%
associate-*l*0.0%
associate-*l*0.2%
Simplified0.2%
Taylor expanded in z around inf 59.4%
*-commutative59.4%
associate-/l*69.9%
Simplified69.9%
associate-/r/75.1%
Applied egg-rr75.1%
Final simplification88.2%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))) (t_2 (* 9.0 (* y (/ (/ x z) c_m)))))
(*
c_s
(if (<= a -2.15e-39)
t_1
(if (<= a 1.95e-177)
(/ (/ b c_m) z)
(if (<= a 1.7e-126)
t_2
(if (<= a 2.3e-17)
(/ b (* c_m z))
(if (<= a 3.4e+113) t_2 t_1))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (y * ((x / z) / c_m));
double tmp;
if (a <= -2.15e-39) {
tmp = t_1;
} else if (a <= 1.95e-177) {
tmp = (b / c_m) / z;
} else if (a <= 1.7e-126) {
tmp = t_2;
} else if (a <= 2.3e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.4e+113) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 = (-4.0d0) * (t * (a / c_m))
t_2 = 9.0d0 * (y * ((x / z) / c_m))
if (a <= (-2.15d-39)) then
tmp = t_1
else if (a <= 1.95d-177) then
tmp = (b / c_m) / z
else if (a <= 1.7d-126) then
tmp = t_2
else if (a <= 2.3d-17) then
tmp = b / (c_m * z)
else if (a <= 3.4d+113) then
tmp = t_2
else
tmp = t_1
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (y * ((x / z) / c_m));
double tmp;
if (a <= -2.15e-39) {
tmp = t_1;
} else if (a <= 1.95e-177) {
tmp = (b / c_m) / z;
} else if (a <= 1.7e-126) {
tmp = t_2;
} else if (a <= 2.3e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.4e+113) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) t_2 = 9.0 * (y * ((x / z) / c_m)) tmp = 0 if a <= -2.15e-39: tmp = t_1 elif a <= 1.95e-177: tmp = (b / c_m) / z elif a <= 1.7e-126: tmp = t_2 elif a <= 2.3e-17: tmp = b / (c_m * z) elif a <= 3.4e+113: tmp = t_2 else: tmp = t_1 return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) t_2 = Float64(9.0 * Float64(y * Float64(Float64(x / z) / c_m))) tmp = 0.0 if (a <= -2.15e-39) tmp = t_1; elseif (a <= 1.95e-177) tmp = Float64(Float64(b / c_m) / z); elseif (a <= 1.7e-126) tmp = t_2; elseif (a <= 2.3e-17) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 3.4e+113) tmp = t_2; else tmp = t_1; end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (t * (a / c_m));
t_2 = 9.0 * (y * ((x / z) / c_m));
tmp = 0.0;
if (a <= -2.15e-39)
tmp = t_1;
elseif (a <= 1.95e-177)
tmp = (b / c_m) / z;
elseif (a <= 1.7e-126)
tmp = t_2;
elseif (a <= 2.3e-17)
tmp = b / (c_m * z);
elseif (a <= 3.4e+113)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y * N[(N[(x / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -2.15e-39], t$95$1, If[LessEqual[a, 1.95e-177], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.7e-126], t$95$2, If[LessEqual[a, 2.3e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+113], t$95$2, t$95$1]]]]]), $MachinePrecision]]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
t_2 := 9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -2.15 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-177}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if a < -2.15e-39 or 3.40000000000000019e113 < a Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*77.0%
*-commutative77.0%
associate-*l*77.0%
associate-*l*74.5%
Simplified74.5%
Taylor expanded in z around inf 46.5%
*-commutative46.5%
associate-/l*52.1%
Simplified52.1%
associate-/r/54.0%
Applied egg-rr54.0%
if -2.15e-39 < a < 1.95000000000000007e-177Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*90.2%
*-commutative90.2%
associate-+l-90.2%
*-commutative90.2%
associate-*r*81.8%
*-commutative81.8%
associate-*l*81.8%
associate-*l*90.1%
Simplified90.1%
Applied egg-rr81.9%
associate-*l/81.9%
*-un-lft-identity81.9%
associate-*r*86.7%
Applied egg-rr86.7%
Taylor expanded in b around inf 54.8%
if 1.95000000000000007e-177 < a < 1.7e-126 or 2.30000000000000009e-17 < a < 3.40000000000000019e113Initial program 70.1%
associate-+l-70.1%
*-commutative70.1%
associate-*r*70.1%
*-commutative70.1%
associate-+l-70.1%
*-commutative70.1%
associate-*r*70.1%
*-commutative70.1%
associate-*l*70.2%
associate-*l*69.4%
Simplified69.4%
Taylor expanded in x around inf 35.4%
associate-*r/35.4%
*-commutative35.4%
associate-*r*35.5%
*-commutative35.5%
times-frac42.4%
Simplified42.4%
associate-/l*42.3%
clear-num42.3%
frac-times42.4%
metadata-eval42.4%
Applied egg-rr42.4%
Taylor expanded in z around 0 35.4%
*-commutative35.4%
times-frac44.6%
associate-*l/40.1%
associate-*r/38.0%
Simplified38.0%
if 1.7e-126 < a < 2.30000000000000009e-17Initial program 91.1%
associate-+l-91.1%
*-commutative91.1%
associate-*r*91.2%
*-commutative91.2%
associate-+l-91.2%
*-commutative91.2%
associate-*r*91.1%
*-commutative91.1%
associate-*l*91.1%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 38.3%
*-commutative38.3%
Simplified38.3%
Final simplification50.3%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))) (t_2 (* 9.0 (/ y (/ c_m (/ x z))))))
(*
c_s
(if (<= a -3.8e-42)
t_1
(if (<= a 4.2e-207)
(/ (/ b c_m) z)
(if (<= a 3.8e-126)
t_2
(if (<= a 5.5e-17)
(/ b (* c_m z))
(if (<= a 3.4e+113) t_2 t_1))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (y / (c_m / (x / z)));
double tmp;
if (a <= -3.8e-42) {
tmp = t_1;
} else if (a <= 4.2e-207) {
tmp = (b / c_m) / z;
} else if (a <= 3.8e-126) {
tmp = t_2;
} else if (a <= 5.5e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.4e+113) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 = (-4.0d0) * (t * (a / c_m))
t_2 = 9.0d0 * (y / (c_m / (x / z)))
if (a <= (-3.8d-42)) then
tmp = t_1
else if (a <= 4.2d-207) then
tmp = (b / c_m) / z
else if (a <= 3.8d-126) then
tmp = t_2
else if (a <= 5.5d-17) then
tmp = b / (c_m * z)
else if (a <= 3.4d+113) then
tmp = t_2
else
tmp = t_1
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (y / (c_m / (x / z)));
double tmp;
if (a <= -3.8e-42) {
tmp = t_1;
} else if (a <= 4.2e-207) {
tmp = (b / c_m) / z;
} else if (a <= 3.8e-126) {
tmp = t_2;
} else if (a <= 5.5e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.4e+113) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) t_2 = 9.0 * (y / (c_m / (x / z))) tmp = 0 if a <= -3.8e-42: tmp = t_1 elif a <= 4.2e-207: tmp = (b / c_m) / z elif a <= 3.8e-126: tmp = t_2 elif a <= 5.5e-17: tmp = b / (c_m * z) elif a <= 3.4e+113: tmp = t_2 else: tmp = t_1 return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) t_2 = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / z)))) tmp = 0.0 if (a <= -3.8e-42) tmp = t_1; elseif (a <= 4.2e-207) tmp = Float64(Float64(b / c_m) / z); elseif (a <= 3.8e-126) tmp = t_2; elseif (a <= 5.5e-17) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 3.4e+113) tmp = t_2; else tmp = t_1; end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (t * (a / c_m));
t_2 = 9.0 * (y / (c_m / (x / z)));
tmp = 0.0;
if (a <= -3.8e-42)
tmp = t_1;
elseif (a <= 4.2e-207)
tmp = (b / c_m) / z;
elseif (a <= 3.8e-126)
tmp = t_2;
elseif (a <= 5.5e-17)
tmp = b / (c_m * z);
elseif (a <= 3.4e+113)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -3.8e-42], t$95$1, If[LessEqual[a, 4.2e-207], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 3.8e-126], t$95$2, If[LessEqual[a, 5.5e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+113], t$95$2, t$95$1]]]]]), $MachinePrecision]]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
t_2 := 9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-207}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if a < -3.80000000000000017e-42 or 3.40000000000000019e113 < a Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*77.0%
*-commutative77.0%
associate-*l*77.0%
associate-*l*74.5%
Simplified74.5%
Taylor expanded in z around inf 46.5%
*-commutative46.5%
associate-/l*52.1%
Simplified52.1%
associate-/r/54.0%
Applied egg-rr54.0%
if -3.80000000000000017e-42 < a < 4.20000000000000007e-207Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*91.5%
*-commutative91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*82.0%
*-commutative82.0%
associate-*l*82.0%
associate-*l*91.5%
Simplified91.5%
Applied egg-rr83.4%
associate-*l/83.4%
*-un-lft-identity83.4%
associate-*r*87.5%
Applied egg-rr87.5%
Taylor expanded in b around inf 54.0%
if 4.20000000000000007e-207 < a < 3.7999999999999999e-126 or 5.50000000000000001e-17 < a < 3.40000000000000019e113Initial program 72.0%
associate-+l-72.0%
*-commutative72.0%
associate-*r*72.1%
*-commutative72.1%
associate-+l-72.1%
*-commutative72.1%
associate-*r*72.0%
*-commutative72.0%
associate-*l*72.1%
associate-*l*71.5%
Simplified71.5%
Applied egg-rr76.1%
Taylor expanded in x around inf 34.8%
*-commutative34.8%
*-commutative34.8%
associate-/l*40.3%
*-commutative40.3%
associate-/l*38.8%
Simplified38.8%
if 3.7999999999999999e-126 < a < 5.50000000000000001e-17Initial program 91.1%
associate-+l-91.1%
*-commutative91.1%
associate-*r*91.2%
*-commutative91.2%
associate-+l-91.2%
*-commutative91.2%
associate-*r*91.1%
*-commutative91.1%
associate-*l*91.1%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 38.3%
*-commutative38.3%
Simplified38.3%
Final simplification49.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= a -4.1e-39)
t_1
(if (<= a 3.1e-171)
(/ (/ b c_m) z)
(if (<= a 1.35e-126)
(* 9.0 (/ (* x y) (* c_m z)))
(if (<= a 1.7e-17)
(/ b (* c_m z))
(if (<= a 3.4e+113) (* 9.0 (/ y (/ c_m (/ x 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 = -4.0 * (t * (a / c_m));
double tmp;
if (a <= -4.1e-39) {
tmp = t_1;
} else if (a <= 3.1e-171) {
tmp = (b / c_m) / z;
} else if (a <= 1.35e-126) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (a <= 1.7e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.4e+113) {
tmp = 9.0 * (y / (c_m / (x / 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 = (-4.0d0) * (t * (a / c_m))
if (a <= (-4.1d-39)) then
tmp = t_1
else if (a <= 3.1d-171) then
tmp = (b / c_m) / z
else if (a <= 1.35d-126) then
tmp = 9.0d0 * ((x * y) / (c_m * z))
else if (a <= 1.7d-17) then
tmp = b / (c_m * z)
else if (a <= 3.4d+113) then
tmp = 9.0d0 * (y / (c_m / (x / 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 = -4.0 * (t * (a / c_m));
double tmp;
if (a <= -4.1e-39) {
tmp = t_1;
} else if (a <= 3.1e-171) {
tmp = (b / c_m) / z;
} else if (a <= 1.35e-126) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (a <= 1.7e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.4e+113) {
tmp = 9.0 * (y / (c_m / (x / 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 = -4.0 * (t * (a / c_m)) tmp = 0 if a <= -4.1e-39: tmp = t_1 elif a <= 3.1e-171: tmp = (b / c_m) / z elif a <= 1.35e-126: tmp = 9.0 * ((x * y) / (c_m * z)) elif a <= 1.7e-17: tmp = b / (c_m * z) elif a <= 3.4e+113: tmp = 9.0 * (y / (c_m / (x / 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(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (a <= -4.1e-39) tmp = t_1; elseif (a <= 3.1e-171) tmp = Float64(Float64(b / c_m) / z); elseif (a <= 1.35e-126) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z))); elseif (a <= 1.7e-17) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 3.4e+113) tmp = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / 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 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (a <= -4.1e-39)
tmp = t_1;
elseif (a <= 3.1e-171)
tmp = (b / c_m) / z;
elseif (a <= 1.35e-126)
tmp = 9.0 * ((x * y) / (c_m * z));
elseif (a <= 1.7e-17)
tmp = b / (c_m * z);
elseif (a <= 3.4e+113)
tmp = 9.0 * (y / (c_m / (x / 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[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -4.1e-39], t$95$1, If[LessEqual[a, 3.1e-171], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.35e-126], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+113], N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-126}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c_m \cdot z}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if a < -4.1e-39 or 3.40000000000000019e113 < a Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*77.0%
*-commutative77.0%
associate-*l*77.0%
associate-*l*74.5%
Simplified74.5%
Taylor expanded in z around inf 46.5%
*-commutative46.5%
associate-/l*52.1%
Simplified52.1%
associate-/r/54.0%
Applied egg-rr54.0%
if -4.1e-39 < a < 3.1e-171Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*89.3%
*-commutative89.3%
associate-+l-89.3%
*-commutative89.3%
associate-*r*81.1%
*-commutative81.1%
associate-*l*81.1%
associate-*l*89.2%
Simplified89.2%
Applied egg-rr81.2%
associate-*l/81.2%
*-un-lft-identity81.2%
associate-*r*85.9%
Applied egg-rr85.9%
Taylor expanded in b around inf 54.7%
if 3.1e-171 < a < 1.34999999999999998e-126Initial program 78.3%
associate-+l-78.3%
*-commutative78.3%
associate-*r*78.1%
*-commutative78.1%
associate-+l-78.1%
*-commutative78.1%
associate-*r*78.3%
*-commutative78.3%
associate-*l*78.4%
associate-*l*76.1%
Simplified76.1%
Taylor expanded in x around inf 55.9%
if 1.34999999999999998e-126 < a < 1.6999999999999999e-17Initial program 91.1%
associate-+l-91.1%
*-commutative91.1%
associate-*r*91.2%
*-commutative91.2%
associate-+l-91.2%
*-commutative91.2%
associate-*r*91.1%
*-commutative91.1%
associate-*l*91.1%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 38.3%
*-commutative38.3%
Simplified38.3%
if 1.6999999999999999e-17 < a < 3.40000000000000019e113Initial program 67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*67.5%
*-commutative67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*67.5%
*-commutative67.5%
associate-*l*67.5%
associate-*l*67.4%
Simplified67.4%
Applied egg-rr71.7%
Taylor expanded in x around inf 28.0%
*-commutative28.0%
*-commutative28.0%
associate-/l*28.3%
*-commutative28.3%
associate-/l*28.6%
Simplified28.6%
Final simplification50.3%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= a -2.3e-35)
t_1
(if (<= a 3.8e-178)
(/ (/ b c_m) z)
(if (<= a 1.75e-127)
(* (/ x c_m) (/ (* 9.0 y) z))
(if (<= a 4e-17)
(/ b (* c_m z))
(if (<= a 3.5e+113) (* 9.0 (/ y (/ c_m (/ x 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 = -4.0 * (t * (a / c_m));
double tmp;
if (a <= -2.3e-35) {
tmp = t_1;
} else if (a <= 3.8e-178) {
tmp = (b / c_m) / z;
} else if (a <= 1.75e-127) {
tmp = (x / c_m) * ((9.0 * y) / z);
} else if (a <= 4e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.5e+113) {
tmp = 9.0 * (y / (c_m / (x / 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 = (-4.0d0) * (t * (a / c_m))
if (a <= (-2.3d-35)) then
tmp = t_1
else if (a <= 3.8d-178) then
tmp = (b / c_m) / z
else if (a <= 1.75d-127) then
tmp = (x / c_m) * ((9.0d0 * y) / z)
else if (a <= 4d-17) then
tmp = b / (c_m * z)
else if (a <= 3.5d+113) then
tmp = 9.0d0 * (y / (c_m / (x / 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 = -4.0 * (t * (a / c_m));
double tmp;
if (a <= -2.3e-35) {
tmp = t_1;
} else if (a <= 3.8e-178) {
tmp = (b / c_m) / z;
} else if (a <= 1.75e-127) {
tmp = (x / c_m) * ((9.0 * y) / z);
} else if (a <= 4e-17) {
tmp = b / (c_m * z);
} else if (a <= 3.5e+113) {
tmp = 9.0 * (y / (c_m / (x / 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 = -4.0 * (t * (a / c_m)) tmp = 0 if a <= -2.3e-35: tmp = t_1 elif a <= 3.8e-178: tmp = (b / c_m) / z elif a <= 1.75e-127: tmp = (x / c_m) * ((9.0 * y) / z) elif a <= 4e-17: tmp = b / (c_m * z) elif a <= 3.5e+113: tmp = 9.0 * (y / (c_m / (x / 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(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (a <= -2.3e-35) tmp = t_1; elseif (a <= 3.8e-178) tmp = Float64(Float64(b / c_m) / z); elseif (a <= 1.75e-127) tmp = Float64(Float64(x / c_m) * Float64(Float64(9.0 * y) / z)); elseif (a <= 4e-17) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 3.5e+113) tmp = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / 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 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (a <= -2.3e-35)
tmp = t_1;
elseif (a <= 3.8e-178)
tmp = (b / c_m) / z;
elseif (a <= 1.75e-127)
tmp = (x / c_m) * ((9.0 * y) / z);
elseif (a <= 4e-17)
tmp = b / (c_m * z);
elseif (a <= 3.5e+113)
tmp = 9.0 * (y / (c_m / (x / 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[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -2.3e-35], t$95$1, If[LessEqual[a, 3.8e-178], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.75e-127], N[(N[(x / c$95$m), $MachinePrecision] * N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+113], N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-178}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-127}:\\
\;\;\;\;\frac{x}{c_m} \cdot \frac{9 \cdot y}{z}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+113}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if a < -2.2999999999999999e-35 or 3.5000000000000001e113 < a Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*77.0%
*-commutative77.0%
associate-*l*77.0%
associate-*l*74.5%
Simplified74.5%
Taylor expanded in z around inf 46.5%
*-commutative46.5%
associate-/l*52.1%
Simplified52.1%
associate-/r/54.0%
Applied egg-rr54.0%
if -2.2999999999999999e-35 < a < 3.80000000000000015e-178Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*90.2%
*-commutative90.2%
associate-+l-90.2%
*-commutative90.2%
associate-*r*81.8%
*-commutative81.8%
associate-*l*81.8%
associate-*l*90.1%
Simplified90.1%
Applied egg-rr81.9%
associate-*l/81.9%
*-un-lft-identity81.9%
associate-*r*86.7%
Applied egg-rr86.7%
Taylor expanded in b around inf 54.8%
if 3.80000000000000015e-178 < a < 1.74999999999999995e-127Initial program 74.9%
associate-+l-74.9%
*-commutative74.9%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*74.9%
*-commutative74.9%
associate-*l*75.0%
associate-*l*73.0%
Simplified73.0%
Taylor expanded in x around inf 48.9%
associate-*r/49.0%
*-commutative49.0%
associate-*r*49.1%
*-commutative49.1%
times-frac67.5%
Simplified67.5%
if 1.74999999999999995e-127 < a < 4.00000000000000029e-17Initial program 91.1%
associate-+l-91.1%
*-commutative91.1%
associate-*r*91.2%
*-commutative91.2%
associate-+l-91.2%
*-commutative91.2%
associate-*r*91.1%
*-commutative91.1%
associate-*l*91.1%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in b around inf 38.3%
*-commutative38.3%
Simplified38.3%
if 4.00000000000000029e-17 < a < 3.5000000000000001e113Initial program 67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*67.5%
*-commutative67.5%
associate-+l-67.5%
*-commutative67.5%
associate-*r*67.5%
*-commutative67.5%
associate-*l*67.5%
associate-*l*67.4%
Simplified67.4%
Applied egg-rr71.7%
Taylor expanded in x around inf 28.0%
*-commutative28.0%
*-commutative28.0%
associate-/l*28.3%
*-commutative28.3%
associate-/l*28.6%
Simplified28.6%
Final simplification51.0%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 6.5e-65)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
(-
(+ (/ b (* c_m z)) (* 9.0 (/ (* x y) (* c_m z))))
(* 4.0 (/ (* t a) c_m))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= 6.5e-65) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
} else {
tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (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 (c_m <= 6.5d-65) then
tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (t * a)))) / (c_m * z)
else
tmp = ((b / (c_m * z)) + (9.0d0 * ((x * y) / (c_m * z)))) - (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 (c_m <= 6.5e-65) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
} else {
tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (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 c_m <= 6.5e-65: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z) else: tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (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 (c_m <= 6.5e-65) 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(Float64(b / Float64(c_m * z)) + Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z)))) - Float64(4.0 * Float64(Float64(t * a) / c_m))); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 6.5e-65)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
else
tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (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[c$95$m, 6.5e-65], 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[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;c_m \leq 6.5 \cdot 10^{-65}:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(\frac{b}{c_m \cdot z} + 9 \cdot \frac{x \cdot y}{c_m \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c_m}\\
\end{array}
\end{array}
if c < 6.5e-65Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*80.6%
*-commutative80.6%
associate-+l-80.6%
*-commutative80.6%
associate-*r*81.3%
*-commutative81.3%
associate-*l*81.3%
associate-*l*83.5%
Simplified83.5%
if 6.5e-65 < c Initial program 73.8%
associate-+l-73.8%
*-commutative73.8%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*73.8%
*-commutative73.8%
associate-*l*73.8%
associate-*l*73.8%
Simplified73.8%
Taylor expanded in x around 0 81.2%
Final simplification82.7%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* a (/ t c_m)))))
(*
c_s
(if (<= a -2.9e-39)
t_1
(if (<= a 4.4e-20)
(/ b (* c_m z))
(if (or (<= a 5e+82) (not (<= a 1.6e+114))) t_1 (/ (/ 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 t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -2.9e-39) {
tmp = t_1;
} else if (a <= 4.4e-20) {
tmp = b / (c_m * z);
} else if ((a <= 5e+82) || !(a <= 1.6e+114)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * (t / c_m))
if (a <= (-2.9d-39)) then
tmp = t_1
else if (a <= 4.4d-20) then
tmp = b / (c_m * z)
else if ((a <= 5d+82) .or. (.not. (a <= 1.6d+114))) then
tmp = t_1
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 t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -2.9e-39) {
tmp = t_1;
} else if (a <= 4.4e-20) {
tmp = b / (c_m * z);
} else if ((a <= 5e+82) || !(a <= 1.6e+114)) {
tmp = t_1;
} 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): t_1 = -4.0 * (a * (t / c_m)) tmp = 0 if a <= -2.9e-39: tmp = t_1 elif a <= 4.4e-20: tmp = b / (c_m * z) elif (a <= 5e+82) or not (a <= 1.6e+114): tmp = t_1 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) t_1 = Float64(-4.0 * Float64(a * Float64(t / c_m))) tmp = 0.0 if (a <= -2.9e-39) tmp = t_1; elseif (a <= 4.4e-20) tmp = Float64(b / Float64(c_m * z)); elseif ((a <= 5e+82) || !(a <= 1.6e+114)) tmp = t_1; 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)
t_1 = -4.0 * (a * (t / c_m));
tmp = 0.0;
if (a <= -2.9e-39)
tmp = t_1;
elseif (a <= 4.4e-20)
tmp = b / (c_m * z);
elseif ((a <= 5e+82) || ~((a <= 1.6e+114)))
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -2.9e-39], t$95$1, If[LessEqual[a, 4.4e-20], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5e+82], N[Not[LessEqual[a, 1.6e+114]], $MachinePrecision]], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+82} \lor \neg \left(a \leq 1.6 \cdot 10^{+114}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\
\end{array}
\end{array}
\end{array}
if a < -2.89999999999999988e-39 or 4.39999999999999982e-20 < a < 5.00000000000000015e82 or 1.6e114 < a Initial program 75.0%
associate-+l-75.0%
*-commutative75.0%
associate-*r*69.8%
*-commutative69.8%
associate-+l-69.8%
*-commutative69.8%
associate-*r*75.0%
*-commutative75.0%
associate-*l*75.0%
associate-*l*72.9%
Simplified72.9%
Taylor expanded in z around inf 46.1%
expm1-log1p-u27.3%
expm1-udef17.9%
associate-/l*19.8%
Applied egg-rr19.8%
expm1-def27.0%
expm1-log1p52.2%
associate-/l*46.1%
associate-*r/52.5%
Simplified52.5%
if -2.89999999999999988e-39 < a < 4.39999999999999982e-20Initial program 82.4%
associate-+l-82.4%
*-commutative82.4%
associate-*r*88.2%
*-commutative88.2%
associate-+l-88.2%
*-commutative88.2%
associate-*r*82.4%
*-commutative82.4%
associate-*l*82.4%
associate-*l*87.9%
Simplified87.9%
Taylor expanded in b around inf 49.3%
*-commutative49.3%
Simplified49.3%
if 5.00000000000000015e82 < a < 1.6e114Initial program 86.3%
associate-+l-86.3%
*-commutative86.3%
associate-*r*86.3%
*-commutative86.3%
associate-+l-86.3%
*-commutative86.3%
associate-*r*86.3%
*-commutative86.3%
associate-*l*86.3%
associate-*l*86.3%
Simplified86.3%
Applied egg-rr86.3%
associate-*l/86.3%
*-un-lft-identity86.3%
associate-*r*86.3%
Applied egg-rr86.3%
Taylor expanded in b around inf 57.2%
Final simplification51.2%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* a (/ t c_m)))))
(*
c_s
(if (<= a -1.35e-38)
t_1
(if (<= a 1550000.0)
(* b (/ 1.0 (* c_m z)))
(if (or (<= a 6.6e+81) (not (<= a 9.5e+113))) t_1 (/ (/ 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 t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -1.35e-38) {
tmp = t_1;
} else if (a <= 1550000.0) {
tmp = b * (1.0 / (c_m * z));
} else if ((a <= 6.6e+81) || !(a <= 9.5e+113)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * (t / c_m))
if (a <= (-1.35d-38)) then
tmp = t_1
else if (a <= 1550000.0d0) then
tmp = b * (1.0d0 / (c_m * z))
else if ((a <= 6.6d+81) .or. (.not. (a <= 9.5d+113))) then
tmp = t_1
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 t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -1.35e-38) {
tmp = t_1;
} else if (a <= 1550000.0) {
tmp = b * (1.0 / (c_m * z));
} else if ((a <= 6.6e+81) || !(a <= 9.5e+113)) {
tmp = t_1;
} 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): t_1 = -4.0 * (a * (t / c_m)) tmp = 0 if a <= -1.35e-38: tmp = t_1 elif a <= 1550000.0: tmp = b * (1.0 / (c_m * z)) elif (a <= 6.6e+81) or not (a <= 9.5e+113): tmp = t_1 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) t_1 = Float64(-4.0 * Float64(a * Float64(t / c_m))) tmp = 0.0 if (a <= -1.35e-38) tmp = t_1; elseif (a <= 1550000.0) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif ((a <= 6.6e+81) || !(a <= 9.5e+113)) tmp = t_1; 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)
t_1 = -4.0 * (a * (t / c_m));
tmp = 0.0;
if (a <= -1.35e-38)
tmp = t_1;
elseif (a <= 1550000.0)
tmp = b * (1.0 / (c_m * z));
elseif ((a <= 6.6e+81) || ~((a <= 9.5e+113)))
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -1.35e-38], t$95$1, If[LessEqual[a, 1550000.0], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 6.6e+81], N[Not[LessEqual[a, 9.5e+113]], $MachinePrecision]], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1550000:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{+81} \lor \neg \left(a \leq 9.5 \cdot 10^{+113}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\
\end{array}
\end{array}
\end{array}
if a < -1.35000000000000003e-38 or 1.55e6 < a < 6.6e81 or 9.5000000000000001e113 < a Initial program 75.3%
associate-+l-75.3%
*-commutative75.3%
associate-*r*69.8%
*-commutative69.8%
associate-+l-69.8%
*-commutative69.8%
associate-*r*75.3%
*-commutative75.3%
associate-*l*75.3%
associate-*l*73.1%
Simplified73.1%
Taylor expanded in z around inf 47.0%
expm1-log1p-u29.4%
expm1-udef19.3%
associate-/l*21.4%
Applied egg-rr21.4%
expm1-def29.1%
expm1-log1p53.5%
associate-/l*47.0%
associate-*r/53.9%
Simplified53.9%
if -1.35000000000000003e-38 < a < 1.55e6Initial program 81.4%
associate-+l-81.4%
*-commutative81.4%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*81.4%
*-commutative81.4%
associate-*l*81.4%
associate-*l*86.5%
Simplified86.5%
Taylor expanded in b around inf 46.4%
*-commutative46.4%
Simplified46.4%
div-inv46.4%
Applied egg-rr46.4%
if 6.6e81 < a < 9.5000000000000001e113Initial program 86.3%
associate-+l-86.3%
*-commutative86.3%
associate-*r*86.3%
*-commutative86.3%
associate-+l-86.3%
*-commutative86.3%
associate-*r*86.3%
*-commutative86.3%
associate-*l*86.3%
associate-*l*86.3%
Simplified86.3%
Applied egg-rr86.3%
associate-*l/86.3%
*-un-lft-identity86.3%
associate-*r*86.3%
Applied egg-rr86.3%
Taylor expanded in b around inf 57.2%
Final simplification50.3%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 9.0) -2e+147)
(* (/ x c_m) (/ (* 9.0 y) z))
(if (<= (* x 9.0) 5e-51)
(/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
(* 9.0 (/ y (/ c_m (/ x 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 ((x * 9.0) <= -2e+147) {
tmp = (x / c_m) * ((9.0 * y) / z);
} else if ((x * 9.0) <= 5e-51) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = 9.0 * (y / (c_m / (x / 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 ((x * 9.0d0) <= (-2d+147)) then
tmp = (x / c_m) * ((9.0d0 * y) / z)
else if ((x * 9.0d0) <= 5d-51) then
tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
else
tmp = 9.0d0 * (y / (c_m / (x / 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 ((x * 9.0) <= -2e+147) {
tmp = (x / c_m) * ((9.0 * y) / z);
} else if ((x * 9.0) <= 5e-51) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = 9.0 * (y / (c_m / (x / 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 (x * 9.0) <= -2e+147: tmp = (x / c_m) * ((9.0 * y) / z) elif (x * 9.0) <= 5e-51: tmp = ((-4.0 * (t * a)) + (b / z)) / c_m else: tmp = 9.0 * (y / (c_m / (x / 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 (Float64(x * 9.0) <= -2e+147) tmp = Float64(Float64(x / c_m) * Float64(Float64(9.0 * y) / z)); elseif (Float64(x * 9.0) <= 5e-51) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m); else tmp = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / 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 ((x * 9.0) <= -2e+147)
tmp = (x / c_m) * ((9.0 * y) / z);
elseif ((x * 9.0) <= 5e-51)
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
else
tmp = 9.0 * (y / (c_m / (x / 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[N[(x * 9.0), $MachinePrecision], -2e+147], N[(N[(x / c$95$m), $MachinePrecision] * N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * 9.0), $MachinePrecision], 5e-51], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot 9 \leq -2 \cdot 10^{+147}:\\
\;\;\;\;\frac{x}{c_m} \cdot \frac{9 \cdot y}{z}\\
\mathbf{elif}\;x \cdot 9 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\
\end{array}
\end{array}
if (*.f64 x 9) < -2e147Initial program 72.0%
associate-+l-72.0%
*-commutative72.0%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*72.0%
*-commutative72.0%
associate-*l*72.1%
associate-*l*75.2%
Simplified75.2%
Taylor expanded in x around inf 56.1%
associate-*r/56.1%
*-commutative56.1%
associate-*r*56.1%
*-commutative56.1%
times-frac71.3%
Simplified71.3%
if -2e147 < (*.f64 x 9) < 5.00000000000000004e-51Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*84.4%
*-commutative84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*84.4%
*-commutative84.4%
associate-*l*84.4%
associate-*l*86.1%
Simplified86.1%
Taylor expanded in x around 0 70.3%
Taylor expanded in b around 0 73.6%
Taylor expanded in c around 0 74.6%
if 5.00000000000000004e-51 < (*.f64 x 9) Initial program 68.8%
associate-+l-68.8%
*-commutative68.8%
associate-*r*67.3%
*-commutative67.3%
associate-+l-67.3%
*-commutative67.3%
associate-*r*68.8%
*-commutative68.8%
associate-*l*68.8%
associate-*l*68.9%
Simplified68.9%
Applied egg-rr77.3%
Taylor expanded in x around inf 41.7%
*-commutative41.7%
*-commutative41.7%
associate-/l*44.3%
*-commutative44.3%
associate-/l*44.4%
Simplified44.4%
Final simplification65.9%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -2e-100) (not (<= z 8.8e+18)))
(/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
(/ (+ b (* y (* x 9.0))) (* c_m z)))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2e-100) || !(z <= 8.8e+18)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-2d-100)) .or. (.not. (z <= 8.8d+18))) then
tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
else
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2e-100) || !(z <= 8.8e+18)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -2e-100) or not (z <= 8.8e+18): tmp = ((-4.0 * (t * a)) + (b / z)) / c_m else: tmp = (b + (y * (x * 9.0))) / (c_m * z) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -2e-100) || !(z <= 8.8e+18)) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m); else tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -2e-100) || ~((z <= 8.8e+18)))
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
else
tmp = (b + (y * (x * 9.0))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -2e-100], N[Not[LessEqual[z, 8.8e+18]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-100} \lor \neg \left(z \leq 8.8 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\
\end{array}
\end{array}
if z < -2e-100 or 8.8e18 < z Initial program 64.2%
associate-+l-64.2%
*-commutative64.2%
associate-*r*64.0%
*-commutative64.0%
associate-+l-64.0%
*-commutative64.0%
associate-*r*64.2%
*-commutative64.2%
associate-*l*64.2%
associate-*l*68.7%
Simplified68.7%
Taylor expanded in x around 0 53.3%
Taylor expanded in b around 0 68.1%
Taylor expanded in c around 0 71.7%
if -2e-100 < z < 8.8e18Initial program 95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.5%
*-commutative95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.5%
*-commutative95.5%
associate-*l*95.5%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in x around inf 84.4%
associate-*r*84.4%
Simplified84.4%
Final simplification77.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.75e-100)
(+ (/ b (* c_m z)) (* -4.0 (/ a (/ c_m t))))
(if (<= z 1.3e+18)
(/ (+ b (* y (* x 9.0))) (* c_m z))
(/ (+ (* -4.0 (* t a)) (/ b 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 (z <= -1.75e-100) {
tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t)));
} else if (z <= 1.3e+18) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = ((-4.0 * (t * a)) + (b / 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 (z <= (-1.75d-100)) then
tmp = (b / (c_m * z)) + ((-4.0d0) * (a / (c_m / t)))
else if (z <= 1.3d+18) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else
tmp = (((-4.0d0) * (t * a)) + (b / 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 (z <= -1.75e-100) {
tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t)));
} else if (z <= 1.3e+18) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = ((-4.0 * (t * a)) + (b / 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 z <= -1.75e-100: tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t))) elif z <= 1.3e+18: tmp = (b + (y * (x * 9.0))) / (c_m * z) else: tmp = ((-4.0 * (t * a)) + (b / 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 (z <= -1.75e-100) tmp = Float64(Float64(b / Float64(c_m * z)) + Float64(-4.0 * Float64(a / Float64(c_m / t)))); elseif (z <= 1.3e+18) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / 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 (z <= -1.75e-100)
tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t)));
elseif (z <= 1.3e+18)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
else
tmp = ((-4.0 * (t * a)) + (b / 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[z, -1.75e-100], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+18], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $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 -1.75 \cdot 10^{-100}:\\
\;\;\;\;\frac{b}{c_m \cdot z} + -4 \cdot \frac{a}{\frac{c_m}{t}}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+18}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\
\end{array}
\end{array}
if z < -1.75e-100Initial program 73.5%
associate-+l-73.5%
*-commutative73.5%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*73.5%
*-commutative73.5%
associate-*l*73.4%
associate-*l*76.0%
Simplified76.0%
Taylor expanded in x around 0 56.6%
Taylor expanded in b around 0 64.8%
*-un-lft-identity64.8%
associate-/l*69.6%
Applied egg-rr69.6%
if -1.75e-100 < z < 1.3e18Initial program 95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.5%
*-commutative95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.5%
*-commutative95.5%
associate-*l*95.5%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in x around inf 84.4%
associate-*r*84.4%
Simplified84.4%
if 1.3e18 < z Initial program 52.4%
associate-+l-52.4%
*-commutative52.4%
associate-*r*55.2%
*-commutative55.2%
associate-+l-55.2%
*-commutative55.2%
associate-*r*52.4%
*-commutative52.4%
associate-*l*52.4%
associate-*l*59.6%
Simplified59.6%
Taylor expanded in x around 0 49.2%
Taylor expanded in b around 0 72.3%
Taylor expanded in c around 0 77.2%
Final simplification78.2%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.35e-67)
(* -4.0 (* a (/ t c_m)))
(if (<= z 3.6e+46) (* b (/ 1.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 (z <= -1.35e-67) {
tmp = -4.0 * (a * (t / c_m));
} else if (z <= 3.6e+46) {
tmp = b * (1.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 (z <= (-1.35d-67)) then
tmp = (-4.0d0) * (a * (t / c_m))
else if (z <= 3.6d+46) then
tmp = b * (1.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 (z <= -1.35e-67) {
tmp = -4.0 * (a * (t / c_m));
} else if (z <= 3.6e+46) {
tmp = b * (1.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 z <= -1.35e-67: tmp = -4.0 * (a * (t / c_m)) elif z <= 3.6e+46: tmp = b * (1.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 (z <= -1.35e-67) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); elseif (z <= 3.6e+46) tmp = Float64(b * Float64(1.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 (z <= -1.35e-67)
tmp = -4.0 * (a * (t / c_m));
elseif (z <= 3.6e+46)
tmp = b * (1.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[z, -1.35e-67], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+46], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $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}\;z \leq -1.35 \cdot 10^{-67}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+46}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
if z < -1.35000000000000008e-67Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*68.5%
*-commutative68.5%
associate-+l-68.5%
*-commutative68.5%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
associate-*l*74.2%
Simplified74.2%
Taylor expanded in z around inf 42.6%
expm1-log1p-u29.1%
expm1-udef25.4%
associate-/l*27.9%
Applied egg-rr27.9%
expm1-def31.6%
expm1-log1p49.4%
associate-/l*42.6%
associate-*r/49.4%
Simplified49.4%
if -1.35000000000000008e-67 < z < 3.5999999999999999e46Initial program 94.4%
associate-+l-94.4%
*-commutative94.4%
associate-*r*94.4%
*-commutative94.4%
associate-+l-94.4%
*-commutative94.4%
associate-*r*94.4%
*-commutative94.4%
associate-*l*94.4%
associate-*l*92.2%
Simplified92.2%
Taylor expanded in b around inf 51.4%
*-commutative51.4%
Simplified51.4%
div-inv51.6%
Applied egg-rr51.6%
if 3.5999999999999999e46 < z Initial program 52.5%
associate-+l-52.5%
*-commutative52.5%
associate-*r*55.4%
*-commutative55.4%
associate-+l-55.4%
*-commutative55.4%
associate-*r*52.5%
*-commutative52.5%
associate-*l*52.5%
associate-*l*59.9%
Simplified59.9%
Taylor expanded in z around inf 56.9%
*-commutative56.9%
associate-/l*60.5%
Simplified60.5%
associate-/r/62.1%
Applied egg-rr62.1%
Final simplification53.4%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.15e-67)
(* -4.0 (/ a (/ c_m t)))
(if (<= z 4.3e+46) (* b (/ 1.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 (z <= -1.15e-67) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 4.3e+46) {
tmp = b * (1.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 (z <= (-1.15d-67)) then
tmp = (-4.0d0) * (a / (c_m / t))
else if (z <= 4.3d+46) then
tmp = b * (1.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 (z <= -1.15e-67) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 4.3e+46) {
tmp = b * (1.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 z <= -1.15e-67: tmp = -4.0 * (a / (c_m / t)) elif z <= 4.3e+46: tmp = b * (1.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 (z <= -1.15e-67) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); elseif (z <= 4.3e+46) tmp = Float64(b * Float64(1.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 (z <= -1.15e-67)
tmp = -4.0 * (a / (c_m / t));
elseif (z <= 4.3e+46)
tmp = b * (1.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[z, -1.15e-67], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+46], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $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}\;z \leq -1.15 \cdot 10^{-67}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+46}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
if z < -1.15e-67Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*68.5%
*-commutative68.5%
associate-+l-68.5%
*-commutative68.5%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
associate-*l*74.2%
Simplified74.2%
Taylor expanded in z around inf 42.6%
*-commutative42.6%
associate-/l*49.4%
Simplified49.4%
if -1.15e-67 < z < 4.30000000000000005e46Initial program 94.4%
associate-+l-94.4%
*-commutative94.4%
associate-*r*94.4%
*-commutative94.4%
associate-+l-94.4%
*-commutative94.4%
associate-*r*94.4%
*-commutative94.4%
associate-*l*94.4%
associate-*l*92.2%
Simplified92.2%
Taylor expanded in b around inf 51.4%
*-commutative51.4%
Simplified51.4%
div-inv51.6%
Applied egg-rr51.6%
if 4.30000000000000005e46 < z Initial program 52.5%
associate-+l-52.5%
*-commutative52.5%
associate-*r*55.4%
*-commutative55.4%
associate-+l-55.4%
*-commutative55.4%
associate-*r*52.5%
*-commutative52.5%
associate-*l*52.5%
associate-*l*59.9%
Simplified59.9%
Taylor expanded in z around inf 56.9%
*-commutative56.9%
associate-/l*60.5%
Simplified60.5%
associate-/r/62.1%
Applied egg-rr62.1%
Final simplification53.4%
c_m = (fabs.f64 c) c_s = (copysign.f64 1 c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ 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.6%
associate-+l-78.6%
*-commutative78.6%
associate-*r*78.5%
*-commutative78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*78.6%
*-commutative78.6%
associate-*l*78.6%
associate-*l*80.0%
Simplified80.0%
Taylor expanded in b around inf 39.0%
*-commutative39.0%
Simplified39.0%
Final simplification39.0%
c_m = (fabs.f64 c) c_s = (copysign.f64 1 c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ (/ 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(Float64(b / 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[(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 \frac{\frac{b}{c_m}}{z}
\end{array}
Initial program 78.6%
associate-+l-78.6%
*-commutative78.6%
associate-*r*78.5%
*-commutative78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*78.6%
*-commutative78.6%
associate-*l*78.6%
associate-*l*80.0%
Simplified80.0%
Applied egg-rr81.1%
associate-*l/81.1%
*-un-lft-identity81.1%
associate-*r*79.5%
Applied egg-rr79.5%
Taylor expanded in b around inf 39.1%
Final simplification39.1%
(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 2024020
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))