
(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 19 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) (* (log c) (+ b -0.5))) (+ (fma x (log y) a) (+ z t))))
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))) + (fma(x, log(y), a) + (z + t));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(y * i) + Float64(log(c) * Float64(b + -0.5))) + Float64(fma(x, log(y), a) + Float64(z + t))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision] + a), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot i + \log c \cdot \left(b + -0.5\right)\right) + \left(\mathsf{fma}\left(x, \log y, a\right) + \left(z + t\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
fma-def99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
fma-udef99.8%
fma-udef99.8%
metadata-eval99.8%
sub-neg99.8%
associate-+r+99.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
}
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 + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0)))
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 + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + 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]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ z (+ (* y i) (+ (* x (log y)) (* (log c) (- b 0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (z + ((y * i) + ((x * log(y)) + (log(c) * (b - 0.5)))));
}
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 + (z + ((y * i) + ((x * log(y)) + (log(c) * (b - 0.5d0)))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (z + ((y * i) + ((x * Math.log(y)) + (Math.log(c) * (b - 0.5)))));
}
def code(x, y, z, t, a, b, c, i): return a + (z + ((y * i) + ((x * math.log(y)) + (math.log(c) * (b - 0.5)))))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(z + Float64(Float64(y * i) + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (z + ((y * i) + ((x * log(y)) + (log(c) * (b - 0.5))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(z + \left(y \cdot i + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
fma-def99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in t around 0 85.1%
Final simplification85.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.2e+76) (not (<= x 4e+118))) (+ (* y i) (+ (fma x (log y) a) (+ z t))) (+ (* 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 <= -2.2e+76) || !(x <= 4e+118)) {
tmp = (y * i) + (fma(x, log(y), a) + (z + t));
} else {
tmp = (y * i) + ((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 <= -2.2e+76) || !(x <= 4e+118)) tmp = Float64(Float64(y * i) + Float64(fma(x, log(y), a) + Float64(z + t))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.2e+76], N[Not[LessEqual[x, 4e+118]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision] + a), $MachinePrecision] + N[(z + t), $MachinePrecision]), $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 -2.2 \cdot 10^{+76} \lor \neg \left(x \leq 4 \cdot 10^{+118}\right):\\
\;\;\;\;y \cdot i + \left(\mathsf{fma}\left(x, \log y, a\right) + \left(z + t\right)\right)\\
\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 < -2.2e76 or 3.99999999999999987e118 < x Initial program 99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
fma-def99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
fma-udef99.8%
fma-udef99.8%
metadata-eval99.8%
sub-neg99.8%
associate-+r+99.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 94.1%
if -2.2e76 < x < 3.99999999999999987e118Initial program 99.8%
Taylor expanded in x around 0 99.2%
Final simplification97.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.5e+237) (not (<= x 3.5e+243))) (+ t (+ z (* x (log y)))) (+ (* 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 <= -4.5e+237) || !(x <= 3.5e+243)) {
tmp = t + (z + (x * log(y)));
} 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 <= (-4.5d+237)) .or. (.not. (x <= 3.5d+243))) then
tmp = t + (z + (x * log(y)))
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 <= -4.5e+237) || !(x <= 3.5e+243)) {
tmp = t + (z + (x * Math.log(y)));
} 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 <= -4.5e+237) or not (x <= 3.5e+243): tmp = t + (z + (x * math.log(y))) 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 <= -4.5e+237) || !(x <= 3.5e+243)) tmp = Float64(t + Float64(z + Float64(x * log(y)))); 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 <= -4.5e+237) || ~((x <= 3.5e+243))) tmp = t + (z + (x * log(y))); 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, -4.5e+237], N[Not[LessEqual[x, 3.5e+243]], $MachinePrecision]], N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $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 -4.5 \cdot 10^{+237} \lor \neg \left(x \leq 3.5 \cdot 10^{+243}\right):\\
\;\;\;\;t + \left(z + x \cdot \log y\right)\\
\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 < -4.49999999999999964e237 or 3.49999999999999988e243 < x Initial program 99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
fma-def99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+l+99.6%
Simplified99.6%
fma-udef99.6%
fma-udef99.6%
metadata-eval99.6%
sub-neg99.6%
associate-+r+99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 81.1%
Taylor expanded in a around 0 72.7%
Taylor expanded in x around inf 72.7%
if -4.49999999999999964e237 < x < 3.49999999999999988e243Initial program 99.8%
Taylor expanded in x around 0 93.4%
Final simplification90.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4e+237) (not (<= x 2.3e+244))) (+ t (+ z (* x (log y)))) (+ (* y i) (+ (+ a (+ z t)) (* (log c) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4e+237) || !(x <= 2.3e+244)) {
tmp = t + (z + (x * log(y)));
} else {
tmp = (y * i) + ((a + (z + t)) + (log(c) * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-4d+237)) .or. (.not. (x <= 2.3d+244))) then
tmp = t + (z + (x * log(y)))
else
tmp = (y * i) + ((a + (z + t)) + (log(c) * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4e+237) || !(x <= 2.3e+244)) {
tmp = t + (z + (x * Math.log(y)));
} else {
tmp = (y * i) + ((a + (z + t)) + (Math.log(c) * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4e+237) or not (x <= 2.3e+244): tmp = t + (z + (x * math.log(y))) else: tmp = (y * i) + ((a + (z + t)) + (math.log(c) * b)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4e+237) || !(x <= 2.3e+244)) tmp = Float64(t + Float64(z + Float64(x * log(y)))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + Float64(log(c) * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -4e+237) || ~((x <= 2.3e+244))) tmp = t + (z + (x * log(y))); else tmp = (y * i) + ((a + (z + t)) + (log(c) * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4e+237], N[Not[LessEqual[x, 2.3e+244]], $MachinePrecision]], N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+237} \lor \neg \left(x \leq 2.3 \cdot 10^{+244}\right):\\
\;\;\;\;t + \left(z + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + \log c \cdot b\right)\\
\end{array}
\end{array}
if x < -3.99999999999999976e237 or 2.2999999999999999e244 < x Initial program 99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
fma-def99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+l+99.6%
Simplified99.6%
fma-udef99.6%
fma-udef99.6%
metadata-eval99.6%
sub-neg99.6%
associate-+r+99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 81.1%
Taylor expanded in a around 0 72.7%
Taylor expanded in x around inf 72.7%
if -3.99999999999999976e237 < x < 2.2999999999999999e244Initial program 99.8%
Taylor expanded in x around 0 93.4%
Taylor expanded in b around inf 92.1%
*-commutative92.1%
Simplified92.1%
Final simplification89.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -3.7e+169) (not (<= (- b 0.5) 6.6e+220))) (+ a (* (log c) (- b 0.5))) (+ (* y i) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -3.7e+169) || !((b - 0.5) <= 6.6e+220)) {
tmp = a + (log(c) * (b - 0.5));
} else {
tmp = (y * i) + (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 (((b - 0.5d0) <= (-3.7d+169)) .or. (.not. ((b - 0.5d0) <= 6.6d+220))) then
tmp = a + (log(c) * (b - 0.5d0))
else
tmp = (y * i) + (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 (((b - 0.5) <= -3.7e+169) || !((b - 0.5) <= 6.6e+220)) {
tmp = a + (Math.log(c) * (b - 0.5));
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -3.7e+169) or not ((b - 0.5) <= 6.6e+220): tmp = a + (math.log(c) * (b - 0.5)) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -3.7e+169) || !(Float64(b - 0.5) <= 6.6e+220)) tmp = Float64(a + Float64(log(c) * Float64(b - 0.5))); else tmp = Float64(Float64(y * i) + 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 (((b - 0.5) <= -3.7e+169) || ~(((b - 0.5) <= 6.6e+220))) tmp = a + (log(c) * (b - 0.5)); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -3.7e+169], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 6.6e+220]], $MachinePrecision]], N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -3.7 \cdot 10^{+169} \lor \neg \left(b - 0.5 \leq 6.6 \cdot 10^{+220}\right):\\
\;\;\;\;a + \log c \cdot \left(b - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -3.70000000000000001e169 or 6.60000000000000043e220 < (-.f64 b 1/2) Initial program 99.5%
Taylor expanded in a around inf 84.2%
Taylor expanded in y around 0 69.1%
if -3.70000000000000001e169 < (-.f64 b 1/2) < 6.60000000000000043e220Initial program 99.9%
Taylor expanded in x around 0 84.0%
Taylor expanded in b around inf 82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in b around 0 74.4%
Final simplification73.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= (- b 0.5) -5.1e+185)
(+ t (+ z t_1))
(if (<= (- b 0.5) 7e+216) (+ (* y i) (+ a (+ z t))) (+ a t_1)))))
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 ((b - 0.5) <= -5.1e+185) {
tmp = t + (z + t_1);
} else if ((b - 0.5) <= 7e+216) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + 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 = log(c) * (b - 0.5d0)
if ((b - 0.5d0) <= (-5.1d+185)) then
tmp = t + (z + t_1)
else if ((b - 0.5d0) <= 7d+216) then
tmp = (y * i) + (a + (z + t))
else
tmp = a + 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 = Math.log(c) * (b - 0.5);
double tmp;
if ((b - 0.5) <= -5.1e+185) {
tmp = t + (z + t_1);
} else if ((b - 0.5) <= 7e+216) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) tmp = 0 if (b - 0.5) <= -5.1e+185: tmp = t + (z + t_1) elif (b - 0.5) <= 7e+216: tmp = (y * i) + (a + (z + t)) else: tmp = a + t_1 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 (Float64(b - 0.5) <= -5.1e+185) tmp = Float64(t + Float64(z + t_1)); elseif (Float64(b - 0.5) <= 7e+216) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(a + t_1); 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 ((b - 0.5) <= -5.1e+185) tmp = t + (z + t_1); elseif ((b - 0.5) <= 7e+216) tmp = (y * i) + (a + (z + t)); else tmp = a + t_1; 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[LessEqual[N[(b - 0.5), $MachinePrecision], -5.1e+185], N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 7e+216], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;b - 0.5 \leq -5.1 \cdot 10^{+185}:\\
\;\;\;\;t + \left(z + t_1\right)\\
\mathbf{elif}\;b - 0.5 \leq 7 \cdot 10^{+216}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + t_1\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -5.09999999999999996e185Initial program 99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
fma-def99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+l+99.6%
Simplified99.6%
fma-udef99.6%
fma-udef99.6%
metadata-eval99.6%
sub-neg99.6%
associate-+r+99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 79.9%
Taylor expanded in a around 0 70.2%
Taylor expanded in x around 0 68.5%
if -5.09999999999999996e185 < (-.f64 b 1/2) < 6.99999999999999984e216Initial program 99.9%
Taylor expanded in x around 0 83.8%
Taylor expanded in b around inf 82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in b around 0 73.8%
if 6.99999999999999984e216 < (-.f64 b 1/2) Initial program 99.5%
Taylor expanded in a around inf 90.0%
Taylor expanded in y around 0 85.3%
Final simplification74.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -2.75e-11) (not (<= i 155.0))) (+ (* y i) (+ a (+ z t))) (+ (+ a t) (+ z (* (log c) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -2.75e-11) || !(i <= 155.0)) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = (a + t) + (z + (log(c) * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-2.75d-11)) .or. (.not. (i <= 155.0d0))) then
tmp = (y * i) + (a + (z + t))
else
tmp = (a + t) + (z + (log(c) * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -2.75e-11) || !(i <= 155.0)) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = (a + t) + (z + (Math.log(c) * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -2.75e-11) or not (i <= 155.0): tmp = (y * i) + (a + (z + t)) else: tmp = (a + t) + (z + (math.log(c) * b)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -2.75e-11) || !(i <= 155.0)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(Float64(a + t) + Float64(z + Float64(log(c) * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -2.75e-11) || ~((i <= 155.0))) tmp = (y * i) + (a + (z + t)); else tmp = (a + t) + (z + (log(c) * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -2.75e-11], N[Not[LessEqual[i, 155.0]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.75 \cdot 10^{-11} \lor \neg \left(i \leq 155\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + t\right) + \left(z + \log c \cdot b\right)\\
\end{array}
\end{array}
if i < -2.74999999999999987e-11 or 155 < i Initial program 99.9%
Taylor expanded in x around 0 89.5%
Taylor expanded in b around inf 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in b around 0 76.0%
if -2.74999999999999987e-11 < i < 155Initial program 99.7%
Taylor expanded in x around 0 82.2%
Taylor expanded in b around inf 81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in y around 0 76.5%
associate-+r+76.5%
Simplified76.5%
Final simplification76.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -6e+148) (+ (* y i) (+ a (+ z t))) (+ (* y i) (+ a (* (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 (z <= -6e+148) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = (y * i) + (a + (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 (z <= (-6d+148)) then
tmp = (y * i) + (a + (z + t))
else
tmp = (y * i) + (a + (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 (z <= -6e+148) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = (y * i) + (a + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -6e+148: tmp = (y * i) + (a + (z + t)) else: tmp = (y * i) + (a + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -6e+148) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(Float64(y * i) + Float64(a + 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 (z <= -6e+148) tmp = (y * i) + (a + (z + t)); else tmp = (y * i) + (a + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -6e+148], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+148}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -6.00000000000000029e148Initial program 99.9%
Taylor expanded in x around 0 91.2%
Taylor expanded in b around inf 91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in b around 0 82.4%
if -6.00000000000000029e148 < z Initial program 99.8%
Taylor expanded in a around inf 60.9%
Final simplification63.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -6.2e+148) (+ (* y i) (+ a (+ z t))) (+ (* y i) (+ a (* (log c) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -6.2e+148) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = (y * i) + (a + (log(c) * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-6.2d+148)) then
tmp = (y * i) + (a + (z + t))
else
tmp = (y * i) + (a + (log(c) * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -6.2e+148) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = (y * i) + (a + (Math.log(c) * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -6.2e+148: tmp = (y * i) + (a + (z + t)) else: tmp = (y * i) + (a + (math.log(c) * b)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -6.2e+148) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(log(c) * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -6.2e+148) tmp = (y * i) + (a + (z + t)); else tmp = (y * i) + (a + (log(c) * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -6.2e+148], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+148}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot b\right)\\
\end{array}
\end{array}
if z < -6.19999999999999951e148Initial program 99.9%
Taylor expanded in x around 0 91.2%
Taylor expanded in b around inf 91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in b around 0 82.4%
if -6.19999999999999951e148 < z Initial program 99.8%
Taylor expanded in a around inf 60.9%
Taylor expanded in b around inf 59.5%
*-commutative83.7%
Simplified59.5%
Final simplification62.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.85e+238) (not (<= x 3.1e+266))) (* x (log y)) (+ (* y i) (+ 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.85e+238) || !(x <= 3.1e+266)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (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.85d+238)) .or. (.not. (x <= 3.1d+266))) then
tmp = x * log(y)
else
tmp = (y * i) + (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.85e+238) || !(x <= 3.1e+266)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.85e+238) or not (x <= 3.1e+266): tmp = x * math.log(y) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.85e+238) || !(x <= 3.1e+266)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + 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.85e+238) || ~((x <= 3.1e+266))) tmp = x * log(y); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.85e+238], N[Not[LessEqual[x, 3.1e+266]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+238} \lor \neg \left(x \leq 3.1 \cdot 10^{+266}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if x < -1.85e238 or 3.1e266 < x Initial program 99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+r+99.5%
fma-def99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+l+99.5%
Simplified99.5%
fma-udef99.5%
fma-udef99.5%
metadata-eval99.5%
sub-neg99.5%
associate-+r+99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 74.0%
if -1.85e238 < x < 3.1e266Initial program 99.8%
Taylor expanded in x around 0 92.5%
Taylor expanded in b around inf 91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in b around 0 68.8%
Final simplification69.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.25e-291) (* y i) (if (<= a 1.95e-106) z (if (<= a 9.7e+197) (* 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.25e-291) {
tmp = y * i;
} else if (a <= 1.95e-106) {
tmp = z;
} else if (a <= 9.7e+197) {
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.25d-291) then
tmp = y * i
else if (a <= 1.95d-106) then
tmp = z
else if (a <= 9.7d+197) 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.25e-291) {
tmp = y * i;
} else if (a <= 1.95e-106) {
tmp = z;
} else if (a <= 9.7e+197) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.25e-291: tmp = y * i elif a <= 1.95e-106: tmp = z elif a <= 9.7e+197: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.25e-291) tmp = Float64(y * i); elseif (a <= 1.95e-106) tmp = z; elseif (a <= 9.7e+197) 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.25e-291) tmp = y * i; elseif (a <= 1.95e-106) tmp = z; elseif (a <= 9.7e+197) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.25e-291], N[(y * i), $MachinePrecision], If[LessEqual[a, 1.95e-106], z, If[LessEqual[a, 9.7e+197], N[(y * i), $MachinePrecision], a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.25 \cdot 10^{-291}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-106}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 9.7 \cdot 10^{+197}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.24999999999999987e-291 or 1.95000000000000005e-106 < a < 9.69999999999999936e197Initial program 99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
fma-def99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in y around inf 31.1%
*-commutative31.1%
Simplified31.1%
if 2.24999999999999987e-291 < a < 1.95000000000000005e-106Initial program 99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
fma-def99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
Simplified99.7%
fma-udef99.7%
fma-udef99.7%
metadata-eval99.7%
sub-neg99.7%
associate-+r+99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 26.2%
if 9.69999999999999936e197 < a Initial program 99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
fma-udef99.9%
fma-udef99.9%
metadata-eval99.9%
sub-neg99.9%
associate-+r+99.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 53.4%
Final simplification32.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 4.7e-9) (+ t (+ a z)) (+ 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 (y <= 4.7e-9) {
tmp = t + (a + z);
} else {
tmp = 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 (y <= 4.7d-9) then
tmp = t + (a + z)
else
tmp = 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 (y <= 4.7e-9) {
tmp = t + (a + z);
} else {
tmp = a + ((y * i) + t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 4.7e-9: tmp = t + (a + z) else: tmp = a + ((y * i) + t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 4.7e-9) tmp = Float64(t + Float64(a + z)); else tmp = Float64(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 (y <= 4.7e-9) tmp = t + (a + z); else tmp = a + ((y * i) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4.7e-9], N[(t + N[(a + z), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.7 \cdot 10^{-9}:\\
\;\;\;\;t + \left(a + z\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + t\right)\\
\end{array}
\end{array}
if y < 4.6999999999999999e-9Initial program 99.8%
Taylor expanded in x around 0 81.4%
Taylor expanded in b around inf 78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in b around 0 54.4%
Taylor expanded in y around 0 49.1%
+-commutative49.1%
associate-+l+49.1%
Simplified49.1%
if 4.6999999999999999e-9 < y Initial program 99.8%
Taylor expanded in x around 0 89.1%
Taylor expanded in b around inf 89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in b around 0 72.3%
Taylor expanded in z around 0 61.5%
Final simplification56.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.8e+143) (+ (* y i) (+ z t)) (+ 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 (a <= 3.8e+143) {
tmp = (y * i) + (z + t);
} else {
tmp = 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 (a <= 3.8d+143) then
tmp = (y * i) + (z + t)
else
tmp = 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 (a <= 3.8e+143) {
tmp = (y * i) + (z + t);
} else {
tmp = a + ((y * i) + t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.8e+143: tmp = (y * i) + (z + t) else: tmp = a + ((y * i) + t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.8e+143) tmp = Float64(Float64(y * i) + Float64(z + t)); else tmp = Float64(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 (a <= 3.8e+143) tmp = (y * i) + (z + t); else tmp = a + ((y * i) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.8e+143], N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.8 \cdot 10^{+143}:\\
\;\;\;\;y \cdot i + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + t\right)\\
\end{array}
\end{array}
if a < 3.8e143Initial program 99.8%
Taylor expanded in x around 0 85.1%
Taylor expanded in b around inf 83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in b around 0 61.2%
Taylor expanded in a around 0 55.6%
associate-+r+55.6%
Simplified55.6%
if 3.8e143 < a Initial program 99.9%
Taylor expanded in x around 0 89.7%
Taylor expanded in b around inf 89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in b around 0 84.4%
Taylor expanded in z around 0 79.1%
Final simplification58.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ a (+ z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (a + (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 = (y * i) + (a + (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 (y * i) + (a + (z + t));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (a + (z + t))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(a + Float64(z + t))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (a + (z + t)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(a + \left(z + t\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in x around 0 85.8%
Taylor expanded in b around inf 84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in b around 0 64.5%
Final simplification64.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.8e+148) (+ t (+ a z)) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.8e+148) {
tmp = t + (a + z);
} else {
tmp = 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 (y <= 1.8d+148) then
tmp = t + (a + z)
else
tmp = 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 (y <= 1.8e+148) {
tmp = t + (a + z);
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.8e+148: tmp = t + (a + z) else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.8e+148) tmp = Float64(t + Float64(a + z)); else tmp = Float64(y * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 1.8e+148) tmp = t + (a + z); else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.8e+148], N[(t + N[(a + z), $MachinePrecision]), $MachinePrecision], N[(y * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{+148}:\\
\;\;\;\;t + \left(a + z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if y < 1.80000000000000003e148Initial program 99.8%
Taylor expanded in x around 0 85.1%
Taylor expanded in b around inf 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in b around 0 60.3%
Taylor expanded in y around 0 47.9%
+-commutative47.9%
associate-+l+47.9%
Simplified47.9%
if 1.80000000000000003e148 < y Initial program 99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in y around inf 58.5%
*-commutative58.5%
Simplified58.5%
Final simplification50.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.85e+143) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.85e+143) {
tmp = z;
} 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.85d+143) then
tmp = z
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.85e+143) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.85e+143: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.85e+143) tmp = z; 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.85e+143) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.85e+143], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.85 \cdot 10^{+143}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.85000000000000011e143Initial program 99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
fma-def99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
fma-udef99.8%
fma-udef99.8%
metadata-eval99.8%
sub-neg99.8%
associate-+r+99.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 15.7%
if 2.85000000000000011e143 < a Initial program 99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified100.0%
fma-udef100.0%
fma-udef100.0%
metadata-eval100.0%
sub-neg100.0%
associate-+r+100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 44.7%
Final simplification19.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%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
fma-def99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
fma-udef99.8%
fma-udef99.8%
metadata-eval99.8%
sub-neg99.8%
associate-+r+99.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 12.6%
Final simplification12.6%
herbie shell --seed 2023308
(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)))