
(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 (if (<= (* z t) -2e+293) (* z (* 2.0 (+ t (/ (- (* x y) (* (* c i) (fma c b a))) z)))) (* 2.0 (- (fma x y (* z t)) (* (* c i) (+ a (* c b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z * t) <= -2e+293) {
tmp = z * (2.0 * (t + (((x * y) - ((c * i) * fma(c, b, a))) / z)));
} else {
tmp = 2.0 * (fma(x, y, (z * t)) - ((c * i) * (a + (c * b))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(z * t) <= -2e+293) tmp = Float64(z * Float64(2.0 * Float64(t + Float64(Float64(Float64(x * y) - Float64(Float64(c * i) * fma(c, b, a))) / z)))); else tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(c * i) * Float64(a + Float64(c * b))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+293], N[(z * N[(2.0 * N[(t + N[(N[(N[(x * y), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * N[(c * b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+293}:\\
\;\;\;\;z \cdot \left(2 \cdot \left(t + \frac{x \cdot y - \left(c \cdot i\right) \cdot \mathsf{fma}\left(c, b, a\right)}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + c \cdot b\right)\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -1.9999999999999998e293Initial program 78.8%
associate--l+78.8%
*-commutative78.8%
associate--l+78.8%
associate--l+78.8%
*-commutative78.8%
associate--l+78.8%
fma-define78.8%
*-commutative78.8%
associate-*l*73.6%
+-commutative73.6%
fma-define73.6%
Simplified73.6%
Taylor expanded in z around inf 94.7%
distribute-lft-out94.7%
associate-*r*100.0%
+-commutative100.0%
*-commutative100.0%
fma-undefine100.0%
Simplified100.0%
if -1.9999999999999998e293 < (*.f64 z t) Initial program 91.8%
fma-define93.0%
associate-*l*97.4%
Simplified97.4%
Final simplification97.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))))
(if (<= (- (+ (* x y) (* z t)) (* i (* c t_1))) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* (* c i) t_1)))
(* -2.0 (* c (* i (* c (+ b (/ a c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double tmp;
if ((((x * y) + (z * t)) - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (fma(x, y, (z * t)) - ((c * i) * t_1));
} else {
tmp = -2.0 * (c * (i * (c * (b + (a / c)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(c * i) * t_1))); else tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(c * Float64(b + Float64(a / c)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(i * N[(c * N[(b + N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot t\_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot \left(b + \frac{a}{c}\right)\right)\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.5%
fma-define94.5%
associate-*l*98.7%
Simplified98.7%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
associate--l+0.0%
*-commutative0.0%
associate--l+0.0%
associate--l+0.0%
*-commutative0.0%
associate--l+0.0%
fma-define30.0%
*-commutative30.0%
associate-*l*30.0%
+-commutative30.0%
fma-define30.0%
Simplified30.0%
Taylor expanded in i around inf 60.4%
Taylor expanded in c around inf 70.1%
Final simplification97.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))) (t_2 (* c (* i t_1))) (t_3 (* i (* c t_1))))
(if (<= t_3 -1e+208)
(* -2.0 t_2)
(if (<= t_3 -200000000.0)
(* 2.0 (- (* x y) t_3))
(if (<= t_3 5e-24)
(* 2.0 (+ (* x y) (* z t)))
(* 2.0 (- (* z t) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double t_2 = c * (i * t_1);
double t_3 = i * (c * t_1);
double tmp;
if (t_3 <= -1e+208) {
tmp = -2.0 * t_2;
} else if (t_3 <= -200000000.0) {
tmp = 2.0 * ((x * y) - t_3);
} else if (t_3 <= 5e-24) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = 2.0 * ((z * t) - 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) :: t_3
real(8) :: tmp
t_1 = a + (c * b)
t_2 = c * (i * t_1)
t_3 = i * (c * t_1)
if (t_3 <= (-1d+208)) then
tmp = (-2.0d0) * t_2
else if (t_3 <= (-200000000.0d0)) then
tmp = 2.0d0 * ((x * y) - t_3)
else if (t_3 <= 5d-24) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = 2.0d0 * ((z * t) - 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 = a + (c * b);
double t_2 = c * (i * t_1);
double t_3 = i * (c * t_1);
double tmp;
if (t_3 <= -1e+208) {
tmp = -2.0 * t_2;
} else if (t_3 <= -200000000.0) {
tmp = 2.0 * ((x * y) - t_3);
} else if (t_3 <= 5e-24) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = 2.0 * ((z * t) - t_2);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) t_2 = c * (i * t_1) t_3 = i * (c * t_1) tmp = 0 if t_3 <= -1e+208: tmp = -2.0 * t_2 elif t_3 <= -200000000.0: tmp = 2.0 * ((x * y) - t_3) elif t_3 <= 5e-24: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = 2.0 * ((z * t) - t_2) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) t_2 = Float64(c * Float64(i * t_1)) t_3 = Float64(i * Float64(c * t_1)) tmp = 0.0 if (t_3 <= -1e+208) tmp = Float64(-2.0 * t_2); elseif (t_3 <= -200000000.0) tmp = Float64(2.0 * Float64(Float64(x * y) - t_3)); elseif (t_3 <= 5e-24) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); t_2 = c * (i * t_1); t_3 = i * (c * t_1); tmp = 0.0; if (t_3 <= -1e+208) tmp = -2.0 * t_2; elseif (t_3 <= -200000000.0) tmp = 2.0 * ((x * y) - t_3); elseif (t_3 <= 5e-24) tmp = 2.0 * ((x * y) + (z * t)); else tmp = 2.0 * ((z * t) - t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+208], N[(-2.0 * t$95$2), $MachinePrecision], If[LessEqual[t$95$3, -200000000.0], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e-24], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
t_2 := c \cdot \left(i \cdot t\_1\right)\\
t_3 := i \cdot \left(c \cdot t\_1\right)\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+208}:\\
\;\;\;\;-2 \cdot t\_2\\
\mathbf{elif}\;t\_3 \leq -200000000:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_3\right)\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-24}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_2\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -9.9999999999999998e207Initial program 75.9%
associate--l+75.9%
*-commutative75.9%
associate--l+75.9%
associate--l+75.9%
*-commutative75.9%
associate--l+75.9%
fma-define79.2%
*-commutative79.2%
associate-*l*86.9%
+-commutative86.9%
fma-define86.9%
Simplified86.9%
Taylor expanded in i around inf 85.2%
if -9.9999999999999998e207 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2e8Initial program 95.4%
Taylor expanded in x around inf 87.1%
if -2e8 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.9999999999999998e-24Initial program 96.9%
associate--l+96.9%
*-commutative96.9%
associate--l+96.9%
associate--l+96.9%
*-commutative96.9%
associate--l+96.9%
fma-define97.9%
*-commutative97.9%
associate-*l*98.9%
+-commutative98.9%
fma-define98.9%
Simplified98.9%
Taylor expanded in c around 0 92.0%
if 4.9999999999999998e-24 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 93.5%
associate--l+93.5%
*-commutative93.5%
associate--l+93.5%
associate--l+93.5%
*-commutative93.5%
associate--l+93.5%
fma-define93.5%
*-commutative93.5%
associate-*l*88.7%
+-commutative88.7%
fma-define88.7%
Simplified88.7%
Taylor expanded in x around 0 84.8%
Final simplification87.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))) (t_2 (* c t_1)) (t_3 (+ (* x y) (* z t))))
(if (<= t_2 -1e+122)
(* 2.0 (- (* x y) (* i t_2)))
(if (<= t_2 5e+60)
(* 2.0 (- t_3 (* i (* c a))))
(if (<= t_2 1.5e+208)
(* 2.0 (- t_3 (* (* c i) (* c b))))
(* 2.0 (- (* z t) (* 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 = a + (c * b);
double t_2 = c * t_1;
double t_3 = (x * y) + (z * t);
double tmp;
if (t_2 <= -1e+122) {
tmp = 2.0 * ((x * y) - (i * t_2));
} else if (t_2 <= 5e+60) {
tmp = 2.0 * (t_3 - (i * (c * a)));
} else if (t_2 <= 1.5e+208) {
tmp = 2.0 * (t_3 - ((c * i) * (c * b)));
} else {
tmp = 2.0 * ((z * t) - (c * (i * 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) :: t_3
real(8) :: tmp
t_1 = a + (c * b)
t_2 = c * t_1
t_3 = (x * y) + (z * t)
if (t_2 <= (-1d+122)) then
tmp = 2.0d0 * ((x * y) - (i * t_2))
else if (t_2 <= 5d+60) then
tmp = 2.0d0 * (t_3 - (i * (c * a)))
else if (t_2 <= 1.5d+208) then
tmp = 2.0d0 * (t_3 - ((c * i) * (c * b)))
else
tmp = 2.0d0 * ((z * t) - (c * (i * 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 = a + (c * b);
double t_2 = c * t_1;
double t_3 = (x * y) + (z * t);
double tmp;
if (t_2 <= -1e+122) {
tmp = 2.0 * ((x * y) - (i * t_2));
} else if (t_2 <= 5e+60) {
tmp = 2.0 * (t_3 - (i * (c * a)));
} else if (t_2 <= 1.5e+208) {
tmp = 2.0 * (t_3 - ((c * i) * (c * b)));
} else {
tmp = 2.0 * ((z * t) - (c * (i * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) t_2 = c * t_1 t_3 = (x * y) + (z * t) tmp = 0 if t_2 <= -1e+122: tmp = 2.0 * ((x * y) - (i * t_2)) elif t_2 <= 5e+60: tmp = 2.0 * (t_3 - (i * (c * a))) elif t_2 <= 1.5e+208: tmp = 2.0 * (t_3 - ((c * i) * (c * b))) else: tmp = 2.0 * ((z * t) - (c * (i * t_1))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) t_2 = Float64(c * t_1) t_3 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (t_2 <= -1e+122) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(i * t_2))); elseif (t_2 <= 5e+60) tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(c * a)))); elseif (t_2 <= 1.5e+208) tmp = Float64(2.0 * Float64(t_3 - Float64(Float64(c * i) * Float64(c * b)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); t_2 = c * t_1; t_3 = (x * y) + (z * t); tmp = 0.0; if (t_2 <= -1e+122) tmp = 2.0 * ((x * y) - (i * t_2)); elseif (t_2 <= 5e+60) tmp = 2.0 * (t_3 - (i * (c * a))); elseif (t_2 <= 1.5e+208) tmp = 2.0 * (t_3 - ((c * i) * (c * b))); else tmp = 2.0 * ((z * t) - (c * (i * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+122], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(i * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+60], N[(2.0 * N[(t$95$3 - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1.5e+208], N[(2.0 * N[(t$95$3 - N[(N[(c * i), $MachinePrecision] * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
t_2 := c \cdot t\_1\\
t_3 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+122}:\\
\;\;\;\;2 \cdot \left(x \cdot y - i \cdot t\_2\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+60}:\\
\;\;\;\;2 \cdot \left(t\_3 - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{elif}\;t\_2 \leq 1.5 \cdot 10^{+208}:\\
\;\;\;\;2 \cdot \left(t\_3 - \left(c \cdot i\right) \cdot \left(c \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -1.00000000000000001e122Initial program 82.3%
Taylor expanded in x around inf 83.5%
if -1.00000000000000001e122 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4.99999999999999975e60Initial program 97.5%
Taylor expanded in a around inf 94.3%
*-commutative94.3%
Simplified94.3%
if 4.99999999999999975e60 < (*.f64 (+.f64 a (*.f64 b c)) c) < 1.49999999999999997e208Initial program 99.7%
fma-define99.7%
associate-*l*99.6%
Simplified99.6%
fma-define99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 90.2%
*-commutative90.2%
Simplified90.2%
if 1.49999999999999997e208 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 80.1%
associate--l+80.1%
*-commutative80.1%
associate--l+80.1%
associate--l+80.1%
*-commutative80.1%
associate--l+80.1%
fma-define82.2%
*-commutative82.2%
associate-*l*93.8%
+-commutative93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in x around 0 91.7%
Final simplification90.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* i (* c t_1))) INFINITY)
(* 2.0 (- t_2 (* (* c i) t_1)))
(* -2.0 (* c (* i (* c (+ b (/ a c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - ((c * i) * t_1));
} else {
tmp = -2.0 * (c * (i * (c * (b + (a / c)))));
}
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 + (c * b);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - (i * (c * t_1))) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - ((c * i) * t_1));
} else {
tmp = -2.0 * (c * (i * (c * (b + (a / c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - (i * (c * t_1))) <= math.inf: tmp = 2.0 * (t_2 - ((c * i) * t_1)) else: tmp = -2.0 * (c * (i * (c * (b + (a / c))))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) 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(Float64(c * i) * t_1))); else tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(c * Float64(b + Float64(a / c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - (i * (c * t_1))) <= Inf) tmp = 2.0 * (t_2 - ((c * i) * t_1)); else tmp = -2.0 * (c * (i * (c * (b + (a / c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $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[(N[(c * i), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(i * N[(c * N[(b + N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
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 - \left(c \cdot i\right) \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot \left(b + \frac{a}{c}\right)\right)\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.5%
fma-define94.5%
associate-*l*98.7%
Simplified98.7%
fma-define98.7%
+-commutative98.7%
Applied egg-rr98.7%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
associate--l+0.0%
*-commutative0.0%
associate--l+0.0%
associate--l+0.0%
*-commutative0.0%
associate--l+0.0%
fma-define30.0%
*-commutative30.0%
associate-*l*30.0%
+-commutative30.0%
fma-define30.0%
Simplified30.0%
Taylor expanded in i around inf 60.4%
Taylor expanded in c around inf 70.1%
Final simplification97.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))) (t_2 (* c t_1)))
(if (<= t_2 -1e+122)
(* 2.0 (- (* x y) (* i t_2)))
(if (<= t_2 20.0)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* c a))))
(* 2.0 (- (* z t) (* 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 = a + (c * b);
double t_2 = c * t_1;
double tmp;
if (t_2 <= -1e+122) {
tmp = 2.0 * ((x * y) - (i * t_2));
} else if (t_2 <= 20.0) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else {
tmp = 2.0 * ((z * t) - (c * (i * 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 = a + (c * b)
t_2 = c * t_1
if (t_2 <= (-1d+122)) then
tmp = 2.0d0 * ((x * y) - (i * t_2))
else if (t_2 <= 20.0d0) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (c * a)))
else
tmp = 2.0d0 * ((z * t) - (c * (i * 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 = a + (c * b);
double t_2 = c * t_1;
double tmp;
if (t_2 <= -1e+122) {
tmp = 2.0 * ((x * y) - (i * t_2));
} else if (t_2 <= 20.0) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else {
tmp = 2.0 * ((z * t) - (c * (i * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) t_2 = c * t_1 tmp = 0 if t_2 <= -1e+122: tmp = 2.0 * ((x * y) - (i * t_2)) elif t_2 <= 20.0: tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))) else: tmp = 2.0 * ((z * t) - (c * (i * t_1))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) t_2 = Float64(c * t_1) tmp = 0.0 if (t_2 <= -1e+122) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(i * t_2))); elseif (t_2 <= 20.0) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * a)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); t_2 = c * t_1; tmp = 0.0; if (t_2 <= -1e+122) tmp = 2.0 * ((x * y) - (i * t_2)); elseif (t_2 <= 20.0) tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))); else tmp = 2.0 * ((z * t) - (c * (i * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+122], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(i * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 20.0], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
t_2 := c \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+122}:\\
\;\;\;\;2 \cdot \left(x \cdot y - i \cdot t\_2\right)\\
\mathbf{elif}\;t\_2 \leq 20:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -1.00000000000000001e122Initial program 82.3%
Taylor expanded in x around inf 83.5%
if -1.00000000000000001e122 < (*.f64 (+.f64 a (*.f64 b c)) c) < 20Initial program 97.3%
Taylor expanded in a around inf 94.0%
*-commutative94.0%
Simplified94.0%
if 20 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 87.8%
associate--l+87.8%
*-commutative87.8%
associate--l+87.8%
associate--l+87.8%
*-commutative87.8%
associate--l+87.8%
fma-define89.1%
*-commutative89.1%
associate-*l*93.8%
+-commutative93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in x around 0 86.9%
Final simplification89.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* c b))) (t_2 (* i (* c t_1))))
(if (<= t_2 (- INFINITY))
(* -2.0 (* c (* i t_1)))
(* 2.0 (- (+ (* x y) (* z t)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double t_2 = i * (c * t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = -2.0 * (c * (i * t_1));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
}
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 + (c * b);
double t_2 = i * (c * t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = -2.0 * (c * (i * t_1));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) t_2 = i * (c * t_1) tmp = 0 if t_2 <= -math.inf: tmp = -2.0 * (c * (i * t_1)) else: tmp = 2.0 * (((x * y) + (z * t)) - t_2) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) t_2 = Float64(i * Float64(c * t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(-2.0 * Float64(c * Float64(i * t_1))); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); t_2 = i * (c * t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = -2.0 * (c * (i * t_1)); else tmp = 2.0 * (((x * y) + (z * t)) - t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(-2.0 * N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
t_2 := i \cdot \left(c \cdot t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t\_2\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 71.7%
associate--l+71.7%
*-commutative71.7%
associate--l+71.7%
associate--l+71.7%
*-commutative71.7%
associate--l+71.7%
fma-define75.6%
*-commutative75.6%
associate-*l*88.4%
+-commutative88.4%
fma-define88.4%
Simplified88.4%
Taylor expanded in i around inf 86.9%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 95.5%
Final simplification93.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -5e+62) (not (<= (* x y) 5e+169))) (* y (* 2.0 (+ x (* t (/ z y))))) (* 2.0 (- (* z t) (* c (* i (+ a (* c b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -5e+62) || !((x * y) <= 5e+169)) {
tmp = y * (2.0 * (x + (t * (z / y))));
} else {
tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b)))));
}
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 * y) <= (-5d+62)) .or. (.not. ((x * y) <= 5d+169))) then
tmp = y * (2.0d0 * (x + (t * (z / y))))
else
tmp = 2.0d0 * ((z * t) - (c * (i * (a + (c * b)))))
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 * y) <= -5e+62) || !((x * y) <= 5e+169)) {
tmp = y * (2.0 * (x + (t * (z / y))));
} else {
tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -5e+62) or not ((x * y) <= 5e+169): tmp = y * (2.0 * (x + (t * (z / y)))) else: tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -5e+62) || !(Float64(x * y) <= 5e+169)) tmp = Float64(y * Float64(2.0 * Float64(x + Float64(t * Float64(z / y))))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(c * b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -5e+62) || ~(((x * y) <= 5e+169))) tmp = y * (2.0 * (x + (t * (z / y)))); else tmp = 2.0 * ((z * t) - (c * (i * (a + (c * b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+62], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+169]], $MachinePrecision]], N[(y * N[(2.0 * N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+62} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+169}\right):\\
\;\;\;\;y \cdot \left(2 \cdot \left(x + t \cdot \frac{z}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -5.00000000000000029e62 or 5.00000000000000017e169 < (*.f64 x y) Initial program 88.2%
associate--l+88.2%
*-commutative88.2%
associate--l+88.2%
associate--l+88.2%
*-commutative88.2%
associate--l+88.2%
fma-define92.1%
*-commutative92.1%
associate-*l*91.0%
+-commutative91.0%
fma-define91.0%
Simplified91.0%
Taylor expanded in c around 0 75.8%
Taylor expanded in y around inf 79.7%
distribute-lft-out79.7%
associate-/l*81.0%
Simplified81.0%
if -5.00000000000000029e62 < (*.f64 x y) < 5.00000000000000017e169Initial program 91.9%
associate--l+91.9%
*-commutative91.9%
associate--l+91.9%
associate--l+91.9%
*-commutative91.9%
associate--l+91.9%
fma-define91.9%
*-commutative91.9%
associate-*l*91.8%
+-commutative91.8%
fma-define91.8%
Simplified91.8%
Taylor expanded in x around 0 85.2%
Final simplification84.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (* 2.0 y))))
(if (<= x -1.6e+41)
t_1
(if (<= x -3.3e-51)
(* 2.0 (* (* c a) (- i)))
(if (<= x 3.4e-239)
(* t (* z 2.0))
(if (<= x 6.6e+69) (* -2.0 (* (* c i) a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * (2.0 * y);
double tmp;
if (x <= -1.6e+41) {
tmp = t_1;
} else if (x <= -3.3e-51) {
tmp = 2.0 * ((c * a) * -i);
} else if (x <= 3.4e-239) {
tmp = t * (z * 2.0);
} else if (x <= 6.6e+69) {
tmp = -2.0 * ((c * i) * a);
} 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 * (2.0d0 * y)
if (x <= (-1.6d+41)) then
tmp = t_1
else if (x <= (-3.3d-51)) then
tmp = 2.0d0 * ((c * a) * -i)
else if (x <= 3.4d-239) then
tmp = t * (z * 2.0d0)
else if (x <= 6.6d+69) then
tmp = (-2.0d0) * ((c * i) * a)
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 * (2.0 * y);
double tmp;
if (x <= -1.6e+41) {
tmp = t_1;
} else if (x <= -3.3e-51) {
tmp = 2.0 * ((c * a) * -i);
} else if (x <= 3.4e-239) {
tmp = t * (z * 2.0);
} else if (x <= 6.6e+69) {
tmp = -2.0 * ((c * i) * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * (2.0 * y) tmp = 0 if x <= -1.6e+41: tmp = t_1 elif x <= -3.3e-51: tmp = 2.0 * ((c * a) * -i) elif x <= 3.4e-239: tmp = t * (z * 2.0) elif x <= 6.6e+69: tmp = -2.0 * ((c * i) * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * Float64(2.0 * y)) tmp = 0.0 if (x <= -1.6e+41) tmp = t_1; elseif (x <= -3.3e-51) tmp = Float64(2.0 * Float64(Float64(c * a) * Float64(-i))); elseif (x <= 3.4e-239) tmp = Float64(t * Float64(z * 2.0)); elseif (x <= 6.6e+69) tmp = Float64(-2.0 * Float64(Float64(c * i) * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * (2.0 * y); tmp = 0.0; if (x <= -1.6e+41) tmp = t_1; elseif (x <= -3.3e-51) tmp = 2.0 * ((c * a) * -i); elseif (x <= 3.4e-239) tmp = t * (z * 2.0); elseif (x <= 6.6e+69) tmp = -2.0 * ((c * i) * a); 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[(2.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e+41], t$95$1, If[LessEqual[x, -3.3e-51], N[(2.0 * N[(N[(c * a), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.4e-239], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.6e+69], N[(-2.0 * N[(N[(c * i), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(2 \cdot y\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{-51}:\\
\;\;\;\;2 \cdot \left(\left(c \cdot a\right) \cdot \left(-i\right)\right)\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-239}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{+69}:\\
\;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.60000000000000005e41 or 6.5999999999999997e69 < x Initial program 88.5%
associate--l+88.5%
*-commutative88.5%
associate--l+88.5%
associate--l+88.5%
*-commutative88.5%
associate--l+88.5%
fma-define91.7%
*-commutative91.7%
associate-*l*88.8%
+-commutative88.8%
fma-define88.8%
Simplified88.8%
Taylor expanded in x around inf 47.2%
*-commutative47.2%
associate-*l*47.2%
Simplified47.2%
if -1.60000000000000005e41 < x < -3.29999999999999973e-51Initial program 95.8%
Taylor expanded in a around inf 75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in x around inf 69.9%
Taylor expanded in x around 0 39.0%
*-commutative39.0%
associate-*l*39.2%
neg-mul-139.2%
*-commutative39.2%
associate-*r*43.1%
distribute-lft-neg-out43.1%
*-commutative43.1%
distribute-rgt-neg-in43.1%
Simplified43.1%
if -3.29999999999999973e-51 < x < 3.4e-239Initial program 95.1%
associate--l+95.1%
*-commutative95.1%
associate--l+95.1%
associate--l+95.1%
*-commutative95.1%
associate--l+95.1%
fma-define95.1%
*-commutative95.1%
associate-*l*91.8%
+-commutative91.8%
fma-define91.9%
Simplified91.9%
Taylor expanded in z around inf 38.8%
associate-*r*38.8%
*-commutative38.8%
associate-*l*38.8%
*-commutative38.8%
Simplified38.8%
if 3.4e-239 < x < 6.5999999999999997e69Initial program 88.7%
associate--l+88.7%
*-commutative88.7%
associate--l+88.7%
associate--l+88.7%
*-commutative88.7%
associate--l+88.7%
fma-define88.7%
*-commutative88.7%
associate-*l*92.2%
+-commutative92.2%
fma-define92.2%
Simplified92.2%
Taylor expanded in a around inf 36.8%
Final simplification41.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* (* c i) a))) (t_2 (* x (* 2.0 y))))
(if (<= x -1e+49)
t_2
(if (<= x -3.6e-51)
t_1
(if (<= x 4.4e-239) (* t (* z 2.0)) (if (<= x 3.7e+61) 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 = -2.0 * ((c * i) * a);
double t_2 = x * (2.0 * y);
double tmp;
if (x <= -1e+49) {
tmp = t_2;
} else if (x <= -3.6e-51) {
tmp = t_1;
} else if (x <= 4.4e-239) {
tmp = t * (z * 2.0);
} else if (x <= 3.7e+61) {
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 = (-2.0d0) * ((c * i) * a)
t_2 = x * (2.0d0 * y)
if (x <= (-1d+49)) then
tmp = t_2
else if (x <= (-3.6d-51)) then
tmp = t_1
else if (x <= 4.4d-239) then
tmp = t * (z * 2.0d0)
else if (x <= 3.7d+61) 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 = -2.0 * ((c * i) * a);
double t_2 = x * (2.0 * y);
double tmp;
if (x <= -1e+49) {
tmp = t_2;
} else if (x <= -3.6e-51) {
tmp = t_1;
} else if (x <= 4.4e-239) {
tmp = t * (z * 2.0);
} else if (x <= 3.7e+61) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * ((c * i) * a) t_2 = x * (2.0 * y) tmp = 0 if x <= -1e+49: tmp = t_2 elif x <= -3.6e-51: tmp = t_1 elif x <= 4.4e-239: tmp = t * (z * 2.0) elif x <= 3.7e+61: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(Float64(c * i) * a)) t_2 = Float64(x * Float64(2.0 * y)) tmp = 0.0 if (x <= -1e+49) tmp = t_2; elseif (x <= -3.6e-51) tmp = t_1; elseif (x <= 4.4e-239) tmp = Float64(t * Float64(z * 2.0)); elseif (x <= 3.7e+61) 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 = -2.0 * ((c * i) * a); t_2 = x * (2.0 * y); tmp = 0.0; if (x <= -1e+49) tmp = t_2; elseif (x <= -3.6e-51) tmp = t_1; elseif (x <= 4.4e-239) tmp = t * (z * 2.0); elseif (x <= 3.7e+61) 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[(-2.0 * N[(N[(c * i), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(2.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e+49], t$95$2, If[LessEqual[x, -3.6e-51], t$95$1, If[LessEqual[x, 4.4e-239], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+61], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(\left(c \cdot i\right) \cdot a\right)\\
t_2 := x \cdot \left(2 \cdot y\right)\\
\mathbf{if}\;x \leq -1 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-239}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -9.99999999999999946e48 or 3.70000000000000003e61 < x Initial program 89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
fma-define92.6%
*-commutative92.6%
associate-*l*88.7%
+-commutative88.7%
fma-define88.7%
Simplified88.7%
Taylor expanded in x around inf 47.7%
*-commutative47.7%
associate-*l*47.7%
Simplified47.7%
if -9.99999999999999946e48 < x < -3.6e-51 or 4.39999999999999965e-239 < x < 3.70000000000000003e61Initial program 89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
fma-define89.5%
*-commutative89.5%
associate-*l*94.0%
+-commutative94.0%
fma-define94.0%
Simplified94.0%
Taylor expanded in a around inf 38.3%
if -3.6e-51 < x < 4.39999999999999965e-239Initial program 95.1%
associate--l+95.1%
*-commutative95.1%
associate--l+95.1%
associate--l+95.1%
*-commutative95.1%
associate--l+95.1%
fma-define95.1%
*-commutative95.1%
associate-*l*92.0%
+-commutative92.0%
fma-define92.0%
Simplified92.0%
Taylor expanded in z around inf 38.3%
associate-*r*38.3%
*-commutative38.3%
associate-*l*38.3%
*-commutative38.3%
Simplified38.3%
Final simplification41.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -4e-104)
(* -2.0 (* c (* (* c i) b)))
(if (<= c 4.3e-275)
(* t (* z 2.0))
(if (<= c 1.6e+24) (* x (* 2.0 y)) (* -2.0 (* c (* i (* c b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -4e-104) {
tmp = -2.0 * (c * ((c * i) * b));
} else if (c <= 4.3e-275) {
tmp = t * (z * 2.0);
} else if (c <= 1.6e+24) {
tmp = x * (2.0 * y);
} else {
tmp = -2.0 * (c * (i * (c * b)));
}
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 <= (-4d-104)) then
tmp = (-2.0d0) * (c * ((c * i) * b))
else if (c <= 4.3d-275) then
tmp = t * (z * 2.0d0)
else if (c <= 1.6d+24) then
tmp = x * (2.0d0 * y)
else
tmp = (-2.0d0) * (c * (i * (c * b)))
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 <= -4e-104) {
tmp = -2.0 * (c * ((c * i) * b));
} else if (c <= 4.3e-275) {
tmp = t * (z * 2.0);
} else if (c <= 1.6e+24) {
tmp = x * (2.0 * y);
} else {
tmp = -2.0 * (c * (i * (c * b)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -4e-104: tmp = -2.0 * (c * ((c * i) * b)) elif c <= 4.3e-275: tmp = t * (z * 2.0) elif c <= 1.6e+24: tmp = x * (2.0 * y) else: tmp = -2.0 * (c * (i * (c * b))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -4e-104) tmp = Float64(-2.0 * Float64(c * Float64(Float64(c * i) * b))); elseif (c <= 4.3e-275) tmp = Float64(t * Float64(z * 2.0)); elseif (c <= 1.6e+24) tmp = Float64(x * Float64(2.0 * y)); else tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(c * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -4e-104) tmp = -2.0 * (c * ((c * i) * b)); elseif (c <= 4.3e-275) tmp = t * (z * 2.0); elseif (c <= 1.6e+24) tmp = x * (2.0 * y); else tmp = -2.0 * (c * (i * (c * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -4e-104], N[(-2.0 * N[(c * N[(N[(c * i), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.3e-275], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.6e+24], N[(x * N[(2.0 * y), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4 \cdot 10^{-104}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)\\
\mathbf{elif}\;c \leq 4.3 \cdot 10^{-275}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(2 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if c < -3.99999999999999971e-104Initial program 83.9%
associate--l+83.9%
*-commutative83.9%
associate--l+83.9%
associate--l+83.9%
*-commutative83.9%
associate--l+83.9%
fma-define85.2%
*-commutative85.2%
associate-*l*90.0%
+-commutative90.0%
fma-define90.0%
Simplified90.0%
Taylor expanded in i around inf 72.8%
Taylor expanded in a around 0 61.8%
if -3.99999999999999971e-104 < c < 4.29999999999999976e-275Initial program 97.9%
associate--l+97.9%
*-commutative97.9%
associate--l+97.9%
associate--l+97.9%
*-commutative97.9%
associate--l+97.9%
fma-define97.9%
*-commutative97.9%
associate-*l*84.9%
+-commutative84.9%
fma-define84.9%
Simplified84.9%
Taylor expanded in z around inf 52.0%
associate-*r*52.0%
*-commutative52.0%
associate-*l*52.0%
*-commutative52.0%
Simplified52.0%
if 4.29999999999999976e-275 < c < 1.5999999999999999e24Initial program 94.1%
associate--l+94.1%
*-commutative94.1%
associate--l+94.1%
associate--l+94.1%
*-commutative94.1%
associate--l+94.1%
fma-define95.6%
*-commutative95.6%
associate-*l*92.9%
+-commutative92.9%
fma-define92.9%
Simplified92.9%
Taylor expanded in x around inf 47.4%
*-commutative47.4%
associate-*l*47.4%
Simplified47.4%
if 1.5999999999999999e24 < c Initial program 89.9%
associate--l+89.9%
*-commutative89.9%
associate--l+89.9%
associate--l+89.9%
*-commutative89.9%
associate--l+89.9%
fma-define91.7%
*-commutative91.7%
associate-*l*98.1%
+-commutative98.1%
fma-define98.1%
Simplified98.1%
Taylor expanded in i around inf 75.9%
Taylor expanded in a around 0 60.3%
*-commutative82.6%
Simplified60.3%
Final simplification55.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* c (* (* c i) b)))))
(if (<= c -4e-104)
t_1
(if (<= c 5.1e-275)
(* t (* z 2.0))
(if (<= c 1.15e+24) (* x (* 2.0 y)) 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 * i) * b));
double tmp;
if (c <= -4e-104) {
tmp = t_1;
} else if (c <= 5.1e-275) {
tmp = t * (z * 2.0);
} else if (c <= 1.15e+24) {
tmp = x * (2.0 * y);
} 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 * i) * b))
if (c <= (-4d-104)) then
tmp = t_1
else if (c <= 5.1d-275) then
tmp = t * (z * 2.0d0)
else if (c <= 1.15d+24) then
tmp = x * (2.0d0 * y)
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 * i) * b));
double tmp;
if (c <= -4e-104) {
tmp = t_1;
} else if (c <= 5.1e-275) {
tmp = t * (z * 2.0);
} else if (c <= 1.15e+24) {
tmp = x * (2.0 * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (c * ((c * i) * b)) tmp = 0 if c <= -4e-104: tmp = t_1 elif c <= 5.1e-275: tmp = t * (z * 2.0) elif c <= 1.15e+24: tmp = x * (2.0 * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(c * Float64(Float64(c * i) * b))) tmp = 0.0 if (c <= -4e-104) tmp = t_1; elseif (c <= 5.1e-275) tmp = Float64(t * Float64(z * 2.0)); elseif (c <= 1.15e+24) tmp = Float64(x * Float64(2.0 * y)); 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 * i) * b)); tmp = 0.0; if (c <= -4e-104) tmp = t_1; elseif (c <= 5.1e-275) tmp = t * (z * 2.0); elseif (c <= 1.15e+24) tmp = x * (2.0 * y); 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[(N[(c * i), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4e-104], t$95$1, If[LessEqual[c, 5.1e-275], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.15e+24], N[(x * N[(2.0 * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)\\
\mathbf{if}\;c \leq -4 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.1 \cdot 10^{-275}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{elif}\;c \leq 1.15 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(2 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.99999999999999971e-104 or 1.15e24 < c Initial program 86.4%
associate--l+86.4%
*-commutative86.4%
associate--l+86.4%
associate--l+86.4%
*-commutative86.4%
associate--l+86.4%
fma-define87.9%
*-commutative87.9%
associate-*l*93.4%
+-commutative93.4%
fma-define93.4%
Simplified93.4%
Taylor expanded in i around inf 74.1%
Taylor expanded in a around 0 61.2%
if -3.99999999999999971e-104 < c < 5.09999999999999984e-275Initial program 97.9%
associate--l+97.9%
*-commutative97.9%
associate--l+97.9%
associate--l+97.9%
*-commutative97.9%
associate--l+97.9%
fma-define97.9%
*-commutative97.9%
associate-*l*84.9%
+-commutative84.9%
fma-define84.9%
Simplified84.9%
Taylor expanded in z around inf 52.0%
associate-*r*52.0%
*-commutative52.0%
associate-*l*52.0%
*-commutative52.0%
Simplified52.0%
if 5.09999999999999984e-275 < c < 1.15e24Initial program 94.1%
associate--l+94.1%
*-commutative94.1%
associate--l+94.1%
associate--l+94.1%
*-commutative94.1%
associate--l+94.1%
fma-define95.6%
*-commutative95.6%
associate-*l*92.9%
+-commutative92.9%
fma-define92.9%
Simplified92.9%
Taylor expanded in x around inf 47.4%
*-commutative47.4%
associate-*l*47.4%
Simplified47.4%
Final simplification55.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -5.2e-15)
(* -2.0 (* c (* i (+ a (* c b)))))
(if (<= c 3.8e+29)
(* 2.0 (+ (* x y) (* z t)))
(* -2.0 (* c (* i (* c (+ b (/ a c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -5.2e-15) {
tmp = -2.0 * (c * (i * (a + (c * b))));
} else if (c <= 3.8e+29) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * (c * (i * (c * (b + (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 <= (-5.2d-15)) then
tmp = (-2.0d0) * (c * (i * (a + (c * b))))
else if (c <= 3.8d+29) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = (-2.0d0) * (c * (i * (c * (b + (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 <= -5.2e-15) {
tmp = -2.0 * (c * (i * (a + (c * b))));
} else if (c <= 3.8e+29) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * (c * (i * (c * (b + (a / c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -5.2e-15: tmp = -2.0 * (c * (i * (a + (c * b)))) elif c <= 3.8e+29: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = -2.0 * (c * (i * (c * (b + (a / c))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -5.2e-15) tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(a + Float64(c * b))))); elseif (c <= 3.8e+29) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(c * Float64(b + Float64(a / c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -5.2e-15) tmp = -2.0 * (c * (i * (a + (c * b)))); elseif (c <= 3.8e+29) tmp = 2.0 * ((x * y) + (z * t)); else tmp = -2.0 * (c * (i * (c * (b + (a / c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -5.2e-15], N[(-2.0 * N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.8e+29], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(i * N[(c * N[(b + N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.2 \cdot 10^{-15}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+29}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot \left(b + \frac{a}{c}\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -5.20000000000000009e-15Initial program 80.5%
associate--l+80.5%
*-commutative80.5%
associate--l+80.5%
associate--l+80.5%
*-commutative80.5%
associate--l+80.5%
fma-define82.0%
*-commutative82.0%
associate-*l*90.8%
+-commutative90.8%
fma-define90.8%
Simplified90.8%
Taylor expanded in i around inf 80.3%
if -5.20000000000000009e-15 < c < 3.79999999999999971e29Initial program 96.3%
associate--l+96.3%
*-commutative96.3%
associate--l+96.3%
associate--l+96.3%
*-commutative96.3%
associate--l+96.3%
fma-define97.0%
*-commutative97.0%
associate-*l*89.4%
+-commutative89.4%
fma-define89.4%
Simplified89.4%
Taylor expanded in c around 0 74.9%
if 3.79999999999999971e29 < c Initial program 89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
fma-define91.2%
*-commutative91.2%
associate-*l*98.0%
+-commutative98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in i around inf 78.3%
Taylor expanded in c around inf 78.3%
Final simplification77.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -4.2e-11) (not (<= c 3.2e+29))) (* -2.0 (* c (* i (+ a (* c b))))) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.2e-11) || !(c <= 3.2e+29)) {
tmp = -2.0 * (c * (i * (a + (c * b))));
} else {
tmp = 2.0 * ((x * y) + (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 ((c <= (-4.2d-11)) .or. (.not. (c <= 3.2d+29))) then
tmp = (-2.0d0) * (c * (i * (a + (c * b))))
else
tmp = 2.0d0 * ((x * y) + (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 ((c <= -4.2e-11) || !(c <= 3.2e+29)) {
tmp = -2.0 * (c * (i * (a + (c * b))));
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -4.2e-11) or not (c <= 3.2e+29): tmp = -2.0 * (c * (i * (a + (c * b)))) else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -4.2e-11) || !(c <= 3.2e+29)) tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(a + Float64(c * b))))); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -4.2e-11) || ~((c <= 3.2e+29))) tmp = -2.0 * (c * (i * (a + (c * b)))); else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -4.2e-11], N[Not[LessEqual[c, 3.2e+29]], $MachinePrecision]], N[(-2.0 * N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.2 \cdot 10^{-11} \lor \neg \left(c \leq 3.2 \cdot 10^{+29}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -4.1999999999999997e-11 or 3.19999999999999987e29 < c Initial program 84.5%
associate--l+84.5%
*-commutative84.5%
associate--l+84.5%
associate--l+84.5%
*-commutative84.5%
associate--l+84.5%
fma-define86.2%
*-commutative86.2%
associate-*l*94.1%
+-commutative94.1%
fma-define94.1%
Simplified94.1%
Taylor expanded in i around inf 79.4%
if -4.1999999999999997e-11 < c < 3.19999999999999987e29Initial program 96.3%
associate--l+96.3%
*-commutative96.3%
associate--l+96.3%
associate--l+96.3%
*-commutative96.3%
associate--l+96.3%
fma-define97.0%
*-commutative97.0%
associate-*l*89.4%
+-commutative89.4%
fma-define89.4%
Simplified89.4%
Taylor expanded in c around 0 74.9%
Final simplification77.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -2.8e-7)
(* -2.0 (* c (* (* c i) b)))
(if (<= c 9.2e+36)
(* 2.0 (+ (* x y) (* z t)))
(* -2.0 (* c (* i (* c b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2.8e-7) {
tmp = -2.0 * (c * ((c * i) * b));
} else if (c <= 9.2e+36) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * (c * (i * (c * b)));
}
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-7)) then
tmp = (-2.0d0) * (c * ((c * i) * b))
else if (c <= 9.2d+36) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = (-2.0d0) * (c * (i * (c * b)))
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-7) {
tmp = -2.0 * (c * ((c * i) * b));
} else if (c <= 9.2e+36) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * (c * (i * (c * b)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -2.8e-7: tmp = -2.0 * (c * ((c * i) * b)) elif c <= 9.2e+36: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = -2.0 * (c * (i * (c * b))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -2.8e-7) tmp = Float64(-2.0 * Float64(c * Float64(Float64(c * i) * b))); elseif (c <= 9.2e+36) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(c * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -2.8e-7) tmp = -2.0 * (c * ((c * i) * b)); elseif (c <= 9.2e+36) tmp = 2.0 * ((x * y) + (z * t)); else tmp = -2.0 * (c * (i * (c * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -2.8e-7], N[(-2.0 * N[(c * N[(N[(c * i), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.2e+36], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.8 \cdot 10^{-7}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{+36}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if c < -2.80000000000000019e-7Initial program 80.2%
associate--l+80.2%
*-commutative80.2%
associate--l+80.2%
associate--l+80.2%
*-commutative80.2%
associate--l+80.2%
fma-define81.7%
*-commutative81.7%
associate-*l*90.7%
+-commutative90.7%
fma-define90.7%
Simplified90.7%
Taylor expanded in i around inf 80.0%
Taylor expanded in a around 0 69.6%
if -2.80000000000000019e-7 < c < 9.19999999999999986e36Initial program 96.3%
associate--l+96.3%
*-commutative96.3%
associate--l+96.3%
associate--l+96.3%
*-commutative96.3%
associate--l+96.3%
fma-define97.1%
*-commutative97.1%
associate-*l*89.7%
+-commutative89.7%
fma-define89.7%
Simplified89.7%
Taylor expanded in c around 0 73.5%
if 9.19999999999999986e36 < c Initial program 88.8%
associate--l+88.8%
*-commutative88.8%
associate--l+88.8%
associate--l+88.8%
*-commutative88.8%
associate--l+88.8%
fma-define90.7%
*-commutative90.7%
associate-*l*97.9%
+-commutative97.9%
fma-define97.9%
Simplified97.9%
Taylor expanded in i around inf 78.9%
Taylor expanded in a around 0 65.2%
*-commutative84.3%
Simplified65.2%
Final simplification70.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= t -1.3e-154) (not (<= t 1.1e+117))) (* t (* z 2.0)) (* x (* 2.0 y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -1.3e-154) || !(t <= 1.1e+117)) {
tmp = t * (z * 2.0);
} else {
tmp = x * (2.0 * y);
}
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 <= (-1.3d-154)) .or. (.not. (t <= 1.1d+117))) then
tmp = t * (z * 2.0d0)
else
tmp = x * (2.0d0 * y)
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 <= -1.3e-154) || !(t <= 1.1e+117)) {
tmp = t * (z * 2.0);
} else {
tmp = x * (2.0 * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -1.3e-154) or not (t <= 1.1e+117): tmp = t * (z * 2.0) else: tmp = x * (2.0 * y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -1.3e-154) || !(t <= 1.1e+117)) tmp = Float64(t * Float64(z * 2.0)); else tmp = Float64(x * Float64(2.0 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((t <= -1.3e-154) || ~((t <= 1.1e+117))) tmp = t * (z * 2.0); else tmp = x * (2.0 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -1.3e-154], N[Not[LessEqual[t, 1.1e+117]], $MachinePrecision]], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(2.0 * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-154} \lor \neg \left(t \leq 1.1 \cdot 10^{+117}\right):\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot y\right)\\
\end{array}
\end{array}
if t < -1.3e-154 or 1.10000000000000007e117 < t Initial program 88.9%
associate--l+88.9%
*-commutative88.9%
associate--l+88.9%
associate--l+88.9%
*-commutative88.9%
associate--l+88.9%
fma-define91.0%
*-commutative91.0%
associate-*l*89.5%
+-commutative89.5%
fma-define89.5%
Simplified89.5%
Taylor expanded in z around inf 41.0%
associate-*r*41.0%
*-commutative41.0%
associate-*l*41.0%
*-commutative41.0%
Simplified41.0%
if -1.3e-154 < t < 1.10000000000000007e117Initial program 93.2%
associate--l+93.2%
*-commutative93.2%
associate--l+93.2%
associate--l+93.2%
*-commutative93.2%
associate--l+93.2%
fma-define93.2%
*-commutative93.2%
associate-*l*94.1%
+-commutative94.1%
fma-define94.2%
Simplified94.2%
Taylor expanded in x around inf 32.3%
*-commutative32.3%
associate-*l*32.3%
Simplified32.3%
Final simplification37.1%
(FPCore (x y z t a b c i) :precision binary64 (* t (* z 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t * (z * 2.0);
}
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 = t * (z * 2.0d0)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t * (z * 2.0);
}
def code(x, y, z, t, a, b, c, i): return t * (z * 2.0)
function code(x, y, z, t, a, b, c, i) return Float64(t * Float64(z * 2.0)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = t * (z * 2.0); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \left(z \cdot 2\right)
\end{array}
Initial program 90.8%
associate--l+90.8%
*-commutative90.8%
associate--l+90.8%
associate--l+90.8%
*-commutative90.8%
associate--l+90.8%
fma-define92.0%
*-commutative92.0%
associate-*l*91.6%
+-commutative91.6%
fma-define91.6%
Simplified91.6%
Taylor expanded in z around inf 29.3%
associate-*r*29.3%
*-commutative29.3%
associate-*l*29.3%
*-commutative29.3%
Simplified29.3%
(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 2024146
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(! :herbie-platform default (* 2 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))