
(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 12 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 (* 2.0 (+ (+ (* x y) (* z t)) (/ (* c i) (/ -1.0 (+ a (* c b)))))))
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)) + ((c * i) / (-1.0 / (a + (c * b)))));
}
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)) + ((c * i) / ((-1.0d0) / (a + (c * b)))))
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)) + ((c * i) / (-1.0 / (a + (c * b)))));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) + ((c * i) / (-1.0 / (a + (c * b)))))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(Float64(c * i) / Float64(-1.0 / Float64(a + Float64(c * b)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) + ((c * i) / (-1.0 / (a + (c * b))))); 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[(c * i), $MachinePrecision] / N[(-1.0 / N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) + \frac{c \cdot i}{\frac{-1}{a + c \cdot b}}\right)
\end{array}
Initial program 93.9%
associate-*l*N/A
*-commutativeN/A
flip-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6497.5%
Applied egg-rr97.5%
Final simplification97.5%
(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 (+ (* x y) (- (* z t) (* 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 * ((x * y) + ((z * t) - (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 * ((x * y) + ((z * t) - (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 * ((x * y) + ((z * t) - (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(Float64(x * y) + Float64(Float64(z * t) - 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 * ((x * y) + ((z * t) - (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[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $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(x \cdot y + \left(z \cdot t - c \cdot \left(i \cdot t\_1\right)\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 78.2%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.0%
Simplified90.0%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 97.6%
Final simplification96.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (- (* z t) (* c (* i (+ a (* c b)))))))))
(if (<= c -7.5e-115)
t_1
(if (<= c 2e-181) (* 2.0 (- (+ (* x y) (* z t)) (* i (* c a)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + ((z * t) - (c * (i * (a + (c * b))))));
double tmp;
if (c <= -7.5e-115) {
tmp = t_1;
} else if (c <= 2e-181) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * 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 = 2.0d0 * ((x * y) + ((z * t) - (c * (i * (a + (c * b))))))
if (c <= (-7.5d-115)) then
tmp = t_1
else if (c <= 2d-181) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (c * 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 = 2.0 * ((x * y) + ((z * t) - (c * (i * (a + (c * b))))));
double tmp;
if (c <= -7.5e-115) {
tmp = t_1;
} else if (c <= 2e-181) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + ((z * t) - (c * (i * (a + (c * b)))))) tmp = 0 if c <= -7.5e-115: tmp = t_1 elif c <= 2e-181: tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(c * b))))))) tmp = 0.0 if (c <= -7.5e-115) tmp = t_1; elseif (c <= 2e-181) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + ((z * t) - (c * (i * (a + (c * b)))))); tmp = 0.0; if (c <= -7.5e-115) tmp = t_1; elseif (c <= 2e-181) tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.5e-115], t$95$1, If[LessEqual[c, 2e-181], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\right)\\
\mathbf{if}\;c \leq -7.5 \cdot 10^{-115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2 \cdot 10^{-181}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.50000000000000038e-115 or 2.00000000000000009e-181 < c Initial program 91.3%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.0%
Simplified95.0%
if -7.50000000000000038e-115 < c < 2.00000000000000009e-181Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6498.7%
Simplified98.7%
Final simplification96.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* c (* (+ a (* c b)) (- 0.0 i))))))
(if (<= c -1.55e+109)
t_1
(if (<= c 1.85e+74)
(* 2.0 (+ (+ (* x y) (* z t)) (/ (* c i) (/ -1.0 a))))
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 * ((a + (c * b)) * (0.0 - i)));
double tmp;
if (c <= -1.55e+109) {
tmp = t_1;
} else if (c <= 1.85e+74) {
tmp = 2.0 * (((x * y) + (z * t)) + ((c * i) / (-1.0 / 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 = 2.0d0 * (c * ((a + (c * b)) * (0.0d0 - i)))
if (c <= (-1.55d+109)) then
tmp = t_1
else if (c <= 1.85d+74) then
tmp = 2.0d0 * (((x * y) + (z * t)) + ((c * i) / ((-1.0d0) / 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 = 2.0 * (c * ((a + (c * b)) * (0.0 - i)));
double tmp;
if (c <= -1.55e+109) {
tmp = t_1;
} else if (c <= 1.85e+74) {
tmp = 2.0 * (((x * y) + (z * t)) + ((c * i) / (-1.0 / a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (c * ((a + (c * b)) * (0.0 - i))) tmp = 0 if c <= -1.55e+109: tmp = t_1 elif c <= 1.85e+74: tmp = 2.0 * (((x * y) + (z * t)) + ((c * i) / (-1.0 / a))) 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(a + Float64(c * b)) * Float64(0.0 - i)))) tmp = 0.0 if (c <= -1.55e+109) tmp = t_1; elseif (c <= 1.85e+74) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(Float64(c * i) / Float64(-1.0 / a)))); 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 * ((a + (c * b)) * (0.0 - i))); tmp = 0.0; if (c <= -1.55e+109) tmp = t_1; elseif (c <= 1.85e+74) tmp = 2.0 * (((x * y) + (z * t)) + ((c * i) / (-1.0 / a))); 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[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(0.0 - i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.55e+109], t$95$1, If[LessEqual[c, 1.85e+74], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(c * i), $MachinePrecision] / N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(c \cdot \left(\left(a + c \cdot b\right) \cdot \left(0 - i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.55 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.85 \cdot 10^{+74}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) + \frac{c \cdot i}{\frac{-1}{a}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.54999999999999996e109 or 1.8500000000000001e74 < c Initial program 84.6%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.8%
Simplified93.8%
Taylor expanded in i around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6484.6%
Simplified84.6%
if -1.54999999999999996e109 < c < 1.8500000000000001e74Initial program 99.3%
associate-*l*N/A
*-commutativeN/A
flip-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Applied egg-rr99.7%
Taylor expanded in a around inf
/-lowering-/.f6491.8%
Simplified91.8%
Final simplification89.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* c (* (+ a (* c b)) (- 0.0 i))))))
(if (<= c -1.8e+103)
t_1
(if (<= c 6.2e+75) (* 2.0 (- (+ (* x y) (* z t)) (* i (* c a)))) 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 * ((a + (c * b)) * (0.0 - i)));
double tmp;
if (c <= -1.8e+103) {
tmp = t_1;
} else if (c <= 6.2e+75) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * 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 = 2.0d0 * (c * ((a + (c * b)) * (0.0d0 - i)))
if (c <= (-1.8d+103)) then
tmp = t_1
else if (c <= 6.2d+75) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (c * 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 = 2.0 * (c * ((a + (c * b)) * (0.0 - i)));
double tmp;
if (c <= -1.8e+103) {
tmp = t_1;
} else if (c <= 6.2e+75) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (c * ((a + (c * b)) * (0.0 - i))) tmp = 0 if c <= -1.8e+103: tmp = t_1 elif c <= 6.2e+75: tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))) 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(a + Float64(c * b)) * Float64(0.0 - i)))) tmp = 0.0 if (c <= -1.8e+103) tmp = t_1; elseif (c <= 6.2e+75) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * a)))); 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 * ((a + (c * b)) * (0.0 - i))); tmp = 0.0; if (c <= -1.8e+103) tmp = t_1; elseif (c <= 6.2e+75) tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))); 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[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(0.0 - i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.8e+103], t$95$1, If[LessEqual[c, 6.2e+75], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(c \cdot \left(\left(a + c \cdot b\right) \cdot \left(0 - i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.8 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 6.2 \cdot 10^{+75}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.80000000000000008e103 or 6.2000000000000002e75 < c Initial program 84.6%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.8%
Simplified93.8%
Taylor expanded in i around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6484.6%
Simplified84.6%
if -1.80000000000000008e103 < c < 6.2000000000000002e75Initial program 99.3%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6491.4%
Simplified91.4%
Final simplification88.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* c (* (+ a (* c b)) (- 0.0 i))))))
(if (<= c -5.8e+102)
t_1
(if (<= c 7.2e+60) (* 2.0 (+ (* x y) (* z t))) 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 * ((a + (c * b)) * (0.0 - i)));
double tmp;
if (c <= -5.8e+102) {
tmp = t_1;
} else if (c <= 7.2e+60) {
tmp = 2.0 * ((x * y) + (z * t));
} 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 * ((a + (c * b)) * (0.0d0 - i)))
if (c <= (-5.8d+102)) then
tmp = t_1
else if (c <= 7.2d+60) then
tmp = 2.0d0 * ((x * y) + (z * t))
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 * ((a + (c * b)) * (0.0 - i)));
double tmp;
if (c <= -5.8e+102) {
tmp = t_1;
} else if (c <= 7.2e+60) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (c * ((a + (c * b)) * (0.0 - i))) tmp = 0 if c <= -5.8e+102: tmp = t_1 elif c <= 7.2e+60: tmp = 2.0 * ((x * y) + (z * t)) 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(a + Float64(c * b)) * Float64(0.0 - i)))) tmp = 0.0 if (c <= -5.8e+102) tmp = t_1; elseif (c <= 7.2e+60) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); 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 * ((a + (c * b)) * (0.0 - i))); tmp = 0.0; if (c <= -5.8e+102) tmp = t_1; elseif (c <= 7.2e+60) tmp = 2.0 * ((x * y) + (z * t)); 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[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(0.0 - i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.8e+102], t$95$1, If[LessEqual[c, 7.2e+60], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(c \cdot \left(\left(a + c \cdot b\right) \cdot \left(0 - i\right)\right)\right)\\
\mathbf{if}\;c \leq -5.8 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 7.2 \cdot 10^{+60}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.8000000000000005e102 or 7.19999999999999935e60 < c Initial program 85.5%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.1%
Simplified94.1%
Taylor expanded in i around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6483.5%
Simplified83.5%
if -5.8000000000000005e102 < c < 7.19999999999999935e60Initial program 99.3%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.9%
Simplified91.9%
Taylor expanded in c around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.5%
Simplified76.5%
Final simplification79.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))))
(if (<= z -1.8e+137)
t_1
(if (<= z 9.8e-262)
(* 2.0 (* x y))
(if (<= z 1.05e-32) (* a (* c (* i -2.0))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double tmp;
if (z <= -1.8e+137) {
tmp = t_1;
} else if (z <= 9.8e-262) {
tmp = 2.0 * (x * y);
} else if (z <= 1.05e-32) {
tmp = a * (c * (i * -2.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
if (z <= (-1.8d+137)) then
tmp = t_1
else if (z <= 9.8d-262) then
tmp = 2.0d0 * (x * y)
else if (z <= 1.05d-32) then
tmp = a * (c * (i * (-2.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double tmp;
if (z <= -1.8e+137) {
tmp = t_1;
} else if (z <= 9.8e-262) {
tmp = 2.0 * (x * y);
} else if (z <= 1.05e-32) {
tmp = a * (c * (i * -2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) tmp = 0 if z <= -1.8e+137: tmp = t_1 elif z <= 9.8e-262: tmp = 2.0 * (x * y) elif z <= 1.05e-32: tmp = a * (c * (i * -2.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (z <= -1.8e+137) tmp = t_1; elseif (z <= 9.8e-262) tmp = Float64(2.0 * Float64(x * y)); elseif (z <= 1.05e-32) tmp = Float64(a * Float64(c * Float64(i * -2.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); tmp = 0.0; if (z <= -1.8e+137) tmp = t_1; elseif (z <= 9.8e-262) tmp = 2.0 * (x * y); elseif (z <= 1.05e-32) tmp = a * (c * (i * -2.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+137], t$95$1, If[LessEqual[z, 9.8e-262], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-32], N[(a * N[(c * N[(i * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-262}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-32}:\\
\;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.8e137 or 1.05e-32 < z Initial program 91.6%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.4%
Simplified93.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6456.4%
Simplified56.4%
if -1.8e137 < z < 9.8000000000000005e-262Initial program 93.2%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.4%
Simplified90.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6436.2%
Simplified36.2%
if 9.8000000000000005e-262 < z < 1.05e-32Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.2%
Simplified96.2%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.7%
Simplified33.7%
Final simplification43.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* i (* (+ a (* c b)) (* c -2.0)))))
(if (<= c -4.8e+102)
t_1
(if (<= c 3.9e+59) (* 2.0 (+ (* x y) (* z t))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i * ((a + (c * b)) * (c * -2.0));
double tmp;
if (c <= -4.8e+102) {
tmp = t_1;
} else if (c <= 3.9e+59) {
tmp = 2.0 * ((x * y) + (z * t));
} 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 = i * ((a + (c * b)) * (c * (-2.0d0)))
if (c <= (-4.8d+102)) then
tmp = t_1
else if (c <= 3.9d+59) then
tmp = 2.0d0 * ((x * y) + (z * t))
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 = i * ((a + (c * b)) * (c * -2.0));
double tmp;
if (c <= -4.8e+102) {
tmp = t_1;
} else if (c <= 3.9e+59) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i * ((a + (c * b)) * (c * -2.0)) tmp = 0 if c <= -4.8e+102: tmp = t_1 elif c <= 3.9e+59: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i * Float64(Float64(a + Float64(c * b)) * Float64(c * -2.0))) tmp = 0.0 if (c <= -4.8e+102) tmp = t_1; elseif (c <= 3.9e+59) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i * ((a + (c * b)) * (c * -2.0)); tmp = 0.0; if (c <= -4.8e+102) tmp = t_1; elseif (c <= 3.9e+59) tmp = 2.0 * ((x * y) + (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.8e+102], t$95$1, If[LessEqual[c, 3.9e+59], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(\left(a + c \cdot b\right) \cdot \left(c \cdot -2\right)\right)\\
\mathbf{if}\;c \leq -4.8 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 3.9 \cdot 10^{+59}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -4.79999999999999989e102 or 3.90000000000000021e59 < c Initial program 85.5%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.1%
Simplified94.1%
Taylor expanded in i around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6479.8%
Simplified79.8%
if -4.79999999999999989e102 < c < 3.90000000000000021e59Initial program 99.3%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.9%
Simplified91.9%
Taylor expanded in c around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.5%
Simplified76.5%
Final simplification77.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (* -2.0 (* c (* c i))))))
(if (<= c -2.2e+107)
t_1
(if (<= c 4.2e+102) (* 2.0 (+ (* x y) (* z t))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * (-2.0 * (c * (c * i)));
double tmp;
if (c <= -2.2e+107) {
tmp = t_1;
} else if (c <= 4.2e+102) {
tmp = 2.0 * ((x * y) + (z * t));
} 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 = b * ((-2.0d0) * (c * (c * i)))
if (c <= (-2.2d+107)) then
tmp = t_1
else if (c <= 4.2d+102) then
tmp = 2.0d0 * ((x * y) + (z * t))
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 = b * (-2.0 * (c * (c * i)));
double tmp;
if (c <= -2.2e+107) {
tmp = t_1;
} else if (c <= 4.2e+102) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * (-2.0 * (c * (c * i))) tmp = 0 if c <= -2.2e+107: tmp = t_1 elif c <= 4.2e+102: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * Float64(-2.0 * Float64(c * Float64(c * i)))) tmp = 0.0 if (c <= -2.2e+107) tmp = t_1; elseif (c <= 4.2e+102) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * (-2.0 * (c * (c * i))); tmp = 0.0; if (c <= -2.2e+107) tmp = t_1; elseif (c <= 4.2e+102) tmp = 2.0 * ((x * y) + (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[(-2.0 * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.2e+107], t$95$1, If[LessEqual[c, 4.2e+102], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(-2 \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -2.2 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 4.2 \cdot 10^{+102}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.2e107 or 4.20000000000000003e102 < c Initial program 84.7%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.3%
Simplified93.3%
Taylor expanded in c around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6475.7%
Simplified75.7%
Taylor expanded in b around 0
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6475.7%
Simplified75.7%
if -2.2e107 < c < 4.20000000000000003e102Initial program 98.7%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.5%
Simplified92.5%
Taylor expanded in c around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.2%
Simplified74.2%
Final simplification74.7%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* 2.0 (* z t)))) (if (<= t -1.6e-159) t_1 (if (<= t 2.35e+54) (* 2.0 (* x 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 * (z * t);
double tmp;
if (t <= -1.6e-159) {
tmp = t_1;
} else if (t <= 2.35e+54) {
tmp = 2.0 * (x * 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 * (z * t)
if (t <= (-1.6d-159)) then
tmp = t_1
else if (t <= 2.35d+54) then
tmp = 2.0d0 * (x * 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 * (z * t);
double tmp;
if (t <= -1.6e-159) {
tmp = t_1;
} else if (t <= 2.35e+54) {
tmp = 2.0 * (x * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) tmp = 0 if t <= -1.6e-159: tmp = t_1 elif t <= 2.35e+54: tmp = 2.0 * (x * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -1.6e-159) tmp = t_1; elseif (t <= 2.35e+54) tmp = Float64(2.0 * Float64(x * 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 * (z * t); tmp = 0.0; if (t <= -1.6e-159) tmp = t_1; elseif (t <= 2.35e+54) tmp = 2.0 * (x * 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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e-159], t$95$1, If[LessEqual[t, 2.35e+54], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+54}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6e-159 or 2.34999999999999996e54 < t Initial program 92.8%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.1%
Simplified92.1%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6445.5%
Simplified45.5%
if -1.6e-159 < t < 2.34999999999999996e54Initial program 95.2%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.6%
Simplified93.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6440.8%
Simplified40.8%
Final simplification43.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.55e+255) (* 2.0 (+ (* x y) (* z t))) (* a (* c (* i -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.55e+255) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = a * (c * (i * -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 (a <= 1.55d+255) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = a * (c * (i * (-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 (a <= 1.55e+255) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = a * (c * (i * -2.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.55e+255: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = a * (c * (i * -2.0)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.55e+255) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(a * Float64(c * Float64(i * -2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.55e+255) tmp = 2.0 * ((x * y) + (z * t)); else tmp = a * (c * (i * -2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.55e+255], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(c * N[(i * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.55 \cdot 10^{+255}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\
\end{array}
\end{array}
if a < 1.5500000000000001e255Initial program 93.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.8%
Simplified92.8%
Taylor expanded in c around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.3%
Simplified59.3%
if 1.5500000000000001e255 < a Initial program 93.0%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.5%
Simplified92.5%
Taylor expanded in a around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.1%
Simplified87.1%
Final simplification60.7%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 93.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
sub-negN/A
associate-+l-N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.8%
Simplified92.8%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6430.3%
Simplified30.3%
Final simplification30.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 2024145
(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))))