
(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 19 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 (+ a (* b c))) (t_2 (+ (* z t) (* x y))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* (* c i) t_1)))
(* 2.0 (- (* z t) (* a (* c 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 = (z * t) + (x * y);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - ((c * i) * t_1));
} else {
tmp = 2.0 * ((z * t) - (a * (c * 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 = (z * t) + (x * y);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - ((c * i) * t_1));
} else {
tmp = 2.0 * ((z * t) - (a * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (z * t) + (x * y) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - ((c * i) * t_1)) else: tmp = 2.0 * ((z * t) - (a * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(Float64(c * i) * t_1))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (z * t) + (x * y); tmp = 0.0; if ((t_2 - ((c * t_1) * i)) <= Inf) tmp = 2.0 * (t_2 - ((c * i) * t_1)); else tmp = 2.0 * ((z * t) - (a * (c * 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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(N[(c * i), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := z \cdot t + x \cdot y\\
\mathbf{if}\;t_2 - \left(c \cdot t_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t_2 - \left(c \cdot i\right) \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \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 95.7%
associate-*r*98.8%
*-commutative98.8%
+-commutative98.8%
distribute-lft-in90.6%
Applied egg-rr90.6%
associate-*r*89.4%
fma-def89.4%
associate-*r*87.5%
Applied egg-rr87.5%
fma-udef87.5%
associate-*r*88.6%
*-commutative88.6%
associate-*r*90.6%
distribute-lft-out98.8%
Applied egg-rr98.8%
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 a around inf 27.3%
Taylor expanded in x around 0 64.0%
*-commutative64.0%
associate-*r*64.0%
*-commutative64.0%
Simplified64.0%
Final simplification97.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* z t) (* a (* c i)))))
(t_2 (* 2.0 (- (* x y) (* (* b i) (* c c))))))
(if (<= c -1.15e+78)
t_2
(if (<= c -2.9e+27)
t_1
(if (<= c -0.00102)
t_2
(if (<= c -4.7e-172)
t_1
(if (<= c 3.25e-118)
(* (+ (* z t) (* x y)) 2.0)
(if (<= c 2.4e-46)
t_1
(if (<= c 4e+42)
(* 2.0 (- (* z t) (* i (* c (* b c)))))
(* (* c (* i (+ a (* b c)))) -2.0))))))))))
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) - (a * (c * i)));
double t_2 = 2.0 * ((x * y) - ((b * i) * (c * c)));
double tmp;
if (c <= -1.15e+78) {
tmp = t_2;
} else if (c <= -2.9e+27) {
tmp = t_1;
} else if (c <= -0.00102) {
tmp = t_2;
} else if (c <= -4.7e-172) {
tmp = t_1;
} else if (c <= 3.25e-118) {
tmp = ((z * t) + (x * y)) * 2.0;
} else if (c <= 2.4e-46) {
tmp = t_1;
} else if (c <= 4e+42) {
tmp = 2.0 * ((z * t) - (i * (c * (b * c))));
} else {
tmp = (c * (i * (a + (b * c)))) * -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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) - (a * (c * i)))
t_2 = 2.0d0 * ((x * y) - ((b * i) * (c * c)))
if (c <= (-1.15d+78)) then
tmp = t_2
else if (c <= (-2.9d+27)) then
tmp = t_1
else if (c <= (-0.00102d0)) then
tmp = t_2
else if (c <= (-4.7d-172)) then
tmp = t_1
else if (c <= 3.25d-118) then
tmp = ((z * t) + (x * y)) * 2.0d0
else if (c <= 2.4d-46) then
tmp = t_1
else if (c <= 4d+42) then
tmp = 2.0d0 * ((z * t) - (i * (c * (b * c))))
else
tmp = (c * (i * (a + (b * c)))) * (-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 t_1 = 2.0 * ((z * t) - (a * (c * i)));
double t_2 = 2.0 * ((x * y) - ((b * i) * (c * c)));
double tmp;
if (c <= -1.15e+78) {
tmp = t_2;
} else if (c <= -2.9e+27) {
tmp = t_1;
} else if (c <= -0.00102) {
tmp = t_2;
} else if (c <= -4.7e-172) {
tmp = t_1;
} else if (c <= 3.25e-118) {
tmp = ((z * t) + (x * y)) * 2.0;
} else if (c <= 2.4e-46) {
tmp = t_1;
} else if (c <= 4e+42) {
tmp = 2.0 * ((z * t) - (i * (c * (b * c))));
} else {
tmp = (c * (i * (a + (b * c)))) * -2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) - (a * (c * i))) t_2 = 2.0 * ((x * y) - ((b * i) * (c * c))) tmp = 0 if c <= -1.15e+78: tmp = t_2 elif c <= -2.9e+27: tmp = t_1 elif c <= -0.00102: tmp = t_2 elif c <= -4.7e-172: tmp = t_1 elif c <= 3.25e-118: tmp = ((z * t) + (x * y)) * 2.0 elif c <= 2.4e-46: tmp = t_1 elif c <= 4e+42: tmp = 2.0 * ((z * t) - (i * (c * (b * c)))) else: tmp = (c * (i * (a + (b * c)))) * -2.0 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))) t_2 = Float64(2.0 * Float64(Float64(x * y) - Float64(Float64(b * i) * Float64(c * c)))) tmp = 0.0 if (c <= -1.15e+78) tmp = t_2; elseif (c <= -2.9e+27) tmp = t_1; elseif (c <= -0.00102) tmp = t_2; elseif (c <= -4.7e-172) tmp = t_1; elseif (c <= 3.25e-118) tmp = Float64(Float64(Float64(z * t) + Float64(x * y)) * 2.0); elseif (c <= 2.4e-46) tmp = t_1; elseif (c <= 4e+42) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(c * Float64(b * c))))); else tmp = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) - (a * (c * i))); t_2 = 2.0 * ((x * y) - ((b * i) * (c * c))); tmp = 0.0; if (c <= -1.15e+78) tmp = t_2; elseif (c <= -2.9e+27) tmp = t_1; elseif (c <= -0.00102) tmp = t_2; elseif (c <= -4.7e-172) tmp = t_1; elseif (c <= 3.25e-118) tmp = ((z * t) + (x * y)) * 2.0; elseif (c <= 2.4e-46) tmp = t_1; elseif (c <= 4e+42) tmp = 2.0 * ((z * t) - (i * (c * (b * c)))); else tmp = (c * (i * (a + (b * c)))) * -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(N[(b * i), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+78], t$95$2, If[LessEqual[c, -2.9e+27], t$95$1, If[LessEqual[c, -0.00102], t$95$2, If[LessEqual[c, -4.7e-172], t$95$1, If[LessEqual[c, 3.25e-118], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 2.4e-46], t$95$1, If[LessEqual[c, 4e+42], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(c * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y - \left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -2.9 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -0.00102:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -4.7 \cdot 10^{-172}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 3.25 \cdot 10^{-118}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 4 \cdot 10^{+42}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\end{array}
\end{array}
if c < -1.1500000000000001e78 or -2.9000000000000001e27 < c < -0.00102Initial program 87.8%
Taylor expanded in a around 0 83.6%
Taylor expanded in z around 0 83.6%
*-commutative83.6%
unpow283.6%
Simplified83.6%
if -1.1500000000000001e78 < c < -2.9000000000000001e27 or -0.00102 < c < -4.69999999999999976e-172 or 3.24999999999999979e-118 < c < 2.40000000000000013e-46Initial program 93.0%
Taylor expanded in a around inf 89.0%
Taylor expanded in x around 0 80.9%
*-commutative80.9%
associate-*r*84.0%
*-commutative84.0%
Simplified84.0%
if -4.69999999999999976e-172 < c < 3.24999999999999979e-118Initial program 100.0%
Taylor expanded in c around 0 92.8%
if 2.40000000000000013e-46 < c < 4.00000000000000018e42Initial program 100.0%
Taylor expanded in a around 0 92.7%
Taylor expanded in x around 0 77.5%
associate-*r*77.5%
*-commutative77.5%
associate-*r*77.6%
unpow277.6%
associate-*l*77.6%
Simplified77.6%
if 4.00000000000000018e42 < c Initial program 83.1%
fma-def83.1%
*-commutative83.1%
associate-*l*92.6%
+-commutative92.6%
fma-def92.6%
Simplified92.6%
Taylor expanded in i around inf 77.3%
Final simplification84.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* i (+ a (* b c)))) -2.0)))
(if (<= c -1e+68)
t_1
(if (<= c 2.75e-118)
(* (+ (* z t) (* x y)) 2.0)
(if (<= c 2.4e-47)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 1.45e+41) (* 2.0 (- (* z t) (* i (* c (* b c))))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -1e+68) {
tmp = t_1;
} else if (c <= 2.75e-118) {
tmp = ((z * t) + (x * y)) * 2.0;
} else if (c <= 2.4e-47) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 1.45e+41) {
tmp = 2.0 * ((z * t) - (i * (c * (b * c))));
} 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 = (c * (i * (a + (b * c)))) * (-2.0d0)
if (c <= (-1d+68)) then
tmp = t_1
else if (c <= 2.75d-118) then
tmp = ((z * t) + (x * y)) * 2.0d0
else if (c <= 2.4d-47) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 1.45d+41) then
tmp = 2.0d0 * ((z * t) - (i * (c * (b * c))))
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 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -1e+68) {
tmp = t_1;
} else if (c <= 2.75e-118) {
tmp = ((z * t) + (x * y)) * 2.0;
} else if (c <= 2.4e-47) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 1.45e+41) {
tmp = 2.0 * ((z * t) - (i * (c * (b * c))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * (i * (a + (b * c)))) * -2.0 tmp = 0 if c <= -1e+68: tmp = t_1 elif c <= 2.75e-118: tmp = ((z * t) + (x * y)) * 2.0 elif c <= 2.4e-47: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 1.45e+41: tmp = 2.0 * ((z * t) - (i * (c * (b * c)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0) tmp = 0.0 if (c <= -1e+68) tmp = t_1; elseif (c <= 2.75e-118) tmp = Float64(Float64(Float64(z * t) + Float64(x * y)) * 2.0); elseif (c <= 2.4e-47) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 1.45e+41) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(c * Float64(b * c))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * (i * (a + (b * c)))) * -2.0; tmp = 0.0; if (c <= -1e+68) tmp = t_1; elseif (c <= 2.75e-118) tmp = ((z * t) + (x * y)) * 2.0; elseif (c <= 2.4e-47) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 1.45e+41) tmp = 2.0 * ((z * t) - (i * (c * (b * c)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -1e+68], t$95$1, If[LessEqual[c, 2.75e-118], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 2.4e-47], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.45e+41], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(c * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -1 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.75 \cdot 10^{-118}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{-47}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{+41}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -9.99999999999999953e67 or 1.44999999999999994e41 < c Initial program 84.7%
fma-def84.7%
*-commutative84.7%
associate-*l*93.8%
+-commutative93.8%
fma-def93.8%
Simplified93.8%
Taylor expanded in i around inf 76.1%
if -9.99999999999999953e67 < c < 2.7500000000000001e-118Initial program 98.1%
Taylor expanded in c around 0 84.3%
if 2.7500000000000001e-118 < c < 2.3999999999999999e-47Initial program 88.0%
Taylor expanded in a around inf 88.0%
Taylor expanded in x around 0 94.0%
*-commutative94.0%
associate-*r*93.9%
*-commutative93.9%
Simplified93.9%
if 2.3999999999999999e-47 < c < 1.44999999999999994e41Initial program 100.0%
Taylor expanded in a around 0 92.7%
Taylor expanded in x around 0 77.5%
associate-*r*77.5%
*-commutative77.5%
associate-*r*77.6%
unpow277.6%
associate-*l*77.6%
Simplified77.6%
Final simplification81.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* z t) (* x y)) 2.0))
(t_2 (* (* c (* i (+ a (* b c)))) -2.0)))
(if (<= c -2.8e+62)
t_2
(if (<= c 6.8e-119)
t_1
(if (<= c 8.2e-10)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 9.4e+32) 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 = ((z * t) + (x * y)) * 2.0;
double t_2 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -2.8e+62) {
tmp = t_2;
} else if (c <= 6.8e-119) {
tmp = t_1;
} else if (c <= 8.2e-10) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 9.4e+32) {
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 = ((z * t) + (x * y)) * 2.0d0
t_2 = (c * (i * (a + (b * c)))) * (-2.0d0)
if (c <= (-2.8d+62)) then
tmp = t_2
else if (c <= 6.8d-119) then
tmp = t_1
else if (c <= 8.2d-10) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 9.4d+32) 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 = ((z * t) + (x * y)) * 2.0;
double t_2 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -2.8e+62) {
tmp = t_2;
} else if (c <= 6.8e-119) {
tmp = t_1;
} else if (c <= 8.2e-10) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 9.4e+32) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((z * t) + (x * y)) * 2.0 t_2 = (c * (i * (a + (b * c)))) * -2.0 tmp = 0 if c <= -2.8e+62: tmp = t_2 elif c <= 6.8e-119: tmp = t_1 elif c <= 8.2e-10: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 9.4e+32: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z * t) + Float64(x * y)) * 2.0) t_2 = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0) tmp = 0.0 if (c <= -2.8e+62) tmp = t_2; elseif (c <= 6.8e-119) tmp = t_1; elseif (c <= 8.2e-10) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 9.4e+32) 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 = ((z * t) + (x * y)) * 2.0; t_2 = (c * (i * (a + (b * c)))) * -2.0; tmp = 0.0; if (c <= -2.8e+62) tmp = t_2; elseif (c <= 6.8e-119) tmp = t_1; elseif (c <= 8.2e-10) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 9.4e+32) 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[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -2.8e+62], t$95$2, If[LessEqual[c, 6.8e-119], t$95$1, If[LessEqual[c, 8.2e-10], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.4e+32], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot t + x \cdot y\right) \cdot 2\\
t_2 := \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -2.8 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 8.2 \cdot 10^{-10}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 9.4 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -2.80000000000000014e62 or 9.40000000000000047e32 < c Initial program 85.0%
fma-def85.0%
*-commutative85.0%
associate-*l*93.9%
+-commutative93.9%
fma-def93.9%
Simplified93.9%
Taylor expanded in i around inf 76.5%
if -2.80000000000000014e62 < c < 6.80000000000000047e-119 or 8.1999999999999996e-10 < c < 9.40000000000000047e32Initial program 98.3%
Taylor expanded in c around 0 83.6%
if 6.80000000000000047e-119 < c < 8.1999999999999996e-10Initial program 90.3%
Taylor expanded in a around inf 85.5%
Taylor expanded in x around 0 90.4%
*-commutative90.4%
associate-*r*90.3%
*-commutative90.3%
Simplified90.3%
Final simplification80.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -5.5e+30) (not (<= c 7.8e-119))) (* 2.0 (- (* z t) (* c (* i (+ a (* b c)))))) (* (+ (* 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 ((c <= -5.5e+30) || !(c <= 7.8e-119)) {
tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c)))));
} else {
tmp = ((z * t) + (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 ((c <= (-5.5d+30)) .or. (.not. (c <= 7.8d-119))) then
tmp = 2.0d0 * ((z * t) - (c * (i * (a + (b * c)))))
else
tmp = ((z * t) + (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 ((c <= -5.5e+30) || !(c <= 7.8e-119)) {
tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c)))));
} else {
tmp = ((z * t) + (x * y)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -5.5e+30) or not (c <= 7.8e-119): tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c))))) else: tmp = ((z * t) + (x * y)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -5.5e+30) || !(c <= 7.8e-119)) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(b * c)))))); else tmp = Float64(Float64(Float64(z * t) + 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 ((c <= -5.5e+30) || ~((c <= 7.8e-119))) tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c))))); else tmp = ((z * t) + (x * y)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -5.5e+30], N[Not[LessEqual[c, 7.8e-119]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.5 \cdot 10^{+30} \lor \neg \left(c \leq 7.8 \cdot 10^{-119}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\end{array}
\end{array}
if c < -5.50000000000000025e30 or 7.7999999999999998e-119 < c Initial program 86.4%
Taylor expanded in x around 0 88.1%
if -5.50000000000000025e30 < c < 7.7999999999999998e-119Initial program 99.0%
Taylor expanded in c around 0 85.2%
Final simplification86.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.8e+81) (not (<= c 3.25e-118))) (* 2.0 (- (* z t) (* c (* i (+ a (* b c)))))) (* 2.0 (- (+ (* z t) (* x y)) (* 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 <= -2.8e+81) || !(c <= 3.25e-118)) {
tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c)))));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - (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 <= (-2.8d+81)) .or. (.not. (c <= 3.25d-118))) then
tmp = 2.0d0 * ((z * t) - (c * (i * (a + (b * c)))))
else
tmp = 2.0d0 * (((z * t) + (x * y)) - (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 <= -2.8e+81) || !(c <= 3.25e-118)) {
tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c)))));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -2.8e+81) or not (c <= 3.25e-118): tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c))))) else: tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -2.8e+81) || !(c <= 3.25e-118)) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(b * c)))))); else tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - 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 <= -2.8e+81) || ~((c <= 3.25e-118))) tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c))))); else tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -2.8e+81], N[Not[LessEqual[c, 3.25e-118]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.8 \cdot 10^{+81} \lor \neg \left(c \leq 3.25 \cdot 10^{-118}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -2.79999999999999995e81 or 3.24999999999999979e-118 < c Initial program 86.1%
Taylor expanded in x around 0 88.5%
if -2.79999999999999995e81 < c < 3.24999999999999979e-118Initial program 98.2%
Taylor expanded in a around inf 95.3%
Final simplification91.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* i (+ a (* b c))))))
(if (<= x -3.1e+205)
(* 2.0 (- (* x y) t_1))
(if (<= x 1.2e+51) (* 2.0 (- (* z t) t_1)) (* (+ (* 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 t_1 = c * (i * (a + (b * c)));
double tmp;
if (x <= -3.1e+205) {
tmp = 2.0 * ((x * y) - t_1);
} else if (x <= 1.2e+51) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = ((z * t) + (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) :: t_1
real(8) :: tmp
t_1 = c * (i * (a + (b * c)))
if (x <= (-3.1d+205)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (x <= 1.2d+51) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = ((z * t) + (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 t_1 = c * (i * (a + (b * c)));
double tmp;
if (x <= -3.1e+205) {
tmp = 2.0 * ((x * y) - t_1);
} else if (x <= 1.2e+51) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = ((z * t) + (x * y)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (i * (a + (b * c))) tmp = 0 if x <= -3.1e+205: tmp = 2.0 * ((x * y) - t_1) elif x <= 1.2e+51: tmp = 2.0 * ((z * t) - t_1) else: tmp = ((z * t) + (x * y)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(i * Float64(a + Float64(b * c)))) tmp = 0.0 if (x <= -3.1e+205) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (x <= 1.2e+51) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(Float64(Float64(z * t) + Float64(x * y)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * (i * (a + (b * c))); tmp = 0.0; if (x <= -3.1e+205) tmp = 2.0 * ((x * y) - t_1); elseif (x <= 1.2e+51) tmp = 2.0 * ((z * t) - t_1); else tmp = ((z * t) + (x * y)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.1e+205], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e+51], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\\
\mathbf{if}\;x \leq -3.1 \cdot 10^{+205}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+51}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\end{array}
\end{array}
if x < -3.10000000000000017e205Initial program 87.1%
Taylor expanded in z around 0 82.5%
if -3.10000000000000017e205 < x < 1.1999999999999999e51Initial program 94.1%
Taylor expanded in x around 0 82.5%
if 1.1999999999999999e51 < x Initial program 84.4%
Taylor expanded in c around 0 72.4%
Final simplification80.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -8e+81)
(* 2.0 (+ (* z t) (- (* x y) (* (* c i) (* b c)))))
(if (<= c 3.25e-118)
(* 2.0 (- (+ (* z t) (* x y)) (* i (* a c))))
(* 2.0 (- (* z t) (* c (* i (+ a (* b c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -8e+81) {
tmp = 2.0 * ((z * t) + ((x * y) - ((c * i) * (b * c))));
} else if (c <= 3.25e-118) {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c)));
} else {
tmp = 2.0 * ((z * t) - (c * (i * (a + (b * 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 <= (-8d+81)) then
tmp = 2.0d0 * ((z * t) + ((x * y) - ((c * i) * (b * c))))
else if (c <= 3.25d-118) then
tmp = 2.0d0 * (((z * t) + (x * y)) - (i * (a * c)))
else
tmp = 2.0d0 * ((z * t) - (c * (i * (a + (b * 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 <= -8e+81) {
tmp = 2.0 * ((z * t) + ((x * y) - ((c * i) * (b * c))));
} else if (c <= 3.25e-118) {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c)));
} else {
tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -8e+81: tmp = 2.0 * ((z * t) + ((x * y) - ((c * i) * (b * c)))) elif c <= 3.25e-118: tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))) else: tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -8e+81) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(Float64(x * y) - Float64(Float64(c * i) * Float64(b * c))))); elseif (c <= 3.25e-118) tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(b * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -8e+81) tmp = 2.0 * ((z * t) + ((x * y) - ((c * i) * (b * c)))); elseif (c <= 3.25e-118) tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))); else tmp = 2.0 * ((z * t) - (c * (i * (a + (b * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -8e+81], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.25e-118], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8 \cdot 10^{+81}:\\
\;\;\;\;2 \cdot \left(z \cdot t + \left(x \cdot y - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq 3.25 \cdot 10^{-118}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\
\end{array}
\end{array}
if c < -7.99999999999999937e81Initial program 86.0%
Taylor expanded in a around 0 81.2%
sub-neg81.2%
+-commutative81.2%
associate-+l+81.2%
associate-*l*90.3%
distribute-rgt-neg-in90.3%
distribute-rgt-neg-in90.3%
Applied egg-rr90.3%
if -7.99999999999999937e81 < c < 3.24999999999999979e-118Initial program 98.2%
Taylor expanded in a around inf 95.3%
if 3.24999999999999979e-118 < c Initial program 86.2%
Taylor expanded in x around 0 89.6%
Final simplification92.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* c (* c (* b i))))))
(if (<= c -4.6e+81)
t_1
(if (<= c -3.7e-199)
(* 2.0 (* z t))
(if (<= c 1.8e-199)
(* x (* y 2.0))
(if (<= c 4.9e-29) (* t (* z 2.0)) 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 * (c * (b * i)));
double tmp;
if (c <= -4.6e+81) {
tmp = t_1;
} else if (c <= -3.7e-199) {
tmp = 2.0 * (z * t);
} else if (c <= 1.8e-199) {
tmp = x * (y * 2.0);
} else if (c <= 4.9e-29) {
tmp = t * (z * 2.0);
} 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 * (c * (b * i)))
if (c <= (-4.6d+81)) then
tmp = t_1
else if (c <= (-3.7d-199)) then
tmp = 2.0d0 * (z * t)
else if (c <= 1.8d-199) then
tmp = x * (y * 2.0d0)
else if (c <= 4.9d-29) then
tmp = t * (z * 2.0d0)
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 * (c * (b * i)));
double tmp;
if (c <= -4.6e+81) {
tmp = t_1;
} else if (c <= -3.7e-199) {
tmp = 2.0 * (z * t);
} else if (c <= 1.8e-199) {
tmp = x * (y * 2.0);
} else if (c <= 4.9e-29) {
tmp = t * (z * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (c * (c * (b * i))) tmp = 0 if c <= -4.6e+81: tmp = t_1 elif c <= -3.7e-199: tmp = 2.0 * (z * t) elif c <= 1.8e-199: tmp = x * (y * 2.0) elif c <= 4.9e-29: tmp = t * (z * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i)))) tmp = 0.0 if (c <= -4.6e+81) tmp = t_1; elseif (c <= -3.7e-199) tmp = Float64(2.0 * Float64(z * t)); elseif (c <= 1.8e-199) tmp = Float64(x * Float64(y * 2.0)); elseif (c <= 4.9e-29) tmp = Float64(t * Float64(z * 2.0)); 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 * (c * (b * i))); tmp = 0.0; if (c <= -4.6e+81) tmp = t_1; elseif (c <= -3.7e-199) tmp = 2.0 * (z * t); elseif (c <= 1.8e-199) tmp = x * (y * 2.0); elseif (c <= 4.9e-29) tmp = t * (z * 2.0); 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[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.6e+81], t$95$1, If[LessEqual[c, -3.7e-199], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.8e-199], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.9e-29], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -4.6 \cdot 10^{+81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -3.7 \cdot 10^{-199}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.8 \cdot 10^{-199}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{-29}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -4.5999999999999998e81 or 4.8999999999999998e-29 < c Initial program 85.6%
fma-def85.6%
*-commutative85.6%
associate-*l*94.1%
+-commutative94.1%
fma-def94.1%
Simplified94.1%
Taylor expanded in i around inf 75.0%
Taylor expanded in c around inf 61.3%
if -4.5999999999999998e81 < c < -3.69999999999999999e-199Initial program 96.2%
Taylor expanded in z around inf 47.8%
if -3.69999999999999999e-199 < c < 1.8000000000000001e-199Initial program 99.9%
fma-def99.9%
*-commutative99.9%
associate-*l*91.5%
+-commutative91.5%
fma-def91.5%
Simplified91.5%
Taylor expanded in x around inf 63.4%
associate-*r*63.4%
Simplified63.4%
if 1.8000000000000001e-199 < c < 4.8999999999999998e-29Initial program 94.3%
associate-*r*94.4%
*-commutative94.4%
+-commutative94.4%
distribute-lft-in94.4%
Applied egg-rr94.4%
associate-*r*91.6%
fma-def91.6%
associate-*r*91.6%
Applied egg-rr91.6%
fma-udef91.6%
associate-*r*94.4%
*-commutative94.4%
associate-*r*94.4%
distribute-lft-out94.4%
Applied egg-rr94.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-*r*67.7%
Simplified67.7%
Final simplification59.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* c (* i (* b c))))))
(if (<= c -2.8e+81)
t_1
(if (<= c -7.5e-199)
(* 2.0 (* z t))
(if (<= c 1.45e-199)
(* x (* y 2.0))
(if (<= c 4.9e-29) (* t (* z 2.0)) 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 * (i * (b * c)));
double tmp;
if (c <= -2.8e+81) {
tmp = t_1;
} else if (c <= -7.5e-199) {
tmp = 2.0 * (z * t);
} else if (c <= 1.45e-199) {
tmp = x * (y * 2.0);
} else if (c <= 4.9e-29) {
tmp = t * (z * 2.0);
} 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 * (i * (b * c)))
if (c <= (-2.8d+81)) then
tmp = t_1
else if (c <= (-7.5d-199)) then
tmp = 2.0d0 * (z * t)
else if (c <= 1.45d-199) then
tmp = x * (y * 2.0d0)
else if (c <= 4.9d-29) then
tmp = t * (z * 2.0d0)
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 * (i * (b * c)));
double tmp;
if (c <= -2.8e+81) {
tmp = t_1;
} else if (c <= -7.5e-199) {
tmp = 2.0 * (z * t);
} else if (c <= 1.45e-199) {
tmp = x * (y * 2.0);
} else if (c <= 4.9e-29) {
tmp = t * (z * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (c * (i * (b * c))) tmp = 0 if c <= -2.8e+81: tmp = t_1 elif c <= -7.5e-199: tmp = 2.0 * (z * t) elif c <= 1.45e-199: tmp = x * (y * 2.0) elif c <= 4.9e-29: tmp = t * (z * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(c * Float64(i * Float64(b * c)))) tmp = 0.0 if (c <= -2.8e+81) tmp = t_1; elseif (c <= -7.5e-199) tmp = Float64(2.0 * Float64(z * t)); elseif (c <= 1.45e-199) tmp = Float64(x * Float64(y * 2.0)); elseif (c <= 4.9e-29) tmp = Float64(t * Float64(z * 2.0)); 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 * (i * (b * c))); tmp = 0.0; if (c <= -2.8e+81) tmp = t_1; elseif (c <= -7.5e-199) tmp = 2.0 * (z * t); elseif (c <= 1.45e-199) tmp = x * (y * 2.0); elseif (c <= 4.9e-29) tmp = t * (z * 2.0); 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[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.8e+81], t$95$1, If[LessEqual[c, -7.5e-199], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.45e-199], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.9e-29], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{if}\;c \leq -2.8 \cdot 10^{+81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -7.5 \cdot 10^{-199}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{-199}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{-29}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -2.79999999999999995e81 or 4.8999999999999998e-29 < c Initial program 85.6%
fma-def85.6%
*-commutative85.6%
associate-*l*94.1%
+-commutative94.1%
fma-def94.1%
Simplified94.1%
Taylor expanded in i around inf 75.0%
Taylor expanded in c around inf 62.2%
if -2.79999999999999995e81 < c < -7.5000000000000003e-199Initial program 96.2%
Taylor expanded in z around inf 47.8%
if -7.5000000000000003e-199 < c < 1.45e-199Initial program 99.9%
fma-def99.9%
*-commutative99.9%
associate-*l*91.5%
+-commutative91.5%
fma-def91.5%
Simplified91.5%
Taylor expanded in x around inf 63.4%
associate-*r*63.4%
Simplified63.4%
if 1.45e-199 < c < 4.8999999999999998e-29Initial program 94.3%
associate-*r*94.4%
*-commutative94.4%
+-commutative94.4%
distribute-lft-in94.4%
Applied egg-rr94.4%
associate-*r*91.6%
fma-def91.6%
associate-*r*91.6%
Applied egg-rr91.6%
fma-udef91.6%
associate-*r*94.4%
*-commutative94.4%
associate-*r*94.4%
distribute-lft-out94.4%
Applied egg-rr94.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-*r*67.7%
Simplified67.7%
Final simplification60.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -5.7e+62) (not (<= c 2.15e+33))) (* (* c (* i (+ a (* b c)))) -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 ((c <= -5.7e+62) || !(c <= 2.15e+33)) {
tmp = (c * (i * (a + (b * c)))) * -2.0;
} else {
tmp = ((z * t) + (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 ((c <= (-5.7d+62)) .or. (.not. (c <= 2.15d+33))) then
tmp = (c * (i * (a + (b * c)))) * (-2.0d0)
else
tmp = ((z * t) + (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 ((c <= -5.7e+62) || !(c <= 2.15e+33)) {
tmp = (c * (i * (a + (b * c)))) * -2.0;
} else {
tmp = ((z * t) + (x * y)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -5.7e+62) or not (c <= 2.15e+33): tmp = (c * (i * (a + (b * c)))) * -2.0 else: tmp = ((z * t) + (x * y)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -5.7e+62) || !(c <= 2.15e+33)) tmp = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0); else tmp = Float64(Float64(Float64(z * t) + 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 ((c <= -5.7e+62) || ~((c <= 2.15e+33))) tmp = (c * (i * (a + (b * c)))) * -2.0; else tmp = ((z * t) + (x * y)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -5.7e+62], N[Not[LessEqual[c, 2.15e+33]], $MachinePrecision]], N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.7 \cdot 10^{+62} \lor \neg \left(c \leq 2.15 \cdot 10^{+33}\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\end{array}
\end{array}
if c < -5.69999999999999998e62 or 2.15000000000000014e33 < c Initial program 85.0%
fma-def85.0%
*-commutative85.0%
associate-*l*93.9%
+-commutative93.9%
fma-def93.9%
Simplified93.9%
Taylor expanded in i around inf 76.5%
if -5.69999999999999998e62 < c < 2.15000000000000014e33Initial program 97.1%
Taylor expanded in c around 0 80.5%
Final simplification78.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (* y 2.0))))
(if (<= x -3.2e+205)
t_1
(if (<= x -2.05e+80)
(* 2.0 (* z t))
(if (<= x -320.0)
(* a (* (* c i) -2.0))
(if (<= x 1.8e+49) (* t (* z 2.0)) t_1))))))
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 tmp;
if (x <= -3.2e+205) {
tmp = t_1;
} else if (x <= -2.05e+80) {
tmp = 2.0 * (z * t);
} else if (x <= -320.0) {
tmp = a * ((c * i) * -2.0);
} else if (x <= 1.8e+49) {
tmp = t * (z * 2.0);
} 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 = x * (y * 2.0d0)
if (x <= (-3.2d+205)) then
tmp = t_1
else if (x <= (-2.05d+80)) then
tmp = 2.0d0 * (z * t)
else if (x <= (-320.0d0)) then
tmp = a * ((c * i) * (-2.0d0))
else if (x <= 1.8d+49) then
tmp = t * (z * 2.0d0)
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 = x * (y * 2.0);
double tmp;
if (x <= -3.2e+205) {
tmp = t_1;
} else if (x <= -2.05e+80) {
tmp = 2.0 * (z * t);
} else if (x <= -320.0) {
tmp = a * ((c * i) * -2.0);
} else if (x <= 1.8e+49) {
tmp = t * (z * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * (y * 2.0) tmp = 0 if x <= -3.2e+205: tmp = t_1 elif x <= -2.05e+80: tmp = 2.0 * (z * t) elif x <= -320.0: tmp = a * ((c * i) * -2.0) elif x <= 1.8e+49: tmp = t * (z * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * Float64(y * 2.0)) tmp = 0.0 if (x <= -3.2e+205) tmp = t_1; elseif (x <= -2.05e+80) tmp = Float64(2.0 * Float64(z * t)); elseif (x <= -320.0) tmp = Float64(a * Float64(Float64(c * i) * -2.0)); elseif (x <= 1.8e+49) tmp = Float64(t * Float64(z * 2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * (y * 2.0); tmp = 0.0; if (x <= -3.2e+205) tmp = t_1; elseif (x <= -2.05e+80) tmp = 2.0 * (z * t); elseif (x <= -320.0) tmp = a * ((c * i) * -2.0); elseif (x <= 1.8e+49) tmp = t * (z * 2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+205], t$95$1, If[LessEqual[x, -2.05e+80], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -320.0], N[(a * N[(N[(c * i), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e+49], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.05 \cdot 10^{+80}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \leq -320:\\
\;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+49}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -3.19999999999999996e205 or 1.79999999999999998e49 < x Initial program 85.4%
fma-def86.8%
*-commutative86.8%
associate-*l*89.2%
+-commutative89.2%
fma-def89.2%
Simplified89.2%
Taylor expanded in x around inf 53.4%
associate-*r*53.4%
Simplified53.4%
if -3.19999999999999996e205 < x < -2.05000000000000001e80Initial program 81.1%
Taylor expanded in z around inf 34.4%
if -2.05000000000000001e80 < x < -320Initial program 94.1%
fma-def94.1%
*-commutative94.1%
associate-*l*87.9%
+-commutative87.9%
fma-def87.9%
Simplified87.9%
Taylor expanded in a around inf 51.5%
*-commutative51.5%
associate-*r*51.3%
*-commutative51.3%
associate-*l*51.3%
Simplified51.3%
if -320 < x < 1.79999999999999998e49Initial program 96.5%
associate-*r*97.2%
*-commutative97.2%
+-commutative97.2%
distribute-lft-in87.9%
Applied egg-rr87.9%
associate-*r*87.9%
fma-def87.9%
associate-*r*85.9%
Applied egg-rr85.9%
fma-udef85.9%
associate-*r*85.9%
*-commutative85.9%
associate-*r*87.9%
distribute-lft-out97.2%
Applied egg-rr97.2%
Taylor expanded in z around inf 46.7%
*-commutative46.7%
associate-*r*46.7%
Simplified46.7%
Final simplification47.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (* y 2.0))))
(if (<= x -7.8e+205)
t_1
(if (<= x -1e+80)
(* 2.0 (* z t))
(if (<= x -290.0)
(* -2.0 (* c (* a i)))
(if (<= x 1.7e+38) (* t (* z 2.0)) t_1))))))
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 tmp;
if (x <= -7.8e+205) {
tmp = t_1;
} else if (x <= -1e+80) {
tmp = 2.0 * (z * t);
} else if (x <= -290.0) {
tmp = -2.0 * (c * (a * i));
} else if (x <= 1.7e+38) {
tmp = t * (z * 2.0);
} 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 = x * (y * 2.0d0)
if (x <= (-7.8d+205)) then
tmp = t_1
else if (x <= (-1d+80)) then
tmp = 2.0d0 * (z * t)
else if (x <= (-290.0d0)) then
tmp = (-2.0d0) * (c * (a * i))
else if (x <= 1.7d+38) then
tmp = t * (z * 2.0d0)
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 = x * (y * 2.0);
double tmp;
if (x <= -7.8e+205) {
tmp = t_1;
} else if (x <= -1e+80) {
tmp = 2.0 * (z * t);
} else if (x <= -290.0) {
tmp = -2.0 * (c * (a * i));
} else if (x <= 1.7e+38) {
tmp = t * (z * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * (y * 2.0) tmp = 0 if x <= -7.8e+205: tmp = t_1 elif x <= -1e+80: tmp = 2.0 * (z * t) elif x <= -290.0: tmp = -2.0 * (c * (a * i)) elif x <= 1.7e+38: tmp = t * (z * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * Float64(y * 2.0)) tmp = 0.0 if (x <= -7.8e+205) tmp = t_1; elseif (x <= -1e+80) tmp = Float64(2.0 * Float64(z * t)); elseif (x <= -290.0) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); elseif (x <= 1.7e+38) tmp = Float64(t * Float64(z * 2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * (y * 2.0); tmp = 0.0; if (x <= -7.8e+205) tmp = t_1; elseif (x <= -1e+80) tmp = 2.0 * (z * t); elseif (x <= -290.0) tmp = -2.0 * (c * (a * i)); elseif (x <= 1.7e+38) tmp = t * (z * 2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.8e+205], t$95$1, If[LessEqual[x, -1e+80], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -290.0], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+38], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1 \cdot 10^{+80}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \leq -290:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -7.7999999999999997e205 or 1.69999999999999998e38 < x Initial program 85.8%
fma-def87.1%
*-commutative87.1%
associate-*l*89.5%
+-commutative89.5%
fma-def89.5%
Simplified89.5%
Taylor expanded in x around inf 52.1%
associate-*r*52.1%
Simplified52.1%
if -7.7999999999999997e205 < x < -1e80Initial program 81.1%
Taylor expanded in z around inf 34.4%
if -1e80 < x < -290Initial program 94.1%
fma-def94.1%
*-commutative94.1%
associate-*l*87.9%
+-commutative87.9%
fma-def87.9%
Simplified87.9%
Taylor expanded in a around inf 51.5%
*-commutative51.5%
Simplified51.5%
if -290 < x < 1.69999999999999998e38Initial program 96.5%
associate-*r*97.2%
*-commutative97.2%
+-commutative97.2%
distribute-lft-in87.7%
Applied egg-rr87.7%
associate-*r*87.7%
fma-def87.7%
associate-*r*85.7%
Applied egg-rr85.7%
fma-udef85.7%
associate-*r*85.7%
*-commutative85.7%
associate-*r*87.7%
distribute-lft-out97.2%
Applied egg-rr97.2%
Taylor expanded in z around inf 46.6%
*-commutative46.6%
associate-*r*46.6%
Simplified46.6%
Final simplification47.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -1.8e+82) (not (<= c 1.2e+34))) (* -2.0 (* c (* i (* b c)))) (* (+ (* 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 ((c <= -1.8e+82) || !(c <= 1.2e+34)) {
tmp = -2.0 * (c * (i * (b * c)));
} else {
tmp = ((z * t) + (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 ((c <= (-1.8d+82)) .or. (.not. (c <= 1.2d+34))) then
tmp = (-2.0d0) * (c * (i * (b * c)))
else
tmp = ((z * t) + (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 ((c <= -1.8e+82) || !(c <= 1.2e+34)) {
tmp = -2.0 * (c * (i * (b * c)));
} else {
tmp = ((z * t) + (x * y)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.8e+82) or not (c <= 1.2e+34): tmp = -2.0 * (c * (i * (b * c))) else: tmp = ((z * t) + (x * y)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.8e+82) || !(c <= 1.2e+34)) tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(b * c)))); else tmp = Float64(Float64(Float64(z * t) + 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 ((c <= -1.8e+82) || ~((c <= 1.2e+34))) tmp = -2.0 * (c * (i * (b * c))); else tmp = ((z * t) + (x * y)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.8e+82], N[Not[LessEqual[c, 1.2e+34]], $MachinePrecision]], N[(-2.0 * N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.8 \cdot 10^{+82} \lor \neg \left(c \leq 1.2 \cdot 10^{+34}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\end{array}
\end{array}
if c < -1.80000000000000007e82 or 1.19999999999999993e34 < c Initial program 84.5%
fma-def84.5%
*-commutative84.5%
associate-*l*93.7%
+-commutative93.7%
fma-def93.7%
Simplified93.7%
Taylor expanded in i around inf 77.4%
Taylor expanded in c around inf 64.3%
if -1.80000000000000007e82 < c < 1.19999999999999993e34Initial program 97.1%
Taylor expanded in c around 0 79.7%
Final simplification73.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -5.4e+81) (not (<= c 2.8e+33))) (* b (* i (* c (* c -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 ((c <= -5.4e+81) || !(c <= 2.8e+33)) {
tmp = b * (i * (c * (c * -2.0)));
} else {
tmp = ((z * t) + (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 ((c <= (-5.4d+81)) .or. (.not. (c <= 2.8d+33))) then
tmp = b * (i * (c * (c * (-2.0d0))))
else
tmp = ((z * t) + (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 ((c <= -5.4e+81) || !(c <= 2.8e+33)) {
tmp = b * (i * (c * (c * -2.0)));
} else {
tmp = ((z * t) + (x * y)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -5.4e+81) or not (c <= 2.8e+33): tmp = b * (i * (c * (c * -2.0))) else: tmp = ((z * t) + (x * y)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -5.4e+81) || !(c <= 2.8e+33)) tmp = Float64(b * Float64(i * Float64(c * Float64(c * -2.0)))); else tmp = Float64(Float64(Float64(z * t) + 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 ((c <= -5.4e+81) || ~((c <= 2.8e+33))) tmp = b * (i * (c * (c * -2.0))); else tmp = ((z * t) + (x * y)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -5.4e+81], N[Not[LessEqual[c, 2.8e+33]], $MachinePrecision]], N[(b * N[(i * N[(c * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.4 \cdot 10^{+81} \lor \neg \left(c \leq 2.8 \cdot 10^{+33}\right):\\
\;\;\;\;b \cdot \left(i \cdot \left(c \cdot \left(c \cdot -2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\end{array}
\end{array}
if c < -5.3999999999999999e81 or 2.8000000000000001e33 < c Initial program 84.5%
associate-*r*92.1%
*-commutative92.1%
+-commutative92.1%
distribute-lft-in75.0%
Applied egg-rr75.0%
associate-*r*75.9%
fma-def75.9%
associate-*r*76.7%
Applied egg-rr76.7%
fma-udef76.7%
associate-*r*75.9%
*-commutative75.9%
associate-*r*75.0%
distribute-lft-out92.1%
Applied egg-rr92.1%
Taylor expanded in c around inf 64.2%
unpow264.2%
associate-*r*64.2%
associate-*r*68.6%
associate-*r*68.6%
*-commutative68.6%
Simplified68.6%
if -5.3999999999999999e81 < c < 2.8000000000000001e33Initial program 97.1%
Taylor expanded in c around 0 79.7%
Final simplification74.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -3.2e+82)
(* (* (* b i) (* c c)) -2.0)
(if (<= c 1.35e+34)
(* (+ (* z t) (* x y)) 2.0)
(* -2.0 (* c (* i (* b c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -3.2e+82) {
tmp = ((b * i) * (c * c)) * -2.0;
} else if (c <= 1.35e+34) {
tmp = ((z * t) + (x * y)) * 2.0;
} else {
tmp = -2.0 * (c * (i * (b * 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 <= (-3.2d+82)) then
tmp = ((b * i) * (c * c)) * (-2.0d0)
else if (c <= 1.35d+34) then
tmp = ((z * t) + (x * y)) * 2.0d0
else
tmp = (-2.0d0) * (c * (i * (b * 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 <= -3.2e+82) {
tmp = ((b * i) * (c * c)) * -2.0;
} else if (c <= 1.35e+34) {
tmp = ((z * t) + (x * y)) * 2.0;
} else {
tmp = -2.0 * (c * (i * (b * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -3.2e+82: tmp = ((b * i) * (c * c)) * -2.0 elif c <= 1.35e+34: tmp = ((z * t) + (x * y)) * 2.0 else: tmp = -2.0 * (c * (i * (b * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -3.2e+82) tmp = Float64(Float64(Float64(b * i) * Float64(c * c)) * -2.0); elseif (c <= 1.35e+34) tmp = Float64(Float64(Float64(z * t) + Float64(x * y)) * 2.0); else tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(b * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -3.2e+82) tmp = ((b * i) * (c * c)) * -2.0; elseif (c <= 1.35e+34) tmp = ((z * t) + (x * y)) * 2.0; else tmp = -2.0 * (c * (i * (b * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -3.2e+82], N[(N[(N[(b * i), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[c, 1.35e+34], N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(-2.0 * N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.2 \cdot 10^{+82}:\\
\;\;\;\;\left(\left(b \cdot i\right) \cdot \left(c \cdot c\right)\right) \cdot -2\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{+34}:\\
\;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\end{array}
\end{array}
if c < -3.19999999999999975e82Initial program 86.0%
fma-def86.0%
*-commutative86.0%
associate-*l*95.1%
+-commutative95.1%
fma-def95.1%
Simplified95.1%
Taylor expanded in c around inf 75.9%
*-commutative75.9%
unpow275.9%
Simplified75.9%
if -3.19999999999999975e82 < c < 1.35e34Initial program 97.1%
Taylor expanded in c around 0 79.7%
if 1.35e34 < c Initial program 83.6%
fma-def83.6%
*-commutative83.6%
associate-*l*92.8%
+-commutative92.8%
fma-def92.8%
Simplified92.8%
Taylor expanded in i around inf 77.9%
Taylor expanded in c around inf 60.2%
Final simplification73.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.8e+205) (not (<= x 7.5e+32))) (* x (* y 2.0)) (* 2.0 (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.8e+205) || !(x <= 7.5e+32)) {
tmp = x * (y * 2.0);
} else {
tmp = 2.0 * (z * t);
}
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 ((x <= (-3.8d+205)) .or. (.not. (x <= 7.5d+32))) then
tmp = x * (y * 2.0d0)
else
tmp = 2.0d0 * (z * t)
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 ((x <= -3.8e+205) || !(x <= 7.5e+32)) {
tmp = x * (y * 2.0);
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.8e+205) or not (x <= 7.5e+32): tmp = x * (y * 2.0) else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.8e+205) || !(x <= 7.5e+32)) tmp = Float64(x * Float64(y * 2.0)); else tmp = Float64(2.0 * Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3.8e+205) || ~((x <= 7.5e+32))) tmp = x * (y * 2.0); else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.8e+205], N[Not[LessEqual[x, 7.5e+32]], $MachinePrecision]], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+205} \lor \neg \left(x \leq 7.5 \cdot 10^{+32}\right):\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if x < -3.8e205 or 7.49999999999999959e32 < x Initial program 86.2%
fma-def87.5%
*-commutative87.5%
associate-*l*89.7%
+-commutative89.7%
fma-def89.7%
Simplified89.7%
Taylor expanded in x around inf 52.1%
associate-*r*52.1%
Simplified52.1%
if -3.8e205 < x < 7.49999999999999959e32Initial program 94.0%
Taylor expanded in z around inf 41.8%
Final simplification45.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -7.8e+205) (not (<= x 8.5e+43))) (* x (* y 2.0)) (* t (* z 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -7.8e+205) || !(x <= 8.5e+43)) {
tmp = x * (y * 2.0);
} else {
tmp = t * (z * 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 ((x <= (-7.8d+205)) .or. (.not. (x <= 8.5d+43))) then
tmp = x * (y * 2.0d0)
else
tmp = t * (z * 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 ((x <= -7.8e+205) || !(x <= 8.5e+43)) {
tmp = x * (y * 2.0);
} else {
tmp = t * (z * 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -7.8e+205) or not (x <= 8.5e+43): tmp = x * (y * 2.0) else: tmp = t * (z * 2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -7.8e+205) || !(x <= 8.5e+43)) tmp = Float64(x * Float64(y * 2.0)); else tmp = Float64(t * Float64(z * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -7.8e+205) || ~((x <= 8.5e+43))) tmp = x * (y * 2.0); else tmp = t * (z * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -7.8e+205], N[Not[LessEqual[x, 8.5e+43]], $MachinePrecision]], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+205} \lor \neg \left(x \leq 8.5 \cdot 10^{+43}\right):\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\end{array}
\end{array}
if x < -7.7999999999999997e205 or 8.5e43 < x Initial program 85.4%
fma-def86.8%
*-commutative86.8%
associate-*l*89.2%
+-commutative89.2%
fma-def89.2%
Simplified89.2%
Taylor expanded in x around inf 53.4%
associate-*r*53.4%
Simplified53.4%
if -7.7999999999999997e205 < x < 8.5e43Initial program 94.1%
associate-*r*96.2%
*-commutative96.2%
+-commutative96.2%
distribute-lft-in87.3%
Applied egg-rr87.3%
associate-*r*86.3%
fma-def86.3%
associate-*r*84.8%
Applied egg-rr84.8%
fma-udef84.8%
associate-*r*85.8%
*-commutative85.8%
associate-*r*87.3%
distribute-lft-out96.2%
Applied egg-rr96.2%
Taylor expanded in z around inf 41.5%
*-commutative41.5%
associate-*r*41.5%
Simplified41.5%
Final simplification45.0%
(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 91.6%
Taylor expanded in z around inf 35.8%
Final simplification35.8%
(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 2023185
(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))))