
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (<= t_1 (- INFINITY))
(* t_1 2.0)
(* 2.0 (- (fma x y (* z t)) (* (+ a (* b c)) (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_1 * 2.0;
} else {
tmp = 2.0 * (fma(x, y, (z * t)) - ((a + (b * c)) * (c * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(t_1 * 2.0); else tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$1 * 2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_1 \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 78.6%
Taylor expanded in c around 0 92.9%
if -inf.0 < (+.f64 (*.f64 x y) (*.f64 z t)) Initial program 91.5%
associate-*l*95.7%
fma-def97.0%
Simplified97.0%
Final simplification96.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* i (* c t_1))) (t_3 (* c (* t_1 i))))
(if (<= t_2 (- INFINITY))
(* 2.0 (- (* x y) t_3))
(if (<= t_2 5e+303)
(* 2.0 (- (+ (* x y) (* z t)) t_2))
(* 2.0 (- (* z t) t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = i * (c * t_1);
double t_3 = c * (t_1 * i);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * ((x * y) - t_3);
} else if (t_2 <= 5e+303) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} else {
tmp = 2.0 * ((z * t) - t_3);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = i * (c * t_1);
double t_3 = c * (t_1 * i);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((x * y) - t_3);
} else if (t_2 <= 5e+303) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} else {
tmp = 2.0 * ((z * t) - t_3);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = i * (c * t_1) t_3 = c * (t_1 * i) tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * ((x * y) - t_3) elif t_2 <= 5e+303: tmp = 2.0 * (((x * y) + (z * t)) - t_2) else: tmp = 2.0 * ((z * t) - t_3) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(i * Float64(c * t_1)) t_3 = Float64(c * Float64(t_1 * i)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(Float64(x * y) - t_3)); elseif (t_2 <= 5e+303) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2)); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_3)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = i * (c * t_1); t_3 = c * (t_1 * i); tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * ((x * y) - t_3); elseif (t_2 <= 5e+303) tmp = 2.0 * (((x * y) + (z * t)) - t_2); else tmp = 2.0 * ((z * t) - t_3); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+303], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
t_3 := c \cdot \left(t_1 \cdot i\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_3\right)\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_3\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 79.6%
Taylor expanded in z around 0 88.5%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.9999999999999997e303Initial program 98.5%
if 4.9999999999999997e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 78.5%
Taylor expanded in x around 0 94.0%
Final simplification95.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* i (* c t_1))) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* -2.0 (* c (* t_1 i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = -2.0 * (c * (t_1 * i));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - (i * (c * t_1))) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = -2.0 * (c * (t_1 * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - (i * (c * t_1))) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = -2.0 * (c * (t_1 * i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(-2.0 * Float64(c * Float64(t_1 * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - (i * (c * t_1))) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = -2.0 * (c * (t_1 * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t_2 - i \cdot \left(c \cdot t_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(t_2 - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(t_1 \cdot i\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 94.6%
associate-*l*98.4%
fma-def98.4%
Simplified98.4%
fma-def98.4%
+-commutative98.4%
Applied egg-rr98.4%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
Taylor expanded in x around 0 33.3%
Taylor expanded in t around 0 50.4%
Final simplification96.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t)))
(t_2 (* -2.0 (* a (* c i))))
(t_3 (* (* x y) 2.0))
(t_4 (* -2.0 (* c (* c (* b i))))))
(if (<= c -1.15e+204)
t_4
(if (<= c -1.1e+180)
t_2
(if (<= c -5.8e+57)
t_4
(if (<= c -1.8e-17)
t_1
(if (<= c -3.4e-19)
t_2
(if (<= c -2.15e-176)
t_3
(if (<= c -8.6e-237)
t_1
(if (<= c 5.9e+23)
t_3
(if (<= c 2e+67)
(* -2.0 (* c (* a i)))
(* -2.0 (* c (* b (* c i)))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (a * (c * i));
double t_3 = (x * y) * 2.0;
double t_4 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_4;
} else if (c <= -1.1e+180) {
tmp = t_2;
} else if (c <= -5.8e+57) {
tmp = t_4;
} else if (c <= -1.8e-17) {
tmp = t_1;
} else if (c <= -3.4e-19) {
tmp = t_2;
} else if (c <= -2.15e-176) {
tmp = t_3;
} else if (c <= -8.6e-237) {
tmp = t_1;
} else if (c <= 5.9e+23) {
tmp = t_3;
} else if (c <= 2e+67) {
tmp = -2.0 * (c * (a * i));
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (-2.0d0) * (a * (c * i))
t_3 = (x * y) * 2.0d0
t_4 = (-2.0d0) * (c * (c * (b * i)))
if (c <= (-1.15d+204)) then
tmp = t_4
else if (c <= (-1.1d+180)) then
tmp = t_2
else if (c <= (-5.8d+57)) then
tmp = t_4
else if (c <= (-1.8d-17)) then
tmp = t_1
else if (c <= (-3.4d-19)) then
tmp = t_2
else if (c <= (-2.15d-176)) then
tmp = t_3
else if (c <= (-8.6d-237)) then
tmp = t_1
else if (c <= 5.9d+23) then
tmp = t_3
else if (c <= 2d+67) then
tmp = (-2.0d0) * (c * (a * i))
else
tmp = (-2.0d0) * (c * (b * (c * i)))
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 i) {
double t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (a * (c * i));
double t_3 = (x * y) * 2.0;
double t_4 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_4;
} else if (c <= -1.1e+180) {
tmp = t_2;
} else if (c <= -5.8e+57) {
tmp = t_4;
} else if (c <= -1.8e-17) {
tmp = t_1;
} else if (c <= -3.4e-19) {
tmp = t_2;
} else if (c <= -2.15e-176) {
tmp = t_3;
} else if (c <= -8.6e-237) {
tmp = t_1;
} else if (c <= 5.9e+23) {
tmp = t_3;
} else if (c <= 2e+67) {
tmp = -2.0 * (c * (a * i));
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = -2.0 * (a * (c * i)) t_3 = (x * y) * 2.0 t_4 = -2.0 * (c * (c * (b * i))) tmp = 0 if c <= -1.15e+204: tmp = t_4 elif c <= -1.1e+180: tmp = t_2 elif c <= -5.8e+57: tmp = t_4 elif c <= -1.8e-17: tmp = t_1 elif c <= -3.4e-19: tmp = t_2 elif c <= -2.15e-176: tmp = t_3 elif c <= -8.6e-237: tmp = t_1 elif c <= 5.9e+23: tmp = t_3 elif c <= 2e+67: tmp = -2.0 * (c * (a * i)) else: tmp = -2.0 * (c * (b * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(-2.0 * Float64(a * Float64(c * i))) t_3 = Float64(Float64(x * y) * 2.0) t_4 = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i)))) tmp = 0.0 if (c <= -1.15e+204) tmp = t_4; elseif (c <= -1.1e+180) tmp = t_2; elseif (c <= -5.8e+57) tmp = t_4; elseif (c <= -1.8e-17) tmp = t_1; elseif (c <= -3.4e-19) tmp = t_2; elseif (c <= -2.15e-176) tmp = t_3; elseif (c <= -8.6e-237) tmp = t_1; elseif (c <= 5.9e+23) tmp = t_3; elseif (c <= 2e+67) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); else tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = -2.0 * (a * (c * i)); t_3 = (x * y) * 2.0; t_4 = -2.0 * (c * (c * (b * i))); tmp = 0.0; if (c <= -1.15e+204) tmp = t_4; elseif (c <= -1.1e+180) tmp = t_2; elseif (c <= -5.8e+57) tmp = t_4; elseif (c <= -1.8e-17) tmp = t_1; elseif (c <= -3.4e-19) tmp = t_2; elseif (c <= -2.15e-176) tmp = t_3; elseif (c <= -8.6e-237) tmp = t_1; elseif (c <= 5.9e+23) tmp = t_3; elseif (c <= 2e+67) tmp = -2.0 * (c * (a * i)); else tmp = -2.0 * (c * (b * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$4 = N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$4, If[LessEqual[c, -1.1e+180], t$95$2, If[LessEqual[c, -5.8e+57], t$95$4, If[LessEqual[c, -1.8e-17], t$95$1, If[LessEqual[c, -3.4e-19], t$95$2, If[LessEqual[c, -2.15e-176], t$95$3, If[LessEqual[c, -8.6e-237], t$95$1, If[LessEqual[c, 5.9e+23], t$95$3, If[LessEqual[c, 2e+67], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
t_3 := \left(x \cdot y\right) \cdot 2\\
t_4 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -5.8 \cdot 10^{+57}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;c \leq -1.8 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -3.4 \cdot 10^{-19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -2.15 \cdot 10^{-176}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -8.6 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 5.9 \cdot 10^{+23}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq 2 \cdot 10^{+67}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -1.14999999999999995e204 or -1.1e180 < c < -5.8000000000000003e57Initial program 79.2%
Taylor expanded in x around 0 73.0%
Taylor expanded in c around inf 70.4%
*-commutative70.4%
unpow270.4%
associate-*r*68.4%
associate-*r*70.2%
*-commutative70.2%
Simplified70.2%
expm1-log1p-u40.1%
expm1-udef39.9%
associate-*r*36.3%
*-commutative36.3%
associate-*l*39.9%
Applied egg-rr39.9%
expm1-def40.1%
expm1-log1p70.3%
Simplified70.3%
if -1.14999999999999995e204 < c < -1.1e180 or -1.79999999999999997e-17 < c < -3.4000000000000002e-19Initial program 76.2%
Taylor expanded in x around 0 91.6%
Taylor expanded in a around inf 74.1%
if -5.8000000000000003e57 < c < -1.79999999999999997e-17 or -2.15000000000000006e-176 < c < -8.59999999999999965e-237Initial program 99.9%
Taylor expanded in z around inf 66.0%
if -3.4000000000000002e-19 < c < -2.15000000000000006e-176 or -8.59999999999999965e-237 < c < 5.89999999999999987e23Initial program 97.0%
Taylor expanded in x around inf 53.0%
if 5.89999999999999987e23 < c < 1.99999999999999997e67Initial program 90.8%
Taylor expanded in x around 0 90.2%
Taylor expanded in a around inf 60.8%
*-commutative60.8%
*-commutative60.8%
associate-*r*70.3%
Simplified70.3%
if 1.99999999999999997e67 < c Initial program 85.3%
Taylor expanded in x around 0 92.4%
Taylor expanded in c around inf 67.4%
*-commutative67.4%
unpow267.4%
associate-*r*69.7%
associate-*r*75.6%
*-commutative75.6%
Simplified75.6%
Final simplification64.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t)))
(t_2 (* -2.0 (* a (* c i))))
(t_3 (* (* x y) 2.0))
(t_4 (* -2.0 (* c (* c (* b i))))))
(if (<= c -1.15e+204)
t_4
(if (<= c -1.1e+180)
t_2
(if (<= c -2.8e+57)
t_4
(if (<= c -3.1e-15)
t_1
(if (<= c -2.2e-19)
t_2
(if (<= c -2.65e-173)
t_3
(if (<= c -9.2e-237)
t_1
(if (<= c 1.2e+25)
t_3
(if (<= c 1.9e+67)
(* -2.0 (* c (* a i)))
(* -2.0 (* (* b c) (* c i))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (a * (c * i));
double t_3 = (x * y) * 2.0;
double t_4 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_4;
} else if (c <= -1.1e+180) {
tmp = t_2;
} else if (c <= -2.8e+57) {
tmp = t_4;
} else if (c <= -3.1e-15) {
tmp = t_1;
} else if (c <= -2.2e-19) {
tmp = t_2;
} else if (c <= -2.65e-173) {
tmp = t_3;
} else if (c <= -9.2e-237) {
tmp = t_1;
} else if (c <= 1.2e+25) {
tmp = t_3;
} else if (c <= 1.9e+67) {
tmp = -2.0 * (c * (a * i));
} else {
tmp = -2.0 * ((b * c) * (c * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (-2.0d0) * (a * (c * i))
t_3 = (x * y) * 2.0d0
t_4 = (-2.0d0) * (c * (c * (b * i)))
if (c <= (-1.15d+204)) then
tmp = t_4
else if (c <= (-1.1d+180)) then
tmp = t_2
else if (c <= (-2.8d+57)) then
tmp = t_4
else if (c <= (-3.1d-15)) then
tmp = t_1
else if (c <= (-2.2d-19)) then
tmp = t_2
else if (c <= (-2.65d-173)) then
tmp = t_3
else if (c <= (-9.2d-237)) then
tmp = t_1
else if (c <= 1.2d+25) then
tmp = t_3
else if (c <= 1.9d+67) then
tmp = (-2.0d0) * (c * (a * i))
else
tmp = (-2.0d0) * ((b * c) * (c * i))
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 i) {
double t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (a * (c * i));
double t_3 = (x * y) * 2.0;
double t_4 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_4;
} else if (c <= -1.1e+180) {
tmp = t_2;
} else if (c <= -2.8e+57) {
tmp = t_4;
} else if (c <= -3.1e-15) {
tmp = t_1;
} else if (c <= -2.2e-19) {
tmp = t_2;
} else if (c <= -2.65e-173) {
tmp = t_3;
} else if (c <= -9.2e-237) {
tmp = t_1;
} else if (c <= 1.2e+25) {
tmp = t_3;
} else if (c <= 1.9e+67) {
tmp = -2.0 * (c * (a * i));
} else {
tmp = -2.0 * ((b * c) * (c * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = -2.0 * (a * (c * i)) t_3 = (x * y) * 2.0 t_4 = -2.0 * (c * (c * (b * i))) tmp = 0 if c <= -1.15e+204: tmp = t_4 elif c <= -1.1e+180: tmp = t_2 elif c <= -2.8e+57: tmp = t_4 elif c <= -3.1e-15: tmp = t_1 elif c <= -2.2e-19: tmp = t_2 elif c <= -2.65e-173: tmp = t_3 elif c <= -9.2e-237: tmp = t_1 elif c <= 1.2e+25: tmp = t_3 elif c <= 1.9e+67: tmp = -2.0 * (c * (a * i)) else: tmp = -2.0 * ((b * c) * (c * i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(-2.0 * Float64(a * Float64(c * i))) t_3 = Float64(Float64(x * y) * 2.0) t_4 = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i)))) tmp = 0.0 if (c <= -1.15e+204) tmp = t_4; elseif (c <= -1.1e+180) tmp = t_2; elseif (c <= -2.8e+57) tmp = t_4; elseif (c <= -3.1e-15) tmp = t_1; elseif (c <= -2.2e-19) tmp = t_2; elseif (c <= -2.65e-173) tmp = t_3; elseif (c <= -9.2e-237) tmp = t_1; elseif (c <= 1.2e+25) tmp = t_3; elseif (c <= 1.9e+67) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); else tmp = Float64(-2.0 * Float64(Float64(b * c) * Float64(c * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = -2.0 * (a * (c * i)); t_3 = (x * y) * 2.0; t_4 = -2.0 * (c * (c * (b * i))); tmp = 0.0; if (c <= -1.15e+204) tmp = t_4; elseif (c <= -1.1e+180) tmp = t_2; elseif (c <= -2.8e+57) tmp = t_4; elseif (c <= -3.1e-15) tmp = t_1; elseif (c <= -2.2e-19) tmp = t_2; elseif (c <= -2.65e-173) tmp = t_3; elseif (c <= -9.2e-237) tmp = t_1; elseif (c <= 1.2e+25) tmp = t_3; elseif (c <= 1.9e+67) tmp = -2.0 * (c * (a * i)); else tmp = -2.0 * ((b * c) * (c * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$4 = N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$4, If[LessEqual[c, -1.1e+180], t$95$2, If[LessEqual[c, -2.8e+57], t$95$4, If[LessEqual[c, -3.1e-15], t$95$1, If[LessEqual[c, -2.2e-19], t$95$2, If[LessEqual[c, -2.65e-173], t$95$3, If[LessEqual[c, -9.2e-237], t$95$1, If[LessEqual[c, 1.2e+25], t$95$3, If[LessEqual[c, 1.9e+67], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
t_3 := \left(x \cdot y\right) \cdot 2\\
t_4 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -2.8 \cdot 10^{+57}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;c \leq -3.1 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2.2 \cdot 10^{-19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -2.65 \cdot 10^{-173}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -9.2 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq 1.9 \cdot 10^{+67}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -1.14999999999999995e204 or -1.1e180 < c < -2.8e57Initial program 79.2%
Taylor expanded in x around 0 73.0%
Taylor expanded in c around inf 70.4%
*-commutative70.4%
unpow270.4%
associate-*r*68.4%
associate-*r*70.2%
*-commutative70.2%
Simplified70.2%
expm1-log1p-u40.1%
expm1-udef39.9%
associate-*r*36.3%
*-commutative36.3%
associate-*l*39.9%
Applied egg-rr39.9%
expm1-def40.1%
expm1-log1p70.3%
Simplified70.3%
if -1.14999999999999995e204 < c < -1.1e180 or -3.0999999999999999e-15 < c < -2.1999999999999998e-19Initial program 76.2%
Taylor expanded in x around 0 91.6%
Taylor expanded in a around inf 74.1%
if -2.8e57 < c < -3.0999999999999999e-15 or -2.64999999999999982e-173 < c < -9.20000000000000046e-237Initial program 99.9%
Taylor expanded in z around inf 66.0%
if -2.1999999999999998e-19 < c < -2.64999999999999982e-173 or -9.20000000000000046e-237 < c < 1.19999999999999998e25Initial program 97.0%
Taylor expanded in x around inf 53.0%
if 1.19999999999999998e25 < c < 1.9000000000000001e67Initial program 90.8%
Taylor expanded in x around 0 90.2%
Taylor expanded in a around inf 60.8%
*-commutative60.8%
*-commutative60.8%
associate-*r*70.3%
Simplified70.3%
if 1.9000000000000001e67 < c Initial program 85.3%
Taylor expanded in x around 0 92.4%
Taylor expanded in c around inf 67.4%
*-commutative67.4%
unpow267.4%
associate-*r*69.7%
associate-*r*75.6%
*-commutative75.6%
Simplified75.6%
expm1-log1p-u37.9%
expm1-udef30.8%
associate-*r*32.4%
*-commutative32.4%
associate-*l*30.8%
Applied egg-rr30.8%
expm1-def36.7%
expm1-log1p74.4%
Simplified74.4%
Taylor expanded in c around 0 67.4%
unpow267.4%
associate-*r*69.7%
associate-*r*77.2%
*-commutative77.2%
Simplified77.2%
Final simplification64.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))))
(t_2 (* 2.0 (+ (* x y) (- (* z t) (* (* b c) (* c i)))))))
(if (<= c -1.8e+134)
t_1
(if (<= c -4e-113)
t_2
(if (<= c 1.55e-168)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(if (<= c 1e-57) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
double t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))));
double tmp;
if (c <= -1.8e+134) {
tmp = t_1;
} else if (c <= -4e-113) {
tmp = t_2;
} else if (c <= 1.55e-168) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else if (c <= 1e-57) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
t_2 = 2.0d0 * ((x * y) + ((z * t) - ((b * c) * (c * i))))
if (c <= (-1.8d+134)) then
tmp = t_1
else if (c <= (-4d-113)) then
tmp = t_2
else if (c <= 1.55d-168) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else if (c <= 1d-57) then
tmp = t_2
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 i) {
double t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
double t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))));
double tmp;
if (c <= -1.8e+134) {
tmp = t_1;
} else if (c <= -4e-113) {
tmp = t_2;
} else if (c <= 1.55e-168) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else if (c <= 1e-57) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i)))) tmp = 0 if c <= -1.8e+134: tmp = t_1 elif c <= -4e-113: tmp = t_2 elif c <= 1.55e-168: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) elif c <= 1e-57: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))) t_2 = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(Float64(b * c) * Float64(c * i))))) tmp = 0.0 if (c <= -1.8e+134) tmp = t_1; elseif (c <= -4e-113) tmp = t_2; elseif (c <= 1.55e-168) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); elseif (c <= 1e-57) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i)))); tmp = 0.0; if (c <= -1.8e+134) tmp = t_1; elseif (c <= -4e-113) tmp = t_2; elseif (c <= 1.55e-168) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); elseif (c <= 1e-57) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.8e+134], t$95$1, If[LessEqual[c, -4e-113], t$95$2, If[LessEqual[c, 1.55e-168], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1e-57], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y + \left(z \cdot t - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.8 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -4 \cdot 10^{-113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-168}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 10^{-57}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -1.79999999999999994e134 or 9.99999999999999955e-58 < c Initial program 83.8%
Taylor expanded in z around 0 90.2%
if -1.79999999999999994e134 < c < -3.99999999999999991e-113 or 1.55e-168 < c < 9.99999999999999955e-58Initial program 93.6%
Taylor expanded in a around 0 93.8%
associate--l+93.8%
associate-*l*93.8%
Applied egg-rr93.8%
if -3.99999999999999991e-113 < c < 1.55e-168Initial program 98.5%
Taylor expanded in a around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification93.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))))
(t_2 (+ (* x y) (* z t))))
(if (<= c -3.5e+142)
t_1
(if (<= c -1.15e-112)
(* 2.0 (- t_2 (* b (* c (* c i)))))
(if (<= c 1.45e-168)
(* 2.0 (- t_2 (* i (* a c))))
(if (<= c 1.25e-57)
(* 2.0 (+ (* x y) (- (* z t) (* (* b c) (* c i)))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
double t_2 = (x * y) + (z * t);
double tmp;
if (c <= -3.5e+142) {
tmp = t_1;
} else if (c <= -1.15e-112) {
tmp = 2.0 * (t_2 - (b * (c * (c * i))));
} else if (c <= 1.45e-168) {
tmp = 2.0 * (t_2 - (i * (a * c)));
} else if (c <= 1.25e-57) {
tmp = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
t_2 = (x * y) + (z * t)
if (c <= (-3.5d+142)) then
tmp = t_1
else if (c <= (-1.15d-112)) then
tmp = 2.0d0 * (t_2 - (b * (c * (c * i))))
else if (c <= 1.45d-168) then
tmp = 2.0d0 * (t_2 - (i * (a * c)))
else if (c <= 1.25d-57) then
tmp = 2.0d0 * ((x * y) + ((z * t) - ((b * c) * (c * i))))
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 i) {
double t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
double t_2 = (x * y) + (z * t);
double tmp;
if (c <= -3.5e+142) {
tmp = t_1;
} else if (c <= -1.15e-112) {
tmp = 2.0 * (t_2 - (b * (c * (c * i))));
} else if (c <= 1.45e-168) {
tmp = 2.0 * (t_2 - (i * (a * c)));
} else if (c <= 1.25e-57) {
tmp = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) t_2 = (x * y) + (z * t) tmp = 0 if c <= -3.5e+142: tmp = t_1 elif c <= -1.15e-112: tmp = 2.0 * (t_2 - (b * (c * (c * i)))) elif c <= 1.45e-168: tmp = 2.0 * (t_2 - (i * (a * c))) elif c <= 1.25e-57: tmp = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (c <= -3.5e+142) tmp = t_1; elseif (c <= -1.15e-112) tmp = Float64(2.0 * Float64(t_2 - Float64(b * Float64(c * Float64(c * i))))); elseif (c <= 1.45e-168) tmp = Float64(2.0 * Float64(t_2 - Float64(i * Float64(a * c)))); elseif (c <= 1.25e-57) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(Float64(b * c) * Float64(c * i))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); t_2 = (x * y) + (z * t); tmp = 0.0; if (c <= -3.5e+142) tmp = t_1; elseif (c <= -1.15e-112) tmp = 2.0 * (t_2 - (b * (c * (c * i)))); elseif (c <= 1.45e-168) tmp = 2.0 * (t_2 - (i * (a * c))); elseif (c <= 1.25e-57) tmp = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.5e+142], t$95$1, If[LessEqual[c, -1.15e-112], N[(2.0 * N[(t$95$2 - N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.45e-168], N[(2.0 * N[(t$95$2 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.25e-57], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \leq -3.5 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -1.15 \cdot 10^{-112}:\\
\;\;\;\;2 \cdot \left(t_2 - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{-168}:\\
\;\;\;\;2 \cdot \left(t_2 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-57}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -3.49999999999999997e142 or 1.25e-57 < c Initial program 84.3%
Taylor expanded in z around 0 90.8%
if -3.49999999999999997e142 < c < -1.14999999999999995e-112Initial program 90.6%
Taylor expanded in a around 0 95.4%
unpow295.4%
associate-*r*95.4%
Simplified95.4%
if -1.14999999999999995e-112 < c < 1.4499999999999999e-168Initial program 98.5%
Taylor expanded in a around inf 98.5%
*-commutative98.5%
Simplified98.5%
if 1.4499999999999999e-168 < c < 1.25e-57Initial program 95.5%
Taylor expanded in a around 0 95.5%
associate--l+95.6%
associate-*l*95.6%
Applied egg-rr95.6%
Final simplification94.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* c (* b (* c i))))))
(if (<= c -1.15e+204)
t_1
(if (<= c -1.1e+180)
(* -2.0 (* a (* c i)))
(if (<= c -2.4e+58)
t_1
(if (<= c -8.6e-237)
(* 2.0 (* z t))
(if (<= c 1.6e+27)
(* (* x y) 2.0)
(if (<= c 6.8e+66) (* -2.0 (* c (* a i))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (c * (b * (c * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_1;
} else if (c <= -1.1e+180) {
tmp = -2.0 * (a * (c * i));
} else if (c <= -2.4e+58) {
tmp = t_1;
} else if (c <= -8.6e-237) {
tmp = 2.0 * (z * t);
} else if (c <= 1.6e+27) {
tmp = (x * y) * 2.0;
} else if (c <= 6.8e+66) {
tmp = -2.0 * (c * (a * i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (-2.0d0) * (c * (b * (c * i)))
if (c <= (-1.15d+204)) then
tmp = t_1
else if (c <= (-1.1d+180)) then
tmp = (-2.0d0) * (a * (c * i))
else if (c <= (-2.4d+58)) then
tmp = t_1
else if (c <= (-8.6d-237)) then
tmp = 2.0d0 * (z * t)
else if (c <= 1.6d+27) then
tmp = (x * y) * 2.0d0
else if (c <= 6.8d+66) then
tmp = (-2.0d0) * (c * (a * i))
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 i) {
double t_1 = -2.0 * (c * (b * (c * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_1;
} else if (c <= -1.1e+180) {
tmp = -2.0 * (a * (c * i));
} else if (c <= -2.4e+58) {
tmp = t_1;
} else if (c <= -8.6e-237) {
tmp = 2.0 * (z * t);
} else if (c <= 1.6e+27) {
tmp = (x * y) * 2.0;
} else if (c <= 6.8e+66) {
tmp = -2.0 * (c * (a * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (c * (b * (c * i))) tmp = 0 if c <= -1.15e+204: tmp = t_1 elif c <= -1.1e+180: tmp = -2.0 * (a * (c * i)) elif c <= -2.4e+58: tmp = t_1 elif c <= -8.6e-237: tmp = 2.0 * (z * t) elif c <= 1.6e+27: tmp = (x * y) * 2.0 elif c <= 6.8e+66: tmp = -2.0 * (c * (a * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))) tmp = 0.0 if (c <= -1.15e+204) tmp = t_1; elseif (c <= -1.1e+180) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (c <= -2.4e+58) tmp = t_1; elseif (c <= -8.6e-237) tmp = Float64(2.0 * Float64(z * t)); elseif (c <= 1.6e+27) tmp = Float64(Float64(x * y) * 2.0); elseif (c <= 6.8e+66) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -2.0 * (c * (b * (c * i))); tmp = 0.0; if (c <= -1.15e+204) tmp = t_1; elseif (c <= -1.1e+180) tmp = -2.0 * (a * (c * i)); elseif (c <= -2.4e+58) tmp = t_1; elseif (c <= -8.6e-237) tmp = 2.0 * (z * t); elseif (c <= 1.6e+27) tmp = (x * y) * 2.0; elseif (c <= 6.8e+66) tmp = -2.0 * (c * (a * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$1, If[LessEqual[c, -1.1e+180], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.4e+58], t$95$1, If[LessEqual[c, -8.6e-237], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.6e+27], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 6.8e+66], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -2.4 \cdot 10^{+58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -8.6 \cdot 10^{-237}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{+27}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{+66}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -1.14999999999999995e204 or -1.1e180 < c < -2.4e58 or 6.8000000000000006e66 < c Initial program 82.6%
Taylor expanded in x around 0 83.8%
Taylor expanded in c around inf 68.7%
*-commutative68.7%
unpow268.7%
associate-*r*69.1%
associate-*r*73.2%
*-commutative73.2%
Simplified73.2%
if -1.14999999999999995e204 < c < -1.1e180Initial program 71.5%
Taylor expanded in x around 0 89.9%
Taylor expanded in a around inf 68.9%
if -2.4e58 < c < -8.59999999999999965e-237Initial program 97.8%
Taylor expanded in z around inf 51.6%
if -8.59999999999999965e-237 < c < 1.60000000000000008e27Initial program 97.5%
Taylor expanded in x around inf 53.9%
if 1.60000000000000008e27 < c < 6.8000000000000006e66Initial program 90.8%
Taylor expanded in x around 0 90.2%
Taylor expanded in a around inf 60.8%
*-commutative60.8%
*-commutative60.8%
associate-*r*70.3%
Simplified70.3%
Final simplification62.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0)) (t_2 (* -2.0 (* c (* c (* b i))))))
(if (<= c -1.15e+204)
t_2
(if (<= c -1.1e+180)
(* -2.0 (* a (* c i)))
(if (<= c -2.8e+88)
t_2
(if (<= c 1.85e+28)
t_1
(if (<= c 1.06e+48)
(* -2.0 (* c (* a i)))
(if (<= c 9.2e+61) t_1 (* -2.0 (* (* b c) (* c i)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_2;
} else if (c <= -1.1e+180) {
tmp = -2.0 * (a * (c * i));
} else if (c <= -2.8e+88) {
tmp = t_2;
} else if (c <= 1.85e+28) {
tmp = t_1;
} else if (c <= 1.06e+48) {
tmp = -2.0 * (c * (a * i));
} else if (c <= 9.2e+61) {
tmp = t_1;
} else {
tmp = -2.0 * ((b * c) * (c * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
t_2 = (-2.0d0) * (c * (c * (b * i)))
if (c <= (-1.15d+204)) then
tmp = t_2
else if (c <= (-1.1d+180)) then
tmp = (-2.0d0) * (a * (c * i))
else if (c <= (-2.8d+88)) then
tmp = t_2
else if (c <= 1.85d+28) then
tmp = t_1
else if (c <= 1.06d+48) then
tmp = (-2.0d0) * (c * (a * i))
else if (c <= 9.2d+61) then
tmp = t_1
else
tmp = (-2.0d0) * ((b * c) * (c * i))
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 i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1.15e+204) {
tmp = t_2;
} else if (c <= -1.1e+180) {
tmp = -2.0 * (a * (c * i));
} else if (c <= -2.8e+88) {
tmp = t_2;
} else if (c <= 1.85e+28) {
tmp = t_1;
} else if (c <= 1.06e+48) {
tmp = -2.0 * (c * (a * i));
} else if (c <= 9.2e+61) {
tmp = t_1;
} else {
tmp = -2.0 * ((b * c) * (c * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = -2.0 * (c * (c * (b * i))) tmp = 0 if c <= -1.15e+204: tmp = t_2 elif c <= -1.1e+180: tmp = -2.0 * (a * (c * i)) elif c <= -2.8e+88: tmp = t_2 elif c <= 1.85e+28: tmp = t_1 elif c <= 1.06e+48: tmp = -2.0 * (c * (a * i)) elif c <= 9.2e+61: tmp = t_1 else: tmp = -2.0 * ((b * c) * (c * i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i)))) tmp = 0.0 if (c <= -1.15e+204) tmp = t_2; elseif (c <= -1.1e+180) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (c <= -2.8e+88) tmp = t_2; elseif (c <= 1.85e+28) tmp = t_1; elseif (c <= 1.06e+48) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); elseif (c <= 9.2e+61) tmp = t_1; else tmp = Float64(-2.0 * Float64(Float64(b * c) * Float64(c * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; t_2 = -2.0 * (c * (c * (b * i))); tmp = 0.0; if (c <= -1.15e+204) tmp = t_2; elseif (c <= -1.1e+180) tmp = -2.0 * (a * (c * i)); elseif (c <= -2.8e+88) tmp = t_2; elseif (c <= 1.85e+28) tmp = t_1; elseif (c <= 1.06e+48) tmp = -2.0 * (c * (a * i)); elseif (c <= 9.2e+61) tmp = t_1; else tmp = -2.0 * ((b * c) * (c * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$2, If[LessEqual[c, -1.1e+180], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.8e+88], t$95$2, If[LessEqual[c, 1.85e+28], t$95$1, If[LessEqual[c, 1.06e+48], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.2e+61], t$95$1, N[(-2.0 * N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -2.8 \cdot 10^{+88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.85 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.06 \cdot 10^{+48}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -1.14999999999999995e204 or -1.1e180 < c < -2.79999999999999989e88Initial program 78.4%
Taylor expanded in x around 0 76.0%
Taylor expanded in c around inf 75.4%
*-commutative75.4%
unpow275.4%
associate-*r*73.1%
associate-*r*75.3%
*-commutative75.3%
Simplified75.3%
expm1-log1p-u43.5%
expm1-udef43.3%
associate-*r*41.3%
*-commutative41.3%
associate-*l*43.3%
Applied egg-rr43.3%
expm1-def43.5%
expm1-log1p75.3%
Simplified75.3%
if -1.14999999999999995e204 < c < -1.1e180Initial program 71.5%
Taylor expanded in x around 0 89.9%
Taylor expanded in a around inf 68.9%
if -2.79999999999999989e88 < c < 1.85e28 or 1.06e48 < c < 9.1999999999999998e61Initial program 97.1%
Taylor expanded in c around 0 82.9%
if 1.85e28 < c < 1.06e48Initial program 81.5%
Taylor expanded in x around 0 100.0%
Taylor expanded in a around inf 81.0%
*-commutative81.0%
*-commutative81.0%
associate-*r*100.0%
Simplified100.0%
if 9.1999999999999998e61 < c Initial program 86.0%
Taylor expanded in x around 0 92.8%
Taylor expanded in c around inf 65.7%
*-commutative65.7%
unpow265.7%
associate-*r*68.0%
associate-*r*73.6%
*-commutative73.6%
Simplified73.6%
expm1-log1p-u37.7%
expm1-udef31.0%
associate-*r*32.4%
*-commutative32.4%
associate-*l*31.0%
Applied egg-rr31.0%
expm1-def36.5%
expm1-log1p72.4%
Simplified72.4%
Taylor expanded in c around 0 65.7%
unpow265.7%
associate-*r*68.0%
associate-*r*75.1%
*-commutative75.1%
Simplified75.1%
Final simplification79.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0)) (t_2 (* (* b -2.0) (* i (* c c)))))
(if (<= c -1.2e+204)
t_2
(if (<= c -5.8e+177)
(* -2.0 (* a (* c i)))
(if (<= c -3e+82)
t_2
(if (<= c 3.3e+28)
t_1
(if (<= c 2.65e+48)
(* -2.0 (* c (* a i)))
(if (<= c 4.9e+61) t_1 (* -2.0 (* (* b c) (* c i)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = (b * -2.0) * (i * (c * c));
double tmp;
if (c <= -1.2e+204) {
tmp = t_2;
} else if (c <= -5.8e+177) {
tmp = -2.0 * (a * (c * i));
} else if (c <= -3e+82) {
tmp = t_2;
} else if (c <= 3.3e+28) {
tmp = t_1;
} else if (c <= 2.65e+48) {
tmp = -2.0 * (c * (a * i));
} else if (c <= 4.9e+61) {
tmp = t_1;
} else {
tmp = -2.0 * ((b * c) * (c * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
t_2 = (b * (-2.0d0)) * (i * (c * c))
if (c <= (-1.2d+204)) then
tmp = t_2
else if (c <= (-5.8d+177)) then
tmp = (-2.0d0) * (a * (c * i))
else if (c <= (-3d+82)) then
tmp = t_2
else if (c <= 3.3d+28) then
tmp = t_1
else if (c <= 2.65d+48) then
tmp = (-2.0d0) * (c * (a * i))
else if (c <= 4.9d+61) then
tmp = t_1
else
tmp = (-2.0d0) * ((b * c) * (c * i))
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 i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = (b * -2.0) * (i * (c * c));
double tmp;
if (c <= -1.2e+204) {
tmp = t_2;
} else if (c <= -5.8e+177) {
tmp = -2.0 * (a * (c * i));
} else if (c <= -3e+82) {
tmp = t_2;
} else if (c <= 3.3e+28) {
tmp = t_1;
} else if (c <= 2.65e+48) {
tmp = -2.0 * (c * (a * i));
} else if (c <= 4.9e+61) {
tmp = t_1;
} else {
tmp = -2.0 * ((b * c) * (c * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = (b * -2.0) * (i * (c * c)) tmp = 0 if c <= -1.2e+204: tmp = t_2 elif c <= -5.8e+177: tmp = -2.0 * (a * (c * i)) elif c <= -3e+82: tmp = t_2 elif c <= 3.3e+28: tmp = t_1 elif c <= 2.65e+48: tmp = -2.0 * (c * (a * i)) elif c <= 4.9e+61: tmp = t_1 else: tmp = -2.0 * ((b * c) * (c * i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(Float64(b * -2.0) * Float64(i * Float64(c * c))) tmp = 0.0 if (c <= -1.2e+204) tmp = t_2; elseif (c <= -5.8e+177) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (c <= -3e+82) tmp = t_2; elseif (c <= 3.3e+28) tmp = t_1; elseif (c <= 2.65e+48) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); elseif (c <= 4.9e+61) tmp = t_1; else tmp = Float64(-2.0 * Float64(Float64(b * c) * Float64(c * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; t_2 = (b * -2.0) * (i * (c * c)); tmp = 0.0; if (c <= -1.2e+204) tmp = t_2; elseif (c <= -5.8e+177) tmp = -2.0 * (a * (c * i)); elseif (c <= -3e+82) tmp = t_2; elseif (c <= 3.3e+28) tmp = t_1; elseif (c <= 2.65e+48) tmp = -2.0 * (c * (a * i)); elseif (c <= 4.9e+61) tmp = t_1; else tmp = -2.0 * ((b * c) * (c * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * -2.0), $MachinePrecision] * N[(i * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.2e+204], t$95$2, If[LessEqual[c, -5.8e+177], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3e+82], t$95$2, If[LessEqual[c, 3.3e+28], t$95$1, If[LessEqual[c, 2.65e+48], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.9e+61], t$95$1, N[(-2.0 * N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := \left(b \cdot -2\right) \cdot \left(i \cdot \left(c \cdot c\right)\right)\\
\mathbf{if}\;c \leq -1.2 \cdot 10^{+204}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -5.8 \cdot 10^{+177}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -3 \cdot 10^{+82}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 3.3 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.65 \cdot 10^{+48}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -1.2e204 or -5.80000000000000027e177 < c < -2.99999999999999989e82Initial program 79.7%
Taylor expanded in x around 0 74.8%
Taylor expanded in c around inf 78.9%
*-commutative78.9%
unpow278.9%
associate-*r*74.1%
associate-*r*76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in c around 0 78.9%
associate-*r*78.9%
unpow278.9%
Simplified78.9%
if -1.2e204 < c < -5.80000000000000027e177Initial program 68.6%
Taylor expanded in x around 0 91.4%
Taylor expanded in a around inf 65.8%
if -2.99999999999999989e82 < c < 3.3e28 or 2.65e48 < c < 4.90000000000000025e61Initial program 97.1%
Taylor expanded in c around 0 82.9%
if 3.3e28 < c < 2.65e48Initial program 81.5%
Taylor expanded in x around 0 100.0%
Taylor expanded in a around inf 81.0%
*-commutative81.0%
*-commutative81.0%
associate-*r*100.0%
Simplified100.0%
if 4.90000000000000025e61 < c Initial program 86.0%
Taylor expanded in x around 0 92.8%
Taylor expanded in c around inf 65.7%
*-commutative65.7%
unpow265.7%
associate-*r*68.0%
associate-*r*73.6%
*-commutative73.6%
Simplified73.6%
expm1-log1p-u37.7%
expm1-udef31.0%
associate-*r*32.4%
*-commutative32.4%
associate-*l*31.0%
Applied egg-rr31.0%
expm1-def36.5%
expm1-log1p72.4%
Simplified72.4%
Taylor expanded in c around 0 65.7%
unpow265.7%
associate-*r*68.0%
associate-*r*75.1%
*-commutative75.1%
Simplified75.1%
Final simplification79.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -8.4e-19) (not (<= c 1.4e-37))) (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i)))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -8.4e-19) || !(c <= 1.4e-37)) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((c <= (-8.4d-19)) .or. (.not. (c <= 1.4d-37))) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
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 i) {
double tmp;
if ((c <= -8.4e-19) || !(c <= 1.4e-37)) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -8.4e-19) or not (c <= 1.4e-37): tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -8.4e-19) || !(c <= 1.4e-37)) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -8.4e-19) || ~((c <= 1.4e-37))) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -8.4e-19], N[Not[LessEqual[c, 1.4e-37]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.4 \cdot 10^{-19} \lor \neg \left(c \leq 1.4 \cdot 10^{-37}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -8.3999999999999996e-19 or 1.4000000000000001e-37 < c Initial program 85.0%
Taylor expanded in x around 0 83.8%
if -8.3999999999999996e-19 < c < 1.4000000000000001e-37Initial program 97.1%
Taylor expanded in c around 0 87.0%
Final simplification85.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -1.05e+80) (not (<= c 1.25e-57))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.05e+80) || !(c <= 1.25e-57)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((c <= (-1.05d+80)) .or. (.not. (c <= 1.25d-57))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
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 i) {
double tmp;
if ((c <= -1.05e+80) || !(c <= 1.25e-57)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.05e+80) or not (c <= 1.25e-57): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.05e+80) || !(c <= 1.25e-57)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -1.05e+80) || ~((c <= 1.25e-57))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.05e+80], N[Not[LessEqual[c, 1.25e-57]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.05 \cdot 10^{+80} \lor \neg \left(c \leq 1.25 \cdot 10^{-57}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -1.05000000000000001e80 or 1.25e-57 < c Initial program 84.0%
Taylor expanded in z around 0 90.0%
if -1.05000000000000001e80 < c < 1.25e-57Initial program 96.7%
Taylor expanded in c around 0 84.7%
Final simplification87.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -1.8e+84) (not (<= c 2.4e-27))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.8e+84) || !(c <= 2.4e-27)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((c <= (-1.8d+84)) .or. (.not. (c <= 2.4d-27))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (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 i) {
double tmp;
if ((c <= -1.8e+84) || !(c <= 2.4e-27)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.8e+84) or not (c <= 2.4e-27): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.8e+84) || !(c <= 2.4e-27)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -1.8e+84) || ~((c <= 2.4e-27))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.8e+84], N[Not[LessEqual[c, 2.4e-27]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.8 \cdot 10^{+84} \lor \neg \left(c \leq 2.4 \cdot 10^{-27}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -1.8e84 or 2.40000000000000002e-27 < c Initial program 83.2%
Taylor expanded in z around 0 90.4%
if -1.8e84 < c < 2.40000000000000002e-27Initial program 96.9%
Taylor expanded in a around inf 89.8%
*-commutative89.8%
Simplified89.8%
Final simplification90.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.1e+80) (not (<= c 1.55e+23))) (* -2.0 (* c (* (+ a (* b c)) i))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.1e+80) || !(c <= 1.55e+23)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((c <= (-2.1d+80)) .or. (.not. (c <= 1.55d+23))) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else
tmp = ((x * y) + (z * t)) * 2.0d0
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 i) {
double tmp;
if ((c <= -2.1e+80) || !(c <= 1.55e+23)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -2.1e+80) or not (c <= 1.55e+23): tmp = -2.0 * (c * ((a + (b * c)) * i)) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -2.1e+80) || !(c <= 1.55e+23)) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -2.1e+80) || ~((c <= 1.55e+23))) tmp = -2.0 * (c * ((a + (b * c)) * i)); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -2.1e+80], N[Not[LessEqual[c, 1.55e+23]], $MachinePrecision]], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.1 \cdot 10^{+80} \lor \neg \left(c \leq 1.55 \cdot 10^{+23}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -2.10000000000000001e80 or 1.54999999999999985e23 < c Initial program 82.3%
Taylor expanded in x around 0 86.4%
Taylor expanded in t around 0 85.4%
if -2.10000000000000001e80 < c < 1.54999999999999985e23Initial program 97.1%
Taylor expanded in c around 0 82.6%
Final simplification83.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* x y) 2.0)) (t_2 (* 2.0 (* z t))))
(if (<= t -2.65e-92)
t_2
(if (<= t 4.3e-18)
t_1
(if (<= t 1.75e+53)
(* -2.0 (* a (* c i)))
(if (<= t 7.5e+95) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) * 2.0;
double t_2 = 2.0 * (z * t);
double tmp;
if (t <= -2.65e-92) {
tmp = t_2;
} else if (t <= 4.3e-18) {
tmp = t_1;
} else if (t <= 1.75e+53) {
tmp = -2.0 * (a * (c * i));
} else if (t <= 7.5e+95) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * y) * 2.0d0
t_2 = 2.0d0 * (z * t)
if (t <= (-2.65d-92)) then
tmp = t_2
else if (t <= 4.3d-18) then
tmp = t_1
else if (t <= 1.75d+53) then
tmp = (-2.0d0) * (a * (c * i))
else if (t <= 7.5d+95) 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 i) {
double t_1 = (x * y) * 2.0;
double t_2 = 2.0 * (z * t);
double tmp;
if (t <= -2.65e-92) {
tmp = t_2;
} else if (t <= 4.3e-18) {
tmp = t_1;
} else if (t <= 1.75e+53) {
tmp = -2.0 * (a * (c * i));
} else if (t <= 7.5e+95) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) * 2.0 t_2 = 2.0 * (z * t) tmp = 0 if t <= -2.65e-92: tmp = t_2 elif t <= 4.3e-18: tmp = t_1 elif t <= 1.75e+53: tmp = -2.0 * (a * (c * i)) elif t <= 7.5e+95: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) * 2.0) t_2 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -2.65e-92) tmp = t_2; elseif (t <= 4.3e-18) tmp = t_1; elseif (t <= 1.75e+53) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (t <= 7.5e+95) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) * 2.0; t_2 = 2.0 * (z * t); tmp = 0.0; if (t <= -2.65e-92) tmp = t_2; elseif (t <= 4.3e-18) tmp = t_1; elseif (t <= 1.75e+53) tmp = -2.0 * (a * (c * i)); elseif (t <= 7.5e+95) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e-92], t$95$2, If[LessEqual[t, 4.3e-18], t$95$1, If[LessEqual[t, 1.75e+53], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+95], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y\right) \cdot 2\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{-92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+53}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+95}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.65000000000000015e-92 or 7.5000000000000001e95 < t Initial program 85.3%
Taylor expanded in z around inf 44.7%
if -2.65000000000000015e-92 < t < 4.3000000000000002e-18 or 1.75000000000000009e53 < t < 7.5000000000000001e95Initial program 93.6%
Taylor expanded in x around inf 39.8%
if 4.3000000000000002e-18 < t < 1.75000000000000009e53Initial program 100.0%
Taylor expanded in x around 0 75.3%
Taylor expanded in a around inf 20.8%
Final simplification40.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= t -2.3e-92) (not (<= t 7.2e+95))) (* 2.0 (* z t)) (* (* x y) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -2.3e-92) || !(t <= 7.2e+95)) {
tmp = 2.0 * (z * t);
} else {
tmp = (x * y) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((t <= (-2.3d-92)) .or. (.not. (t <= 7.2d+95))) then
tmp = 2.0d0 * (z * t)
else
tmp = (x * y) * 2.0d0
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 i) {
double tmp;
if ((t <= -2.3e-92) || !(t <= 7.2e+95)) {
tmp = 2.0 * (z * t);
} else {
tmp = (x * y) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -2.3e-92) or not (t <= 7.2e+95): tmp = 2.0 * (z * t) else: tmp = (x * y) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -2.3e-92) || !(t <= 7.2e+95)) tmp = Float64(2.0 * Float64(z * t)); else tmp = Float64(Float64(x * y) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((t <= -2.3e-92) || ~((t <= 7.2e+95))) tmp = 2.0 * (z * t); else tmp = (x * y) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -2.3e-92], N[Not[LessEqual[t, 7.2e+95]], $MachinePrecision]], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-92} \lor \neg \left(t \leq 7.2 \cdot 10^{+95}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\end{array}
\end{array}
if t < -2.30000000000000016e-92 or 7.19999999999999955e95 < t Initial program 85.3%
Taylor expanded in z around inf 44.7%
if -2.30000000000000016e-92 < t < 7.19999999999999955e95Initial program 94.4%
Taylor expanded in x around inf 37.5%
Final simplification40.9%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 90.1%
Taylor expanded in z around inf 28.5%
Final simplification28.5%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
herbie shell --seed 2023285
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))