
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (- (/ b y) (* x -9.0)))
(t_2 (/ (+ (* -4.0 (* t a)) (/ (* y t_1) z)) c_m))
(t_3 (/ (+ b (- (* y (* x 9.0)) (* a (* (* z 4.0) t)))) (* c_m z))))
(*
c_s
(if (<= t_3 (- INFINITY))
t_2
(if (<= t_3 -4e-61)
t_3
(if (<= t_3 0.0)
t_2
(if (<= t_3 5e+211)
t_3
(if (<= t_3 INFINITY)
(/ (+ (* a (* t -4.0)) (* (/ y z) t_1)) c_m)
(* a (/ (* t -4.0) c_m))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b / y) - (x * -9.0);
double t_2 = ((-4.0 * (t * a)) + ((y * t_1) / z)) / c_m;
double t_3 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_3 <= -4e-61) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 5e+211) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = ((a * (t * -4.0)) + ((y / z) * t_1)) / c_m;
} else {
tmp = a * ((t * -4.0) / 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;
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);
double t_2 = ((-4.0 * (t * a)) + ((y * t_1) / z)) / c_m;
double t_3 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_3 <= -4e-61) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 5e+211) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = ((a * (t * -4.0)) + ((y / z) * t_1)) / c_m;
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (b / y) - (x * -9.0) t_2 = ((-4.0 * (t * a)) + ((y * t_1) / z)) / c_m t_3 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z) tmp = 0 if t_3 <= -math.inf: tmp = t_2 elif t_3 <= -4e-61: tmp = t_3 elif t_3 <= 0.0: tmp = t_2 elif t_3 <= 5e+211: tmp = t_3 elif t_3 <= math.inf: tmp = ((a * (t * -4.0)) + ((y / z) * t_1)) / c_m else: tmp = a * ((t * -4.0) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(b / y) - Float64(x * -9.0)) t_2 = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(y * t_1) / z)) / c_m) t_3 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(Float64(z * 4.0) * t)))) / Float64(c_m * z)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_2; elseif (t_3 <= -4e-61) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 5e+211) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(Float64(Float64(a * Float64(t * -4.0)) + Float64(Float64(y / z) * t_1)) / c_m); else tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (b / y) - (x * -9.0);
t_2 = ((-4.0 * (t * a)) + ((y * t_1) / z)) / c_m;
t_3 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
tmp = 0.0;
if (t_3 <= -Inf)
tmp = t_2;
elseif (t_3 <= -4e-61)
tmp = t_3;
elseif (t_3 <= 0.0)
tmp = t_2;
elseif (t_3 <= 5e+211)
tmp = t_3;
elseif (t_3 <= Inf)
tmp = ((a * (t * -4.0)) + ((y / z) * t_1)) / c_m;
else
tmp = a * ((t * -4.0) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$3, (-Infinity)], t$95$2, If[LessEqual[t$95$3, -4e-61], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 5e+211], t$95$3, If[LessEqual[t$95$3, Infinity], N[(N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{b}{y} - x \cdot -9\\
t_2 := \frac{-4 \cdot \left(t \cdot a\right) + \frac{y \cdot t\_1}{z}}{c\_m}\\
t_3 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(\left(z \cdot 4\right) \cdot t\right)\right)}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-61}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+211}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{y}{z} \cdot t\_1}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -inf.0 or -4.0000000000000002e-61 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 70.5%
associate-+l-70.5%
*-commutative70.5%
associate-*r*71.6%
*-commutative71.6%
associate-+l-71.6%
associate-*l*71.6%
associate-*l*72.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in y around inf 57.2%
Taylor expanded in z around -inf 75.2%
mul-1-neg75.2%
unsub-neg75.2%
*-commutative75.2%
associate-/l*76.3%
*-commutative76.3%
associate-/l*73.2%
mul-1-neg73.2%
unsub-neg73.2%
associate-*r/73.2%
*-commutative73.2%
associate-/l*73.2%
associate-/r*77.2%
Simplified77.2%
Taylor expanded in c around 0 91.6%
if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -4.0000000000000002e-61 or 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 4.9999999999999995e211Initial program 99.3%
if 4.9999999999999995e211 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 87.9%
associate-+l-87.9%
*-commutative87.9%
associate-*r*90.4%
*-commutative90.4%
associate-+l-90.4%
associate-*l*90.4%
associate-*l*88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y around inf 77.4%
Taylor expanded in z around -inf 74.0%
mul-1-neg74.0%
unsub-neg74.0%
*-commutative74.0%
associate-/l*72.6%
*-commutative72.6%
associate-/l*71.4%
mul-1-neg71.4%
unsub-neg71.4%
associate-*r/71.4%
*-commutative71.4%
associate-/l*71.4%
associate-/r*67.7%
Simplified67.7%
Taylor expanded in c around 0 89.1%
*-commutative89.1%
associate-*l*89.1%
*-commutative89.1%
associate-/l*87.8%
Simplified87.8%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*5.9%
*-commutative5.9%
associate-+l-5.9%
associate-*l*5.9%
associate-*l*5.9%
*-commutative5.9%
Simplified5.9%
Taylor expanded in z around inf 55.6%
*-commutative55.6%
associate-/l*89.8%
associate-*r*89.8%
associate-*l/89.8%
Simplified89.8%
Final simplification92.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (* -4.0 (* t a)) (/ (* y (- (/ b y) (* x -9.0))) z)) c_m)))
(*
c_s
(if (<= z -1.36e+14)
t_1
(if (<= z 4.6e-169)
(/ (+ b (- (* y (* x 9.0)) (* a (* (* z 4.0) t)))) (* c_m z))
(if (<= z 2.45e+204) t_1 (* a (/ (* t -4.0) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m;
double tmp;
if (z <= -1.36e+14) {
tmp = t_1;
} else if (z <= 4.6e-169) {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
} else if (z <= 2.45e+204) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = (((-4.0d0) * (t * a)) + ((y * ((b / y) - (x * (-9.0d0)))) / z)) / c_m
if (z <= (-1.36d+14)) then
tmp = t_1
else if (z <= 4.6d-169) then
tmp = (b + ((y * (x * 9.0d0)) - (a * ((z * 4.0d0) * t)))) / (c_m * z)
else if (z <= 2.45d+204) then
tmp = t_1
else
tmp = a * ((t * (-4.0d0)) / c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m;
double tmp;
if (z <= -1.36e+14) {
tmp = t_1;
} else if (z <= 4.6e-169) {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
} else if (z <= 2.45e+204) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m tmp = 0 if z <= -1.36e+14: tmp = t_1 elif z <= 4.6e-169: tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z) elif z <= 2.45e+204: tmp = t_1 else: tmp = a * ((t * -4.0) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(y * Float64(Float64(b / y) - Float64(x * -9.0))) / z)) / c_m) tmp = 0.0 if (z <= -1.36e+14) tmp = t_1; elseif (z <= 4.6e-169) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(Float64(z * 4.0) * t)))) / Float64(c_m * z)); elseif (z <= 2.45e+204) tmp = t_1; else tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m;
tmp = 0.0;
if (z <= -1.36e+14)
tmp = t_1;
elseif (z <= 4.6e-169)
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
elseif (z <= 2.45e+204)
tmp = t_1;
else
tmp = a * ((t * -4.0) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -1.36e+14], t$95$1, If[LessEqual[z, 4.6e-169], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+204], t$95$1, N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{-4 \cdot \left(t \cdot a\right) + \frac{y \cdot \left(\frac{b}{y} - x \cdot -9\right)}{z}}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.36 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-169}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(\left(z \cdot 4\right) \cdot t\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\end{array}
\end{array}
\end{array}
if z < -1.36e14 or 4.6000000000000002e-169 < z < 2.4499999999999999e204Initial program 70.1%
associate-+l-70.1%
*-commutative70.1%
associate-*r*70.2%
*-commutative70.2%
associate-+l-70.2%
associate-*l*70.2%
associate-*l*74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in y around inf 67.8%
Taylor expanded in z around -inf 72.2%
mul-1-neg72.2%
unsub-neg72.2%
*-commutative72.2%
associate-/l*73.5%
*-commutative73.5%
associate-/l*74.8%
mul-1-neg74.8%
unsub-neg74.8%
associate-*r/74.9%
*-commutative74.9%
associate-/l*74.9%
associate-/r*79.0%
Simplified79.0%
Taylor expanded in c around 0 85.5%
if -1.36e14 < z < 4.6000000000000002e-169Initial program 96.0%
if 2.4499999999999999e204 < z Initial program 42.2%
associate-+l-42.2%
*-commutative42.2%
associate-*r*34.2%
*-commutative34.2%
associate-+l-34.2%
associate-*l*34.2%
associate-*l*42.5%
*-commutative42.5%
Simplified42.5%
Taylor expanded in z around inf 76.6%
*-commutative76.6%
associate-/l*92.2%
associate-*r*92.2%
associate-*l/92.2%
Simplified92.2%
Final simplification90.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (* -4.0 (* t a)) (/ b z)) c_m)))
(*
c_s
(if (<= z -6.2e+88)
t_1
(if (<= z -2.8e-45)
(* y (/ (- (/ b y) (* x -9.0)) (* c_m z)))
(if (<= z -6.5e-92)
(/ (- b (* 4.0 (* a (* z t)))) (* c_m z))
(if (<= z 2.7e+39) (/ (+ b (* y (* x 9.0))) (* c_m z)) t_1)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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)) + (b / z)) / c_m;
double tmp;
if (z <= -6.2e+88) {
tmp = t_1;
} else if (z <= -2.8e-45) {
tmp = y * (((b / y) - (x * -9.0)) / (c_m * z));
} else if (z <= -6.5e-92) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= 2.7e+39) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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)) + (b / z)) / c_m
if (z <= (-6.2d+88)) then
tmp = t_1
else if (z <= (-2.8d-45)) then
tmp = y * (((b / y) - (x * (-9.0d0))) / (c_m * z))
else if (z <= (-6.5d-92)) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c_m * z)
else if (z <= 2.7d+39) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else
tmp = t_1
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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)) + (b / z)) / c_m;
double tmp;
if (z <= -6.2e+88) {
tmp = t_1;
} else if (z <= -2.8e-45) {
tmp = y * (((b / y) - (x * -9.0)) / (c_m * z));
} else if (z <= -6.5e-92) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= 2.7e+39) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((-4.0 * (t * a)) + (b / z)) / c_m tmp = 0 if z <= -6.2e+88: tmp = t_1 elif z <= -2.8e-45: tmp = y * (((b / y) - (x * -9.0)) / (c_m * z)) elif z <= -6.5e-92: tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z) elif z <= 2.7e+39: tmp = (b + (y * (x * 9.0))) / (c_m * z) else: tmp = t_1 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m) tmp = 0.0 if (z <= -6.2e+88) tmp = t_1; elseif (z <= -2.8e-45) tmp = Float64(y * Float64(Float64(Float64(b / y) - Float64(x * -9.0)) / Float64(c_m * z))); elseif (z <= -6.5e-92) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c_m * z)); elseif (z <= 2.7e+39) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); else tmp = t_1; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((-4.0 * (t * a)) + (b / z)) / c_m;
tmp = 0.0;
if (z <= -6.2e+88)
tmp = t_1;
elseif (z <= -2.8e-45)
tmp = y * (((b / y) - (x * -9.0)) / (c_m * z));
elseif (z <= -6.5e-92)
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
elseif (z <= 2.7e+39)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -6.2e+88], t$95$1, If[LessEqual[z, -2.8e-45], N[(y * N[(N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-92], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+39], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $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])\\
\\
\begin{array}{l}
t_1 := \frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-45}:\\
\;\;\;\;y \cdot \frac{\frac{b}{y} - x \cdot -9}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+39}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -6.2000000000000003e88 or 2.70000000000000003e39 < z Initial program 58.6%
associate-+l-58.6%
*-commutative58.6%
associate-*r*58.8%
*-commutative58.8%
associate-+l-58.8%
associate-*l*58.8%
associate-*l*63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around -inf 70.9%
mul-1-neg70.9%
unsub-neg70.9%
*-commutative70.9%
associate-/l*72.7%
*-commutative72.7%
associate-/l*72.6%
mul-1-neg72.6%
unsub-neg72.6%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.7%
associate-/r*78.4%
Simplified78.4%
Taylor expanded in c around 0 80.4%
Taylor expanded in y around 0 80.9%
associate-*r/80.9%
mul-1-neg80.9%
Simplified80.9%
if -6.2000000000000003e88 < z < -2.8000000000000001e-45Initial program 86.4%
associate-+l-86.4%
*-commutative86.4%
associate-*r*83.6%
*-commutative83.6%
associate-+l-83.6%
associate-*l*83.6%
associate-*l*89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in y around inf 67.6%
Taylor expanded in z around -inf 66.7%
mul-1-neg66.7%
unsub-neg66.7%
*-commutative66.7%
associate-/l*71.8%
*-commutative71.8%
associate-/l*74.5%
mul-1-neg74.5%
unsub-neg74.5%
associate-*r/74.4%
*-commutative74.4%
associate-/l*74.5%
associate-/r*78.0%
Simplified78.0%
Taylor expanded in c around 0 81.4%
Taylor expanded in a around 0 67.2%
mul-1-neg67.2%
associate-/l*67.0%
distribute-lft-neg-in67.0%
Simplified67.0%
if -2.8000000000000001e-45 < z < -6.50000000000000035e-92Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
associate-*l*99.6%
associate-*l*87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in x around 0 99.6%
if -6.50000000000000035e-92 < z < 2.70000000000000003e39Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.4%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around inf 82.8%
associate-*r*82.8%
Simplified82.8%
Final simplification80.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (* -4.0 (* t a)) (/ b z)) c_m)))
(*
c_s
(if (<= z -3.85e+87)
t_1
(if (<= z -2.6e-43)
(/ (* y (+ (/ b y) (* x 9.0))) (* c_m z))
(if (<= z -4.2e-93)
(/ (- b (* 4.0 (* a (* z t)))) (* c_m z))
(if (<= z 4.5e+38) (/ (+ b (* y (* x 9.0))) (* c_m z)) t_1)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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)) + (b / z)) / c_m;
double tmp;
if (z <= -3.85e+87) {
tmp = t_1;
} else if (z <= -2.6e-43) {
tmp = (y * ((b / y) + (x * 9.0))) / (c_m * z);
} else if (z <= -4.2e-93) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= 4.5e+38) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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)) + (b / z)) / c_m
if (z <= (-3.85d+87)) then
tmp = t_1
else if (z <= (-2.6d-43)) then
tmp = (y * ((b / y) + (x * 9.0d0))) / (c_m * z)
else if (z <= (-4.2d-93)) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c_m * z)
else if (z <= 4.5d+38) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else
tmp = t_1
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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)) + (b / z)) / c_m;
double tmp;
if (z <= -3.85e+87) {
tmp = t_1;
} else if (z <= -2.6e-43) {
tmp = (y * ((b / y) + (x * 9.0))) / (c_m * z);
} else if (z <= -4.2e-93) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= 4.5e+38) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((-4.0 * (t * a)) + (b / z)) / c_m tmp = 0 if z <= -3.85e+87: tmp = t_1 elif z <= -2.6e-43: tmp = (y * ((b / y) + (x * 9.0))) / (c_m * z) elif z <= -4.2e-93: tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z) elif z <= 4.5e+38: tmp = (b + (y * (x * 9.0))) / (c_m * z) else: tmp = t_1 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m) tmp = 0.0 if (z <= -3.85e+87) tmp = t_1; elseif (z <= -2.6e-43) tmp = Float64(Float64(y * Float64(Float64(b / y) + Float64(x * 9.0))) / Float64(c_m * z)); elseif (z <= -4.2e-93) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c_m * z)); elseif (z <= 4.5e+38) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); else tmp = t_1; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((-4.0 * (t * a)) + (b / z)) / c_m;
tmp = 0.0;
if (z <= -3.85e+87)
tmp = t_1;
elseif (z <= -2.6e-43)
tmp = (y * ((b / y) + (x * 9.0))) / (c_m * z);
elseif (z <= -4.2e-93)
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
elseif (z <= 4.5e+38)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -3.85e+87], t$95$1, If[LessEqual[z, -2.6e-43], N[(N[(y * N[(N[(b / y), $MachinePrecision] + N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-93], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+38], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $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])\\
\\
\begin{array}{l}
t_1 := \frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.85 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-43}:\\
\;\;\;\;\frac{y \cdot \left(\frac{b}{y} + x \cdot 9\right)}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+38}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -3.85000000000000015e87 or 4.4999999999999998e38 < z Initial program 58.6%
associate-+l-58.6%
*-commutative58.6%
associate-*r*58.8%
*-commutative58.8%
associate-+l-58.8%
associate-*l*58.8%
associate-*l*63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around -inf 70.9%
mul-1-neg70.9%
unsub-neg70.9%
*-commutative70.9%
associate-/l*72.7%
*-commutative72.7%
associate-/l*72.6%
mul-1-neg72.6%
unsub-neg72.6%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.7%
associate-/r*78.4%
Simplified78.4%
Taylor expanded in c around 0 80.4%
Taylor expanded in y around 0 80.9%
associate-*r/80.9%
mul-1-neg80.9%
Simplified80.9%
if -3.85000000000000015e87 < z < -2.6e-43Initial program 86.4%
associate-+l-86.4%
*-commutative86.4%
associate-*r*83.6%
*-commutative83.6%
associate-+l-83.6%
associate-*l*83.6%
associate-*l*89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in x around inf 70.0%
associate-*r*70.0%
*-commutative70.0%
associate-*r*70.0%
Simplified70.0%
Taylor expanded in y around inf 67.2%
if -2.6e-43 < z < -4.2000000000000002e-93Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
associate-*l*99.6%
associate-*l*87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in x around 0 99.6%
if -4.2000000000000002e-93 < z < 4.4999999999999998e38Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.4%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around inf 82.8%
associate-*r*82.8%
Simplified82.8%
Final simplification80.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -3.9e+158) (not (<= z 7.8e+99)))
(/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
(/ (+ b (- (* y (* x 9.0)) (* a (* (* z 4.0) t)))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3.9e+158) || !(z <= 7.8e+99)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-3.9d+158)) .or. (.not. (z <= 7.8d+99))) then
tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
else
tmp = (b + ((y * (x * 9.0d0)) - (a * ((z * 4.0d0) * t)))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3.9e+158) || !(z <= 7.8e+99)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -3.9e+158) or not (z <= 7.8e+99): tmp = ((-4.0 * (t * a)) + (b / z)) / c_m else: tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -3.9e+158) || !(z <= 7.8e+99)) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(Float64(z * 4.0) * t)))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -3.9e+158) || ~((z <= 7.8e+99)))
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
else
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -3.9e+158], N[Not[LessEqual[z, 7.8e+99]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+158} \lor \neg \left(z \leq 7.8 \cdot 10^{+99}\right):\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(\left(z \cdot 4\right) \cdot t\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -3.9e158 or 7.79999999999999989e99 < z Initial program 51.1%
associate-+l-51.1%
*-commutative51.1%
associate-*r*51.4%
*-commutative51.4%
associate-+l-51.4%
associate-*l*51.4%
associate-*l*57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in y around inf 58.8%
Taylor expanded in z around -inf 72.3%
mul-1-neg72.3%
unsub-neg72.3%
*-commutative72.3%
associate-/l*74.7%
*-commutative74.7%
associate-/l*72.4%
mul-1-neg72.4%
unsub-neg72.4%
associate-*r/72.5%
*-commutative72.5%
associate-/l*72.5%
associate-/r*77.5%
Simplified77.5%
Taylor expanded in c around 0 79.0%
Taylor expanded in y around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
Simplified82.1%
if -3.9e158 < z < 7.79999999999999989e99Initial program 91.7%
Final simplification88.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -3.3e+152) (not (<= z 5.5e+84)))
(/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
(/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3.3e+152) || !(z <= 5.5e+84)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-3.3d+152)) .or. (.not. (z <= 5.5d+84))) then
tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
else
tmp = (b - (((z * 4.0d0) * (t * a)) - (x * (9.0d0 * y)))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3.3e+152) || !(z <= 5.5e+84)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -3.3e+152) or not (z <= 5.5e+84): tmp = ((-4.0 * (t * a)) + (b / z)) / c_m else: tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -3.3e+152) || !(z <= 5.5e+84)) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m); else tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -3.3e+152) || ~((z <= 5.5e+84)))
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
else
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -3.3e+152], N[Not[LessEqual[z, 5.5e+84]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+152} \lor \neg \left(z \leq 5.5 \cdot 10^{+84}\right):\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -3.3000000000000001e152 or 5.5000000000000004e84 < z Initial program 53.4%
associate-+l-53.4%
*-commutative53.4%
associate-*r*53.7%
*-commutative53.7%
associate-+l-53.7%
associate-*l*53.7%
associate-*l*59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y around inf 59.6%
Taylor expanded in z around -inf 70.2%
mul-1-neg70.2%
unsub-neg70.2%
*-commutative70.2%
associate-/l*72.5%
*-commutative72.5%
associate-/l*71.4%
mul-1-neg71.4%
unsub-neg71.4%
associate-*r/71.5%
*-commutative71.5%
associate-/l*71.5%
associate-/r*76.3%
Simplified76.3%
Taylor expanded in c around 0 79.9%
Taylor expanded in y around 0 83.0%
associate-*r/83.0%
mul-1-neg83.0%
Simplified83.0%
if -3.3000000000000001e152 < z < 5.5000000000000004e84Initial program 91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*90.9%
*-commutative90.9%
associate-+l-90.9%
associate-*l*91.0%
associate-*l*89.3%
*-commutative89.3%
Simplified89.3%
Final simplification87.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 4.8)
(/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c_m z))
(+
(* -4.0 (* t (/ a c_m)))
(* (/ y z) (- (/ (/ b c_m) y) (* x (/ -9.0 c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 4.8) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
} else {
tmp = (-4.0 * (t * (a / c_m))) + ((y / z) * (((b / c_m) / y) - (x * (-9.0 / c_m))));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (c_m <= 4.8d0) then
tmp = (b - (((z * 4.0d0) * (t * a)) - (x * (9.0d0 * y)))) / (c_m * z)
else
tmp = ((-4.0d0) * (t * (a / c_m))) + ((y / z) * (((b / c_m) / y) - (x * ((-9.0d0) / c_m))))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 4.8) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
} else {
tmp = (-4.0 * (t * (a / c_m))) + ((y / z) * (((b / c_m) / y) - (x * (-9.0 / c_m))));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 4.8: tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z) else: tmp = (-4.0 * (t * (a / c_m))) + ((y / z) * (((b / c_m) / y) - (x * (-9.0 / c_m)))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 4.8) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c_m * z)); else tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) + Float64(Float64(y / z) * Float64(Float64(Float64(b / c_m) / y) - Float64(x * Float64(-9.0 / c_m))))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 4.8)
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
else
tmp = (-4.0 * (t * (a / c_m))) + ((y / z) * (((b / c_m) / y) - (x * (-9.0 / c_m))));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 4.8], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(N[(b / c$95$m), $MachinePrecision] / y), $MachinePrecision] - N[(x * N[(-9.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 4.8:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right) + \frac{y}{z} \cdot \left(\frac{\frac{b}{c\_m}}{y} - x \cdot \frac{-9}{c\_m}\right)\\
\end{array}
\end{array}
if c < 4.79999999999999982Initial program 84.7%
associate-+l-84.7%
*-commutative84.7%
associate-*r*85.2%
*-commutative85.2%
associate-+l-85.2%
associate-*l*85.2%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
if 4.79999999999999982 < c Initial program 61.8%
associate-+l-61.8%
*-commutative61.8%
associate-*r*58.9%
*-commutative58.9%
associate-+l-58.9%
associate-*l*58.9%
associate-*l*62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in y around inf 69.3%
Taylor expanded in z around -inf 83.0%
mul-1-neg83.0%
unsub-neg83.0%
*-commutative83.0%
associate-/l*87.6%
*-commutative87.6%
associate-/l*82.3%
mul-1-neg82.3%
unsub-neg82.3%
associate-*r/82.2%
*-commutative82.2%
associate-/l*82.2%
associate-/r*85.5%
Simplified85.5%
Final simplification85.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(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 -3.1e-35)
t_1
(if (<= a 2.1e-34)
(/ (/ b z) c_m)
(if (or (<= a 48000000000.0) (not (<= a 1.55e+91)))
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);
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 <= -3.1e-35) {
tmp = t_1;
} else if (a <= 2.1e-34) {
tmp = (b / z) / c_m;
} else if ((a <= 48000000000.0) || !(a <= 1.55e+91)) {
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.
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 <= (-3.1d-35)) then
tmp = t_1
else if (a <= 2.1d-34) then
tmp = (b / z) / c_m
else if ((a <= 48000000000.0d0) .or. (.not. (a <= 1.55d+91))) 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;
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 <= -3.1e-35) {
tmp = t_1;
} else if (a <= 2.1e-34) {
tmp = (b / z) / c_m;
} else if ((a <= 48000000000.0) || !(a <= 1.55e+91)) {
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]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) tmp = 0 if a <= -3.1e-35: tmp = t_1 elif a <= 2.1e-34: tmp = (b / z) / c_m elif (a <= 48000000000.0) or not (a <= 1.55e+91): 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]) 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 <= -3.1e-35) tmp = t_1; elseif (a <= 2.1e-34) tmp = Float64(Float64(b / z) / c_m); elseif ((a <= 48000000000.0) || !(a <= 1.55e+91)) 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])){:}
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 <= -3.1e-35)
tmp = t_1;
elseif (a <= 2.1e-34)
tmp = (b / z) / c_m;
elseif ((a <= 48000000000.0) || ~((a <= 1.55e+91)))
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.
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, -3.1e-35], t$95$1, If[LessEqual[a, 2.1e-34], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[Or[LessEqual[a, 48000000000.0], N[Not[LessEqual[a, 1.55e+91]], $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])\\
\\
\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 -3.1 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;a \leq 48000000000 \lor \neg \left(a \leq 1.55 \cdot 10^{+91}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
\end{array}
if a < -3.10000000000000012e-35 or 2.1000000000000001e-34 < a < 4.8e10 or 1.54999999999999999e91 < a Initial program 78.6%
associate-+l-78.6%
*-commutative78.6%
associate-*r*73.2%
*-commutative73.2%
associate-+l-73.2%
associate-*l*73.2%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 78.3%
Taylor expanded in a around inf 57.1%
*-commutative57.1%
associate-/l*65.7%
Simplified65.7%
if -3.10000000000000012e-35 < a < 2.1000000000000001e-34Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around inf 66.9%
Taylor expanded in z around -inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
*-commutative79.1%
associate-/l*78.4%
*-commutative78.4%
associate-/l*78.0%
mul-1-neg78.0%
unsub-neg78.0%
associate-*r/78.0%
*-commutative78.0%
associate-/l*78.0%
associate-/r*83.9%
Simplified83.9%
Taylor expanded in c around 0 89.4%
Taylor expanded in b around inf 45.8%
if 4.8e10 < a < 1.54999999999999999e91Initial program 65.4%
associate-+l-65.4%
*-commutative65.4%
associate-*r*65.3%
*-commutative65.3%
associate-+l-65.3%
associate-*l*65.3%
associate-*l*56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in b around inf 38.0%
associate-/r*46.2%
Simplified46.2%
Final simplification55.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -2.35e+296)
(/ (/ b c_m) z)
(if (<= t -5.4e+93)
(* a (/ (* t -4.0) c_m))
(if (<= t -1.4e-107)
(* 9.0 (/ (* x (/ y c_m)) z))
(if (<= t 1.05e-65) (/ b (* c_m z)) (* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.4e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -1.4e-107) {
tmp = 9.0 * ((x * (y / c_m)) / z);
} else if (t <= 1.05e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-2.35d+296)) then
tmp = (b / c_m) / z
else if (t <= (-5.4d+93)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (t <= (-1.4d-107)) then
tmp = 9.0d0 * ((x * (y / c_m)) / z)
else if (t <= 1.05d-65) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.4e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -1.4e-107) {
tmp = 9.0 * ((x * (y / c_m)) / z);
} else if (t <= 1.05e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -2.35e+296: tmp = (b / c_m) / z elif t <= -5.4e+93: tmp = a * ((t * -4.0) / c_m) elif t <= -1.4e-107: tmp = 9.0 * ((x * (y / c_m)) / z) elif t <= 1.05e-65: tmp = b / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -2.35e+296) tmp = Float64(Float64(b / c_m) / z); elseif (t <= -5.4e+93) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (t <= -1.4e-107) tmp = Float64(9.0 * Float64(Float64(x * Float64(y / c_m)) / z)); elseif (t <= 1.05e-65) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -2.35e+296)
tmp = (b / c_m) / z;
elseif (t <= -5.4e+93)
tmp = a * ((t * -4.0) / c_m);
elseif (t <= -1.4e-107)
tmp = 9.0 * ((x * (y / c_m)) / z);
elseif (t <= 1.05e-65)
tmp = b / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -2.35e+296], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -5.4e+93], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.4e-107], N[(9.0 * N[(N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-65], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+296}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{+93}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-107}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c\_m}}{z}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-65}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if t < -2.3499999999999999e296Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*0.3%
*-commutative0.3%
Simplified0.3%
Taylor expanded in b around inf 100.0%
associate-/r*98.4%
Simplified98.4%
if -2.3499999999999999e296 < t < -5.3999999999999999e93Initial program 66.4%
associate-+l-66.4%
*-commutative66.4%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*65.6%
associate-*r*65.6%
associate-*l/65.6%
Simplified65.6%
if -5.3999999999999999e93 < t < -1.3999999999999999e-107Initial program 88.5%
associate-+l-88.5%
*-commutative88.5%
associate-*r*88.6%
*-commutative88.6%
associate-+l-88.6%
associate-*l*88.6%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 59.1%
associate-/r*59.2%
associate-/l*58.6%
Simplified58.6%
if -1.3999999999999999e-107 < t < 1.05000000000000001e-65Initial program 87.0%
associate-+l-87.0%
*-commutative87.0%
associate-*r*80.1%
*-commutative80.1%
associate-+l-80.1%
associate-*l*80.1%
associate-*l*87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in b around inf 51.4%
*-commutative51.4%
Simplified51.4%
if 1.05000000000000001e-65 < t Initial program 73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
associate-*l*76.3%
associate-*l*73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in z around 0 71.6%
Taylor expanded in a around inf 48.0%
*-commutative48.0%
associate-/l*53.8%
Simplified53.8%
Final simplification56.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -2.35e+296)
(/ (/ b c_m) z)
(if (<= t -5.2e+93)
(* a (/ (* t -4.0) c_m))
(if (<= t -3.8e-108)
(* 9.0 (/ (* x y) (* c_m z)))
(if (<= t 6.4e-65) (/ b (* c_m z)) (* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.2e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -3.8e-108) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (t <= 6.4e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-2.35d+296)) then
tmp = (b / c_m) / z
else if (t <= (-5.2d+93)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (t <= (-3.8d-108)) then
tmp = 9.0d0 * ((x * y) / (c_m * z))
else if (t <= 6.4d-65) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.2e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -3.8e-108) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (t <= 6.4e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -2.35e+296: tmp = (b / c_m) / z elif t <= -5.2e+93: tmp = a * ((t * -4.0) / c_m) elif t <= -3.8e-108: tmp = 9.0 * ((x * y) / (c_m * z)) elif t <= 6.4e-65: tmp = b / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -2.35e+296) tmp = Float64(Float64(b / c_m) / z); elseif (t <= -5.2e+93) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (t <= -3.8e-108) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z))); elseif (t <= 6.4e-65) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -2.35e+296)
tmp = (b / c_m) / z;
elseif (t <= -5.2e+93)
tmp = a * ((t * -4.0) / c_m);
elseif (t <= -3.8e-108)
tmp = 9.0 * ((x * y) / (c_m * z));
elseif (t <= 6.4e-65)
tmp = b / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -2.35e+296], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -5.2e+93], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-108], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.4e-65], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+296}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+93}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-108}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c\_m \cdot z}\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if t < -2.3499999999999999e296Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*0.3%
*-commutative0.3%
Simplified0.3%
Taylor expanded in b around inf 100.0%
associate-/r*98.4%
Simplified98.4%
if -2.3499999999999999e296 < t < -5.19999999999999999e93Initial program 66.4%
associate-+l-66.4%
*-commutative66.4%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*65.6%
associate-*r*65.6%
associate-*l/65.6%
Simplified65.6%
if -5.19999999999999999e93 < t < -3.79999999999999973e-108Initial program 88.5%
associate-+l-88.5%
*-commutative88.5%
associate-*r*88.6%
*-commutative88.6%
associate-+l-88.6%
associate-*l*88.6%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 59.1%
if -3.79999999999999973e-108 < t < 6.3999999999999998e-65Initial program 87.2%
associate-+l-87.2%
*-commutative87.2%
associate-*r*80.3%
*-commutative80.3%
associate-+l-80.3%
associate-*l*80.3%
associate-*l*87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in b around inf 50.8%
*-commutative50.8%
Simplified50.8%
if 6.3999999999999998e-65 < t Initial program 73.5%
associate-+l-73.5%
*-commutative73.5%
associate-*r*76.0%
*-commutative76.0%
associate-+l-76.0%
associate-*l*76.1%
associate-*l*73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in z around 0 71.3%
Taylor expanded in a around inf 48.5%
*-commutative48.5%
associate-/l*54.4%
Simplified54.4%
Final simplification56.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -2.35e+296)
(/ (/ b c_m) z)
(if (<= t -5.4e+93)
(* a (/ (* t -4.0) c_m))
(if (<= t -4.5e-109)
(* 9.0 (* (/ y z) (/ x c_m)))
(if (<= t 6.5e-66) (/ b (* c_m z)) (* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.4e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -4.5e-109) {
tmp = 9.0 * ((y / z) * (x / c_m));
} else if (t <= 6.5e-66) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-2.35d+296)) then
tmp = (b / c_m) / z
else if (t <= (-5.4d+93)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (t <= (-4.5d-109)) then
tmp = 9.0d0 * ((y / z) * (x / c_m))
else if (t <= 6.5d-66) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.4e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -4.5e-109) {
tmp = 9.0 * ((y / z) * (x / c_m));
} else if (t <= 6.5e-66) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -2.35e+296: tmp = (b / c_m) / z elif t <= -5.4e+93: tmp = a * ((t * -4.0) / c_m) elif t <= -4.5e-109: tmp = 9.0 * ((y / z) * (x / c_m)) elif t <= 6.5e-66: tmp = b / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -2.35e+296) tmp = Float64(Float64(b / c_m) / z); elseif (t <= -5.4e+93) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (t <= -4.5e-109) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c_m))); elseif (t <= 6.5e-66) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -2.35e+296)
tmp = (b / c_m) / z;
elseif (t <= -5.4e+93)
tmp = a * ((t * -4.0) / c_m);
elseif (t <= -4.5e-109)
tmp = 9.0 * ((y / z) * (x / c_m));
elseif (t <= 6.5e-66)
tmp = b / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -2.35e+296], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -5.4e+93], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-109], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e-66], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+296}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{+93}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-109}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c\_m}\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if t < -2.3499999999999999e296Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*0.3%
*-commutative0.3%
Simplified0.3%
Taylor expanded in b around inf 100.0%
associate-/r*98.4%
Simplified98.4%
if -2.3499999999999999e296 < t < -5.3999999999999999e93Initial program 66.4%
associate-+l-66.4%
*-commutative66.4%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*65.6%
associate-*r*65.6%
associate-*l/65.6%
Simplified65.6%
if -5.3999999999999999e93 < t < -4.5000000000000001e-109Initial program 88.5%
associate-+l-88.5%
*-commutative88.5%
associate-*r*88.6%
*-commutative88.6%
associate-+l-88.6%
associate-*l*88.6%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 59.1%
times-frac54.7%
Applied egg-rr54.7%
if -4.5000000000000001e-109 < t < 6.50000000000000024e-66Initial program 87.0%
associate-+l-87.0%
*-commutative87.0%
associate-*r*80.1%
*-commutative80.1%
associate-+l-80.1%
associate-*l*80.1%
associate-*l*87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in b around inf 51.4%
*-commutative51.4%
Simplified51.4%
if 6.50000000000000024e-66 < t Initial program 73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
associate-*l*76.3%
associate-*l*73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in z around 0 71.6%
Taylor expanded in a around inf 48.0%
*-commutative48.0%
associate-/l*53.8%
Simplified53.8%
Final simplification55.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -2.35e+296)
(/ (/ b c_m) z)
(if (<= t -5.2e+93)
(* a (/ (* t -4.0) c_m))
(if (<= t -2.1e-109)
(* 9.0 (* x (/ (/ y c_m) z)))
(if (<= t 6e-65) (/ b (* c_m z)) (* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.2e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -2.1e-109) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (t <= 6e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-2.35d+296)) then
tmp = (b / c_m) / z
else if (t <= (-5.2d+93)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (t <= (-2.1d-109)) then
tmp = 9.0d0 * (x * ((y / c_m) / z))
else if (t <= 6d-65) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -5.2e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -2.1e-109) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (t <= 6e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -2.35e+296: tmp = (b / c_m) / z elif t <= -5.2e+93: tmp = a * ((t * -4.0) / c_m) elif t <= -2.1e-109: tmp = 9.0 * (x * ((y / c_m) / z)) elif t <= 6e-65: tmp = b / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -2.35e+296) tmp = Float64(Float64(b / c_m) / z); elseif (t <= -5.2e+93) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (t <= -2.1e-109) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); elseif (t <= 6e-65) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -2.35e+296)
tmp = (b / c_m) / z;
elseif (t <= -5.2e+93)
tmp = a * ((t * -4.0) / c_m);
elseif (t <= -2.1e-109)
tmp = 9.0 * (x * ((y / c_m) / z));
elseif (t <= 6e-65)
tmp = b / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -2.35e+296], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -5.2e+93], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-109], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-65], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+296}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+93}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-109}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-65}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if t < -2.3499999999999999e296Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*0.3%
*-commutative0.3%
Simplified0.3%
Taylor expanded in b around inf 100.0%
associate-/r*98.4%
Simplified98.4%
if -2.3499999999999999e296 < t < -5.19999999999999999e93Initial program 66.4%
associate-+l-66.4%
*-commutative66.4%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*65.6%
associate-*r*65.6%
associate-*l/65.6%
Simplified65.6%
if -5.19999999999999999e93 < t < -2.09999999999999996e-109Initial program 88.5%
associate-+l-88.5%
*-commutative88.5%
associate-*r*88.6%
*-commutative88.6%
associate-+l-88.6%
associate-*l*88.6%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 59.1%
associate-/l*52.4%
associate-/r*52.5%
Simplified52.5%
if -2.09999999999999996e-109 < t < 5.99999999999999996e-65Initial program 87.2%
associate-+l-87.2%
*-commutative87.2%
associate-*r*80.3%
*-commutative80.3%
associate-+l-80.3%
associate-*l*80.3%
associate-*l*87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in b around inf 50.8%
*-commutative50.8%
Simplified50.8%
if 5.99999999999999996e-65 < t Initial program 73.5%
associate-+l-73.5%
*-commutative73.5%
associate-*r*76.0%
*-commutative76.0%
associate-+l-76.0%
associate-*l*76.1%
associate-*l*73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in z around 0 71.3%
Taylor expanded in a around inf 48.5%
*-commutative48.5%
associate-/l*54.4%
Simplified54.4%
Final simplification55.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -2.35e+296)
(/ (/ b c_m) z)
(if (<= t -7e+93)
(* a (/ (* t -4.0) c_m))
(if (<= t -1.45e-107)
(* 9.0 (* x (/ y (* c_m z))))
(if (<= t 1.35e-65) (/ b (* c_m z)) (* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -7e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -1.45e-107) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (t <= 1.35e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-2.35d+296)) then
tmp = (b / c_m) / z
else if (t <= (-7d+93)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (t <= (-1.45d-107)) then
tmp = 9.0d0 * (x * (y / (c_m * z)))
else if (t <= 1.35d-65) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -2.35e+296) {
tmp = (b / c_m) / z;
} else if (t <= -7e+93) {
tmp = a * ((t * -4.0) / c_m);
} else if (t <= -1.45e-107) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (t <= 1.35e-65) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -2.35e+296: tmp = (b / c_m) / z elif t <= -7e+93: tmp = a * ((t * -4.0) / c_m) elif t <= -1.45e-107: tmp = 9.0 * (x * (y / (c_m * z))) elif t <= 1.35e-65: tmp = b / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -2.35e+296) tmp = Float64(Float64(b / c_m) / z); elseif (t <= -7e+93) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (t <= -1.45e-107) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))); elseif (t <= 1.35e-65) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -2.35e+296)
tmp = (b / c_m) / z;
elseif (t <= -7e+93)
tmp = a * ((t * -4.0) / c_m);
elseif (t <= -1.45e-107)
tmp = 9.0 * (x * (y / (c_m * z)));
elseif (t <= 1.35e-65)
tmp = b / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -2.35e+296], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -7e+93], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-107], N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-65], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+296}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;t \leq -7 \cdot 10^{+93}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-107}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-65}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if t < -2.3499999999999999e296Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*0.3%
*-commutative0.3%
Simplified0.3%
Taylor expanded in b around inf 100.0%
associate-/r*98.4%
Simplified98.4%
if -2.3499999999999999e296 < t < -6.99999999999999996e93Initial program 66.4%
associate-+l-66.4%
*-commutative66.4%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*65.6%
associate-*r*65.6%
associate-*l/65.6%
Simplified65.6%
if -6.99999999999999996e93 < t < -1.4499999999999999e-107Initial program 88.5%
associate-+l-88.5%
*-commutative88.5%
associate-*r*88.6%
*-commutative88.6%
associate-+l-88.6%
associate-*l*88.6%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 59.1%
associate-/l*52.4%
*-commutative52.4%
Applied egg-rr52.4%
if -1.4499999999999999e-107 < t < 1.3499999999999999e-65Initial program 87.0%
associate-+l-87.0%
*-commutative87.0%
associate-*r*80.1%
*-commutative80.1%
associate-+l-80.1%
associate-*l*80.1%
associate-*l*87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in b around inf 51.4%
*-commutative51.4%
Simplified51.4%
if 1.3499999999999999e-65 < t Initial program 73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
associate-*l*76.3%
associate-*l*73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in z around 0 71.6%
Taylor expanded in a around inf 48.0%
*-commutative48.0%
associate-/l*53.8%
Simplified53.8%
Final simplification55.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= a -3.35e-35)
(* a (/ (* t -4.0) c_m))
(if (<= a 2.8e-34)
(/ (/ b z) c_m)
(if (<= a 14000000000.0)
(* a (* t (/ -4.0 c_m)))
(if (<= a 3.5e+93)
(* (/ b c_m) (/ 1.0 z))
(* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (a <= -3.35e-35) {
tmp = a * ((t * -4.0) / c_m);
} else if (a <= 2.8e-34) {
tmp = (b / z) / c_m;
} else if (a <= 14000000000.0) {
tmp = a * (t * (-4.0 / c_m));
} else if (a <= 3.5e+93) {
tmp = (b / c_m) * (1.0 / z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (a <= (-3.35d-35)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (a <= 2.8d-34) then
tmp = (b / z) / c_m
else if (a <= 14000000000.0d0) then
tmp = a * (t * ((-4.0d0) / c_m))
else if (a <= 3.5d+93) then
tmp = (b / c_m) * (1.0d0 / z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (a <= -3.35e-35) {
tmp = a * ((t * -4.0) / c_m);
} else if (a <= 2.8e-34) {
tmp = (b / z) / c_m;
} else if (a <= 14000000000.0) {
tmp = a * (t * (-4.0 / c_m));
} else if (a <= 3.5e+93) {
tmp = (b / c_m) * (1.0 / z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if a <= -3.35e-35: tmp = a * ((t * -4.0) / c_m) elif a <= 2.8e-34: tmp = (b / z) / c_m elif a <= 14000000000.0: tmp = a * (t * (-4.0 / c_m)) elif a <= 3.5e+93: tmp = (b / c_m) * (1.0 / z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (a <= -3.35e-35) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (a <= 2.8e-34) tmp = Float64(Float64(b / z) / c_m); elseif (a <= 14000000000.0) tmp = Float64(a * Float64(t * Float64(-4.0 / c_m))); elseif (a <= 3.5e+93) tmp = Float64(Float64(b / c_m) * Float64(1.0 / z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (a <= -3.35e-35)
tmp = a * ((t * -4.0) / c_m);
elseif (a <= 2.8e-34)
tmp = (b / z) / c_m;
elseif (a <= 14000000000.0)
tmp = a * (t * (-4.0 / c_m));
elseif (a <= 3.5e+93)
tmp = (b / c_m) * (1.0 / z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[a, -3.35e-35], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e-34], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[a, 14000000000.0], N[(a * N[(t * N[(-4.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+93], N[(N[(b / c$95$m), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -3.35 \cdot 10^{-35}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;a \leq 14000000000:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c\_m}\right)\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+93}:\\
\;\;\;\;\frac{b}{c\_m} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if a < -3.35e-35Initial program 76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*70.1%
*-commutative70.1%
associate-+l-70.1%
associate-*l*70.1%
associate-*l*71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around inf 57.5%
*-commutative57.5%
associate-/l*62.5%
associate-*r*62.5%
associate-*l/62.5%
Simplified62.5%
if -3.35e-35 < a < 2.79999999999999997e-34Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around inf 66.9%
Taylor expanded in z around -inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
*-commutative79.1%
associate-/l*78.4%
*-commutative78.4%
associate-/l*78.0%
mul-1-neg78.0%
unsub-neg78.0%
associate-*r/78.0%
*-commutative78.0%
associate-/l*78.0%
associate-/r*83.9%
Simplified83.9%
Taylor expanded in c around 0 89.4%
Taylor expanded in b around inf 45.8%
if 2.79999999999999997e-34 < a < 1.4e10Initial program 80.6%
associate-+l-80.6%
*-commutative80.6%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
associate-*l*81.2%
associate-*l*81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y around inf 60.9%
Taylor expanded in z around -inf 62.7%
mul-1-neg62.7%
unsub-neg62.7%
*-commutative62.7%
associate-/l*62.4%
*-commutative62.4%
associate-/l*43.4%
mul-1-neg43.4%
unsub-neg43.4%
associate-*r/43.4%
*-commutative43.4%
associate-/l*43.4%
associate-/r*43.4%
Simplified43.4%
Taylor expanded in t around inf 42.0%
associate-*r/41.6%
*-commutative41.6%
associate-*l*41.6%
*-commutative41.6%
associate-*r/41.6%
*-commutative41.6%
associate-/l*41.6%
Simplified41.6%
if 1.4e10 < a < 3.49999999999999998e93Initial program 65.4%
associate-+l-65.4%
*-commutative65.4%
associate-*r*65.3%
*-commutative65.3%
associate-+l-65.3%
associate-*l*65.3%
associate-*l*56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in b around inf 38.0%
associate-/r*46.2%
Simplified46.2%
div-inv46.2%
Applied egg-rr46.2%
if 3.49999999999999998e93 < a Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*77.6%
*-commutative77.6%
associate-+l-77.6%
associate-*l*77.6%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in z around 0 80.2%
Taylor expanded in a around inf 58.2%
*-commutative58.2%
associate-/l*69.0%
Simplified69.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= a -3.35e-35)
(* a (/ (* t -4.0) c_m))
(if (<= a 6.8e-35)
(/ (/ b z) c_m)
(if (<= a 4000000000000.0)
(* a (* t (/ -4.0 c_m)))
(if (<= a 1.55e+91) (/ (/ b c_m) z) (* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (a <= -3.35e-35) {
tmp = a * ((t * -4.0) / c_m);
} else if (a <= 6.8e-35) {
tmp = (b / z) / c_m;
} else if (a <= 4000000000000.0) {
tmp = a * (t * (-4.0 / c_m));
} else if (a <= 1.55e+91) {
tmp = (b / c_m) / z;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 (a <= (-3.35d-35)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (a <= 6.8d-35) then
tmp = (b / z) / c_m
else if (a <= 4000000000000.0d0) then
tmp = a * (t * ((-4.0d0) / c_m))
else if (a <= 1.55d+91) then
tmp = (b / c_m) / z
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 (a <= -3.35e-35) {
tmp = a * ((t * -4.0) / c_m);
} else if (a <= 6.8e-35) {
tmp = (b / z) / c_m;
} else if (a <= 4000000000000.0) {
tmp = a * (t * (-4.0 / c_m));
} else if (a <= 1.55e+91) {
tmp = (b / c_m) / z;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if a <= -3.35e-35: tmp = a * ((t * -4.0) / c_m) elif a <= 6.8e-35: tmp = (b / z) / c_m elif a <= 4000000000000.0: tmp = a * (t * (-4.0 / c_m)) elif a <= 1.55e+91: tmp = (b / c_m) / z else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (a <= -3.35e-35) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (a <= 6.8e-35) tmp = Float64(Float64(b / z) / c_m); elseif (a <= 4000000000000.0) tmp = Float64(a * Float64(t * Float64(-4.0 / c_m))); elseif (a <= 1.55e+91) tmp = Float64(Float64(b / c_m) / z); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (a <= -3.35e-35)
tmp = a * ((t * -4.0) / c_m);
elseif (a <= 6.8e-35)
tmp = (b / z) / c_m;
elseif (a <= 4000000000000.0)
tmp = a * (t * (-4.0 / c_m));
elseif (a <= 1.55e+91)
tmp = (b / c_m) / z;
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[a, -3.35e-35], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8e-35], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[a, 4000000000000.0], N[(a * N[(t * N[(-4.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+91], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -3.35 \cdot 10^{-35}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;a \leq 4000000000000:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c\_m}\right)\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+91}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if a < -3.35e-35Initial program 76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*70.1%
*-commutative70.1%
associate-+l-70.1%
associate-*l*70.1%
associate-*l*71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around inf 57.5%
*-commutative57.5%
associate-/l*62.5%
associate-*r*62.5%
associate-*l/62.5%
Simplified62.5%
if -3.35e-35 < a < 6.8000000000000005e-35Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around inf 66.9%
Taylor expanded in z around -inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
*-commutative79.1%
associate-/l*78.4%
*-commutative78.4%
associate-/l*78.0%
mul-1-neg78.0%
unsub-neg78.0%
associate-*r/78.0%
*-commutative78.0%
associate-/l*78.0%
associate-/r*83.9%
Simplified83.9%
Taylor expanded in c around 0 89.4%
Taylor expanded in b around inf 45.8%
if 6.8000000000000005e-35 < a < 4e12Initial program 68.6%
associate-+l-68.6%
*-commutative68.6%
associate-*r*68.9%
*-commutative68.9%
associate-+l-68.9%
associate-*l*69.2%
associate-*l*69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in y around inf 52.2%
Taylor expanded in z around -inf 68.7%
mul-1-neg68.7%
unsub-neg68.7%
*-commutative68.7%
associate-/l*68.7%
*-commutative68.7%
associate-/l*52.8%
mul-1-neg52.8%
unsub-neg52.8%
associate-*r/52.8%
*-commutative52.8%
associate-/l*52.8%
associate-/r*52.8%
Simplified52.8%
Taylor expanded in t around inf 51.4%
associate-*r/51.4%
*-commutative51.4%
associate-*l*51.4%
*-commutative51.4%
associate-*r/51.4%
*-commutative51.4%
associate-/l*51.4%
Simplified51.4%
if 4e12 < a < 1.54999999999999999e91Initial program 71.1%
associate-+l-71.1%
*-commutative71.1%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
associate-*l*70.9%
associate-*l*61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in b around inf 41.6%
associate-/r*50.6%
Simplified50.6%
if 1.54999999999999999e91 < a Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*77.6%
*-commutative77.6%
associate-+l-77.6%
associate-*l*77.6%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in z around 0 80.2%
Taylor expanded in a around inf 58.2%
*-commutative58.2%
associate-/l*69.0%
Simplified69.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(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 -3.4e-35)
t_1
(if (<= a 6.2e-32)
(/ (/ b z) c_m)
(if (<= a 125000000000.0)
(* a (* t (/ -4.0 c_m)))
(if (<= a 1.55e+91) (/ (/ b c_m) z) t_1)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -3.4e-35) {
tmp = t_1;
} else if (a <= 6.2e-32) {
tmp = (b / z) / c_m;
} else if (a <= 125000000000.0) {
tmp = a * (t * (-4.0 / c_m));
} else if (a <= 1.55e+91) {
tmp = (b / c_m) / z;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 <= (-3.4d-35)) then
tmp = t_1
else if (a <= 6.2d-32) then
tmp = (b / z) / c_m
else if (a <= 125000000000.0d0) then
tmp = a * (t * ((-4.0d0) / c_m))
else if (a <= 1.55d+91) then
tmp = (b / c_m) / z
else
tmp = t_1
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 <= -3.4e-35) {
tmp = t_1;
} else if (a <= 6.2e-32) {
tmp = (b / z) / c_m;
} else if (a <= 125000000000.0) {
tmp = a * (t * (-4.0 / c_m));
} else if (a <= 1.55e+91) {
tmp = (b / c_m) / z;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) tmp = 0 if a <= -3.4e-35: tmp = t_1 elif a <= 6.2e-32: tmp = (b / z) / c_m elif a <= 125000000000.0: tmp = a * (t * (-4.0 / c_m)) elif a <= 1.55e+91: tmp = (b / c_m) / z else: tmp = t_1 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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 <= -3.4e-35) tmp = t_1; elseif (a <= 6.2e-32) tmp = Float64(Float64(b / z) / c_m); elseif (a <= 125000000000.0) tmp = Float64(a * Float64(t * Float64(-4.0 / c_m))); elseif (a <= 1.55e+91) tmp = Float64(Float64(b / c_m) / z); else tmp = t_1; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 <= -3.4e-35)
tmp = t_1;
elseif (a <= 6.2e-32)
tmp = (b / z) / c_m;
elseif (a <= 125000000000.0)
tmp = a * (t * (-4.0 / c_m));
elseif (a <= 1.55e+91)
tmp = (b / c_m) / z;
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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, -3.4e-35], t$95$1, If[LessEqual[a, 6.2e-32], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[a, 125000000000.0], N[(a * N[(t * N[(-4.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+91], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\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 -3.4 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;a \leq 125000000000:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c\_m}\right)\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+91}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if a < -3.4000000000000003e-35 or 1.54999999999999999e91 < a Initial program 78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in z around 0 77.4%
Taylor expanded in a around inf 57.8%
*-commutative57.8%
associate-/l*66.7%
Simplified66.7%
if -3.4000000000000003e-35 < a < 6.20000000000000021e-32Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around inf 66.9%
Taylor expanded in z around -inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
*-commutative79.1%
associate-/l*78.4%
*-commutative78.4%
associate-/l*78.0%
mul-1-neg78.0%
unsub-neg78.0%
associate-*r/78.0%
*-commutative78.0%
associate-/l*78.0%
associate-/r*83.9%
Simplified83.9%
Taylor expanded in c around 0 89.4%
Taylor expanded in b around inf 45.8%
if 6.20000000000000021e-32 < a < 1.25e11Initial program 80.6%
associate-+l-80.6%
*-commutative80.6%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
associate-*l*81.2%
associate-*l*81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in y around inf 60.9%
Taylor expanded in z around -inf 62.7%
mul-1-neg62.7%
unsub-neg62.7%
*-commutative62.7%
associate-/l*62.4%
*-commutative62.4%
associate-/l*43.4%
mul-1-neg43.4%
unsub-neg43.4%
associate-*r/43.4%
*-commutative43.4%
associate-/l*43.4%
associate-/r*43.4%
Simplified43.4%
Taylor expanded in t around inf 42.0%
associate-*r/41.6%
*-commutative41.6%
associate-*l*41.6%
*-commutative41.6%
associate-*r/41.6%
*-commutative41.6%
associate-/l*41.6%
Simplified41.6%
if 1.25e11 < a < 1.54999999999999999e91Initial program 65.4%
associate-+l-65.4%
*-commutative65.4%
associate-*r*65.3%
*-commutative65.3%
associate-+l-65.3%
associate-*l*65.3%
associate-*l*56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in b around inf 38.0%
associate-/r*46.2%
Simplified46.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= x -3.8e+31)
(+ (* -4.0 (/ (* t a) c_m)) (* 9.0 (/ (* x y) (* c_m z))))
(if (<= x 1500000.0)
(/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
(* (/ y z) (- (/ b (* c_m y)) (* -9.0 (/ x c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -3.8e+31) {
tmp = (-4.0 * ((t * a) / c_m)) + (9.0 * ((x * y) / (c_m * z)));
} else if (x <= 1500000.0) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (y / z) * ((b / (c_m * y)) - (-9.0 * (x / c_m)));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (x <= (-3.8d+31)) then
tmp = ((-4.0d0) * ((t * a) / c_m)) + (9.0d0 * ((x * y) / (c_m * z)))
else if (x <= 1500000.0d0) then
tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
else
tmp = (y / z) * ((b / (c_m * y)) - ((-9.0d0) * (x / c_m)))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -3.8e+31) {
tmp = (-4.0 * ((t * a) / c_m)) + (9.0 * ((x * y) / (c_m * z)));
} else if (x <= 1500000.0) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = (y / z) * ((b / (c_m * y)) - (-9.0 * (x / c_m)));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if x <= -3.8e+31: tmp = (-4.0 * ((t * a) / c_m)) + (9.0 * ((x * y) / (c_m * z))) elif x <= 1500000.0: tmp = ((-4.0 * (t * a)) + (b / z)) / c_m else: tmp = (y / z) * ((b / (c_m * y)) - (-9.0 * (x / c_m))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (x <= -3.8e+31) tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) / c_m)) + Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z)))); elseif (x <= 1500000.0) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m); else tmp = Float64(Float64(y / z) * Float64(Float64(b / Float64(c_m * y)) - Float64(-9.0 * Float64(x / c_m)))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (x <= -3.8e+31)
tmp = (-4.0 * ((t * a) / c_m)) + (9.0 * ((x * y) / (c_m * z)));
elseif (x <= 1500000.0)
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
else
tmp = (y / z) * ((b / (c_m * y)) - (-9.0 * (x / c_m)));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[x, -3.8e+31], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1500000.0], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * N[(N[(b / N[(c$95$m * y), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(x / c$95$m), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+31}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + 9 \cdot \frac{x \cdot y}{c\_m \cdot z}\\
\mathbf{elif}\;x \leq 1500000:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(\frac{b}{c\_m \cdot y} - -9 \cdot \frac{x}{c\_m}\right)\\
\end{array}
\end{array}
if x < -3.8000000000000001e31Initial program 74.2%
associate-+l-74.2%
*-commutative74.2%
associate-*r*75.9%
*-commutative75.9%
associate-+l-75.9%
associate-*l*75.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in b around 0 70.9%
Taylor expanded in x around 0 77.6%
if -3.8000000000000001e31 < x < 1.5e6Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*80.1%
*-commutative80.1%
associate-+l-80.1%
associate-*l*80.1%
associate-*l*82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in y around inf 63.1%
Taylor expanded in z around -inf 69.9%
mul-1-neg69.9%
unsub-neg69.9%
*-commutative69.9%
associate-/l*71.9%
*-commutative71.9%
associate-/l*65.9%
mul-1-neg65.9%
unsub-neg65.9%
associate-*r/65.9%
*-commutative65.9%
associate-/l*65.9%
associate-/r*73.8%
Simplified73.8%
Taylor expanded in c around 0 83.8%
Taylor expanded in y around 0 74.4%
associate-*r/74.4%
mul-1-neg74.4%
Simplified74.4%
if 1.5e6 < x Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
associate-*l*79.4%
associate-*l*78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in y around inf 62.9%
Taylor expanded in z around -inf 75.7%
mul-1-neg75.7%
unsub-neg75.7%
*-commutative75.7%
associate-/l*77.3%
*-commutative77.3%
associate-/l*74.5%
mul-1-neg74.5%
unsub-neg74.5%
associate-*r/74.6%
*-commutative74.6%
associate-/l*74.6%
associate-/r*73.1%
Simplified73.1%
Taylor expanded in t around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
*-commutative67.9%
*-commutative67.9%
associate-*r/67.9%
*-commutative67.9%
associate-*r/67.9%
associate-*r/66.4%
associate-*r/66.4%
*-commutative66.4%
associate-*r/66.3%
*-commutative66.3%
Simplified66.3%
Final simplification73.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -3.65e+59) (not (<= z 4.5e+38)))
(/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
(/ (+ (* x (* 9.0 y)) b) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3.65e+59) || !(z <= 4.5e+38)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-3.65d+59)) .or. (.not. (z <= 4.5d+38))) then
tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
else
tmp = ((x * (9.0d0 * y)) + b) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -3.65e+59) || !(z <= 4.5e+38)) {
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
} else {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -3.65e+59) or not (z <= 4.5e+38): tmp = ((-4.0 * (t * a)) + (b / z)) / c_m else: tmp = ((x * (9.0 * y)) + b) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -3.65e+59) || !(z <= 4.5e+38)) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m); else tmp = Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -3.65e+59) || ~((z <= 4.5e+38)))
tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
else
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -3.65e+59], N[Not[LessEqual[z, 4.5e+38]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.65 \cdot 10^{+59} \lor \neg \left(z \leq 4.5 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right) + b}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -3.6500000000000001e59 or 4.4999999999999998e38 < z Initial program 59.5%
associate-+l-59.5%
*-commutative59.5%
associate-*r*59.6%
*-commutative59.6%
associate-+l-59.6%
associate-*l*59.6%
associate-*l*64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in y around inf 64.0%
Taylor expanded in z around -inf 71.1%
mul-1-neg71.1%
unsub-neg71.1%
*-commutative71.1%
associate-/l*73.6%
*-commutative73.6%
associate-/l*74.4%
mul-1-neg74.4%
unsub-neg74.4%
associate-*r/74.4%
*-commutative74.4%
associate-/l*74.4%
associate-/r*78.8%
Simplified78.8%
Taylor expanded in c around 0 80.8%
Taylor expanded in y around 0 79.2%
associate-*r/79.2%
mul-1-neg79.2%
Simplified79.2%
if -3.6500000000000001e59 < z < 4.4999999999999998e38Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*93.8%
*-commutative93.8%
associate-+l-93.8%
associate-*l*93.9%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in x around inf 78.9%
associate-*r*78.9%
*-commutative78.9%
associate-*r*78.9%
Simplified78.9%
Final simplification79.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= a -3.4e-35)
(* a (/ (* t -4.0) c_m))
(if (<= a 3.4e+174)
(/ (+ (* x (* 9.0 y)) b) (* c_m z))
(* -4.0 (* t (/ a c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (a <= -3.4e-35) {
tmp = a * ((t * -4.0) / c_m);
} else if (a <= 3.4e+174) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 (a <= (-3.4d-35)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (a <= 3.4d+174) then
tmp = ((x * (9.0d0 * y)) + b) / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 (a <= -3.4e-35) {
tmp = a * ((t * -4.0) / c_m);
} else if (a <= 3.4e+174) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if a <= -3.4e-35: tmp = a * ((t * -4.0) / c_m) elif a <= 3.4e+174: tmp = ((x * (9.0 * y)) + b) / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (a <= -3.4e-35) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (a <= 3.4e+174) tmp = Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (a <= -3.4e-35)
tmp = a * ((t * -4.0) / c_m);
elseif (a <= 3.4e+174)
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[a, -3.4e-35], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+174], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-35}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+174}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right) + b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if a < -3.4000000000000003e-35Initial program 76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*70.1%
*-commutative70.1%
associate-+l-70.1%
associate-*l*70.1%
associate-*l*71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around inf 57.5%
*-commutative57.5%
associate-/l*62.5%
associate-*r*62.5%
associate-*l/62.5%
Simplified62.5%
if -3.4000000000000003e-35 < a < 3.4000000000000001e174Initial program 79.7%
associate-+l-79.7%
*-commutative79.7%
associate-*r*83.6%
*-commutative83.6%
associate-+l-83.6%
associate-*l*83.6%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in x around inf 70.4%
associate-*r*70.4%
*-commutative70.4%
associate-*r*70.5%
Simplified70.5%
if 3.4000000000000001e174 < a Initial program 85.1%
associate-+l-85.1%
*-commutative85.1%
associate-*r*77.5%
*-commutative77.5%
associate-+l-77.5%
associate-*l*77.5%
associate-*l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in z around 0 84.8%
Taylor expanded in a around inf 70.2%
*-commutative70.2%
associate-/l*77.6%
Simplified77.6%
Final simplification68.9%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (if (<= b -5.2e+234) (/ (/ b z) c_m) (/ (/ b c_m) z))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -5.2e+234) {
tmp = (b / z) / c_m;
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-5.2d+234)) then
tmp = (b / z) / c_m
else
tmp = (b / c_m) / z
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -5.2e+234) {
tmp = (b / z) / c_m;
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -5.2e+234: tmp = (b / z) / c_m else: tmp = (b / c_m) / z return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -5.2e+234) tmp = Float64(Float64(b / z) / c_m); else tmp = Float64(Float64(b / c_m) / z); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -5.2e+234)
tmp = (b / z) / c_m;
else
tmp = (b / c_m) / z;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -5.2e+234], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+234}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -5.2000000000000003e234Initial program 89.5%
associate-+l-89.5%
*-commutative89.5%
associate-*r*78.6%
*-commutative78.6%
associate-+l-78.6%
associate-*l*78.5%
associate-*l*89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in y around inf 56.5%
Taylor expanded in z around -inf 56.9%
mul-1-neg56.9%
unsub-neg56.9%
*-commutative56.9%
associate-/l*56.9%
*-commutative56.9%
associate-/l*62.0%
mul-1-neg62.0%
unsub-neg62.0%
associate-*r/62.0%
*-commutative62.0%
associate-/l*61.9%
associate-/r*56.8%
Simplified56.8%
Taylor expanded in c around 0 84.5%
Taylor expanded in b around inf 79.1%
if -5.2000000000000003e234 < b Initial program 78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*79.0%
*-commutative79.0%
associate-+l-79.0%
associate-*l*79.1%
associate-*l*79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in b around inf 30.1%
associate-/r*32.4%
Simplified32.4%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ (/ b c_m) z)))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * ((b / c_m) / z);
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
code = c_s * ((b / c_m) / z)
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * ((b / c_m) / z);
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): return c_s * ((b / c_m) / z)
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) return Float64(c_s * Float64(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])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
tmp = c_s * ((b / c_m) / z);
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(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])\\
\\
c\_s \cdot \frac{\frac{b}{c\_m}}{z}
\end{array}
Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*79.0%
*-commutative79.0%
associate-+l-79.0%
associate-*l*79.0%
associate-*l*79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in b around inf 32.8%
associate-/r*33.9%
Simplified33.9%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* c_m z))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
code = c_s * (b / (c_m * z))
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): return c_s * (b / (c_m * z))
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) return Float64(c_s * Float64(b / Float64(c_m * z))) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
tmp = c_s * (b / (c_m * z));
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \frac{b}{c\_m \cdot z}
\end{array}
Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*79.0%
*-commutative79.0%
associate-+l-79.0%
associate-*l*79.0%
associate-*l*79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in b around inf 32.8%
*-commutative32.8%
Simplified32.8%
Final simplification32.8%
(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 2024087
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))