
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * 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 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * 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 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (* y i) (fma x (log y) (+ z t))) (+ (* (+ b -0.5) (log c)) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((y * i) + fma(x, log(y), (z + t))) + (((b + -0.5) * log(c)) + a);
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(y * i) + fma(x, log(y), Float64(z + t))) + Float64(Float64(Float64(b + -0.5) * log(c)) + a)) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot i + \mathsf{fma}\left(x, \log y, z + t\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + a\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.8%
fma-udef99.8%
metadata-eval99.8%
sub-neg99.8%
associate-+r+99.8%
fma-udef99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y))))));
}
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 = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + (x * log(y))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (x * Math.log(y))))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (x * math.log(y))))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y)))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= a 2.16e+77)
(+ (* y i) (+ t (+ z (+ t_1 (* b (log c))))))
(+ (* y i) (+ a (+ t (+ z t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (a <= 2.16e+77) {
tmp = (y * i) + (t + (z + (t_1 + (b * log(c)))));
} else {
tmp = (y * i) + (a + (t + (z + 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 * log(y)
if (a <= 2.16d+77) then
tmp = (y * i) + (t + (z + (t_1 + (b * log(c)))))
else
tmp = (y * i) + (a + (t + (z + 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 * Math.log(y);
double tmp;
if (a <= 2.16e+77) {
tmp = (y * i) + (t + (z + (t_1 + (b * Math.log(c)))));
} else {
tmp = (y * i) + (a + (t + (z + t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if a <= 2.16e+77: tmp = (y * i) + (t + (z + (t_1 + (b * math.log(c))))) else: tmp = (y * i) + (a + (t + (z + t_1))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (a <= 2.16e+77) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c)))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (a <= 2.16e+77) tmp = (y * i) + (t + (z + (t_1 + (b * log(c))))); else tmp = (y * i) + (a + (t + (z + t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2.16e+77], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq 2.16 \cdot 10^{+77}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(t_1 + b \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t_1\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.15999999999999992e77Initial program 99.8%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in a around 0 86.2%
if 2.15999999999999992e77 < a Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 96.9%
Final simplification88.5%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* b (log c)) (+ a (+ t (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
}
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 = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * Math.log(c)) + (a + (t + (z + (x * Math.log(y))))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((b * math.log(c)) + (a + (t + (z + (x * math.log(y))))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y)))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 98.2%
*-commutative98.2%
Simplified98.2%
Final simplification98.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.2e+55) (not (<= x 7e+84))) (+ (* y i) (+ a (+ t (+ z (* x (log y)))))) (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.2e+55) || !(x <= 7e+84)) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-4.2d+55)) .or. (.not. (x <= 7d+84))) then
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
else
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.2e+55) || !(x <= 7e+84)) {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
} else {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.2e+55) or not (x <= 7e+84): tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) else: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.2e+55) || !(x <= 7e+84)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -4.2e+55) || ~((x <= 7e+84))) tmp = (y * i) + (a + (t + (z + (x * log(y))))); else tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.2e+55], N[Not[LessEqual[x, 7e+84]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+55} \lor \neg \left(x \leq 7 \cdot 10^{+84}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.2000000000000001e55 or 6.9999999999999998e84 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 92.0%
if -4.2000000000000001e55 < x < 6.9999999999999998e84Initial program 99.9%
Taylor expanded in x around 0 99.3%
Final simplification96.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -3.6e+152) (not (<= b 1.5e+173))) (+ (* y i) (+ t (+ z (* b (log c))))) (+ (* y i) (+ a (+ t (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -3.6e+152) || !(b <= 1.5e+173)) {
tmp = (y * i) + (t + (z + (b * log(c))));
} else {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((b <= (-3.6d+152)) .or. (.not. (b <= 1.5d+173))) then
tmp = (y * i) + (t + (z + (b * log(c))))
else
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -3.6e+152) || !(b <= 1.5e+173)) {
tmp = (y * i) + (t + (z + (b * Math.log(c))));
} else {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -3.6e+152) or not (b <= 1.5e+173): tmp = (y * i) + (t + (z + (b * math.log(c)))) else: tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -3.6e+152) || !(b <= 1.5e+173)) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(b * log(c))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -3.6e+152) || ~((b <= 1.5e+173))) tmp = (y * i) + (t + (z + (b * log(c)))); else tmp = (y * i) + (a + (t + (z + (x * log(y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -3.6e+152], N[Not[LessEqual[b, 1.5e+173]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+152} \lor \neg \left(b \leq 1.5 \cdot 10^{+173}\right):\\
\;\;\;\;y \cdot i + \left(t + \left(z + b \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\end{array}
\end{array}
if b < -3.5999999999999999e152 or 1.4999999999999999e173 < b Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in a around 0 98.0%
Taylor expanded in x around 0 92.6%
if -3.5999999999999999e152 < b < 1.4999999999999999e173Initial program 99.9%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in b around 0 94.0%
Final simplification93.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -11500000.0) (not (<= x 5.5e+84))) (+ (* y i) (+ a (+ t (+ z (* x (log y)))))) (+ (+ (* (+ b -0.5) (log c)) a) (+ (* y i) z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -11500000.0) || !(x <= 5.5e+84)) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else {
tmp = (((b + -0.5) * log(c)) + a) + ((y * i) + z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-11500000.0d0)) .or. (.not. (x <= 5.5d+84))) then
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
else
tmp = (((b + (-0.5d0)) * log(c)) + a) + ((y * i) + z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -11500000.0) || !(x <= 5.5e+84)) {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
} else {
tmp = (((b + -0.5) * Math.log(c)) + a) + ((y * i) + z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -11500000.0) or not (x <= 5.5e+84): tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) else: tmp = (((b + -0.5) * math.log(c)) + a) + ((y * i) + z) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -11500000.0) || !(x <= 5.5e+84)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); else tmp = Float64(Float64(Float64(Float64(b + -0.5) * log(c)) + a) + Float64(Float64(y * i) + z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -11500000.0) || ~((x <= 5.5e+84))) tmp = (y * i) + (a + (t + (z + (x * log(y))))); else tmp = (((b + -0.5) * log(c)) + a) + ((y * i) + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -11500000.0], N[Not[LessEqual[x, 5.5e+84]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -11500000 \lor \neg \left(x \leq 5.5 \cdot 10^{+84}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + -0.5\right) \cdot \log c + a\right) + \left(y \cdot i + z\right)\\
\end{array}
\end{array}
if x < -1.15e7 or 5.5000000000000004e84 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 92.8%
if -1.15e7 < x < 5.5000000000000004e84Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
fma-udef99.9%
metadata-eval99.9%
sub-neg99.9%
associate-+r+99.9%
fma-udef99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 80.7%
Final simplification85.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= b -7e+150)
(+ (* y i) (+ t (+ z (* b (log c)))))
(if (<= b 2.8e+165)
(+ (* y i) (+ a (+ t (+ z (* x (log y))))))
(+ (+ (* (+ b -0.5) (log c)) a) (+ (* y i) t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (b <= -7e+150) {
tmp = (y * i) + (t + (z + (b * log(c))));
} else if (b <= 2.8e+165) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else {
tmp = (((b + -0.5) * log(c)) + a) + ((y * i) + t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (b <= (-7d+150)) then
tmp = (y * i) + (t + (z + (b * log(c))))
else if (b <= 2.8d+165) then
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
else
tmp = (((b + (-0.5d0)) * log(c)) + a) + ((y * i) + t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (b <= -7e+150) {
tmp = (y * i) + (t + (z + (b * Math.log(c))));
} else if (b <= 2.8e+165) {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
} else {
tmp = (((b + -0.5) * Math.log(c)) + a) + ((y * i) + t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if b <= -7e+150: tmp = (y * i) + (t + (z + (b * math.log(c)))) elif b <= 2.8e+165: tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) else: tmp = (((b + -0.5) * math.log(c)) + a) + ((y * i) + t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (b <= -7e+150) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(b * log(c))))); elseif (b <= 2.8e+165) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); else tmp = Float64(Float64(Float64(Float64(b + -0.5) * log(c)) + a) + Float64(Float64(y * i) + t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (b <= -7e+150) tmp = (y * i) + (t + (z + (b * log(c)))); elseif (b <= 2.8e+165) tmp = (y * i) + (a + (t + (z + (x * log(y))))); else tmp = (((b + -0.5) * log(c)) + a) + ((y * i) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[b, -7e+150], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+165], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+150}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + b \cdot \log c\right)\right)\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+165}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + -0.5\right) \cdot \log c + a\right) + \left(y \cdot i + t\right)\\
\end{array}
\end{array}
if b < -6.99999999999999968e150Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in x around 0 99.9%
if -6.99999999999999968e150 < b < 2.7999999999999998e165Initial program 99.9%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in b around 0 94.0%
if 2.7999999999999998e165 < b Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
Simplified99.7%
fma-udef99.6%
fma-udef99.6%
metadata-eval99.6%
sub-neg99.6%
associate-+r+99.6%
fma-udef99.6%
associate-+r+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+l+99.6%
Applied egg-rr99.6%
Taylor expanded in t around inf 76.3%
Final simplification92.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 7.5e+127)
(+ (* y i) (+ t (+ z (* b (log c)))))
(if (<= a 5.6e+170)
(+ a (+ t (+ z (* x (log y)))))
(+ (+ t a) (+ (* y i) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.5e+127) {
tmp = (y * i) + (t + (z + (b * log(c))));
} else if (a <= 5.6e+170) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = (t + a) + ((y * i) + z);
}
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 <= 7.5d+127) then
tmp = (y * i) + (t + (z + (b * log(c))))
else if (a <= 5.6d+170) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = (t + a) + ((y * i) + z)
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 <= 7.5e+127) {
tmp = (y * i) + (t + (z + (b * Math.log(c))));
} else if (a <= 5.6e+170) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (t + a) + ((y * i) + z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7.5e+127: tmp = (y * i) + (t + (z + (b * math.log(c)))) elif a <= 5.6e+170: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (t + a) + ((y * i) + z) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7.5e+127) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(b * log(c))))); elseif (a <= 5.6e+170) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(t + a) + Float64(Float64(y * i) + z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 7.5e+127) tmp = (y * i) + (t + (z + (b * log(c)))); elseif (a <= 5.6e+170) tmp = a + (t + (z + (x * log(y)))); else tmp = (t + a) + ((y * i) + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7.5e+127], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e+170], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.5 \cdot 10^{+127}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + b \cdot \log c\right)\right)\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{+170}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t + a\right) + \left(y \cdot i + z\right)\\
\end{array}
\end{array}
if a < 7.4999999999999996e127Initial program 99.8%
Taylor expanded in b around inf 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in a around 0 85.5%
Taylor expanded in x around 0 69.7%
if 7.4999999999999996e127 < a < 5.6000000000000003e170Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in b around 0 99.6%
Taylor expanded in y around 0 99.6%
if 5.6000000000000003e170 < a Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 96.5%
Taylor expanded in x around 0 85.0%
associate-+r+85.0%
+-commutative85.0%
*-commutative85.0%
Simplified85.0%
Final simplification72.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.7e+191) (not (<= x 1.7e+139))) (+ (* y i) (* x (log y))) (+ (+ t a) (+ (* y i) z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.7e+191) || !(x <= 1.7e+139)) {
tmp = (y * i) + (x * log(y));
} else {
tmp = (t + a) + ((y * i) + z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.7d+191)) .or. (.not. (x <= 1.7d+139))) then
tmp = (y * i) + (x * log(y))
else
tmp = (t + a) + ((y * i) + z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.7e+191) || !(x <= 1.7e+139)) {
tmp = (y * i) + (x * Math.log(y));
} else {
tmp = (t + a) + ((y * i) + z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.7e+191) or not (x <= 1.7e+139): tmp = (y * i) + (x * math.log(y)) else: tmp = (t + a) + ((y * i) + z) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.7e+191) || !(x <= 1.7e+139)) tmp = Float64(Float64(y * i) + Float64(x * log(y))); else tmp = Float64(Float64(t + a) + Float64(Float64(y * i) + z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.7e+191) || ~((x <= 1.7e+139))) tmp = (y * i) + (x * log(y)); else tmp = (t + a) + ((y * i) + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.7e+191], N[Not[LessEqual[x, 1.7e+139]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+191} \lor \neg \left(x \leq 1.7 \cdot 10^{+139}\right):\\
\;\;\;\;y \cdot i + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(t + a\right) + \left(y \cdot i + z\right)\\
\end{array}
\end{array}
if x < -1.70000000000000004e191 or 1.7000000000000001e139 < x Initial program 99.7%
Taylor expanded in x around inf 70.5%
if -1.70000000000000004e191 < x < 1.7000000000000001e139Initial program 99.9%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in b around 0 82.9%
Taylor expanded in x around 0 78.9%
associate-+r+78.9%
+-commutative78.9%
*-commutative78.9%
Simplified78.9%
Final simplification76.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 7.5e-9) (+ a (+ t (+ z (* x (log y))))) (+ (+ t a) (+ (* y i) z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 7.5e-9) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = (t + a) + ((y * i) + z);
}
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 (y <= 7.5d-9) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = (t + a) + ((y * i) + z)
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 (y <= 7.5e-9) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (t + a) + ((y * i) + z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 7.5e-9: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (t + a) + ((y * i) + z) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 7.5e-9) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(t + a) + Float64(Float64(y * i) + z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 7.5e-9) tmp = a + (t + (z + (x * log(y)))); else tmp = (t + a) + ((y * i) + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 7.5e-9], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{-9}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t + a\right) + \left(y \cdot i + z\right)\\
\end{array}
\end{array}
if y < 7.49999999999999933e-9Initial program 99.8%
Taylor expanded in b around inf 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in b around 0 82.8%
Taylor expanded in y around 0 80.3%
if 7.49999999999999933e-9 < y Initial program 99.9%
Taylor expanded in b around inf 98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in b around 0 87.2%
Taylor expanded in x around 0 77.1%
associate-+r+77.1%
+-commutative77.1%
*-commutative77.1%
Simplified77.1%
Final simplification78.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ t a) (+ (* y i) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (t + a) + ((y * i) + z);
}
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 + a) + ((y * i) + z)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (t + a) + ((y * i) + z);
}
def code(x, y, z, t, a, b, c, i): return (t + a) + ((y * i) + z)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(t + a) + Float64(Float64(y * i) + z)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (t + a) + ((y * i) + z); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(t + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(t + a\right) + \left(y \cdot i + z\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in b around 0 84.9%
Taylor expanded in x around 0 68.5%
associate-+r+68.5%
+-commutative68.5%
*-commutative68.5%
Simplified68.5%
Final simplification68.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.15e+145) (+ (* y i) z) (+ (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.15e+145) {
tmp = (y * i) + z;
} else {
tmp = (y * i) + a;
}
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 <= 3.15d+145) then
tmp = (y * i) + z
else
tmp = (y * i) + a
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 <= 3.15e+145) {
tmp = (y * i) + z;
} else {
tmp = (y * i) + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.15e+145: tmp = (y * i) + z else: tmp = (y * i) + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.15e+145) tmp = Float64(Float64(y * i) + z); else tmp = Float64(Float64(y * i) + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 3.15e+145) tmp = (y * i) + z; else tmp = (y * i) + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.15e+145], N[(N[(y * i), $MachinePrecision] + z), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.15 \cdot 10^{+145}:\\
\;\;\;\;y \cdot i + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + a\\
\end{array}
\end{array}
if a < 3.14999999999999998e145Initial program 99.8%
Taylor expanded in z around inf 39.8%
if 3.14999999999999998e145 < a Initial program 99.9%
Taylor expanded in a around inf 54.8%
Final simplification41.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.2e+146) (* y i) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.2e+146) {
tmp = y * i;
} else {
tmp = a;
}
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 <= 2.2d+146) then
tmp = y * i
else
tmp = a
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 <= 2.2e+146) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.2e+146: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.2e+146) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.2e+146) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.2e+146], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.2 \cdot 10^{+146}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.1999999999999998e146Initial program 99.8%
Taylor expanded in y around inf 23.6%
*-commutative23.6%
Simplified23.6%
if 2.1999999999999998e146 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
fma-udef99.9%
metadata-eval99.9%
sub-neg99.9%
associate-+r+99.9%
fma-udef99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 50.4%
Final simplification26.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + a;
}
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 = (y * i) + a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + a;
}
def code(x, y, z, t, a, b, c, i): return (y * i) + a
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + a), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + a
\end{array}
Initial program 99.8%
Taylor expanded in a around inf 37.8%
Final simplification37.8%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
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 = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.8%
fma-udef99.8%
metadata-eval99.8%
sub-neg99.8%
associate-+r+99.8%
fma-udef99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.9%
Taylor expanded in a around inf 18.4%
Final simplification18.4%
herbie shell --seed 2023297
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))