
(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 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+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%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (or (<= x -2.1e+88) (not (<= x 4.5e+157)))
(+ (* y i) (+ t_1 (+ a (* x (log y)))))
(+ (* y i) (+ t_1 (+ a (+ z t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if ((x <= -2.1e+88) || !(x <= 4.5e+157)) {
tmp = (y * i) + (t_1 + (a + (x * log(y))));
} else {
tmp = (y * i) + (t_1 + (a + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = log(c) * (b - 0.5d0)
if ((x <= (-2.1d+88)) .or. (.not. (x <= 4.5d+157))) then
tmp = (y * i) + (t_1 + (a + (x * log(y))))
else
tmp = (y * i) + (t_1 + (a + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = Math.log(c) * (b - 0.5);
double tmp;
if ((x <= -2.1e+88) || !(x <= 4.5e+157)) {
tmp = (y * i) + (t_1 + (a + (x * Math.log(y))));
} else {
tmp = (y * i) + (t_1 + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) tmp = 0 if (x <= -2.1e+88) or not (x <= 4.5e+157): tmp = (y * i) + (t_1 + (a + (x * math.log(y)))) else: tmp = (y * i) + (t_1 + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if ((x <= -2.1e+88) || !(x <= 4.5e+157)) tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b - 0.5); tmp = 0.0; if ((x <= -2.1e+88) || ~((x <= 4.5e+157))) tmp = (y * i) + (t_1 + (a + (x * log(y)))); else tmp = (y * i) + (t_1 + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -2.1e+88], N[Not[LessEqual[x, 4.5e+157]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{+88} \lor \neg \left(x \leq 4.5 \cdot 10^{+157}\right):\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.1e88 or 4.49999999999999985e157 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
fma-udef99.8%
add-sqr-sqrt60.7%
pow260.7%
Applied egg-rr60.7%
Taylor expanded in t around 0 52.4%
associate-+r+52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in z around 0 82.8%
if -2.1e88 < x < 4.49999999999999985e157Initial program 99.9%
Taylor expanded in x around 0 99.4%
Final simplification94.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ z (* x (log y)))))
(if (<= a 0.00025)
(+ (* y i) (+ (* (log c) (- b 0.5)) t_1))
(+ (* y i) (+ (+ a (+ t t_1)) (* b (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (x * log(y));
double tmp;
if (a <= 0.00025) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + t_1);
} else {
tmp = (y * i) + ((a + (t + t_1)) + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = z + (x * log(y))
if (a <= 0.00025d0) then
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + t_1)
else
tmp = (y * i) + ((a + (t + t_1)) + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (x * Math.log(y));
double tmp;
if (a <= 0.00025) {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + t_1);
} else {
tmp = (y * i) + ((a + (t + t_1)) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = z + (x * math.log(y)) tmp = 0 if a <= 0.00025: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + t_1) else: tmp = (y * i) + ((a + (t + t_1)) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(z + Float64(x * log(y))) tmp = 0.0 if (a <= 0.00025) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + t_1)); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + t_1)) + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = z + (x * log(y)); tmp = 0.0; if (a <= 0.00025) tmp = (y * i) + ((log(c) * (b - 0.5)) + t_1); else tmp = (y * i) + ((a + (t + t_1)) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 0.00025], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + x \cdot \log y\\
\mathbf{if}\;a \leq 0.00025:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + t\_1\right)\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 2.5000000000000001e-4Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
fma-udef99.9%
add-sqr-sqrt41.3%
pow241.3%
Applied egg-rr41.3%
Taylor expanded in t around 0 31.6%
associate-+r+31.6%
+-commutative31.6%
Simplified31.6%
Taylor expanded in a around 0 66.7%
if 2.5000000000000001e-4 < a Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative87.7%
Simplified99.9%
Final simplification74.6%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (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 = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (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 ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -1e+223) (not (<= (- b 0.5) 5e+232))) (+ (* y i) (+ a (* b (log c)))) (+ (* y i) (+ a (+ z (* -0.5 (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -1e+223) || !((b - 0.5) <= 5e+232)) {
tmp = (y * i) + (a + (b * log(c)));
} else {
tmp = (y * i) + (a + (z + (-0.5 * log(c))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((b - 0.5d0) <= (-1d+223)) .or. (.not. ((b - 0.5d0) <= 5d+232))) then
tmp = (y * i) + (a + (b * log(c)))
else
tmp = (y * i) + (a + (z + ((-0.5d0) * log(c))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -1e+223) || !((b - 0.5) <= 5e+232)) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (z + (-0.5 * Math.log(c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -1e+223) or not ((b - 0.5) <= 5e+232): tmp = (y * i) + (a + (b * math.log(c))) else: tmp = (y * i) + (a + (z + (-0.5 * math.log(c)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -1e+223) || !(Float64(b - 0.5) <= 5e+232)) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(-0.5 * log(c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -1e+223) || ~(((b - 0.5) <= 5e+232))) tmp = (y * i) + (a + (b * log(c))); else tmp = (y * i) + (a + (z + (-0.5 * log(c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+223], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+232]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+223} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+232}\right):\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + -0.5 \cdot \log c\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -1.00000000000000005e223 or 4.99999999999999987e232 < (-.f64 b 1/2) Initial program 99.7%
Taylor expanded in x around 0 97.3%
Taylor expanded in t around 0 95.8%
+-commutative95.8%
sub-neg95.8%
metadata-eval95.8%
distribute-lft-in95.8%
distribute-lft-in95.8%
Simplified95.8%
Taylor expanded in b around inf 87.1%
*-commutative87.1%
Simplified87.1%
if -1.00000000000000005e223 < (-.f64 b 1/2) < 4.99999999999999987e232Initial program 99.9%
Taylor expanded in x around 0 84.4%
Taylor expanded in t around 0 64.4%
+-commutative64.4%
sub-neg64.4%
metadata-eval64.4%
distribute-lft-in64.4%
distribute-lft-in64.4%
Simplified64.4%
Taylor expanded in b around 0 61.3%
*-commutative61.3%
Simplified61.3%
Final simplification65.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.32e+253) (not (<= x 2.8e+227))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.32e+253) || !(x <= 2.8e+227)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.32d+253)) .or. (.not. (x <= 2.8d+227))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.32e+253) || !(x <= 2.8e+227)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.32e+253) or not (x <= 2.8e+227): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.32e+253) || !(x <= 2.8e+227)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.32e+253) || ~((x <= 2.8e+227))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.32e+253], N[Not[LessEqual[x, 2.8e+227]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.32 \cdot 10^{+253} \lor \neg \left(x \leq 2.8 \cdot 10^{+227}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.32e253 or 2.79999999999999984e227 < x Initial program 99.6%
Taylor expanded in x around inf 87.2%
if -1.32e253 < x < 2.79999999999999984e227Initial program 99.9%
Taylor expanded in x around 0 93.9%
Final simplification93.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.32e+253) (not (<= x 5.9e+225))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ (* b (log c)) (+ a (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.32e+253) || !(x <= 5.9e+225)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + ((b * log(c)) + (a + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.32d+253)) .or. (.not. (x <= 5.9d+225))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + ((b * log(c)) + (a + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.32e+253) || !(x <= 5.9e+225)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.32e+253) or not (x <= 5.9e+225): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.32e+253) || !(x <= 5.9e+225)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.32e+253) || ~((x <= 5.9e+225))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + ((b * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.32e+253], N[Not[LessEqual[x, 5.9e+225]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.32 \cdot 10^{+253} \lor \neg \left(x \leq 5.9 \cdot 10^{+225}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.32e253 or 5.8999999999999998e225 < x Initial program 99.6%
Taylor expanded in x around inf 87.2%
if -1.32e253 < x < 5.8999999999999998e225Initial program 99.9%
Taylor expanded in x around 0 93.9%
Taylor expanded in b around inf 91.3%
*-commutative91.3%
Simplified91.3%
Final simplification90.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.38e+253) (not (<= x 1.25e+227))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ a (+ z (* (+ b -0.5) (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.38e+253) || !(x <= 1.25e+227)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (z + ((b + -0.5) * log(c))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.38d+253)) .or. (.not. (x <= 1.25d+227))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (a + (z + ((b + (-0.5d0)) * log(c))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.38e+253) || !(x <= 1.25e+227)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (z + ((b + -0.5) * Math.log(c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.38e+253) or not (x <= 1.25e+227): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (a + (z + ((b + -0.5) * math.log(c)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.38e+253) || !(x <= 1.25e+227)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(b + -0.5) * log(c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.38e+253) || ~((x <= 1.25e+227))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (a + (z + ((b + -0.5) * log(c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.38e+253], N[Not[LessEqual[x, 1.25e+227]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.38 \cdot 10^{+253} \lor \neg \left(x \leq 1.25 \cdot 10^{+227}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\
\end{array}
\end{array}
if x < -1.38e253 or 1.2499999999999999e227 < x Initial program 99.6%
Taylor expanded in x around inf 87.2%
if -1.38e253 < x < 1.2499999999999999e227Initial program 99.9%
Taylor expanded in x around 0 93.9%
Taylor expanded in t around 0 75.4%
+-commutative75.4%
sub-neg75.4%
metadata-eval75.4%
distribute-lft-in75.4%
distribute-lft-in75.4%
Simplified75.4%
Final simplification76.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -6.6e+218) (not (<= b 2.6e+232))) (+ (* y i) (+ a (* b (log c)))) (+ (* y i) (+ z (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -6.6e+218) || !(b <= 2.6e+232)) {
tmp = (y * i) + (a + (b * log(c)));
} else {
tmp = (y * i) + (z + (t + 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 ((b <= (-6.6d+218)) .or. (.not. (b <= 2.6d+232))) then
tmp = (y * i) + (a + (b * log(c)))
else
tmp = (y * i) + (z + (t + 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 ((b <= -6.6e+218) || !(b <= 2.6e+232)) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -6.6e+218) or not (b <= 2.6e+232): tmp = (y * i) + (a + (b * math.log(c))) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -6.6e+218) || !(b <= 2.6e+232)) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -6.6e+218) || ~((b <= 2.6e+232))) tmp = (y * i) + (a + (b * log(c))); else tmp = (y * i) + (z + (t + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -6.6e+218], N[Not[LessEqual[b, 2.6e+232]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.6 \cdot 10^{+218} \lor \neg \left(b \leq 2.6 \cdot 10^{+232}\right):\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if b < -6.59999999999999996e218 or 2.59999999999999973e232 < b Initial program 99.7%
Taylor expanded in x around 0 97.3%
Taylor expanded in t around 0 95.8%
+-commutative95.8%
sub-neg95.8%
metadata-eval95.8%
distribute-lft-in95.8%
distribute-lft-in95.8%
Simplified95.8%
Taylor expanded in b around inf 87.1%
*-commutative87.1%
Simplified87.1%
if -6.59999999999999996e218 < b < 2.59999999999999973e232Initial program 99.9%
Taylor expanded in x around 0 84.4%
add-cube-cbrt84.3%
pow384.3%
sub-neg84.3%
metadata-eval84.3%
*-commutative84.3%
Applied egg-rr84.3%
Taylor expanded in b around inf 78.5%
associate-+r+78.5%
+-commutative78.5%
Simplified78.5%
Final simplification79.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.9e+137) (not (<= x 5.4e+225))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ z (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.9e+137) || !(x <= 5.4e+225)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (z + (t + 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 ((x <= (-2.9d+137)) .or. (.not. (x <= 5.4d+225))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (z + (t + 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 ((x <= -2.9e+137) || !(x <= 5.4e+225)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.9e+137) or not (x <= 5.4e+225): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.9e+137) || !(x <= 5.4e+225)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.9e+137) || ~((x <= 5.4e+225))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (z + (t + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.9e+137], N[Not[LessEqual[x, 5.4e+225]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+137} \lor \neg \left(x \leq 5.4 \cdot 10^{+225}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -2.89999999999999985e137 or 5.3999999999999997e225 < x Initial program 99.7%
Taylor expanded in x around inf 73.1%
if -2.89999999999999985e137 < x < 5.3999999999999997e225Initial program 99.9%
Taylor expanded in x around 0 96.1%
add-cube-cbrt95.8%
pow395.8%
sub-neg95.8%
metadata-eval95.8%
*-commutative95.8%
Applied egg-rr95.8%
Taylor expanded in b around inf 79.1%
associate-+r+79.1%
+-commutative79.1%
Simplified79.1%
Final simplification78.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.15e+23) (+ (* y i) (+ z (* (log c) (- b 0.5)))) (+ (* y i) (+ z (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.15e+23) {
tmp = (y * i) + (z + (log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + (t + 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 <= 1.15d+23) then
tmp = (y * i) + (z + (log(c) * (b - 0.5d0)))
else
tmp = (y * i) + (z + (t + 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 <= 1.15e+23) {
tmp = (y * i) + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.15e+23: tmp = (y * i) + (z + (math.log(c) * (b - 0.5))) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.15e+23) tmp = Float64(Float64(y * i) + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.15e+23) tmp = (y * i) + (z + (log(c) * (b - 0.5))); else tmp = (y * i) + (z + (t + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.15e+23], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.15 \cdot 10^{+23}:\\
\;\;\;\;y \cdot i + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if a < 1.15e23Initial program 99.9%
Taylor expanded in x around 0 86.3%
Taylor expanded in a around 0 72.6%
associate-+r+72.6%
sub-neg72.6%
metadata-eval72.6%
+-commutative72.6%
distribute-lft-out72.6%
+-commutative72.6%
distribute-lft-in72.6%
+-commutative72.6%
fma-def72.6%
Simplified72.6%
Taylor expanded in t around 0 53.9%
if 1.15e23 < a Initial program 99.9%
Taylor expanded in x around 0 87.1%
add-cube-cbrt86.8%
pow386.8%
sub-neg86.8%
metadata-eval86.8%
*-commutative86.8%
Applied egg-rr86.8%
Taylor expanded in b around inf 71.3%
associate-+r+71.3%
+-commutative71.3%
Simplified71.3%
Final simplification57.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -9.8e+87) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -9.8e+87) {
tmp = z + (y * i);
} else {
tmp = a + (y * 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 (z <= (-9.8d+87)) then
tmp = z + (y * i)
else
tmp = a + (y * 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 (z <= -9.8e+87) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -9.8e+87: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -9.8e+87) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -9.8e+87) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -9.8e+87], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+87}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -9.79999999999999943e87Initial program 99.9%
Taylor expanded in z around inf 59.8%
if -9.79999999999999943e87 < z Initial program 99.9%
Taylor expanded in a around inf 43.2%
Final simplification45.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + (t + 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) + (z + (t + 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) + (z + (t + a));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + (t + a))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + Float64(t + a))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + (t + a)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + \left(t + a\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 86.5%
add-cube-cbrt86.2%
pow386.2%
sub-neg86.2%
metadata-eval86.2%
*-commutative86.2%
Applied egg-rr86.2%
Taylor expanded in b around inf 71.2%
associate-+r+71.2%
+-commutative71.2%
Simplified71.2%
Final simplification71.2%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + 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) + (z + 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) + (z + a);
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + a)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + a)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + a); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + a\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 86.5%
Taylor expanded in t around 0 69.6%
+-commutative69.6%
sub-neg69.6%
metadata-eval69.6%
distribute-lft-in69.6%
distribute-lft-in69.6%
Simplified69.6%
Taylor expanded in z around inf 54.5%
Final simplification54.5%
(FPCore (x y z t a b c i) :precision binary64 (+ a (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (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 = a + (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 a + (y * i);
}
def code(x, y, z, t, a, b, c, i): return a + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + y \cdot i
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 41.2%
Final simplification41.2%
(FPCore (x y z t a b c i) :precision binary64 (* y i))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 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 = 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 y * i;
}
def code(x, y, z, t, a, b, c, i): return y * i
function code(x, y, z, t, a, b, c, i) return Float64(y * i) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = y * i; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 86.5%
Taylor expanded in a around 0 68.7%
associate-+r+68.7%
sub-neg68.7%
metadata-eval68.7%
+-commutative68.7%
distribute-lft-out68.7%
+-commutative68.7%
distribute-lft-in68.7%
+-commutative68.7%
fma-def68.7%
Simplified68.7%
Taylor expanded in y around inf 24.7%
Final simplification24.7%
herbie shell --seed 2024026
(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)))