
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma x (* 9.0 y) b) z)))
(if (<= z -3.65e+46)
(/ (+ t_1 (pow (cbrt (* (* t a) -4.0)) 3.0)) c)
(if (<= z 4.7e-82)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(/ (+ t_1 (* t (* a -4.0))) c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, (9.0 * y), b) / z;
double tmp;
if (z <= -3.65e+46) {
tmp = (t_1 + pow(cbrt(((t * a) * -4.0)), 3.0)) / c;
} else if (z <= 4.7e-82) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (t_1 + (t * (a * -4.0))) / c;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(fma(x, Float64(9.0 * y), b) / z) tmp = 0.0 if (z <= -3.65e+46) tmp = Float64(Float64(t_1 + (cbrt(Float64(Float64(t * a) * -4.0)) ^ 3.0)) / c); elseif (z <= 4.7e-82) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(t_1 + Float64(t * Float64(a * -4.0))) / c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -3.65e+46], N[(N[(t$95$1 + N[Power[N[Power[N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4.7e-82], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\\
\mathbf{if}\;z \leq -3.65 \cdot 10^{+46}:\\
\;\;\;\;\frac{t_1 + {\left(\sqrt[3]{\left(t \cdot a\right) \cdot -4}\right)}^{3}}{c}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-82}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + t \cdot \left(a \cdot -4\right)}{c}\\
\end{array}
\end{array}
if z < -3.65000000000000014e46Initial program 60.4%
associate-/r*75.4%
Simplified88.6%
add-cube-cbrt88.1%
pow388.2%
associate-*r*89.7%
Applied egg-rr89.7%
if -3.65000000000000014e46 < z < 4.7000000000000001e-82Initial program 95.7%
if 4.7000000000000001e-82 < z Initial program 63.8%
associate-/r*70.4%
Simplified83.9%
Final simplification90.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma x (* 9.0 y) b)) (t_2 (* t (* a -4.0))))
(if (<= z -6e-131)
(/ (+ t_2 (pow (/ z t_1) -1.0)) c)
(if (<= z 5e-81)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(/ (+ (/ t_1 z) t_2) c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, (9.0 * y), b);
double t_2 = t * (a * -4.0);
double tmp;
if (z <= -6e-131) {
tmp = (t_2 + pow((z / t_1), -1.0)) / c;
} else if (z <= 5e-81) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = ((t_1 / z) + t_2) / c;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(x, Float64(9.0 * y), b) t_2 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -6e-131) tmp = Float64(Float64(t_2 + (Float64(z / t_1) ^ -1.0)) / c); elseif (z <= 5e-81) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(Float64(t_1 / z) + t_2) / c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e-131], N[(N[(t$95$2 + N[Power[N[(z / t$95$1), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 5e-81], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 / z), $MachinePrecision] + t$95$2), $MachinePrecision] / c), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, 9 \cdot y, b\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{-131}:\\
\;\;\;\;\frac{t_2 + {\left(\frac{z}{t_1}\right)}^{-1}}{c}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-81}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_1}{z} + t_2}{c}\\
\end{array}
\end{array}
if z < -5.99999999999999992e-131Initial program 73.5%
associate-/r*83.1%
Simplified91.5%
clear-num91.6%
inv-pow91.6%
Applied egg-rr91.6%
if -5.99999999999999992e-131 < z < 4.99999999999999981e-81Initial program 95.3%
if 4.99999999999999981e-81 < z Initial program 63.8%
associate-/r*70.4%
Simplified83.9%
Final simplification90.5%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1e+50) (not (<= z 2.2e-81))) (/ (+ (/ (fma x (* 9.0 y) b) z) (* t (* a -4.0))) c) (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1e+50) || !(z <= 2.2e-81)) {
tmp = ((fma(x, (9.0 * y), b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1e+50) || !(z <= 2.2e-81)) tmp = Float64(Float64(Float64(fma(x, Float64(9.0 * y), b) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1e+50], N[Not[LessEqual[z, 2.2e-81]], $MachinePrecision]], N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+50} \lor \neg \left(z \leq 2.2 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.0000000000000001e50 or 2.1999999999999999e-81 < z Initial program 62.3%
associate-/r*72.5%
Simplified85.9%
if -1.0000000000000001e50 < z < 2.1999999999999999e-81Initial program 95.7%
Final simplification90.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* x 9.0) (* z (/ c y))))
(t_2 (* y (* x 9.0)))
(t_3 (* -4.0 (* t (/ a c)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-12)
(* (/ 9.0 z) (/ (* x y) c))
(if (<= t_2 -1e-319)
t_3
(if (<= t_2 2e-249)
(* b (/ (/ 1.0 z) c))
(if (<= t_2 1e-128)
(* -4.0 (* a (/ t c)))
(if (<= t_2 4.0)
(/ (/ b c) z)
(if (<= t_2 2e+110) t_3 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) / (z * (c / y));
double t_2 = y * (x * 9.0);
double t_3 = -4.0 * (t * (a / c));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-12) {
tmp = (9.0 / z) * ((x * y) / c);
} else if (t_2 <= -1e-319) {
tmp = t_3;
} else if (t_2 <= 2e-249) {
tmp = b * ((1.0 / z) / c);
} else if (t_2 <= 1e-128) {
tmp = -4.0 * (a * (t / c));
} else if (t_2 <= 4.0) {
tmp = (b / c) / z;
} else if (t_2 <= 2e+110) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) / (z * (c / y));
double t_2 = y * (x * 9.0);
double t_3 = -4.0 * (t * (a / c));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-12) {
tmp = (9.0 / z) * ((x * y) / c);
} else if (t_2 <= -1e-319) {
tmp = t_3;
} else if (t_2 <= 2e-249) {
tmp = b * ((1.0 / z) / c);
} else if (t_2 <= 1e-128) {
tmp = -4.0 * (a * (t / c));
} else if (t_2 <= 4.0) {
tmp = (b / c) / z;
} else if (t_2 <= 2e+110) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * 9.0) / (z * (c / y)) t_2 = y * (x * 9.0) t_3 = -4.0 * (t * (a / c)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-12: tmp = (9.0 / z) * ((x * y) / c) elif t_2 <= -1e-319: tmp = t_3 elif t_2 <= 2e-249: tmp = b * ((1.0 / z) / c) elif t_2 <= 1e-128: tmp = -4.0 * (a * (t / c)) elif t_2 <= 4.0: tmp = (b / c) / z elif t_2 <= 2e+110: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) / Float64(z * Float64(c / y))) t_2 = Float64(y * Float64(x * 9.0)) t_3 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-12) tmp = Float64(Float64(9.0 / z) * Float64(Float64(x * y) / c)); elseif (t_2 <= -1e-319) tmp = t_3; elseif (t_2 <= 2e-249) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (t_2 <= 1e-128) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); elseif (t_2 <= 4.0) tmp = Float64(Float64(b / c) / z); elseif (t_2 <= 2e+110) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * 9.0) / (z * (c / y)); t_2 = y * (x * 9.0); t_3 = -4.0 * (t * (a / c)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-12) tmp = (9.0 / z) * ((x * y) / c); elseif (t_2 <= -1e-319) tmp = t_3; elseif (t_2 <= 2e-249) tmp = b * ((1.0 / z) / c); elseif (t_2 <= 1e-128) tmp = -4.0 * (a * (t / c)); elseif (t_2 <= 4.0) tmp = (b / c) / z; elseif (t_2 <= 2e+110) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-12], N[(N[(9.0 / z), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-319], t$95$3, If[LessEqual[t$95$2, 2e-249], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-128], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4.0], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 2e+110], t$95$3, t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 9}{z \cdot \frac{c}{y}}\\
t_2 := y \cdot \left(x \cdot 9\right)\\
t_3 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-12}:\\
\;\;\;\;\frac{9}{z} \cdot \frac{x \cdot y}{c}\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-319}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-249}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;t_2 \leq 10^{-128}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;t_2 \leq 4:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+110}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 x 9) y) < -inf.0 or 2e110 < (*.f64 (*.f64 x 9) y) Initial program 74.7%
associate-/r*71.9%
Simplified70.3%
add-cube-cbrt70.3%
pow370.2%
associate-*r*70.2%
Applied egg-rr70.2%
Taylor expanded in x around inf 66.8%
times-frac81.1%
*-commutative81.1%
associate-*l*81.2%
Simplified81.2%
clear-num81.1%
associate-*l/81.1%
frac-times82.6%
*-un-lft-identity82.6%
Applied egg-rr82.6%
if -inf.0 < (*.f64 (*.f64 x 9) y) < -4.9999999999999997e-12Initial program 79.3%
associate-*l*79.2%
associate-*l*81.4%
Simplified81.4%
Taylor expanded in x around inf 50.5%
associate-*r/50.4%
*-commutative50.4%
*-commutative50.4%
Applied egg-rr50.4%
times-frac54.1%
Applied egg-rr54.1%
if -4.9999999999999997e-12 < (*.f64 (*.f64 x 9) y) < -9.99989e-320 or 4 < (*.f64 (*.f64 x 9) y) < 2e110Initial program 79.0%
associate-*l*79.0%
associate-*l*80.4%
Simplified80.4%
Taylor expanded in z around inf 59.3%
*-commutative59.3%
associate-/l*58.4%
associate-/r/64.3%
Simplified64.3%
if -9.99989e-320 < (*.f64 (*.f64 x 9) y) < 2.00000000000000011e-249Initial program 75.4%
associate-*l*75.4%
associate-*l*79.0%
Simplified79.0%
Taylor expanded in b around inf 60.5%
*-commutative60.5%
Simplified60.5%
div-inv60.4%
associate-/r*60.6%
Applied egg-rr60.6%
if 2.00000000000000011e-249 < (*.f64 (*.f64 x 9) y) < 1.00000000000000005e-128Initial program 81.3%
associate-*l*81.3%
associate-*l*81.3%
Simplified81.3%
Taylor expanded in z around inf 73.4%
*-commutative73.4%
associate-/l*74.5%
associate-/r/82.3%
Simplified82.3%
Taylor expanded in a around 0 73.4%
expm1-log1p-u18.6%
expm1-udef10.0%
associate-/l*10.0%
Applied egg-rr10.0%
expm1-def18.6%
expm1-log1p74.5%
associate-/l*73.4%
associate-*r/74.6%
Simplified74.6%
if 1.00000000000000005e-128 < (*.f64 (*.f64 x 9) y) < 4Initial program 83.8%
associate-/r*78.7%
Simplified83.9%
add-cube-cbrt83.8%
pow383.9%
associate-*r*83.9%
Applied egg-rr83.9%
Taylor expanded in b around inf 61.5%
associate-/r*61.7%
Simplified61.7%
Final simplification66.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* x 9.0) (* z (/ c y))))
(t_2 (* y (* x 9.0)))
(t_3 (* t (* a -4.0)))
(t_4 (/ (+ t_3 (/ 9.0 (/ z (* x y)))) c)))
(if (<= t_2 -1e+292)
t_1
(if (<= t_2 -5e-12)
t_4
(if (<= t_2 1e+54)
(/ (+ t_3 (/ b z)) c)
(if (<= t_2 1e+202) t_4 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) / (z * (c / y));
double t_2 = y * (x * 9.0);
double t_3 = t * (a * -4.0);
double t_4 = (t_3 + (9.0 / (z / (x * y)))) / c;
double tmp;
if (t_2 <= -1e+292) {
tmp = t_1;
} else if (t_2 <= -5e-12) {
tmp = t_4;
} else if (t_2 <= 1e+54) {
tmp = (t_3 + (b / z)) / c;
} else if (t_2 <= 1e+202) {
tmp = t_4;
} else {
tmp = t_1;
}
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) :: tmp
t_1 = (x * 9.0d0) / (z * (c / y))
t_2 = y * (x * 9.0d0)
t_3 = t * (a * (-4.0d0))
t_4 = (t_3 + (9.0d0 / (z / (x * y)))) / c
if (t_2 <= (-1d+292)) then
tmp = t_1
else if (t_2 <= (-5d-12)) then
tmp = t_4
else if (t_2 <= 1d+54) then
tmp = (t_3 + (b / z)) / c
else if (t_2 <= 1d+202) then
tmp = t_4
else
tmp = t_1
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 = (x * 9.0) / (z * (c / y));
double t_2 = y * (x * 9.0);
double t_3 = t * (a * -4.0);
double t_4 = (t_3 + (9.0 / (z / (x * y)))) / c;
double tmp;
if (t_2 <= -1e+292) {
tmp = t_1;
} else if (t_2 <= -5e-12) {
tmp = t_4;
} else if (t_2 <= 1e+54) {
tmp = (t_3 + (b / z)) / c;
} else if (t_2 <= 1e+202) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * 9.0) / (z * (c / y)) t_2 = y * (x * 9.0) t_3 = t * (a * -4.0) t_4 = (t_3 + (9.0 / (z / (x * y)))) / c tmp = 0 if t_2 <= -1e+292: tmp = t_1 elif t_2 <= -5e-12: tmp = t_4 elif t_2 <= 1e+54: tmp = (t_3 + (b / z)) / c elif t_2 <= 1e+202: tmp = t_4 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) / Float64(z * Float64(c / y))) t_2 = Float64(y * Float64(x * 9.0)) t_3 = Float64(t * Float64(a * -4.0)) t_4 = Float64(Float64(t_3 + Float64(9.0 / Float64(z / Float64(x * y)))) / c) tmp = 0.0 if (t_2 <= -1e+292) tmp = t_1; elseif (t_2 <= -5e-12) tmp = t_4; elseif (t_2 <= 1e+54) tmp = Float64(Float64(t_3 + Float64(b / z)) / c); elseif (t_2 <= 1e+202) tmp = t_4; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * 9.0) / (z * (c / y)); t_2 = y * (x * 9.0); t_3 = t * (a * -4.0); t_4 = (t_3 + (9.0 / (z / (x * y)))) / c; tmp = 0.0; if (t_2 <= -1e+292) tmp = t_1; elseif (t_2 <= -5e-12) tmp = t_4; elseif (t_2 <= 1e+54) tmp = (t_3 + (b / z)) / c; elseif (t_2 <= 1e+202) tmp = t_4; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(9.0 / N[(z / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+292], t$95$1, If[LessEqual[t$95$2, -5e-12], t$95$4, If[LessEqual[t$95$2, 1e+54], N[(N[(t$95$3 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 1e+202], t$95$4, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 9}{z \cdot \frac{c}{y}}\\
t_2 := y \cdot \left(x \cdot 9\right)\\
t_3 := t \cdot \left(a \cdot -4\right)\\
t_4 := \frac{t_3 + \frac{9}{\frac{z}{x \cdot y}}}{c}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+292}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-12}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_2 \leq 10^{+54}:\\
\;\;\;\;\frac{t_3 + \frac{b}{z}}{c}\\
\mathbf{elif}\;t_2 \leq 10^{+202}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 x 9) y) < -1e292 or 9.999999999999999e201 < (*.f64 (*.f64 x 9) y) Initial program 72.2%
associate-/r*69.0%
Simplified65.3%
add-cube-cbrt65.3%
pow365.3%
associate-*r*65.3%
Applied egg-rr65.3%
Taylor expanded in x around inf 70.4%
times-frac90.8%
*-commutative90.8%
associate-*l*90.9%
Simplified90.9%
clear-num90.8%
associate-*l/90.8%
frac-times90.7%
*-un-lft-identity90.7%
Applied egg-rr90.7%
if -1e292 < (*.f64 (*.f64 x 9) y) < -4.9999999999999997e-12 or 1.0000000000000001e54 < (*.f64 (*.f64 x 9) y) < 9.999999999999999e201Initial program 77.7%
associate-/r*76.5%
Simplified88.1%
Taylor expanded in x around inf 76.6%
associate-*r/76.6%
associate-/l*76.7%
Simplified76.7%
if -4.9999999999999997e-12 < (*.f64 (*.f64 x 9) y) < 1.0000000000000001e54Initial program 80.1%
associate-/r*81.9%
Simplified89.5%
Taylor expanded in x around 0 86.1%
associate-*r*85.4%
*-commutative85.4%
*-commutative85.4%
Simplified85.4%
Final simplification84.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c))))
(t_2 (/ (/ b c) z))
(t_3 (* 9.0 (* (/ x z) (/ y c)))))
(if (<= x -4.1e+114)
(* (/ 9.0 z) (/ (* x y) c))
(if (<= x -1.9e+71)
t_2
(if (<= x -4.3e+60)
t_3
(if (<= x -8.6e-26)
t_1
(if (<= x -4.5e-128)
(* b (/ (/ 1.0 z) c))
(if (<= x 8.5e-299)
(* -4.0 (/ a (/ c t)))
(if (<= x 2.05e-209) t_2 (if (<= x 8e-43) t_1 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double t_2 = (b / c) / z;
double t_3 = 9.0 * ((x / z) * (y / c));
double tmp;
if (x <= -4.1e+114) {
tmp = (9.0 / z) * ((x * y) / c);
} else if (x <= -1.9e+71) {
tmp = t_2;
} else if (x <= -4.3e+60) {
tmp = t_3;
} else if (x <= -8.6e-26) {
tmp = t_1;
} else if (x <= -4.5e-128) {
tmp = b * ((1.0 / z) / c);
} else if (x <= 8.5e-299) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 2.05e-209) {
tmp = t_2;
} else if (x <= 8e-43) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
t_2 = (b / c) / z
t_3 = 9.0d0 * ((x / z) * (y / c))
if (x <= (-4.1d+114)) then
tmp = (9.0d0 / z) * ((x * y) / c)
else if (x <= (-1.9d+71)) then
tmp = t_2
else if (x <= (-4.3d+60)) then
tmp = t_3
else if (x <= (-8.6d-26)) then
tmp = t_1
else if (x <= (-4.5d-128)) then
tmp = b * ((1.0d0 / z) / c)
else if (x <= 8.5d-299) then
tmp = (-4.0d0) * (a / (c / t))
else if (x <= 2.05d-209) then
tmp = t_2
else if (x <= 8d-43) then
tmp = t_1
else
tmp = t_3
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 = -4.0 * (t * (a / c));
double t_2 = (b / c) / z;
double t_3 = 9.0 * ((x / z) * (y / c));
double tmp;
if (x <= -4.1e+114) {
tmp = (9.0 / z) * ((x * y) / c);
} else if (x <= -1.9e+71) {
tmp = t_2;
} else if (x <= -4.3e+60) {
tmp = t_3;
} else if (x <= -8.6e-26) {
tmp = t_1;
} else if (x <= -4.5e-128) {
tmp = b * ((1.0 / z) / c);
} else if (x <= 8.5e-299) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 2.05e-209) {
tmp = t_2;
} else if (x <= 8e-43) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) t_2 = (b / c) / z t_3 = 9.0 * ((x / z) * (y / c)) tmp = 0 if x <= -4.1e+114: tmp = (9.0 / z) * ((x * y) / c) elif x <= -1.9e+71: tmp = t_2 elif x <= -4.3e+60: tmp = t_3 elif x <= -8.6e-26: tmp = t_1 elif x <= -4.5e-128: tmp = b * ((1.0 / z) / c) elif x <= 8.5e-299: tmp = -4.0 * (a / (c / t)) elif x <= 2.05e-209: tmp = t_2 elif x <= 8e-43: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) t_2 = Float64(Float64(b / c) / z) t_3 = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))) tmp = 0.0 if (x <= -4.1e+114) tmp = Float64(Float64(9.0 / z) * Float64(Float64(x * y) / c)); elseif (x <= -1.9e+71) tmp = t_2; elseif (x <= -4.3e+60) tmp = t_3; elseif (x <= -8.6e-26) tmp = t_1; elseif (x <= -4.5e-128) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (x <= 8.5e-299) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (x <= 2.05e-209) tmp = t_2; elseif (x <= 8e-43) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * (t * (a / c)); t_2 = (b / c) / z; t_3 = 9.0 * ((x / z) * (y / c)); tmp = 0.0; if (x <= -4.1e+114) tmp = (9.0 / z) * ((x * y) / c); elseif (x <= -1.9e+71) tmp = t_2; elseif (x <= -4.3e+60) tmp = t_3; elseif (x <= -8.6e-26) tmp = t_1; elseif (x <= -4.5e-128) tmp = b * ((1.0 / z) / c); elseif (x <= 8.5e-299) tmp = -4.0 * (a / (c / t)); elseif (x <= 2.05e-209) tmp = t_2; elseif (x <= 8e-43) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$3 = N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.1e+114], N[(N[(9.0 / z), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.9e+71], t$95$2, If[LessEqual[x, -4.3e+60], t$95$3, If[LessEqual[x, -8.6e-26], t$95$1, If[LessEqual[x, -4.5e-128], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e-299], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.05e-209], t$95$2, If[LessEqual[x, 8e-43], t$95$1, t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
t_2 := \frac{\frac{b}{c}}{z}\\
t_3 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{+114}:\\
\;\;\;\;\frac{9}{z} \cdot \frac{x \cdot y}{c}\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{+71}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{+60}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -8.6 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-128}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-299}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-209}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -4.1000000000000001e114Initial program 74.2%
associate-*l*74.1%
associate-*l*76.1%
Simplified76.1%
Taylor expanded in x around inf 61.4%
associate-*r/61.4%
*-commutative61.4%
*-commutative61.4%
Applied egg-rr61.4%
times-frac65.7%
Applied egg-rr65.7%
if -4.1000000000000001e114 < x < -1.9e71 or 8.5e-299 < x < 2.04999999999999989e-209Initial program 80.0%
associate-/r*76.4%
Simplified72.3%
add-cube-cbrt72.1%
pow372.1%
associate-*r*72.1%
Applied egg-rr72.1%
Taylor expanded in b around inf 55.1%
associate-/r*59.3%
Simplified59.3%
if -1.9e71 < x < -4.29999999999999971e60 or 8.00000000000000062e-43 < x Initial program 77.4%
associate-/r*77.6%
Simplified82.9%
add-cube-cbrt82.7%
pow382.7%
associate-*r*84.0%
Applied egg-rr84.0%
Taylor expanded in x around inf 46.0%
times-frac48.6%
Simplified48.6%
if -4.29999999999999971e60 < x < -8.59999999999999976e-26 or 2.04999999999999989e-209 < x < 8.00000000000000062e-43Initial program 76.7%
associate-*l*76.7%
associate-*l*79.0%
Simplified79.0%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*54.9%
associate-/r/60.6%
Simplified60.6%
if -8.59999999999999976e-26 < x < -4.4999999999999999e-128Initial program 82.1%
associate-*l*81.8%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in b around inf 45.2%
*-commutative45.2%
Simplified45.2%
div-inv45.2%
associate-/r*45.3%
Applied egg-rr45.3%
if -4.4999999999999999e-128 < x < 8.5e-299Initial program 80.6%
associate-*l*80.6%
associate-*l*81.9%
Simplified81.9%
Taylor expanded in z around inf 54.0%
*-commutative54.0%
associate-/l*57.8%
Simplified57.8%
Final simplification56.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* t (* a -4.0)) (/ b z))))
(if (<= z -2.2e+151)
(* (/ 1.0 c) t_1)
(if (<= z 2.8e+114)
(/ (+ b (- (* x (* 9.0 y)) (* (* t a) (* z 4.0)))) (* z c))
(/ t_1 c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (t * (a * -4.0)) + (b / z);
double tmp;
if (z <= -2.2e+151) {
tmp = (1.0 / c) * t_1;
} else if (z <= 2.8e+114) {
tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (z * c);
} else {
tmp = t_1 / c;
}
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) :: tmp
t_1 = (t * (a * (-4.0d0))) + (b / z)
if (z <= (-2.2d+151)) then
tmp = (1.0d0 / c) * t_1
else if (z <= 2.8d+114) then
tmp = (b + ((x * (9.0d0 * y)) - ((t * a) * (z * 4.0d0)))) / (z * c)
else
tmp = t_1 / c
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 = (t * (a * -4.0)) + (b / z);
double tmp;
if (z <= -2.2e+151) {
tmp = (1.0 / c) * t_1;
} else if (z <= 2.8e+114) {
tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (z * c);
} else {
tmp = t_1 / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (t * (a * -4.0)) + (b / z) tmp = 0 if z <= -2.2e+151: tmp = (1.0 / c) * t_1 elif z <= 2.8e+114: tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (z * c) else: tmp = t_1 / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) tmp = 0.0 if (z <= -2.2e+151) tmp = Float64(Float64(1.0 / c) * t_1); elseif (z <= 2.8e+114) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(t * a) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(t_1 / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (t * (a * -4.0)) + (b / z); tmp = 0.0; if (z <= -2.2e+151) tmp = (1.0 / c) * t_1; elseif (z <= 2.8e+114) tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (z * c); else tmp = t_1 / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+151], N[(N[(1.0 / c), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[z, 2.8e+114], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right) + \frac{b}{z}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+151}:\\
\;\;\;\;\frac{1}{c} \cdot t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+114}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(t \cdot a\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{c}\\
\end{array}
\end{array}
if z < -2.20000000000000007e151Initial program 46.1%
associate-/r*66.7%
Simplified86.8%
Taylor expanded in x around 0 83.3%
associate-*r*80.0%
*-commutative80.0%
*-commutative80.0%
Simplified80.0%
div-inv80.0%
associate-*r*83.3%
add-cube-cbrt82.9%
unpow382.8%
+-commutative82.8%
unpow382.9%
add-cube-cbrt83.3%
associate-*r*80.0%
Applied egg-rr80.0%
if -2.20000000000000007e151 < z < 2.8e114Initial program 89.4%
associate-*l*89.4%
associate-*l*88.1%
Simplified88.1%
if 2.8e114 < z Initial program 48.0%
associate-/r*60.3%
Simplified85.7%
Taylor expanded in x around 0 80.9%
associate-*r*80.9%
*-commutative80.9%
*-commutative80.9%
Simplified80.9%
Final simplification86.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* t (* a -4.0)) (/ b z))))
(if (<= z -2.15e+151)
(* (/ 1.0 c) t_1)
(if (<= z 1.4e+114)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(/ t_1 c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (t * (a * -4.0)) + (b / z);
double tmp;
if (z <= -2.15e+151) {
tmp = (1.0 / c) * t_1;
} else if (z <= 1.4e+114) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = t_1 / c;
}
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) :: tmp
t_1 = (t * (a * (-4.0d0))) + (b / z)
if (z <= (-2.15d+151)) then
tmp = (1.0d0 / c) * t_1
else if (z <= 1.4d+114) then
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = t_1 / c
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 = (t * (a * -4.0)) + (b / z);
double tmp;
if (z <= -2.15e+151) {
tmp = (1.0 / c) * t_1;
} else if (z <= 1.4e+114) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = t_1 / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (t * (a * -4.0)) + (b / z) tmp = 0 if z <= -2.15e+151: tmp = (1.0 / c) * t_1 elif z <= 1.4e+114: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = t_1 / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) tmp = 0.0 if (z <= -2.15e+151) tmp = Float64(Float64(1.0 / c) * t_1); elseif (z <= 1.4e+114) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(t_1 / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (t * (a * -4.0)) + (b / z); tmp = 0.0; if (z <= -2.15e+151) tmp = (1.0 / c) * t_1; elseif (z <= 1.4e+114) tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c); else tmp = t_1 / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e+151], N[(N[(1.0 / c), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[z, 1.4e+114], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right) + \frac{b}{z}\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+151}:\\
\;\;\;\;\frac{1}{c} \cdot t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+114}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{c}\\
\end{array}
\end{array}
if z < -2.14999999999999991e151Initial program 46.1%
associate-/r*66.7%
Simplified86.8%
Taylor expanded in x around 0 83.3%
associate-*r*80.0%
*-commutative80.0%
*-commutative80.0%
Simplified80.0%
div-inv80.0%
associate-*r*83.3%
add-cube-cbrt82.9%
unpow382.8%
+-commutative82.8%
unpow382.9%
add-cube-cbrt83.3%
associate-*r*80.0%
Applied egg-rr80.0%
if -2.14999999999999991e151 < z < 1.4e114Initial program 89.4%
if 1.4e114 < z Initial program 48.0%
associate-/r*60.3%
Simplified85.7%
Taylor expanded in x around 0 80.9%
associate-*r*80.9%
*-commutative80.9%
*-commutative80.9%
Simplified80.9%
Final simplification87.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.2e+45)
(* (/ 1.0 c) (/ (+ b (- (* x (* 9.0 y)) (* z (* (* t a) 4.0)))) z))
(if (<= z 1.35e+114)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(/ (+ (* t (* a -4.0)) (/ b z)) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.2e+45) {
tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - (z * ((t * a) * 4.0)))) / z);
} else if (z <= 1.35e+114) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
}
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) :: tmp
if (z <= (-2.2d+45)) then
tmp = (1.0d0 / c) * ((b + ((x * (9.0d0 * y)) - (z * ((t * a) * 4.0d0)))) / z)
else if (z <= 1.35d+114) then
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
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 tmp;
if (z <= -2.2e+45) {
tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - (z * ((t * a) * 4.0)))) / z);
} else if (z <= 1.35e+114) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.2e+45: tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - (z * ((t * a) * 4.0)))) / z) elif z <= 1.35e+114: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = ((t * (a * -4.0)) + (b / z)) / c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.2e+45) tmp = Float64(Float64(1.0 / c) * Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(z * Float64(Float64(t * a) * 4.0)))) / z)); elseif (z <= 1.35e+114) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= -2.2e+45) tmp = (1.0 / c) * ((b + ((x * (9.0 * y)) - (z * ((t * a) * 4.0)))) / z); elseif (z <= 1.35e+114) tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c); else tmp = ((t * (a * -4.0)) + (b / z)) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.2e+45], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(z * N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+114], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+45}:\\
\;\;\;\;\frac{1}{c} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) - z \cdot \left(\left(t \cdot a\right) \cdot 4\right)\right)}{z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+114}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if z < -2.2e45Initial program 60.4%
associate-*l*60.4%
associate-*l*67.0%
Simplified67.0%
*-un-lft-identity67.0%
*-commutative67.0%
times-frac82.2%
associate-*r*82.2%
associate-*r*75.4%
associate-*r*75.4%
associate-*r*82.2%
associate-*l*82.2%
Applied egg-rr82.2%
if -2.2e45 < z < 1.35e114Initial program 92.3%
if 1.35e114 < z Initial program 48.0%
associate-/r*60.3%
Simplified85.7%
Taylor expanded in x around 0 80.9%
associate-*r*80.9%
*-commutative80.9%
*-commutative80.9%
Simplified80.9%
Final simplification88.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))) (t_2 (* 9.0 (* (/ x z) (/ y c)))))
(if (<= x -7.8e+87)
t_2
(if (<= x -9e-26)
t_1
(if (<= x -1.78e-127)
(* b (/ (/ 1.0 z) c))
(if (<= x 9e-299)
(* -4.0 (/ a (/ c t)))
(if (<= x 1.4e-209) (/ (/ b c) z) (if (<= x 1.6e-41) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double t_2 = 9.0 * ((x / z) * (y / c));
double tmp;
if (x <= -7.8e+87) {
tmp = t_2;
} else if (x <= -9e-26) {
tmp = t_1;
} else if (x <= -1.78e-127) {
tmp = b * ((1.0 / z) / c);
} else if (x <= 9e-299) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 1.4e-209) {
tmp = (b / c) / z;
} else if (x <= 1.6e-41) {
tmp = t_1;
} else {
tmp = 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) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
t_2 = 9.0d0 * ((x / z) * (y / c))
if (x <= (-7.8d+87)) then
tmp = t_2
else if (x <= (-9d-26)) then
tmp = t_1
else if (x <= (-1.78d-127)) then
tmp = b * ((1.0d0 / z) / c)
else if (x <= 9d-299) then
tmp = (-4.0d0) * (a / (c / t))
else if (x <= 1.4d-209) then
tmp = (b / c) / z
else if (x <= 1.6d-41) then
tmp = t_1
else
tmp = 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 = -4.0 * (t * (a / c));
double t_2 = 9.0 * ((x / z) * (y / c));
double tmp;
if (x <= -7.8e+87) {
tmp = t_2;
} else if (x <= -9e-26) {
tmp = t_1;
} else if (x <= -1.78e-127) {
tmp = b * ((1.0 / z) / c);
} else if (x <= 9e-299) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 1.4e-209) {
tmp = (b / c) / z;
} else if (x <= 1.6e-41) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) t_2 = 9.0 * ((x / z) * (y / c)) tmp = 0 if x <= -7.8e+87: tmp = t_2 elif x <= -9e-26: tmp = t_1 elif x <= -1.78e-127: tmp = b * ((1.0 / z) / c) elif x <= 9e-299: tmp = -4.0 * (a / (c / t)) elif x <= 1.4e-209: tmp = (b / c) / z elif x <= 1.6e-41: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) t_2 = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))) tmp = 0.0 if (x <= -7.8e+87) tmp = t_2; elseif (x <= -9e-26) tmp = t_1; elseif (x <= -1.78e-127) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (x <= 9e-299) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (x <= 1.4e-209) tmp = Float64(Float64(b / c) / z); elseif (x <= 1.6e-41) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * (t * (a / c)); t_2 = 9.0 * ((x / z) * (y / c)); tmp = 0.0; if (x <= -7.8e+87) tmp = t_2; elseif (x <= -9e-26) tmp = t_1; elseif (x <= -1.78e-127) tmp = b * ((1.0 / z) / c); elseif (x <= 9e-299) tmp = -4.0 * (a / (c / t)); elseif (x <= 1.4e-209) tmp = (b / c) / z; elseif (x <= 1.6e-41) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.8e+87], t$95$2, If[LessEqual[x, -9e-26], t$95$1, If[LessEqual[x, -1.78e-127], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e-299], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-209], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 1.6e-41], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
t_2 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.78 \cdot 10^{-127}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-299}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-209}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -7.80000000000000039e87 or 1.60000000000000006e-41 < x Initial program 76.0%
associate-/r*74.0%
Simplified78.6%
add-cube-cbrt78.4%
pow378.4%
associate-*r*79.1%
Applied egg-rr79.1%
Taylor expanded in x around inf 48.4%
times-frac51.0%
Simplified51.0%
if -7.80000000000000039e87 < x < -8.9999999999999998e-26 or 1.40000000000000006e-209 < x < 1.60000000000000006e-41Initial program 78.9%
associate-*l*78.9%
associate-*l*81.0%
Simplified81.0%
Taylor expanded in z around inf 54.9%
*-commutative54.9%
associate-/l*51.7%
associate-/r/56.8%
Simplified56.8%
if -8.9999999999999998e-26 < x < -1.77999999999999992e-127Initial program 82.1%
associate-*l*81.8%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in b around inf 45.2%
*-commutative45.2%
Simplified45.2%
div-inv45.2%
associate-/r*45.3%
Applied egg-rr45.3%
if -1.77999999999999992e-127 < x < 9.00000000000000006e-299Initial program 80.6%
associate-*l*80.6%
associate-*l*81.9%
Simplified81.9%
Taylor expanded in z around inf 54.0%
*-commutative54.0%
associate-/l*57.8%
Simplified57.8%
if 9.00000000000000006e-299 < x < 1.40000000000000006e-209Initial program 75.7%
associate-/r*91.8%
Simplified91.9%
add-cube-cbrt91.8%
pow391.8%
associate-*r*91.8%
Applied egg-rr91.8%
Taylor expanded in b around inf 59.2%
associate-/r*67.3%
Simplified67.3%
Final simplification54.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c)))))
(if (<= x -2.8e+87)
(* 9.0 (/ (* x y) (* z c)))
(if (<= x -3.5e-25)
t_1
(if (<= x -6e-128)
(* b (/ (/ 1.0 z) c))
(if (<= x 9.5e-299)
(* -4.0 (/ a (/ c t)))
(if (<= x 1.6e-209)
(/ (/ b c) z)
(if (<= x 6.2e-61) t_1 (* 9.0 (* (/ x z) (/ y c)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (t * (a / c));
double tmp;
if (x <= -2.8e+87) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (x <= -3.5e-25) {
tmp = t_1;
} else if (x <= -6e-128) {
tmp = b * ((1.0 / z) / c);
} else if (x <= 9.5e-299) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 1.6e-209) {
tmp = (b / c) / z;
} else if (x <= 6.2e-61) {
tmp = t_1;
} else {
tmp = 9.0 * ((x / z) * (y / c));
}
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) :: tmp
t_1 = (-4.0d0) * (t * (a / c))
if (x <= (-2.8d+87)) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (x <= (-3.5d-25)) then
tmp = t_1
else if (x <= (-6d-128)) then
tmp = b * ((1.0d0 / z) / c)
else if (x <= 9.5d-299) then
tmp = (-4.0d0) * (a / (c / t))
else if (x <= 1.6d-209) then
tmp = (b / c) / z
else if (x <= 6.2d-61) then
tmp = t_1
else
tmp = 9.0d0 * ((x / z) * (y / c))
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 = -4.0 * (t * (a / c));
double tmp;
if (x <= -2.8e+87) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (x <= -3.5e-25) {
tmp = t_1;
} else if (x <= -6e-128) {
tmp = b * ((1.0 / z) / c);
} else if (x <= 9.5e-299) {
tmp = -4.0 * (a / (c / t));
} else if (x <= 1.6e-209) {
tmp = (b / c) / z;
} else if (x <= 6.2e-61) {
tmp = t_1;
} else {
tmp = 9.0 * ((x / z) * (y / c));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * (t * (a / c)) tmp = 0 if x <= -2.8e+87: tmp = 9.0 * ((x * y) / (z * c)) elif x <= -3.5e-25: tmp = t_1 elif x <= -6e-128: tmp = b * ((1.0 / z) / c) elif x <= 9.5e-299: tmp = -4.0 * (a / (c / t)) elif x <= 1.6e-209: tmp = (b / c) / z elif x <= 6.2e-61: tmp = t_1 else: tmp = 9.0 * ((x / z) * (y / c)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(t * Float64(a / c))) tmp = 0.0 if (x <= -2.8e+87) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (x <= -3.5e-25) tmp = t_1; elseif (x <= -6e-128) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); elseif (x <= 9.5e-299) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (x <= 1.6e-209) tmp = Float64(Float64(b / c) / z); elseif (x <= 6.2e-61) tmp = t_1; else tmp = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * (t * (a / c)); tmp = 0.0; if (x <= -2.8e+87) tmp = 9.0 * ((x * y) / (z * c)); elseif (x <= -3.5e-25) tmp = t_1; elseif (x <= -6e-128) tmp = b * ((1.0 / z) / c); elseif (x <= 9.5e-299) tmp = -4.0 * (a / (c / t)); elseif (x <= 1.6e-209) tmp = (b / c) / z; elseif (x <= 6.2e-61) tmp = t_1; else tmp = 9.0 * ((x / z) * (y / c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+87], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e-25], t$95$1, If[LessEqual[x, -6e-128], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e-299], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e-209], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 6.2e-61], t$95$1, N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+87}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -6 \cdot 10^{-128}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-299}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-209}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\end{array}
\end{array}
if x < -2.80000000000000015e87Initial program 75.4%
associate-*l*75.4%
associate-*l*75.2%
Simplified75.2%
Taylor expanded in x around inf 54.5%
if -2.80000000000000015e87 < x < -3.5000000000000002e-25 or 1.6000000000000001e-209 < x < 6.1999999999999999e-61Initial program 78.5%
associate-*l*78.5%
associate-*l*80.7%
Simplified80.7%
Taylor expanded in z around inf 55.8%
*-commutative55.8%
associate-/l*52.6%
associate-/r/57.9%
Simplified57.9%
if -3.5000000000000002e-25 < x < -5.99999999999999956e-128Initial program 82.1%
associate-*l*81.8%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in b around inf 45.2%
*-commutative45.2%
Simplified45.2%
div-inv45.2%
associate-/r*45.3%
Applied egg-rr45.3%
if -5.99999999999999956e-128 < x < 9.5000000000000001e-299Initial program 80.6%
associate-*l*80.6%
associate-*l*81.9%
Simplified81.9%
Taylor expanded in z around inf 54.0%
*-commutative54.0%
associate-/l*57.8%
Simplified57.8%
if 9.5000000000000001e-299 < x < 1.6000000000000001e-209Initial program 75.7%
associate-/r*91.8%
Simplified91.9%
add-cube-cbrt91.8%
pow391.8%
associate-*r*91.8%
Applied egg-rr91.8%
Taylor expanded in b around inf 59.2%
associate-/r*67.3%
Simplified67.3%
if 6.1999999999999999e-61 < x Initial program 76.8%
associate-/r*77.0%
Simplified82.4%
add-cube-cbrt82.2%
pow382.3%
associate-*r*83.6%
Applied egg-rr83.6%
Taylor expanded in x around inf 44.5%
times-frac47.2%
Simplified47.2%
Final simplification53.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (* 9.0 (* x y))) (* z c))))
(if (<= z -3.4e+14)
(* -4.0 (* t (/ a c)))
(if (<= z 1.45e+45)
t_1
(if (<= z 6.4e+68)
(* -4.0 (* (* t a) (/ 1.0 c)))
(if (<= z 5.2e+134) t_1 (* -4.0 (/ (* t a) c))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (9.0 * (x * y))) / (z * c);
double tmp;
if (z <= -3.4e+14) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.45e+45) {
tmp = t_1;
} else if (z <= 6.4e+68) {
tmp = -4.0 * ((t * a) * (1.0 / c));
} else if (z <= 5.2e+134) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) / c);
}
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) :: tmp
t_1 = (b + (9.0d0 * (x * y))) / (z * c)
if (z <= (-3.4d+14)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 1.45d+45) then
tmp = t_1
else if (z <= 6.4d+68) then
tmp = (-4.0d0) * ((t * a) * (1.0d0 / c))
else if (z <= 5.2d+134) then
tmp = t_1
else
tmp = (-4.0d0) * ((t * a) / c)
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 + (9.0 * (x * y))) / (z * c);
double tmp;
if (z <= -3.4e+14) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.45e+45) {
tmp = t_1;
} else if (z <= 6.4e+68) {
tmp = -4.0 * ((t * a) * (1.0 / c));
} else if (z <= 5.2e+134) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b + (9.0 * (x * y))) / (z * c) tmp = 0 if z <= -3.4e+14: tmp = -4.0 * (t * (a / c)) elif z <= 1.45e+45: tmp = t_1 elif z <= 6.4e+68: tmp = -4.0 * ((t * a) * (1.0 / c)) elif z <= 5.2e+134: tmp = t_1 else: tmp = -4.0 * ((t * a) / c) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)) tmp = 0.0 if (z <= -3.4e+14) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 1.45e+45) tmp = t_1; elseif (z <= 6.4e+68) tmp = Float64(-4.0 * Float64(Float64(t * a) * Float64(1.0 / c))); elseif (z <= 5.2e+134) tmp = t_1; else tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b + (9.0 * (x * y))) / (z * c); tmp = 0.0; if (z <= -3.4e+14) tmp = -4.0 * (t * (a / c)); elseif (z <= 1.45e+45) tmp = t_1; elseif (z <= 6.4e+68) tmp = -4.0 * ((t * a) * (1.0 / c)); elseif (z <= 5.2e+134) tmp = t_1; else tmp = -4.0 * ((t * a) / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+14], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+45], t$95$1, If[LessEqual[z, 6.4e+68], N[(-4.0 * N[(N[(t * a), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+134], t$95$1, N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+14}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+68}:\\
\;\;\;\;-4 \cdot \left(\left(t \cdot a\right) \cdot \frac{1}{c}\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if z < -3.4e14Initial program 64.0%
associate-*l*64.0%
associate-*l*70.0%
Simplified70.0%
Taylor expanded in z around inf 61.3%
*-commutative61.3%
associate-/l*64.2%
associate-/r/63.0%
Simplified63.0%
if -3.4e14 < z < 1.4499999999999999e45 or 6.39999999999999989e68 < z < 5.2000000000000003e134Initial program 92.0%
associate-*l*91.9%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in x around inf 79.0%
if 1.4499999999999999e45 < z < 6.39999999999999989e68Initial program 83.7%
associate-*l*83.7%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in z around inf 81.6%
*-commutative81.6%
associate-/l*81.6%
associate-/r/65.5%
Simplified65.5%
Taylor expanded in a around 0 81.6%
div-inv81.6%
*-commutative81.6%
Applied egg-rr81.6%
if 5.2000000000000003e134 < z Initial program 43.6%
associate-*l*43.6%
associate-*l*46.7%
Simplified46.7%
Taylor expanded in z around inf 64.9%
Final simplification73.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -5.2e-44)
(* -4.0 (* t (/ a c)))
(if (<= z 7.6e-290)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 3.7e-63)
(/ b (* z c))
(if (<= z 14000000000.0)
(* (/ x z) (/ (* 9.0 y) c))
(if (<= z 1.5e+40) (/ (/ b z) c) (* -4.0 (/ (* t a) c))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.2e-44) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 7.6e-290) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 3.7e-63) {
tmp = b / (z * c);
} else if (z <= 14000000000.0) {
tmp = (x / z) * ((9.0 * y) / c);
} else if (z <= 1.5e+40) {
tmp = (b / z) / c;
} else {
tmp = -4.0 * ((t * a) / c);
}
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) :: tmp
if (z <= (-5.2d-44)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 7.6d-290) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 3.7d-63) then
tmp = b / (z * c)
else if (z <= 14000000000.0d0) then
tmp = (x / z) * ((9.0d0 * y) / c)
else if (z <= 1.5d+40) then
tmp = (b / z) / c
else
tmp = (-4.0d0) * ((t * a) / c)
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 tmp;
if (z <= -5.2e-44) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 7.6e-290) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 3.7e-63) {
tmp = b / (z * c);
} else if (z <= 14000000000.0) {
tmp = (x / z) * ((9.0 * y) / c);
} else if (z <= 1.5e+40) {
tmp = (b / z) / c;
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5.2e-44: tmp = -4.0 * (t * (a / c)) elif z <= 7.6e-290: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 3.7e-63: tmp = b / (z * c) elif z <= 14000000000.0: tmp = (x / z) * ((9.0 * y) / c) elif z <= 1.5e+40: tmp = (b / z) / c else: tmp = -4.0 * ((t * a) / c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5.2e-44) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 7.6e-290) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 3.7e-63) tmp = Float64(b / Float64(z * c)); elseif (z <= 14000000000.0) tmp = Float64(Float64(x / z) * Float64(Float64(9.0 * y) / c)); elseif (z <= 1.5e+40) tmp = Float64(Float64(b / z) / c); else tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= -5.2e-44) tmp = -4.0 * (t * (a / c)); elseif (z <= 7.6e-290) tmp = 9.0 * ((x * y) / (z * c)); elseif (z <= 3.7e-63) tmp = b / (z * c); elseif (z <= 14000000000.0) tmp = (x / z) * ((9.0 * y) / c); elseif (z <= 1.5e+40) tmp = (b / z) / c; else tmp = -4.0 * ((t * a) / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5.2e-44], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-290], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-63], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 14000000000.0], N[(N[(x / z), $MachinePrecision] * N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+40], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-44}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-290}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-63}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;z \leq 14000000000:\\
\;\;\;\;\frac{x}{z} \cdot \frac{9 \cdot y}{c}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if z < -5.1999999999999996e-44Initial program 68.0%
associate-*l*68.0%
associate-*l*73.1%
Simplified73.1%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
associate-/l*61.6%
associate-/r/60.5%
Simplified60.5%
if -5.1999999999999996e-44 < z < 7.5999999999999995e-290Initial program 98.0%
associate-*l*97.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in x around inf 62.9%
if 7.5999999999999995e-290 < z < 3.70000000000000012e-63Initial program 92.8%
associate-*l*92.7%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in b around inf 63.5%
*-commutative63.5%
Simplified63.5%
if 3.70000000000000012e-63 < z < 1.4e10Initial program 85.0%
associate-*l*84.7%
associate-*l*84.8%
Simplified84.8%
Taylor expanded in x around inf 55.6%
associate-*r/55.6%
associate-*r*55.4%
times-frac56.0%
*-commutative56.0%
Simplified56.0%
if 1.4e10 < z < 1.5000000000000001e40Initial program 79.7%
associate-/r*80.7%
Simplified80.7%
add-cube-cbrt80.7%
pow380.7%
associate-*r*80.7%
Applied egg-rr80.7%
Taylor expanded in b around inf 61.3%
if 1.5000000000000001e40 < z Initial program 56.6%
associate-*l*56.6%
associate-*l*58.6%
Simplified58.6%
Taylor expanded in z around inf 56.5%
Final simplification60.5%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1e-51) (not (<= z 1.75e-6))) (/ (+ (* t (* a -4.0)) (/ b z)) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1e-51) || !(z <= 1.75e-6)) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
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) :: tmp
if ((z <= (-1d-51)) .or. (.not. (z <= 1.75d-6))) then
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
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 tmp;
if ((z <= -1e-51) || !(z <= 1.75e-6)) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1e-51) or not (z <= 1.75e-6): tmp = ((t * (a * -4.0)) + (b / z)) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1e-51) || !(z <= 1.75e-6)) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -1e-51) || ~((z <= 1.75e-6))) tmp = ((t * (a * -4.0)) + (b / z)) / c; else tmp = (b + (9.0 * (x * y))) / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1e-51], N[Not[LessEqual[z, 1.75e-6]], $MachinePrecision]], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-51} \lor \neg \left(z \leq 1.75 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1e-51 or 1.74999999999999997e-6 < z Initial program 65.2%
associate-/r*75.0%
Simplified87.8%
Taylor expanded in x around 0 77.3%
associate-*r*76.7%
*-commutative76.7%
*-commutative76.7%
Simplified76.7%
if -1e-51 < z < 1.74999999999999997e-6Initial program 93.8%
associate-*l*93.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in x around inf 84.4%
Final simplification80.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* t (* a -4.0)) (/ b z))))
(if (<= z -3.65e-50)
(* (/ 1.0 c) t_1)
(if (<= z 1.55e-6) (/ (+ b (* 9.0 (* x y))) (* z c)) (/ t_1 c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (t * (a * -4.0)) + (b / z);
double tmp;
if (z <= -3.65e-50) {
tmp = (1.0 / c) * t_1;
} else if (z <= 1.55e-6) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t_1 / c;
}
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) :: tmp
t_1 = (t * (a * (-4.0d0))) + (b / z)
if (z <= (-3.65d-50)) then
tmp = (1.0d0 / c) * t_1
else if (z <= 1.55d-6) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = t_1 / c
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 = (t * (a * -4.0)) + (b / z);
double tmp;
if (z <= -3.65e-50) {
tmp = (1.0 / c) * t_1;
} else if (z <= 1.55e-6) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t_1 / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (t * (a * -4.0)) + (b / z) tmp = 0 if z <= -3.65e-50: tmp = (1.0 / c) * t_1 elif z <= 1.55e-6: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = t_1 / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) tmp = 0.0 if (z <= -3.65e-50) tmp = Float64(Float64(1.0 / c) * t_1); elseif (z <= 1.55e-6) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(t_1 / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (t * (a * -4.0)) + (b / z); tmp = 0.0; if (z <= -3.65e-50) tmp = (1.0 / c) * t_1; elseif (z <= 1.55e-6) tmp = (b + (9.0 * (x * y))) / (z * c); else tmp = t_1 / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.65e-50], N[(N[(1.0 / c), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[z, 1.55e-6], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right) + \frac{b}{z}\\
\mathbf{if}\;z \leq -3.65 \cdot 10^{-50}:\\
\;\;\;\;\frac{1}{c} \cdot t_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-6}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{c}\\
\end{array}
\end{array}
if z < -3.65000000000000018e-50Initial program 68.8%
associate-/r*80.1%
Simplified90.1%
Taylor expanded in x around 0 78.7%
associate-*r*77.4%
*-commutative77.4%
*-commutative77.4%
Simplified77.4%
div-inv77.5%
associate-*r*78.7%
add-cube-cbrt78.3%
unpow378.3%
+-commutative78.3%
unpow378.3%
add-cube-cbrt78.7%
associate-*r*77.5%
Applied egg-rr77.5%
if -3.65000000000000018e-50 < z < 1.55e-6Initial program 93.9%
associate-*l*93.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in x around inf 84.5%
if 1.55e-6 < z Initial program 60.4%
associate-/r*68.4%
Simplified84.9%
Taylor expanded in x around 0 75.3%
associate-*r*75.3%
*-commutative75.3%
*-commutative75.3%
Simplified75.3%
Final simplification80.1%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= a -2.4e-80) (not (<= a 1.16e+64))) (* -4.0 (/ (* t a) c)) (/ b (* z c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -2.4e-80) || !(a <= 1.16e+64)) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b / (z * c);
}
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) :: tmp
if ((a <= (-2.4d-80)) .or. (.not. (a <= 1.16d+64))) then
tmp = (-4.0d0) * ((t * a) / c)
else
tmp = b / (z * c)
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 tmp;
if ((a <= -2.4e-80) || !(a <= 1.16e+64)) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -2.4e-80) or not (a <= 1.16e+64): tmp = -4.0 * ((t * a) / c) else: tmp = b / (z * c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -2.4e-80) || !(a <= 1.16e+64)) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a <= -2.4e-80) || ~((a <= 1.16e+64))) tmp = -4.0 * ((t * a) / c); else tmp = b / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -2.4e-80], N[Not[LessEqual[a, 1.16e+64]], $MachinePrecision]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-80} \lor \neg \left(a \leq 1.16 \cdot 10^{+64}\right):\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if a < -2.3999999999999999e-80 or 1.16e64 < a Initial program 74.6%
associate-*l*74.6%
associate-*l*72.8%
Simplified72.8%
Taylor expanded in z around inf 56.6%
if -2.3999999999999999e-80 < a < 1.16e64Initial program 81.8%
associate-*l*81.7%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in b around inf 48.0%
*-commutative48.0%
Simplified48.0%
Final simplification52.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= a -1.45e-80) (not (<= a 1.15e+64))) (* -4.0 (/ (* t a) c)) (* b (/ (/ 1.0 z) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -1.45e-80) || !(a <= 1.15e+64)) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b * ((1.0 / z) / c);
}
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) :: tmp
if ((a <= (-1.45d-80)) .or. (.not. (a <= 1.15d+64))) then
tmp = (-4.0d0) * ((t * a) / c)
else
tmp = b * ((1.0d0 / z) / c)
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 tmp;
if ((a <= -1.45e-80) || !(a <= 1.15e+64)) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = b * ((1.0 / z) / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -1.45e-80) or not (a <= 1.15e+64): tmp = -4.0 * ((t * a) / c) else: tmp = b * ((1.0 / z) / c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -1.45e-80) || !(a <= 1.15e+64)) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); else tmp = Float64(b * Float64(Float64(1.0 / z) / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a <= -1.45e-80) || ~((a <= 1.15e+64))) tmp = -4.0 * ((t * a) / c); else tmp = b * ((1.0 / z) / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -1.45e-80], N[Not[LessEqual[a, 1.15e+64]], $MachinePrecision]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-80} \lor \neg \left(a \leq 1.15 \cdot 10^{+64}\right):\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\end{array}
\end{array}
if a < -1.44999999999999999e-80 or 1.15e64 < a Initial program 74.6%
associate-*l*74.6%
associate-*l*72.8%
Simplified72.8%
Taylor expanded in z around inf 56.6%
if -1.44999999999999999e-80 < a < 1.15e64Initial program 81.8%
associate-*l*81.7%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in b around inf 48.0%
*-commutative48.0%
Simplified48.0%
div-inv48.6%
associate-/r*48.7%
Applied egg-rr48.7%
Final simplification53.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= a -2.5e-113) (* -4.0 (* a (/ t c))) (if (<= a 3e+64) (* b (/ (/ 1.0 z) c)) (* -4.0 (/ (* t a) c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -2.5e-113) {
tmp = -4.0 * (a * (t / c));
} else if (a <= 3e+64) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = -4.0 * ((t * a) / c);
}
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) :: tmp
if (a <= (-2.5d-113)) then
tmp = (-4.0d0) * (a * (t / c))
else if (a <= 3d+64) then
tmp = b * ((1.0d0 / z) / c)
else
tmp = (-4.0d0) * ((t * a) / c)
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 tmp;
if (a <= -2.5e-113) {
tmp = -4.0 * (a * (t / c));
} else if (a <= 3e+64) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= -2.5e-113: tmp = -4.0 * (a * (t / c)) elif a <= 3e+64: tmp = b * ((1.0 / z) / c) else: tmp = -4.0 * ((t * a) / c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -2.5e-113) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); elseif (a <= 3e+64) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); else tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= -2.5e-113) tmp = -4.0 * (a * (t / c)); elseif (a <= 3e+64) tmp = b * ((1.0 / z) / c); else tmp = -4.0 * ((t * a) / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -2.5e-113], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e+64], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-113}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \leq 3 \cdot 10^{+64}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if a < -2.4999999999999999e-113Initial program 74.6%
associate-*l*74.6%
associate-*l*73.4%
Simplified73.4%
Taylor expanded in z around inf 50.4%
*-commutative50.4%
associate-/l*53.5%
associate-/r/52.8%
Simplified52.8%
Taylor expanded in a around 0 50.4%
expm1-log1p-u31.3%
expm1-udef24.4%
associate-/l*27.1%
Applied egg-rr27.1%
expm1-def31.8%
expm1-log1p53.5%
associate-/l*50.4%
associate-*r/53.5%
Simplified53.5%
if -2.4999999999999999e-113 < a < 3.0000000000000002e64Initial program 82.1%
associate-*l*82.0%
associate-*l*85.7%
Simplified85.7%
Taylor expanded in b around inf 48.7%
*-commutative48.7%
Simplified48.7%
div-inv49.4%
associate-/r*49.5%
Applied egg-rr49.5%
if 3.0000000000000002e64 < a Initial program 75.0%
associate-*l*75.0%
associate-*l*72.7%
Simplified72.7%
Taylor expanded in z around inf 61.9%
Final simplification53.7%
(FPCore (x y z t a b c) :precision binary64 (if (<= a -2.5e-113) (* -4.0 (* a (/ t c))) (if (<= a 2.9e+38) (* b (/ (/ 1.0 z) c)) (* -4.0 (* t (/ a c))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -2.5e-113) {
tmp = -4.0 * (a * (t / c));
} else if (a <= 2.9e+38) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = -4.0 * (t * (a / c));
}
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) :: tmp
if (a <= (-2.5d-113)) then
tmp = (-4.0d0) * (a * (t / c))
else if (a <= 2.9d+38) then
tmp = b * ((1.0d0 / z) / c)
else
tmp = (-4.0d0) * (t * (a / c))
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 tmp;
if (a <= -2.5e-113) {
tmp = -4.0 * (a * (t / c));
} else if (a <= 2.9e+38) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= -2.5e-113: tmp = -4.0 * (a * (t / c)) elif a <= 2.9e+38: tmp = b * ((1.0 / z) / c) else: tmp = -4.0 * (t * (a / c)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -2.5e-113) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); elseif (a <= 2.9e+38) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= -2.5e-113) tmp = -4.0 * (a * (t / c)); elseif (a <= 2.9e+38) tmp = b * ((1.0 / z) / c); else tmp = -4.0 * (t * (a / c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -2.5e-113], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e+38], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-113}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+38}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if a < -2.4999999999999999e-113Initial program 74.6%
associate-*l*74.6%
associate-*l*73.4%
Simplified73.4%
Taylor expanded in z around inf 50.4%
*-commutative50.4%
associate-/l*53.5%
associate-/r/52.8%
Simplified52.8%
Taylor expanded in a around 0 50.4%
expm1-log1p-u31.3%
expm1-udef24.4%
associate-/l*27.1%
Applied egg-rr27.1%
expm1-def31.8%
expm1-log1p53.5%
associate-/l*50.4%
associate-*r/53.5%
Simplified53.5%
if -2.4999999999999999e-113 < a < 2.90000000000000007e38Initial program 81.2%
associate-*l*81.1%
associate-*l*85.1%
Simplified85.1%
Taylor expanded in b around inf 49.1%
*-commutative49.1%
Simplified49.1%
div-inv49.8%
associate-/r*49.9%
Applied egg-rr49.9%
if 2.90000000000000007e38 < a Initial program 76.9%
associate-*l*76.9%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in z around inf 58.8%
*-commutative58.8%
associate-/l*57.5%
associate-/r/61.8%
Simplified61.8%
Final simplification54.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= a -2.95e-114) (* -4.0 (/ a (/ c t))) (if (<= a 1.15e+38) (* b (/ (/ 1.0 z) c)) (* -4.0 (* t (/ a c))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -2.95e-114) {
tmp = -4.0 * (a / (c / t));
} else if (a <= 1.15e+38) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = -4.0 * (t * (a / c));
}
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) :: tmp
if (a <= (-2.95d-114)) then
tmp = (-4.0d0) * (a / (c / t))
else if (a <= 1.15d+38) then
tmp = b * ((1.0d0 / z) / c)
else
tmp = (-4.0d0) * (t * (a / c))
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 tmp;
if (a <= -2.95e-114) {
tmp = -4.0 * (a / (c / t));
} else if (a <= 1.15e+38) {
tmp = b * ((1.0 / z) / c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= -2.95e-114: tmp = -4.0 * (a / (c / t)) elif a <= 1.15e+38: tmp = b * ((1.0 / z) / c) else: tmp = -4.0 * (t * (a / c)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -2.95e-114) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (a <= 1.15e+38) tmp = Float64(b * Float64(Float64(1.0 / z) / c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= -2.95e-114) tmp = -4.0 * (a / (c / t)); elseif (a <= 1.15e+38) tmp = b * ((1.0 / z) / c); else tmp = -4.0 * (t * (a / c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -2.95e-114], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e+38], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.95 \cdot 10^{-114}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+38}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if a < -2.9500000000000001e-114Initial program 74.6%
associate-*l*74.6%
associate-*l*73.4%
Simplified73.4%
Taylor expanded in z around inf 50.4%
*-commutative50.4%
associate-/l*53.5%
Simplified53.5%
if -2.9500000000000001e-114 < a < 1.1500000000000001e38Initial program 81.2%
associate-*l*81.1%
associate-*l*85.1%
Simplified85.1%
Taylor expanded in b around inf 49.1%
*-commutative49.1%
Simplified49.1%
div-inv49.8%
associate-/r*49.9%
Applied egg-rr49.9%
if 1.1500000000000001e38 < a Initial program 76.9%
associate-*l*76.9%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in z around inf 58.8%
*-commutative58.8%
associate-/l*57.5%
associate-/r/61.8%
Simplified61.8%
Final simplification54.1%
(FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return 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 = b / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
def code(x, y, z, t, a, b, c): return b / (z * c)
function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = b / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 77.9%
associate-*l*77.8%
associate-*l*78.5%
Simplified78.5%
Taylor expanded in b around inf 35.1%
*-commutative35.1%
Simplified35.1%
Final simplification35.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\
\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\
\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\
\end{array}
\end{array}
herbie shell --seed 2023199
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))