
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* c_m (* z t))))
(*
c_s
(if (<= c_m 5.2e+16)
(/ (+ (- (* x (* 9.0 y)) (* (* z 4.0) (* t a))) b) (* c_m z))
(if (<= c_m 5.4e+102)
(* t (+ (* -4.0 (/ a c_m)) (+ (* 9.0 (/ (* x y) t_1)) (/ b t_1))))
(if (<= c_m 6.2e+132)
(/
(+
(* -4.0 (/ (* a (* z t)) c_m))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(*
(- a)
(fma
4.0
(/ t c_m)
(/ (fma 9.0 (/ (* x (/ y c_m)) z) (/ b (* c_m z))) (- a))))))))))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 = c_m * (z * t);
double tmp;
if (c_m <= 5.2e+16) {
tmp = (((x * (9.0 * y)) - ((z * 4.0) * (t * a))) + b) / (c_m * z);
} else if (c_m <= 5.4e+102) {
tmp = t * ((-4.0 * (a / c_m)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
} else if (c_m <= 6.2e+132) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else {
tmp = -a * fma(4.0, (t / c_m), (fma(9.0, ((x * (y / c_m)) / z), (b / (c_m * z))) / -a));
}
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(c_m * Float64(z * t)) tmp = 0.0 if (c_m <= 5.2e+16) tmp = Float64(Float64(Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(c_m * z)); elseif (c_m <= 5.4e+102) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / t_1)) + Float64(b / t_1)))); elseif (c_m <= 6.2e+132) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); else tmp = Float64(Float64(-a) * fma(4.0, Float64(t / c_m), Float64(fma(9.0, Float64(Float64(x * Float64(y / c_m)) / z), Float64(b / Float64(c_m * z))) / Float64(-a)))); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(c$95$m * N[(z * t), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[c$95$m, 5.2e+16], N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c$95$m, 5.4e+102], N[(t * N[(N[(-4.0 * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c$95$m, 6.2e+132], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[((-a) * N[(4.0 * N[(t / c$95$m), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := c\_m \cdot \left(z \cdot t\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 5.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{c\_m \cdot z}\\
\mathbf{elif}\;c\_m \leq 5.4 \cdot 10^{+102}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c\_m} + \left(9 \cdot \frac{x \cdot y}{t\_1} + \frac{b}{t\_1}\right)\right)\\
\mathbf{elif}\;c\_m \leq 6.2 \cdot 10^{+132}:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c\_m} + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(4, \frac{t}{c\_m}, \frac{\mathsf{fma}\left(9, \frac{x \cdot \frac{y}{c\_m}}{z}, \frac{b}{c\_m \cdot z}\right)}{-a}\right)\\
\end{array}
\end{array}
\end{array}
if c < 5.2e16Initial program 82.9%
+-commutative82.9%
associate-+r-82.9%
*-commutative82.9%
associate-*r*85.5%
*-commutative85.5%
associate-+r-85.5%
+-commutative85.5%
associate-*l*85.5%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
if 5.2e16 < c < 5.4000000000000002e102Initial program 75.9%
+-commutative75.9%
associate-+r-75.9%
*-commutative75.9%
associate-*r*80.7%
*-commutative80.7%
associate-+r-80.7%
+-commutative80.7%
associate-*l*80.7%
associate-*l*80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in t around inf 94.9%
if 5.4000000000000002e102 < c < 6.1999999999999995e132Initial program 73.3%
+-commutative73.3%
associate-+r-73.3%
*-commutative73.3%
associate-*r*73.3%
*-commutative73.3%
associate-+r-73.3%
+-commutative73.3%
associate-*l*73.1%
associate-*l*73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in z around 0 86.8%
if 6.1999999999999995e132 < c Initial program 56.5%
+-commutative56.5%
associate-+r-56.5%
*-commutative56.5%
associate-*r*56.0%
*-commutative56.0%
associate-+r-56.0%
+-commutative56.0%
associate-*l*56.0%
associate-*l*51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in a around -inf 68.3%
mul-1-neg68.3%
*-commutative68.3%
distribute-rgt-neg-in68.3%
Simplified75.5%
Final simplification84.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* c_m (* z t))))
(*
c_s
(if (<= z -5e+14)
(* t (+ (* -4.0 (/ a c_m)) (+ (* 9.0 (/ (* x y) t_1)) (/ b t_1))))
(if (<= z 1.65e+133)
(/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* c_m z))
(/ (+ (* (* t a) -4.0) (/ b z)) c_m))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = c_m * (z * t);
double tmp;
if (z <= -5e+14) {
tmp = t * ((-4.0 * (a / c_m)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
} else if (z <= 1.65e+133) {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (c_m * z);
} else {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(c_m * Float64(z * t)) tmp = 0.0 if (z <= -5e+14) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / t_1)) + Float64(b / t_1)))); elseif (z <= 1.65e+133) tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) / c_m); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(c$95$m * N[(z * t), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -5e+14], N[(t * N[(N[(-4.0 * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+133], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := c\_m \cdot \left(z \cdot t\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+14}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c\_m} + \left(9 \cdot \frac{x \cdot y}{t\_1} + \frac{b}{t\_1}\right)\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+133}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4 + \frac{b}{z}}{c\_m}\\
\end{array}
\end{array}
\end{array}
if z < -5e14Initial program 59.7%
+-commutative59.7%
associate-+r-59.7%
*-commutative59.7%
associate-*r*57.7%
*-commutative57.7%
associate-+r-57.7%
+-commutative57.7%
associate-*l*57.7%
associate-*l*64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in t around inf 78.9%
if -5e14 < z < 1.65e133Initial program 92.6%
Simplified94.2%
if 1.65e133 < z Initial program 55.1%
+-commutative55.1%
associate-+r-55.1%
*-commutative55.1%
associate-*r*66.0%
*-commutative66.0%
associate-+r-66.0%
+-commutative66.0%
associate-*l*66.0%
associate-*l*70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in x around 0 55.1%
Taylor expanded in a around inf 73.4%
Taylor expanded in c around 0 86.4%
Taylor expanded in a around 0 86.5%
Final simplification89.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* c_m (* z t))))
(*
c_s
(if (<= z -2.4e+15)
(* t (+ (* -4.0 (/ a c_m)) (+ (* 9.0 (/ (* x y) t_1)) (/ b t_1))))
(if (<= z 1.75e+96)
(/ (+ b (- (* y (* x 9.0)) (* a (* (* z 4.0) t)))) (* c_m z))
(/ (+ (* (* t a) -4.0) (/ b z)) c_m))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = c_m * (z * t);
double tmp;
if (z <= -2.4e+15) {
tmp = t * ((-4.0 * (a / c_m)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
} else if (z <= 1.75e+96) {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
} else {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 = c_m * (z * t)
if (z <= (-2.4d+15)) then
tmp = t * (((-4.0d0) * (a / c_m)) + ((9.0d0 * ((x * y) / t_1)) + (b / t_1)))
else if (z <= 1.75d+96) then
tmp = (b + ((y * (x * 9.0d0)) - (a * ((z * 4.0d0) * t)))) / (c_m * z)
else
tmp = (((t * a) * (-4.0d0)) + (b / z)) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 = c_m * (z * t);
double tmp;
if (z <= -2.4e+15) {
tmp = t * ((-4.0 * (a / c_m)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
} else if (z <= 1.75e+96) {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
} else {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = c_m * (z * t) tmp = 0 if z <= -2.4e+15: tmp = t * ((-4.0 * (a / c_m)) + ((9.0 * ((x * y) / t_1)) + (b / t_1))) elif z <= 1.75e+96: tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z) else: tmp = (((t * a) * -4.0) + (b / z)) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(c_m * Float64(z * t)) tmp = 0.0 if (z <= -2.4e+15) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / t_1)) + Float64(b / t_1)))); elseif (z <= 1.75e+96) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(Float64(z * 4.0) * t)))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = c_m * (z * t);
tmp = 0.0;
if (z <= -2.4e+15)
tmp = t * ((-4.0 * (a / c_m)) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
elseif (z <= 1.75e+96)
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
else
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(c$95$m * N[(z * t), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -2.4e+15], N[(t * N[(N[(-4.0 * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+96], 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[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := c\_m \cdot \left(z \cdot t\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+15}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c\_m} + \left(9 \cdot \frac{x \cdot y}{t\_1} + \frac{b}{t\_1}\right)\right)\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+96}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4 + \frac{b}{z}}{c\_m}\\
\end{array}
\end{array}
\end{array}
if z < -2.4e15Initial program 59.7%
+-commutative59.7%
associate-+r-59.7%
*-commutative59.7%
associate-*r*57.7%
*-commutative57.7%
associate-+r-57.7%
+-commutative57.7%
associate-*l*57.7%
associate-*l*64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in t around inf 78.9%
if -2.4e15 < z < 1.7499999999999999e96Initial program 94.3%
if 1.7499999999999999e96 < z Initial program 55.4%
+-commutative55.4%
associate-+r-55.4%
*-commutative55.4%
associate-*r*64.9%
*-commutative64.9%
associate-+r-64.9%
+-commutative64.9%
associate-*l*64.9%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x around 0 50.0%
Taylor expanded in a around inf 71.0%
Taylor expanded in c around 0 82.6%
Taylor expanded in a around 0 82.7%
Final simplification88.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (* (* t a) -4.0) (/ b z)) c_m))
(t_2 (* 9.0 (* x (/ (/ y c_m) z)))))
(*
c_s
(if (<= y -1.7e+47)
t_2
(if (<= y -3.5e-52)
t_1
(if (<= y -2.6e-80)
(* 9.0 (* (/ x c_m) (/ y z)))
(if (<= y 2.3e+224) t_1 t_2)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (((t * a) * -4.0) + (b / z)) / c_m;
double t_2 = 9.0 * (x * ((y / c_m) / z));
double tmp;
if (y <= -1.7e+47) {
tmp = t_2;
} else if (y <= -3.5e-52) {
tmp = t_1;
} else if (y <= -2.6e-80) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else if (y <= 2.3e+224) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (((t * a) * (-4.0d0)) + (b / z)) / c_m
t_2 = 9.0d0 * (x * ((y / c_m) / z))
if (y <= (-1.7d+47)) then
tmp = t_2
else if (y <= (-3.5d-52)) then
tmp = t_1
else if (y <= (-2.6d-80)) then
tmp = 9.0d0 * ((x / c_m) * (y / z))
else if (y <= 2.3d+224) then
tmp = t_1
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (((t * a) * -4.0) + (b / z)) / c_m;
double t_2 = 9.0 * (x * ((y / c_m) / z));
double tmp;
if (y <= -1.7e+47) {
tmp = t_2;
} else if (y <= -3.5e-52) {
tmp = t_1;
} else if (y <= -2.6e-80) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else if (y <= 2.3e+224) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (((t * a) * -4.0) + (b / z)) / c_m t_2 = 9.0 * (x * ((y / c_m) / z)) tmp = 0 if y <= -1.7e+47: tmp = t_2 elif y <= -3.5e-52: tmp = t_1 elif y <= -2.6e-80: tmp = 9.0 * ((x / c_m) * (y / z)) elif y <= 2.3e+224: tmp = t_1 else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) / c_m) t_2 = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))) tmp = 0.0 if (y <= -1.7e+47) tmp = t_2; elseif (y <= -3.5e-52) tmp = t_1; elseif (y <= -2.6e-80) tmp = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))); elseif (y <= 2.3e+224) tmp = t_1; else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (((t * a) * -4.0) + (b / z)) / c_m;
t_2 = 9.0 * (x * ((y / c_m) / z));
tmp = 0.0;
if (y <= -1.7e+47)
tmp = t_2;
elseif (y <= -3.5e-52)
tmp = t_1;
elseif (y <= -2.6e-80)
tmp = 9.0 * ((x / c_m) * (y / z));
elseif (y <= 2.3e+224)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -1.7e+47], t$95$2, If[LessEqual[y, -3.5e-52], t$95$1, If[LessEqual[y, -2.6e-80], N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+224], t$95$1, t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{\left(t \cdot a\right) \cdot -4 + \frac{b}{z}}{c\_m}\\
t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-80}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -1.6999999999999999e47 or 2.3000000000000002e224 < y Initial program 79.0%
+-commutative79.0%
associate-+r-79.0%
*-commutative79.0%
associate-*r*79.1%
*-commutative79.1%
associate-+r-79.1%
+-commutative79.1%
associate-*l*79.1%
associate-*l*77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in x around inf 52.1%
associate-/l*56.9%
associate-/r*60.6%
Simplified60.6%
if -1.6999999999999999e47 < y < -3.5e-52 or -2.6000000000000001e-80 < y < 2.3000000000000002e224Initial program 78.9%
+-commutative78.9%
associate-+r-78.9%
*-commutative78.9%
associate-*r*82.4%
*-commutative82.4%
associate-+r-82.4%
+-commutative82.4%
associate-*l*82.4%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in x around 0 64.9%
Taylor expanded in a around inf 69.2%
Taylor expanded in c around 0 72.2%
Taylor expanded in a around 0 77.8%
if -3.5e-52 < y < -2.6000000000000001e-80Initial program 68.0%
+-commutative68.0%
associate-+r-68.0%
*-commutative68.0%
associate-*r*68.0%
*-commutative68.0%
associate-+r-68.0%
+-commutative68.0%
associate-*l*68.2%
associate-*l*68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in x around inf 35.1%
associate-/l*35.5%
associate-/r*35.5%
Simplified35.5%
Taylor expanded in x around 0 35.1%
times-frac35.9%
Simplified35.9%
Final simplification71.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ (/ y c_m) z)))))
(*
c_s
(if (<= a -3.4e-206)
(* -4.0 (/ (* t a) c_m))
(if (<= a 6e-258)
t_1
(if (<= a 1.75e-90)
(* b (/ 1.0 (* c_m z)))
(if (<= a 8.5e+41) t_1 (* -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 t_1 = 9.0 * (x * ((y / c_m) / z));
double tmp;
if (a <= -3.4e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 6e-258) {
tmp = t_1;
} else if (a <= 1.75e-90) {
tmp = b * (1.0 / (c_m * z));
} else if (a <= 8.5e+41) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (x * ((y / c_m) / z))
if (a <= (-3.4d-206)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (a <= 6d-258) then
tmp = t_1
else if (a <= 1.75d-90) then
tmp = b * (1.0d0 / (c_m * z))
else if (a <= 8.5d+41) then
tmp = t_1
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 t_1 = 9.0 * (x * ((y / c_m) / z));
double tmp;
if (a <= -3.4e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 6e-258) {
tmp = t_1;
} else if (a <= 1.75e-90) {
tmp = b * (1.0 / (c_m * z));
} else if (a <= 8.5e+41) {
tmp = t_1;
} 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): t_1 = 9.0 * (x * ((y / c_m) / z)) tmp = 0 if a <= -3.4e-206: tmp = -4.0 * ((t * a) / c_m) elif a <= 6e-258: tmp = t_1 elif a <= 1.75e-90: tmp = b * (1.0 / (c_m * z)) elif a <= 8.5e+41: tmp = t_1 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) t_1 = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))) tmp = 0.0 if (a <= -3.4e-206) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (a <= 6e-258) tmp = t_1; elseif (a <= 1.75e-90) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (a <= 8.5e+41) tmp = t_1; 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)
t_1 = 9.0 * (x * ((y / c_m) / z));
tmp = 0.0;
if (a <= -3.4e-206)
tmp = -4.0 * ((t * a) / c_m);
elseif (a <= 6e-258)
tmp = t_1;
elseif (a <= 1.75e-90)
tmp = b * (1.0 / (c_m * z));
elseif (a <= 8.5e+41)
tmp = t_1;
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_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -3.4e-206], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-258], t$95$1, If[LessEqual[a, 1.75e-90], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+41], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-206}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-90}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
\end{array}
if a < -3.39999999999999985e-206Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*74.4%
*-commutative74.4%
associate-+r-74.4%
+-commutative74.4%
associate-*l*74.4%
associate-*l*72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 50.2%
*-commutative50.2%
Simplified50.2%
if -3.39999999999999985e-206 < a < 6.00000000000000042e-258 or 1.7499999999999999e-90 < a < 8.49999999999999938e41Initial program 83.0%
+-commutative83.0%
associate-+r-83.0%
*-commutative83.0%
associate-*r*88.1%
*-commutative88.1%
associate-+r-88.1%
+-commutative88.1%
associate-*l*88.1%
associate-*l*88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in x around inf 54.5%
associate-/l*51.2%
associate-/r*52.7%
Simplified52.7%
if 6.00000000000000042e-258 < a < 1.7499999999999999e-90Initial program 82.9%
+-commutative82.9%
associate-+r-82.9%
*-commutative82.9%
associate-*r*97.1%
*-commutative97.1%
associate-+r-97.1%
+-commutative97.1%
associate-*l*97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around inf 60.2%
*-commutative60.2%
Simplified60.2%
div-inv60.2%
Applied egg-rr60.2%
if 8.49999999999999938e41 < a Initial program 80.1%
+-commutative80.1%
associate-+r-80.1%
*-commutative80.1%
associate-*r*76.3%
*-commutative76.3%
associate-+r-76.3%
+-commutative76.3%
associate-*l*76.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in z around 0 73.9%
Taylor expanded in a around inf 55.6%
*-commutative55.6%
associate-/l*64.2%
Simplified64.2%
Final simplification55.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= a -7.5e-206)
(* -4.0 (/ (* t a) c_m))
(if (<= a 6.2e-258)
(* 9.0 (* x (/ (/ y c_m) z)))
(if (<= a 2e-90)
(* b (/ 1.0 (* c_m z)))
(if (<= a 2.6e+35)
(* 9.0 (* (/ x c_m) (/ y 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 <= -7.5e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 6.2e-258) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (a <= 2e-90) {
tmp = b * (1.0 / (c_m * z));
} else if (a <= 2.6e+35) {
tmp = 9.0 * ((x / c_m) * (y / 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 <= (-7.5d-206)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (a <= 6.2d-258) then
tmp = 9.0d0 * (x * ((y / c_m) / z))
else if (a <= 2d-90) then
tmp = b * (1.0d0 / (c_m * z))
else if (a <= 2.6d+35) then
tmp = 9.0d0 * ((x / c_m) * (y / 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 <= -7.5e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 6.2e-258) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (a <= 2e-90) {
tmp = b * (1.0 / (c_m * z));
} else if (a <= 2.6e+35) {
tmp = 9.0 * ((x / c_m) * (y / 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 <= -7.5e-206: tmp = -4.0 * ((t * a) / c_m) elif a <= 6.2e-258: tmp = 9.0 * (x * ((y / c_m) / z)) elif a <= 2e-90: tmp = b * (1.0 / (c_m * z)) elif a <= 2.6e+35: tmp = 9.0 * ((x / c_m) * (y / 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 <= -7.5e-206) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (a <= 6.2e-258) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); elseif (a <= 2e-90) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (a <= 2.6e+35) tmp = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / 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 <= -7.5e-206)
tmp = -4.0 * ((t * a) / c_m);
elseif (a <= 6.2e-258)
tmp = 9.0 * (x * ((y / c_m) / z));
elseif (a <= 2e-90)
tmp = b * (1.0 / (c_m * z));
elseif (a <= 2.6e+35)
tmp = 9.0 * ((x / c_m) * (y / 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, -7.5e-206], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e-258], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-90], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e+35], N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-206}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-258}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-90}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+35}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c\_m} \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if a < -7.5e-206Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*74.4%
*-commutative74.4%
associate-+r-74.4%
+-commutative74.4%
associate-*l*74.4%
associate-*l*72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 50.2%
*-commutative50.2%
Simplified50.2%
if -7.5e-206 < a < 6.19999999999999997e-258Initial program 84.0%
+-commutative84.0%
associate-+r-84.0%
*-commutative84.0%
associate-*r*93.6%
*-commutative93.6%
associate-+r-93.6%
+-commutative93.6%
associate-*l*93.6%
associate-*l*93.6%
*-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 61.3%
associate-/l*55.1%
associate-/r*58.3%
Simplified58.3%
if 6.19999999999999997e-258 < a < 1.99999999999999999e-90Initial program 82.9%
+-commutative82.9%
associate-+r-82.9%
*-commutative82.9%
associate-*r*97.1%
*-commutative97.1%
associate-+r-97.1%
+-commutative97.1%
associate-*l*97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around inf 60.2%
*-commutative60.2%
Simplified60.2%
div-inv60.2%
Applied egg-rr60.2%
if 1.99999999999999999e-90 < a < 2.60000000000000007e35Initial program 81.3%
+-commutative81.3%
associate-+r-81.3%
*-commutative81.3%
associate-*r*81.3%
*-commutative81.3%
associate-+r-81.3%
+-commutative81.3%
associate-*l*81.3%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in x around inf 44.9%
associate-/l*44.8%
associate-/r*44.6%
Simplified44.6%
Taylor expanded in x around 0 44.9%
times-frac40.8%
Simplified40.8%
if 2.60000000000000007e35 < a Initial program 80.4%
+-commutative80.4%
associate-+r-80.4%
*-commutative80.4%
associate-*r*76.7%
*-commutative76.7%
associate-+r-76.7%
+-commutative76.7%
associate-*l*76.7%
associate-*l*76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around 0 74.4%
Taylor expanded in a around inf 54.6%
*-commutative54.6%
associate-/l*63.0%
Simplified63.0%
Final simplification54.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= a -4.9e-206)
(* -4.0 (/ (* t a) c_m))
(if (<= a 9.5e-258)
(* 9.0 (* x (/ (/ y c_m) z)))
(if (<= a 3.6e-90)
(* b (/ 1.0 (* c_m z)))
(if (<= a 1.05e+39)
(* 9.0 (/ (* x (/ y c_m)) z))
(* -4.0 (* t (/ a c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (a <= -4.9e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 9.5e-258) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (a <= 3.6e-90) {
tmp = b * (1.0 / (c_m * z));
} else if (a <= 1.05e+39) {
tmp = 9.0 * ((x * (y / c_m)) / z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (a <= (-4.9d-206)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (a <= 9.5d-258) then
tmp = 9.0d0 * (x * ((y / c_m) / z))
else if (a <= 3.6d-90) then
tmp = b * (1.0d0 / (c_m * z))
else if (a <= 1.05d+39) then
tmp = 9.0d0 * ((x * (y / c_m)) / z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (a <= -4.9e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 9.5e-258) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (a <= 3.6e-90) {
tmp = b * (1.0 / (c_m * z));
} else if (a <= 1.05e+39) {
tmp = 9.0 * ((x * (y / c_m)) / z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if a <= -4.9e-206: tmp = -4.0 * ((t * a) / c_m) elif a <= 9.5e-258: tmp = 9.0 * (x * ((y / c_m) / z)) elif a <= 3.6e-90: tmp = b * (1.0 / (c_m * z)) elif a <= 1.05e+39: tmp = 9.0 * ((x * (y / c_m)) / z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (a <= -4.9e-206) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (a <= 9.5e-258) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); elseif (a <= 3.6e-90) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (a <= 1.05e+39) tmp = Float64(9.0 * Float64(Float64(x * Float64(y / 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 <= -4.9e-206)
tmp = -4.0 * ((t * a) / c_m);
elseif (a <= 9.5e-258)
tmp = 9.0 * (x * ((y / c_m) / z));
elseif (a <= 3.6e-90)
tmp = b * (1.0 / (c_m * z));
elseif (a <= 1.05e+39)
tmp = 9.0 * ((x * (y / c_m)) / z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[a, -4.9e-206], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e-258], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-90], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e+39], N[(9.0 * N[(N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision] / 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 -4.9 \cdot 10^{-206}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-258}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-90}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+39}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if a < -4.9e-206Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*74.4%
*-commutative74.4%
associate-+r-74.4%
+-commutative74.4%
associate-*l*74.4%
associate-*l*72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 50.2%
*-commutative50.2%
Simplified50.2%
if -4.9e-206 < a < 9.5000000000000009e-258Initial program 84.0%
+-commutative84.0%
associate-+r-84.0%
*-commutative84.0%
associate-*r*93.6%
*-commutative93.6%
associate-+r-93.6%
+-commutative93.6%
associate-*l*93.6%
associate-*l*93.6%
*-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 61.3%
associate-/l*55.1%
associate-/r*58.3%
Simplified58.3%
if 9.5000000000000009e-258 < a < 3.59999999999999981e-90Initial program 82.9%
+-commutative82.9%
associate-+r-82.9%
*-commutative82.9%
associate-*r*97.1%
*-commutative97.1%
associate-+r-97.1%
+-commutative97.1%
associate-*l*97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around inf 60.2%
*-commutative60.2%
Simplified60.2%
div-inv60.2%
Applied egg-rr60.2%
if 3.59999999999999981e-90 < a < 1.0499999999999999e39Initial program 82.0%
+-commutative82.0%
associate-+r-82.0%
*-commutative82.0%
associate-*r*82.0%
*-commutative82.0%
associate-+r-82.0%
+-commutative82.0%
associate-*l*82.0%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in x around inf 46.9%
associate-/r*47.0%
associate-/l*46.9%
Simplified46.9%
if 1.0499999999999999e39 < a Initial program 80.1%
+-commutative80.1%
associate-+r-80.1%
*-commutative80.1%
associate-*r*76.3%
*-commutative76.3%
associate-+r-76.3%
+-commutative76.3%
associate-*l*76.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in z around 0 73.9%
Taylor expanded in a around inf 55.6%
*-commutative55.6%
associate-/l*64.2%
Simplified64.2%
Final simplification55.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -8e+106) (not (<= z 2.6e+102)))
(/ (+ (* (* t a) -4.0) (/ b z)) c_m)
(/ (+ (- (* x (* 9.0 y)) (* (* z 4.0) (* t a))) 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 <= -8e+106) || !(z <= 2.6e+102)) {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
} else {
tmp = (((x * (9.0 * y)) - ((z * 4.0) * (t * a))) + 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 <= (-8d+106)) .or. (.not. (z <= 2.6d+102))) then
tmp = (((t * a) * (-4.0d0)) + (b / z)) / c_m
else
tmp = (((x * (9.0d0 * y)) - ((z * 4.0d0) * (t * a))) + 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 <= -8e+106) || !(z <= 2.6e+102)) {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
} else {
tmp = (((x * (9.0 * y)) - ((z * 4.0) * (t * a))) + 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 <= -8e+106) or not (z <= 2.6e+102): tmp = (((t * a) * -4.0) + (b / z)) / c_m else: tmp = (((x * (9.0 * y)) - ((z * 4.0) * (t * a))) + 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 <= -8e+106) || !(z <= 2.6e+102)) tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) / c_m); else tmp = Float64(Float64(Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a))) + 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 <= -8e+106) || ~((z <= 2.6e+102)))
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
else
tmp = (((x * (9.0 * y)) - ((z * 4.0) * (t * a))) + 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, -8e+106], N[Not[LessEqual[z, 2.6e+102]], $MachinePrecision]], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $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 -8 \cdot 10^{+106} \lor \neg \left(z \leq 2.6 \cdot 10^{+102}\right):\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4 + \frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -8.00000000000000073e106 or 2.60000000000000006e102 < z Initial program 54.7%
+-commutative54.7%
associate-+r-54.7%
*-commutative54.7%
associate-*r*58.6%
*-commutative58.6%
associate-+r-58.6%
+-commutative58.6%
associate-*l*58.6%
associate-*l*65.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in x around 0 47.6%
Taylor expanded in a around inf 68.7%
Taylor expanded in c around 0 80.0%
Taylor expanded in a around 0 83.1%
if -8.00000000000000073e106 < z < 2.60000000000000006e102Initial program 92.0%
+-commutative92.0%
associate-+r-92.0%
*-commutative92.0%
associate-*r*93.4%
*-commutative93.4%
associate-+r-93.4%
+-commutative93.4%
associate-*l*93.4%
associate-*l*88.7%
*-commutative88.7%
Simplified88.7%
Final simplification86.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -7.5e+107) (not (<= z 1.95e+93)))
(/ (+ (* (* t a) -4.0) (/ 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 <= -7.5e+107) || !(z <= 1.95e+93)) {
tmp = (((t * a) * -4.0) + (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 <= (-7.5d+107)) .or. (.not. (z <= 1.95d+93))) then
tmp = (((t * a) * (-4.0d0)) + (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 <= -7.5e+107) || !(z <= 1.95e+93)) {
tmp = (((t * a) * -4.0) + (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 <= -7.5e+107) or not (z <= 1.95e+93): tmp = (((t * a) * -4.0) + (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 <= -7.5e+107) || !(z <= 1.95e+93)) tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + 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 <= -7.5e+107) || ~((z <= 1.95e+93)))
tmp = (((t * a) * -4.0) + (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, -7.5e+107], N[Not[LessEqual[z, 1.95e+93]], $MachinePrecision]], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $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 -7.5 \cdot 10^{+107} \lor \neg \left(z \leq 1.95 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4 + \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 < -7.4999999999999996e107 or 1.9500000000000001e93 < z Initial program 54.7%
+-commutative54.7%
associate-+r-54.7%
*-commutative54.7%
associate-*r*58.6%
*-commutative58.6%
associate-+r-58.6%
+-commutative58.6%
associate-*l*58.6%
associate-*l*65.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in x around 0 47.6%
Taylor expanded in a around inf 68.7%
Taylor expanded in c around 0 80.0%
Taylor expanded in a around 0 83.1%
if -7.4999999999999996e107 < z < 1.9500000000000001e93Initial program 92.0%
Final simplification88.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= y -1.08e-75)
(/ (+ b (* y (* x 9.0))) (* c_m z))
(if (<= y 4.5e+224)
(/ (+ (* (* t a) -4.0) (/ b z)) c_m)
(* 9.0 (* x (/ (/ y c_m) z)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (y <= -1.08e-75) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (y <= 4.5e+224) {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (y <= (-1.08d-75)) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else if (y <= 4.5d+224) then
tmp = (((t * a) * (-4.0d0)) + (b / z)) / c_m
else
tmp = 9.0d0 * (x * ((y / c_m) / z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (y <= -1.08e-75) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else if (y <= 4.5e+224) {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if y <= -1.08e-75: tmp = (b + (y * (x * 9.0))) / (c_m * z) elif y <= 4.5e+224: tmp = (((t * a) * -4.0) + (b / z)) / c_m else: tmp = 9.0 * (x * ((y / c_m) / z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (y <= -1.08e-75) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); elseif (y <= 4.5e+224) tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) / c_m); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / 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 (y <= -1.08e-75)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
elseif (y <= 4.5e+224)
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
else
tmp = 9.0 * (x * ((y / c_m) / z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[y, -1.08e-75], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+224], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{-75}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m \cdot z}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+224}:\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4 + \frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
if y < -1.08e-75Initial program 77.1%
+-commutative77.1%
associate-+r-77.1%
*-commutative77.1%
associate-*r*79.7%
*-commutative79.7%
associate-+r-79.7%
+-commutative79.7%
associate-*l*79.7%
associate-*l*78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in x around inf 55.5%
associate-*r*55.5%
Simplified55.5%
if -1.08e-75 < y < 4.4999999999999998e224Initial program 78.9%
+-commutative78.9%
associate-+r-78.9%
*-commutative78.9%
associate-*r*82.1%
*-commutative82.1%
associate-+r-82.1%
+-commutative82.1%
associate-*l*82.1%
associate-*l*82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in x around 0 64.9%
Taylor expanded in a around inf 67.7%
Taylor expanded in c around 0 70.4%
Taylor expanded in a around 0 76.5%
if 4.4999999999999998e224 < y Initial program 80.7%
+-commutative80.7%
associate-+r-80.7%
*-commutative80.7%
associate-*r*76.9%
*-commutative76.9%
associate-+r-76.9%
+-commutative76.9%
associate-*l*76.9%
associate-*l*73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in x around inf 70.0%
associate-/l*66.9%
associate-/r*74.4%
Simplified74.4%
Final simplification70.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= y -2.6e-80)
(/ (+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)) z)
(if (<= y 2.3e+224)
(/ (+ (* (* t a) -4.0) (/ b z)) c_m)
(* 9.0 (* x (/ (/ y c_m) z)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (y <= -2.6e-80) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if (y <= 2.3e+224) {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (y <= (-2.6d-80)) then
tmp = ((9.0d0 * ((x * y) / c_m)) + (b / c_m)) / z
else if (y <= 2.3d+224) then
tmp = (((t * a) * (-4.0d0)) + (b / z)) / c_m
else
tmp = 9.0d0 * (x * ((y / c_m) / z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (y <= -2.6e-80) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if (y <= 2.3e+224) {
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if y <= -2.6e-80: tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z elif y <= 2.3e+224: tmp = (((t * a) * -4.0) + (b / z)) / c_m else: tmp = 9.0 * (x * ((y / c_m) / z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (y <= -2.6e-80) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m)) / z); elseif (y <= 2.3e+224) tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) / c_m); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / 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 (y <= -2.6e-80)
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
elseif (y <= 2.3e+224)
tmp = (((t * a) * -4.0) + (b / z)) / c_m;
else
tmp = 9.0 * (x * ((y / c_m) / z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[y, -2.6e-80], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.3e+224], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-80}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}}{z}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+224}:\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4 + \frac{b}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
if y < -2.6000000000000001e-80Initial program 76.5%
+-commutative76.5%
associate-+r-76.5%
*-commutative76.5%
associate-*r*79.0%
*-commutative79.0%
associate-+r-79.0%
+-commutative79.0%
associate-*l*79.0%
associate-*l*77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in z around 0 76.3%
Taylor expanded in a around 0 56.5%
if -2.6000000000000001e-80 < y < 2.3000000000000002e224Initial program 79.3%
+-commutative79.3%
associate-+r-79.3%
*-commutative79.3%
associate-*r*82.5%
*-commutative82.5%
associate-+r-82.5%
+-commutative82.5%
associate-*l*82.5%
associate-*l*82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in x around 0 65.1%
Taylor expanded in a around inf 67.9%
Taylor expanded in c around 0 70.6%
Taylor expanded in a around 0 76.8%
if 2.3000000000000002e224 < y Initial program 80.7%
+-commutative80.7%
associate-+r-80.7%
*-commutative80.7%
associate-*r*76.9%
*-commutative76.9%
associate-+r-76.9%
+-commutative76.9%
associate-*l*76.9%
associate-*l*73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in x around inf 70.0%
associate-/l*66.9%
associate-/r*74.4%
Simplified74.4%
Final simplification70.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= a -7.5e-206) (not (<= a 2.85e+40)))
(* -4.0 (* t (/ a c_m)))
(/ b (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((a <= -7.5e-206) || !(a <= 2.85e+40)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 <= (-7.5d-206)) .or. (.not. (a <= 2.85d+40))) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = b / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 <= -7.5e-206) || !(a <= 2.85e+40)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (a <= -7.5e-206) or not (a <= 2.85e+40): tmp = -4.0 * (t * (a / c_m)) else: tmp = b / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((a <= -7.5e-206) || !(a <= 2.85e+40)) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(b / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((a <= -7.5e-206) || ~((a <= 2.85e+40)))
tmp = -4.0 * (t * (a / c_m));
else
tmp = b / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[a, -7.5e-206], N[Not[LessEqual[a, 2.85e+40]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-206} \lor \neg \left(a \leq 2.85 \cdot 10^{+40}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if a < -7.5e-206 or 2.8499999999999999e40 < a Initial program 76.1%
+-commutative76.1%
associate-+r-76.1%
*-commutative76.1%
associate-*r*75.0%
*-commutative75.0%
associate-+r-75.0%
+-commutative75.0%
associate-*l*75.0%
associate-*l*74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around 0 73.8%
Taylor expanded in a around inf 52.0%
*-commutative52.0%
associate-/l*55.8%
Simplified55.8%
if -7.5e-206 < a < 2.8499999999999999e40Initial program 83.0%
+-commutative83.0%
associate-+r-83.0%
*-commutative83.0%
associate-*r*91.5%
*-commutative91.5%
associate-+r-91.5%
+-commutative91.5%
associate-*l*91.4%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in b around inf 45.2%
*-commutative45.2%
Simplified45.2%
Final simplification52.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= a -7.5e-206) (not (<= a 1.15e+39)))
(* -4.0 (* t (/ a c_m)))
(* b (/ 1.0 (* c_m z))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((a <= -7.5e-206) || !(a <= 1.15e+39)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b * (1.0 / (c_m * z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((a <= (-7.5d-206)) .or. (.not. (a <= 1.15d+39))) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = b * (1.0d0 / (c_m * z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((a <= -7.5e-206) || !(a <= 1.15e+39)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b * (1.0 / (c_m * z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (a <= -7.5e-206) or not (a <= 1.15e+39): tmp = -4.0 * (t * (a / c_m)) else: tmp = b * (1.0 / (c_m * z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((a <= -7.5e-206) || !(a <= 1.15e+39)) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((a <= -7.5e-206) || ~((a <= 1.15e+39)))
tmp = -4.0 * (t * (a / c_m));
else
tmp = b * (1.0 / (c_m * z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[a, -7.5e-206], N[Not[LessEqual[a, 1.15e+39]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-206} \lor \neg \left(a \leq 1.15 \cdot 10^{+39}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\end{array}
\end{array}
if a < -7.5e-206 or 1.15000000000000006e39 < a Initial program 76.1%
+-commutative76.1%
associate-+r-76.1%
*-commutative76.1%
associate-*r*75.0%
*-commutative75.0%
associate-+r-75.0%
+-commutative75.0%
associate-*l*75.0%
associate-*l*74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around 0 73.8%
Taylor expanded in a around inf 52.0%
*-commutative52.0%
associate-/l*55.8%
Simplified55.8%
if -7.5e-206 < a < 1.15000000000000006e39Initial program 83.0%
+-commutative83.0%
associate-+r-83.0%
*-commutative83.0%
associate-*r*91.5%
*-commutative91.5%
associate-+r-91.5%
+-commutative91.5%
associate-*l*91.4%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in b around inf 45.2%
*-commutative45.2%
Simplified45.2%
div-inv45.1%
Applied egg-rr45.1%
Final simplification52.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= a -7.5e-206)
(* -4.0 (/ (* t a) c_m))
(if (<= a 1e+39) (* b (/ 1.0 (* c_m z))) (* -4.0 (* t (/ a c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (a <= -7.5e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 1e+39) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 <= (-7.5d-206)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (a <= 1d+39) then
tmp = b * (1.0d0 / (c_m * z))
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 <= -7.5e-206) {
tmp = -4.0 * ((t * a) / c_m);
} else if (a <= 1e+39) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if a <= -7.5e-206: tmp = -4.0 * ((t * a) / c_m) elif a <= 1e+39: tmp = b * (1.0 / (c_m * z)) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (a <= -7.5e-206) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (a <= 1e+39) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (a <= -7.5e-206)
tmp = -4.0 * ((t * a) / c_m);
elseif (a <= 1e+39)
tmp = b * (1.0 / (c_m * z));
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[a, -7.5e-206], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+39], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-206}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;a \leq 10^{+39}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if a < -7.5e-206Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*74.4%
*-commutative74.4%
associate-+r-74.4%
+-commutative74.4%
associate-*l*74.4%
associate-*l*72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 50.2%
*-commutative50.2%
Simplified50.2%
if -7.5e-206 < a < 9.9999999999999994e38Initial program 83.0%
+-commutative83.0%
associate-+r-83.0%
*-commutative83.0%
associate-*r*91.5%
*-commutative91.5%
associate-+r-91.5%
+-commutative91.5%
associate-*l*91.4%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in b around inf 45.2%
*-commutative45.2%
Simplified45.2%
div-inv45.1%
Applied egg-rr45.1%
if 9.9999999999999994e38 < a Initial program 80.1%
+-commutative80.1%
associate-+r-80.1%
*-commutative80.1%
associate-*r*76.3%
*-commutative76.3%
associate-+r-76.3%
+-commutative76.3%
associate-*l*76.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in z around 0 73.9%
Taylor expanded in a around inf 55.6%
*-commutative55.6%
associate-/l*64.2%
Simplified64.2%
Final simplification51.3%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 1 c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* 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 78.6%
+-commutative78.6%
associate-+r-78.6%
*-commutative78.6%
associate-*r*80.9%
*-commutative80.9%
associate-+r-80.9%
+-commutative80.9%
associate-*l*80.9%
associate-*l*80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in b around inf 34.3%
*-commutative34.3%
Simplified34.3%
Final simplification34.3%
(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 2024053
(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)))