
(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 14 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 (* c (* t_1 i))) (t_3 (* (* c t_1) i)))
(if (<= t_3 -5e+154)
(* 2.0 (- (* x y) t_2))
(if (<= t_3 2e+293) (* (- (+ (* x y) (* z t)) t_3) 2.0) (* -2.0 t_2)))))
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 = c * (t_1 * i);
double t_3 = (c * t_1) * i;
double tmp;
if (t_3 <= -5e+154) {
tmp = 2.0 * ((x * y) - t_2);
} else if (t_3 <= 2e+293) {
tmp = (((x * y) + (z * t)) - t_3) * 2.0;
} else {
tmp = -2.0 * 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 + (b * c)
t_2 = c * (t_1 * i)
t_3 = (c * t_1) * i
if (t_3 <= (-5d+154)) then
tmp = 2.0d0 * ((x * y) - t_2)
else if (t_3 <= 2d+293) then
tmp = (((x * y) + (z * t)) - t_3) * 2.0d0
else
tmp = (-2.0d0) * 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 + (b * c);
double t_2 = c * (t_1 * i);
double t_3 = (c * t_1) * i;
double tmp;
if (t_3 <= -5e+154) {
tmp = 2.0 * ((x * y) - t_2);
} else if (t_3 <= 2e+293) {
tmp = (((x * y) + (z * t)) - t_3) * 2.0;
} else {
tmp = -2.0 * t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = c * (t_1 * i) t_3 = (c * t_1) * i tmp = 0 if t_3 <= -5e+154: tmp = 2.0 * ((x * y) - t_2) elif t_3 <= 2e+293: tmp = (((x * y) + (z * t)) - t_3) * 2.0 else: tmp = -2.0 * t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(c * Float64(t_1 * i)) t_3 = Float64(Float64(c * t_1) * i) tmp = 0.0 if (t_3 <= -5e+154) tmp = Float64(2.0 * Float64(Float64(x * y) - t_2)); elseif (t_3 <= 2e+293) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_3) * 2.0); else tmp = Float64(-2.0 * t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = c * (t_1 * i); t_3 = (c * t_1) * i; tmp = 0.0; if (t_3 <= -5e+154) tmp = 2.0 * ((x * y) - t_2); elseif (t_3 <= 2e+293) tmp = (((x * y) + (z * t)) - t_3) * 2.0; else tmp = -2.0 * t_2; 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[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+154], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+293], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] * 2.0), $MachinePrecision], N[(-2.0 * t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := c \cdot \left(t\_1 \cdot i\right)\\
t_3 := \left(c \cdot t\_1\right) \cdot i\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_2\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_3\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.00000000000000004e154Initial program 80.5%
associate--l+80.5%
*-commutative80.5%
associate--l+80.5%
associate--l+80.5%
*-commutative80.5%
associate--l+80.5%
fma-define80.5%
*-commutative80.5%
associate-*l*91.6%
+-commutative91.6%
fma-define91.6%
Simplified91.6%
Taylor expanded in z around 0 90.3%
if -5.00000000000000004e154 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.9999999999999998e293Initial program 99.9%
if 1.9999999999999998e293 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 74.3%
associate--l+74.3%
*-commutative74.3%
associate--l+74.3%
associate--l+74.3%
*-commutative74.3%
associate--l+74.3%
fma-define74.3%
*-commutative74.3%
associate-*l*81.3%
+-commutative81.3%
fma-define81.3%
Simplified81.3%
Taylor expanded in i around inf 90.8%
Final simplification95.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 (* y (- x (* b (* i (/ (pow c 2.0) y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (y * (x - (b * (i * (pow(c, 2.0) / y)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (y * (x - (b * (i * (Math.pow(c, 2.0) / y)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = 2.0 * (y * (x - (b * (i * (math.pow(c, 2.0) / y))))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(y * Float64(x - Float64(b * Float64(i * Float64((c ^ 2.0) / y)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - ((c * t_1) * i)) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = 2.0 * (y * (x - (b * (i * ((c ^ 2.0) / y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(y * N[(x - N[(b * N[(i * N[(N[Power[c, 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(y \cdot \left(x - b \cdot \left(i \cdot \frac{{c}^{2}}{y}\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*96.9%
Simplified96.9%
fma-define96.9%
+-commutative96.9%
Applied egg-rr96.9%
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-define0.0%
*-commutative0.0%
associate-*l*14.3%
+-commutative14.3%
fma-define14.3%
Simplified14.3%
Taylor expanded in z around 0 43.3%
Taylor expanded in a around 0 51.2%
Taylor expanded in y around inf 64.9%
mul-1-neg64.9%
unsub-neg64.9%
associate-/l*64.9%
*-commutative64.9%
associate-/l*64.9%
Simplified64.9%
Final simplification95.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* c (* t_1 i))) (t_3 (* (* c t_1) i)))
(if (<= t_3 -2e+153)
(* 2.0 (- (* x y) t_2))
(if (<= t_3 2e+29)
(* (+ (* x y) (* z t)) 2.0)
(if (<= t_3 2e+293) (* 2.0 (- (* x y) t_3)) (* -2.0 t_2))))))
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 = c * (t_1 * i);
double t_3 = (c * t_1) * i;
double tmp;
if (t_3 <= -2e+153) {
tmp = 2.0 * ((x * y) - t_2);
} else if (t_3 <= 2e+29) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (t_3 <= 2e+293) {
tmp = 2.0 * ((x * y) - t_3);
} else {
tmp = -2.0 * 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 + (b * c)
t_2 = c * (t_1 * i)
t_3 = (c * t_1) * i
if (t_3 <= (-2d+153)) then
tmp = 2.0d0 * ((x * y) - t_2)
else if (t_3 <= 2d+29) then
tmp = ((x * y) + (z * t)) * 2.0d0
else if (t_3 <= 2d+293) then
tmp = 2.0d0 * ((x * y) - t_3)
else
tmp = (-2.0d0) * 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 + (b * c);
double t_2 = c * (t_1 * i);
double t_3 = (c * t_1) * i;
double tmp;
if (t_3 <= -2e+153) {
tmp = 2.0 * ((x * y) - t_2);
} else if (t_3 <= 2e+29) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (t_3 <= 2e+293) {
tmp = 2.0 * ((x * y) - t_3);
} else {
tmp = -2.0 * t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = c * (t_1 * i) t_3 = (c * t_1) * i tmp = 0 if t_3 <= -2e+153: tmp = 2.0 * ((x * y) - t_2) elif t_3 <= 2e+29: tmp = ((x * y) + (z * t)) * 2.0 elif t_3 <= 2e+293: tmp = 2.0 * ((x * y) - t_3) else: tmp = -2.0 * t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(c * Float64(t_1 * i)) t_3 = Float64(Float64(c * t_1) * i) tmp = 0.0 if (t_3 <= -2e+153) tmp = Float64(2.0 * Float64(Float64(x * y) - t_2)); elseif (t_3 <= 2e+29) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); elseif (t_3 <= 2e+293) tmp = Float64(2.0 * Float64(Float64(x * y) - t_3)); else tmp = Float64(-2.0 * t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = c * (t_1 * i); t_3 = (c * t_1) * i; tmp = 0.0; if (t_3 <= -2e+153) tmp = 2.0 * ((x * y) - t_2); elseif (t_3 <= 2e+29) tmp = ((x * y) + (z * t)) * 2.0; elseif (t_3 <= 2e+293) tmp = 2.0 * ((x * y) - t_3); else tmp = -2.0 * t_2; 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[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+153], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+29], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$3, 2e+293], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision], N[(-2.0 * t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := c \cdot \left(t\_1 \cdot i\right)\\
t_3 := \left(c \cdot t\_1\right) \cdot i\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_2\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+29}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2e153Initial program 80.8%
associate--l+80.8%
*-commutative80.8%
associate--l+80.8%
associate--l+80.8%
*-commutative80.8%
associate--l+80.8%
fma-define80.8%
*-commutative80.8%
associate-*l*91.7%
+-commutative91.7%
fma-define91.7%
Simplified91.7%
Taylor expanded in z around 0 90.4%
if -2e153 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.99999999999999983e29Initial program 99.9%
associate--l+99.9%
*-commutative99.9%
associate--l+99.9%
associate--l+99.9%
*-commutative99.9%
associate--l+99.9%
fma-define99.9%
*-commutative99.9%
associate-*l*99.0%
+-commutative99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in c around 0 89.5%
if 1.99999999999999983e29 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.9999999999999998e293Initial program 99.7%
Taylor expanded in x around inf 80.2%
if 1.9999999999999998e293 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 74.3%
associate--l+74.3%
*-commutative74.3%
associate--l+74.3%
associate--l+74.3%
*-commutative74.3%
associate--l+74.3%
fma-define74.3%
*-commutative74.3%
associate-*l*81.3%
+-commutative81.3%
fma-define81.3%
Simplified81.3%
Taylor expanded in i around inf 90.8%
Final simplification89.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* c (* t_1 i))) (t_3 (* (* c t_1) i)))
(if (<= t_3 -2e+153)
(* 2.0 (- (* x y) t_2))
(if (<= t_3 2e+279)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(* -2.0 t_2)))))
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 = c * (t_1 * i);
double t_3 = (c * t_1) * i;
double tmp;
if (t_3 <= -2e+153) {
tmp = 2.0 * ((x * y) - t_2);
} else if (t_3 <= 2e+279) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = -2.0 * 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 + (b * c)
t_2 = c * (t_1 * i)
t_3 = (c * t_1) * i
if (t_3 <= (-2d+153)) then
tmp = 2.0d0 * ((x * y) - t_2)
else if (t_3 <= 2d+279) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else
tmp = (-2.0d0) * 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 + (b * c);
double t_2 = c * (t_1 * i);
double t_3 = (c * t_1) * i;
double tmp;
if (t_3 <= -2e+153) {
tmp = 2.0 * ((x * y) - t_2);
} else if (t_3 <= 2e+279) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = -2.0 * t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = c * (t_1 * i) t_3 = (c * t_1) * i tmp = 0 if t_3 <= -2e+153: tmp = 2.0 * ((x * y) - t_2) elif t_3 <= 2e+279: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) else: tmp = -2.0 * t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(c * Float64(t_1 * i)) t_3 = Float64(Float64(c * t_1) * i) tmp = 0.0 if (t_3 <= -2e+153) tmp = Float64(2.0 * Float64(Float64(x * y) - t_2)); elseif (t_3 <= 2e+279) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); else tmp = Float64(-2.0 * t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = c * (t_1 * i); t_3 = (c * t_1) * i; tmp = 0.0; if (t_3 <= -2e+153) tmp = 2.0 * ((x * y) - t_2); elseif (t_3 <= 2e+279) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); else tmp = -2.0 * t_2; 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[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+153], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+279], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := c \cdot \left(t\_1 \cdot i\right)\\
t_3 := \left(c \cdot t\_1\right) \cdot i\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_2\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+279}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2e153Initial program 80.8%
associate--l+80.8%
*-commutative80.8%
associate--l+80.8%
associate--l+80.8%
*-commutative80.8%
associate--l+80.8%
fma-define80.8%
*-commutative80.8%
associate-*l*91.7%
+-commutative91.7%
fma-define91.7%
Simplified91.7%
Taylor expanded in z around 0 90.4%
if -2e153 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000012e279Initial program 99.9%
Taylor expanded in a around inf 93.4%
*-commutative93.4%
Simplified93.4%
if 2.00000000000000012e279 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 75.2%
associate--l+75.2%
*-commutative75.2%
associate--l+75.2%
associate--l+75.2%
*-commutative75.2%
associate--l+75.2%
fma-define75.2%
*-commutative75.2%
associate-*l*80.3%
+-commutative80.3%
fma-define80.3%
Simplified80.3%
Taylor expanded in i around inf 89.5%
Final simplification91.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* -2.0 (* c (* t_1 i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = -2.0 * (c * (t_1 * i));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = -2.0 * (c * (t_1 * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = -2.0 * (c * (t_1 * i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(-2.0 * Float64(c * Float64(t_1 * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - ((c * t_1) * i)) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = -2.0 * (c * (t_1 * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(t\_1 \cdot i\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 94.5%
fma-define94.5%
associate-*l*96.9%
Simplified96.9%
fma-define96.9%
+-commutative96.9%
Applied egg-rr96.9%
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-define0.0%
*-commutative0.0%
associate-*l*14.3%
+-commutative14.3%
fma-define14.3%
Simplified14.3%
Taylor expanded in i around inf 57.6%
Final simplification94.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.35e-45) (not (<= c 3700000.0))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.35e-45) || !(c <= 3700000.0)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-2.35d-45)) .or. (.not. (c <= 3700000.0d0))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.35e-45) || !(c <= 3700000.0)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -2.35e-45) or not (c <= 3700000.0): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -2.35e-45) || !(c <= 3700000.0)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -2.35e-45) || ~((c <= 3700000.0))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -2.35e-45], N[Not[LessEqual[c, 3700000.0]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.35 \cdot 10^{-45} \lor \neg \left(c \leq 3700000\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -2.3499999999999999e-45 or 3.7e6 < c Initial program 81.7%
associate--l+81.7%
*-commutative81.7%
associate--l+81.7%
associate--l+81.7%
*-commutative81.7%
associate--l+81.7%
fma-define81.7%
*-commutative81.7%
associate-*l*90.6%
+-commutative90.6%
fma-define90.6%
Simplified90.6%
Taylor expanded in z around 0 85.2%
if -2.3499999999999999e-45 < c < 3.7e6Initial program 98.2%
associate--l+98.2%
*-commutative98.2%
associate--l+98.2%
associate--l+98.2%
*-commutative98.2%
associate--l+98.2%
fma-define98.2%
*-commutative98.2%
associate-*l*92.8%
+-commutative92.8%
fma-define92.8%
Simplified92.8%
Taylor expanded in c around 0 78.2%
Final simplification81.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -5.2e-40) (not (<= c 5000000.0))) (* -2.0 (* c (* (+ a (* b c)) i))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -5.2e-40) || !(c <= 5000000.0)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-5.2d-40)) .or. (.not. (c <= 5000000.0d0))) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -5.2e-40) || !(c <= 5000000.0)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -5.2e-40) or not (c <= 5000000.0): tmp = -2.0 * (c * ((a + (b * c)) * i)) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -5.2e-40) || !(c <= 5000000.0)) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -5.2e-40) || ~((c <= 5000000.0))) tmp = -2.0 * (c * ((a + (b * c)) * i)); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -5.2e-40], N[Not[LessEqual[c, 5000000.0]], $MachinePrecision]], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.2 \cdot 10^{-40} \lor \neg \left(c \leq 5000000\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -5.2000000000000003e-40 or 5e6 < c Initial program 81.7%
associate--l+81.7%
*-commutative81.7%
associate--l+81.7%
associate--l+81.7%
*-commutative81.7%
associate--l+81.7%
fma-define81.7%
*-commutative81.7%
associate-*l*90.6%
+-commutative90.6%
fma-define90.6%
Simplified90.6%
Taylor expanded in i around inf 80.3%
if -5.2000000000000003e-40 < c < 5e6Initial program 98.2%
associate--l+98.2%
*-commutative98.2%
associate--l+98.2%
associate--l+98.2%
*-commutative98.2%
associate--l+98.2%
fma-define98.2%
*-commutative98.2%
associate-*l*92.8%
+-commutative92.8%
fma-define92.8%
Simplified92.8%
Taylor expanded in c around 0 78.2%
Final simplification79.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (* y 2.0))))
(if (<= y -3.3e-6)
t_1
(if (<= y 3.6e-187)
(* -2.0 (* i (* a c)))
(if (<= y 1.45e+99) (* 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 (y <= -3.3e-6) {
tmp = t_1;
} else if (y <= 3.6e-187) {
tmp = -2.0 * (i * (a * c));
} else if (y <= 1.45e+99) {
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 (y <= (-3.3d-6)) then
tmp = t_1
else if (y <= 3.6d-187) then
tmp = (-2.0d0) * (i * (a * c))
else if (y <= 1.45d+99) 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 (y <= -3.3e-6) {
tmp = t_1;
} else if (y <= 3.6e-187) {
tmp = -2.0 * (i * (a * c));
} else if (y <= 1.45e+99) {
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 y <= -3.3e-6: tmp = t_1 elif y <= 3.6e-187: tmp = -2.0 * (i * (a * c)) elif y <= 1.45e+99: 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 (y <= -3.3e-6) tmp = t_1; elseif (y <= 3.6e-187) tmp = Float64(-2.0 * Float64(i * Float64(a * c))); elseif (y <= 1.45e+99) 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 (y <= -3.3e-6) tmp = t_1; elseif (y <= 3.6e-187) tmp = -2.0 * (i * (a * c)); elseif (y <= 1.45e+99) 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[y, -3.3e-6], t$95$1, If[LessEqual[y, 3.6e-187], N[(-2.0 * N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+99], 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}\;y \leq -3.3 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-187}:\\
\;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+99}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.30000000000000017e-6 or 1.4500000000000001e99 < y Initial program 91.7%
associate--l+91.7%
*-commutative91.7%
associate--l+91.7%
associate--l+91.7%
*-commutative91.7%
associate--l+91.7%
fma-define91.7%
*-commutative91.7%
associate-*l*93.4%
+-commutative93.4%
fma-define93.4%
Simplified93.4%
Taylor expanded in x around inf 48.6%
*-commutative48.6%
associate-*l*48.6%
Simplified48.6%
if -3.30000000000000017e-6 < y < 3.59999999999999994e-187Initial program 88.5%
Taylor expanded in a around inf 58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in c around inf 29.4%
associate-*r*30.1%
Simplified30.1%
if 3.59999999999999994e-187 < y < 1.4500000000000001e99Initial program 85.0%
associate--l+85.0%
*-commutative85.0%
associate--l+85.0%
associate--l+85.0%
*-commutative85.0%
associate--l+85.0%
fma-define85.0%
*-commutative85.0%
associate-*l*89.1%
+-commutative89.1%
fma-define89.1%
Simplified89.1%
Taylor expanded in z around inf 34.1%
associate-*r*34.1%
*-commutative34.1%
associate-*l*34.1%
*-commutative34.1%
Simplified34.1%
Final simplification39.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (* y 2.0))))
(if (<= y -2.3e-5)
t_1
(if (<= y 3.6e-187)
(* -2.0 (* a (* c i)))
(if (<= y 2.9e+98) (* 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 (y <= -2.3e-5) {
tmp = t_1;
} else if (y <= 3.6e-187) {
tmp = -2.0 * (a * (c * i));
} else if (y <= 2.9e+98) {
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 (y <= (-2.3d-5)) then
tmp = t_1
else if (y <= 3.6d-187) then
tmp = (-2.0d0) * (a * (c * i))
else if (y <= 2.9d+98) 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 (y <= -2.3e-5) {
tmp = t_1;
} else if (y <= 3.6e-187) {
tmp = -2.0 * (a * (c * i));
} else if (y <= 2.9e+98) {
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 y <= -2.3e-5: tmp = t_1 elif y <= 3.6e-187: tmp = -2.0 * (a * (c * i)) elif y <= 2.9e+98: 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 (y <= -2.3e-5) tmp = t_1; elseif (y <= 3.6e-187) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (y <= 2.9e+98) 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 (y <= -2.3e-5) tmp = t_1; elseif (y <= 3.6e-187) tmp = -2.0 * (a * (c * i)); elseif (y <= 2.9e+98) 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[y, -2.3e-5], t$95$1, If[LessEqual[y, 3.6e-187], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+98], 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}\;y \leq -2.3 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-187}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+98}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.3e-5 or 2.9000000000000001e98 < y Initial program 91.7%
associate--l+91.7%
*-commutative91.7%
associate--l+91.7%
associate--l+91.7%
*-commutative91.7%
associate--l+91.7%
fma-define91.7%
*-commutative91.7%
associate-*l*93.4%
+-commutative93.4%
fma-define93.4%
Simplified93.4%
Taylor expanded in x around inf 48.6%
*-commutative48.6%
associate-*l*48.6%
Simplified48.6%
if -2.3e-5 < y < 3.59999999999999994e-187Initial program 88.5%
associate--l+88.5%
*-commutative88.5%
associate--l+88.5%
associate--l+88.5%
*-commutative88.5%
associate--l+88.5%
fma-define88.5%
*-commutative88.5%
associate-*l*90.4%
+-commutative90.4%
fma-define90.4%
Simplified90.4%
Taylor expanded in a around inf 29.4%
if 3.59999999999999994e-187 < y < 2.9000000000000001e98Initial program 85.0%
associate--l+85.0%
*-commutative85.0%
associate--l+85.0%
associate--l+85.0%
*-commutative85.0%
associate--l+85.0%
fma-define85.0%
*-commutative85.0%
associate-*l*89.1%
+-commutative89.1%
fma-define89.1%
Simplified89.1%
Taylor expanded in z around inf 34.1%
associate-*r*34.1%
*-commutative34.1%
associate-*l*34.1%
*-commutative34.1%
Simplified34.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -6.2e-47) (not (<= c 6.8e+19))) (* -2.0 (* c (* b (* c i)))) (* 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 <= -6.2e-47) || !(c <= 6.8e+19)) {
tmp = -2.0 * (c * (b * (c * i)));
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-6.2d-47)) .or. (.not. (c <= 6.8d+19))) then
tmp = (-2.0d0) * (c * (b * (c * i)))
else
tmp = x * (y * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -6.2e-47) || !(c <= 6.8e+19)) {
tmp = -2.0 * (c * (b * (c * i)));
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -6.2e-47) or not (c <= 6.8e+19): tmp = -2.0 * (c * (b * (c * i))) else: tmp = x * (y * 2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -6.2e-47) || !(c <= 6.8e+19)) tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))); else tmp = Float64(x * Float64(y * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -6.2e-47) || ~((c <= 6.8e+19))) tmp = -2.0 * (c * (b * (c * i))); else tmp = x * (y * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -6.2e-47], N[Not[LessEqual[c, 6.8e+19]], $MachinePrecision]], N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6.2 \cdot 10^{-47} \lor \neg \left(c \leq 6.8 \cdot 10^{+19}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\end{array}
\end{array}
if c < -6.1999999999999996e-47 or 6.8e19 < c Initial program 81.0%
associate--l+81.0%
*-commutative81.0%
associate--l+81.0%
associate--l+81.0%
*-commutative81.0%
associate--l+81.0%
fma-define81.0%
*-commutative81.0%
associate-*l*90.2%
+-commutative90.2%
fma-define90.2%
Simplified90.2%
Taylor expanded in i around inf 80.3%
Taylor expanded in a around 0 65.0%
if -6.1999999999999996e-47 < c < 6.8e19Initial program 98.3%
associate--l+98.3%
*-commutative98.3%
associate--l+98.3%
associate--l+98.3%
*-commutative98.3%
associate--l+98.3%
fma-define98.3%
*-commutative98.3%
associate-*l*93.0%
+-commutative93.0%
fma-define93.0%
Simplified93.0%
Taylor expanded in x around inf 46.9%
*-commutative46.9%
associate-*l*46.9%
Simplified46.9%
Final simplification56.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -2.35e+60)
(* -2.0 (* c (* (* b c) i)))
(if (<= c 1.24e+39)
(* (+ (* x y) (* z t)) 2.0)
(* -2.0 (* c (* b (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2.35e+60) {
tmp = -2.0 * (c * ((b * c) * i));
} else if (c <= 1.24e+39) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (c <= (-2.35d+60)) then
tmp = (-2.0d0) * (c * ((b * c) * i))
else if (c <= 1.24d+39) then
tmp = ((x * y) + (z * t)) * 2.0d0
else
tmp = (-2.0d0) * (c * (b * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2.35e+60) {
tmp = -2.0 * (c * ((b * c) * i));
} else if (c <= 1.24e+39) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -2.35e+60: tmp = -2.0 * (c * ((b * c) * i)) elif c <= 1.24e+39: tmp = ((x * y) + (z * t)) * 2.0 else: tmp = -2.0 * (c * (b * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -2.35e+60) tmp = Float64(-2.0 * Float64(c * Float64(Float64(b * c) * i))); elseif (c <= 1.24e+39) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); else tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -2.35e+60) tmp = -2.0 * (c * ((b * c) * i)); elseif (c <= 1.24e+39) tmp = ((x * y) + (z * t)) * 2.0; else tmp = -2.0 * (c * (b * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -2.35e+60], N[(-2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.24e+39], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.35 \cdot 10^{+60}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.24 \cdot 10^{+39}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -2.3499999999999999e60Initial program 79.5%
associate--l+79.5%
*-commutative79.5%
associate--l+79.5%
associate--l+79.5%
*-commutative79.5%
associate--l+79.5%
fma-define79.5%
*-commutative79.5%
associate-*l*92.2%
+-commutative92.2%
fma-define92.2%
Simplified92.2%
Taylor expanded in i around inf 83.6%
Taylor expanded in a around 0 64.3%
*-commutative64.3%
Simplified64.3%
if -2.3499999999999999e60 < c < 1.24000000000000007e39Initial program 97.2%
associate--l+97.2%
*-commutative97.2%
associate--l+97.2%
associate--l+97.2%
*-commutative97.2%
associate--l+97.2%
fma-define97.2%
*-commutative97.2%
associate-*l*93.5%
+-commutative93.5%
fma-define93.5%
Simplified93.5%
Taylor expanded in c around 0 71.6%
if 1.24000000000000007e39 < c Initial program 77.4%
associate--l+77.4%
*-commutative77.4%
associate--l+77.4%
associate--l+77.4%
*-commutative77.4%
associate--l+77.4%
fma-define77.4%
*-commutative77.4%
associate-*l*85.8%
+-commutative85.8%
fma-define85.8%
Simplified85.8%
Taylor expanded in i around inf 86.2%
Taylor expanded in a around 0 81.7%
Final simplification72.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= c -7.2e-47) (* -2.0 (* c (* (* b c) i))) (if (<= c 3.1e+20) (* x (* y 2.0)) (* -2.0 (* c (* b (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -7.2e-47) {
tmp = -2.0 * (c * ((b * c) * i));
} else if (c <= 3.1e+20) {
tmp = x * (y * 2.0);
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (c <= (-7.2d-47)) then
tmp = (-2.0d0) * (c * ((b * c) * i))
else if (c <= 3.1d+20) then
tmp = x * (y * 2.0d0)
else
tmp = (-2.0d0) * (c * (b * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -7.2e-47) {
tmp = -2.0 * (c * ((b * c) * i));
} else if (c <= 3.1e+20) {
tmp = x * (y * 2.0);
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -7.2e-47: tmp = -2.0 * (c * ((b * c) * i)) elif c <= 3.1e+20: tmp = x * (y * 2.0) else: tmp = -2.0 * (c * (b * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -7.2e-47) tmp = Float64(-2.0 * Float64(c * Float64(Float64(b * c) * i))); elseif (c <= 3.1e+20) tmp = Float64(x * Float64(y * 2.0)); else tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -7.2e-47) tmp = -2.0 * (c * ((b * c) * i)); elseif (c <= 3.1e+20) tmp = x * (y * 2.0); else tmp = -2.0 * (c * (b * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -7.2e-47], N[(-2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.1e+20], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -7.2 \cdot 10^{-47}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 3.1 \cdot 10^{+20}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -7.19999999999999982e-47Initial program 83.8%
associate--l+83.8%
*-commutative83.8%
associate--l+83.8%
associate--l+83.8%
*-commutative83.8%
associate--l+83.8%
fma-define83.8%
*-commutative83.8%
associate-*l*93.0%
+-commutative93.0%
fma-define93.0%
Simplified93.0%
Taylor expanded in i around inf 75.6%
Taylor expanded in a around 0 54.2%
*-commutative54.2%
Simplified54.2%
if -7.19999999999999982e-47 < c < 3.1e20Initial program 98.3%
associate--l+98.3%
*-commutative98.3%
associate--l+98.3%
associate--l+98.3%
*-commutative98.3%
associate--l+98.3%
fma-define98.3%
*-commutative98.3%
associate-*l*93.0%
+-commutative93.0%
fma-define93.0%
Simplified93.0%
Taylor expanded in x around inf 46.9%
*-commutative46.9%
associate-*l*46.9%
Simplified46.9%
if 3.1e20 < c Initial program 77.7%
associate--l+77.7%
*-commutative77.7%
associate--l+77.7%
associate--l+77.7%
*-commutative77.7%
associate--l+77.7%
fma-define77.7%
*-commutative77.7%
associate-*l*87.0%
+-commutative87.0%
fma-define87.0%
Simplified87.0%
Taylor expanded in i around inf 85.8%
Taylor expanded in a around 0 78.2%
Final simplification56.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= t -4.6e-97) (not (<= t 9.2e+191))) (* t (* z 2.0)) (* x (* y 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -4.6e-97) || !(t <= 9.2e+191)) {
tmp = t * (z * 2.0);
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((t <= (-4.6d-97)) .or. (.not. (t <= 9.2d+191))) then
tmp = t * (z * 2.0d0)
else
tmp = x * (y * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -4.6e-97) || !(t <= 9.2e+191)) {
tmp = t * (z * 2.0);
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -4.6e-97) or not (t <= 9.2e+191): tmp = t * (z * 2.0) else: tmp = x * (y * 2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -4.6e-97) || !(t <= 9.2e+191)) tmp = Float64(t * Float64(z * 2.0)); else tmp = Float64(x * Float64(y * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((t <= -4.6e-97) || ~((t <= 9.2e+191))) tmp = t * (z * 2.0); else tmp = x * (y * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -4.6e-97], N[Not[LessEqual[t, 9.2e+191]], $MachinePrecision]], N[(t * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-97} \lor \neg \left(t \leq 9.2 \cdot 10^{+191}\right):\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\end{array}
\end{array}
if t < -4.59999999999999988e-97 or 9.1999999999999997e191 < t Initial program 90.2%
associate--l+90.2%
*-commutative90.2%
associate--l+90.2%
associate--l+90.2%
*-commutative90.2%
associate--l+90.2%
fma-define90.2%
*-commutative90.2%
associate-*l*91.1%
+-commutative91.1%
fma-define91.1%
Simplified91.1%
Taylor expanded in z around inf 41.0%
associate-*r*41.0%
*-commutative41.0%
associate-*l*41.0%
*-commutative41.0%
Simplified41.0%
if -4.59999999999999988e-97 < t < 9.1999999999999997e191Initial 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*91.9%
+-commutative91.9%
fma-define91.9%
Simplified91.9%
Taylor expanded in x around inf 34.5%
*-commutative34.5%
associate-*l*34.5%
Simplified34.5%
Final simplification37.3%
(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 89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
associate--l+89.4%
*-commutative89.4%
associate--l+89.4%
fma-define89.4%
*-commutative89.4%
associate-*l*91.6%
+-commutative91.6%
fma-define91.6%
Simplified91.6%
Taylor expanded in z around inf 24.5%
associate-*r*24.5%
*-commutative24.5%
associate-*l*24.5%
*-commutative24.5%
Simplified24.5%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
herbie shell --seed 2024143
(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))))