
(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 (+ (+ (fma x (log y) z) (+ t a)) (+ (* y i) (* (+ b -0.5) (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (fma(x, log(y), z) + (t + a)) + ((y * i) + ((b + -0.5) * log(c)));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.5e+50) (not (<= x 4e-6))) (+ (* y i) (+ a (+ z (+ (* x (log y)) (* b (log c)))))) (+ (* 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+50) || !(x <= 4e-6)) {
tmp = (y * i) + (a + (z + ((x * log(y)) + (b * log(c)))));
} 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+50)) .or. (.not. (x <= 4d-6))) then
tmp = (y * i) + (a + (z + ((x * log(y)) + (b * log(c)))))
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+50) || !(x <= 4e-6)) {
tmp = (y * i) + (a + (z + ((x * Math.log(y)) + (b * Math.log(c)))));
} 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+50) or not (x <= 4e-6): tmp = (y * i) + (a + (z + ((x * math.log(y)) + (b * math.log(c))))) 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+50) || !(x <= 4e-6)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(x * log(y)) + Float64(b * log(c)))))); 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+50) || ~((x <= 4e-6))) tmp = (y * i) + (a + (z + ((x * log(y)) + (b * log(c))))); 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+50], N[Not[LessEqual[x, 4e-6]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $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^{+50} \lor \neg \left(x \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\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 < -4.50000000000000014e50 or 3.99999999999999982e-6 < x Initial program 99.8%
Taylor expanded in t around 0 88.2%
Taylor expanded in b around inf 88.2%
if -4.50000000000000014e50 < x < 3.99999999999999982e-6Initial program 99.9%
Taylor expanded in x around 0 99.5%
Final simplification94.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.5e+59) (not (<= x 8.5e+139))) (+ (+ (fma x (log y) z) (+ t a)) (* 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 <= -2.5e+59) || !(x <= 8.5e+139)) {
tmp = (fma(x, log(y), z) + (t + a)) + (y * i);
} 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.5e+59) || !(x <= 8.5e+139)) tmp = Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + 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
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.5e+59], N[Not[LessEqual[x, 8.5e+139]], $MachinePrecision]], N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $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 -2.5 \cdot 10^{+59} \lor \neg \left(x \leq 8.5 \cdot 10^{+139}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + 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 < -2.4999999999999999e59 or 8.5e139 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.0%
*-commutative94.0%
Simplified94.0%
if -2.4999999999999999e59 < x < 8.5e139Initial program 99.9%
Taylor expanded in x around 0 99.6%
Final simplification97.6%
(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 (+ (* y i) (+ a (+ 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 + (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 + (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 + (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 + (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(a + Float64(z + 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 = (y * i) + (a + (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[(a + N[(z + 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}
\\
y \cdot i + \left(a + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 86.9%
Final simplification86.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.6e+55) (not (<= x 8.6e+139))) (+ (* y i) (+ a (+ 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 <= -2.6e+55) || !(x <= 8.6e+139)) {
tmp = (y * i) + (a + (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 <= (-2.6d+55)) .or. (.not. (x <= 8.6d+139))) then
tmp = (y * i) + (a + (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 <= -2.6e+55) || !(x <= 8.6e+139)) {
tmp = (y * i) + (a + (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 <= -2.6e+55) or not (x <= 8.6e+139): tmp = (y * i) + (a + (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 <= -2.6e+55) || !(x <= 8.6e+139)) tmp = Float64(Float64(y * i) + Float64(a + 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 <= -2.6e+55) || ~((x <= 8.6e+139))) tmp = (y * i) + (a + (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, -2.6e+55], N[Not[LessEqual[x, 8.6e+139]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $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 -2.6 \cdot 10^{+55} \lor \neg \left(x \leq 8.6 \cdot 10^{+139}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\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.6e55 or 8.5999999999999996e139 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in t around 0 80.5%
if -2.6e55 < x < 8.5999999999999996e139Initial program 99.9%
Taylor expanded in x around 0 99.6%
Final simplification92.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -2e+58)
(+ a (+ (* y i) t_1))
(if (<= x 1.65e-267)
(+ (+ t a) (+ z (* (+ b -0.5) (log c))))
(if (<= x 2.8e+142) (+ (* y i) (+ z (+ t a))) (+ 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 (x <= -2e+58) {
tmp = a + ((y * i) + t_1);
} else if (x <= 1.65e-267) {
tmp = (t + a) + (z + ((b + -0.5) * log(c)));
} else if (x <= 2.8e+142) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = 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 (x <= (-2d+58)) then
tmp = a + ((y * i) + t_1)
else if (x <= 1.65d-267) then
tmp = (t + a) + (z + ((b + (-0.5d0)) * log(c)))
else if (x <= 2.8d+142) then
tmp = (y * i) + (z + (t + a))
else
tmp = 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 (x <= -2e+58) {
tmp = a + ((y * i) + t_1);
} else if (x <= 1.65e-267) {
tmp = (t + a) + (z + ((b + -0.5) * Math.log(c)));
} else if (x <= 2.8e+142) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = 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 x <= -2e+58: tmp = a + ((y * i) + t_1) elif x <= 1.65e-267: tmp = (t + a) + (z + ((b + -0.5) * math.log(c))) elif x <= 2.8e+142: tmp = (y * i) + (z + (t + a)) else: tmp = 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 (x <= -2e+58) tmp = Float64(a + Float64(Float64(y * i) + t_1)); elseif (x <= 1.65e-267) tmp = Float64(Float64(t + a) + Float64(z + Float64(Float64(b + -0.5) * log(c)))); elseif (x <= 2.8e+142) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); else tmp = 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 (x <= -2e+58) tmp = a + ((y * i) + t_1); elseif (x <= 1.65e-267) tmp = (t + a) + (z + ((b + -0.5) * log(c))); elseif (x <= 2.8e+142) tmp = (y * i) + (z + (t + a)); else tmp = 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[x, -2e+58], N[(a + N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.65e-267], N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+142], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2 \cdot 10^{+58}:\\
\;\;\;\;a + \left(y \cdot i + t_1\right)\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-267}:\\
\;\;\;\;\left(t + a\right) + \left(z + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+142}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\end{array}
\end{array}
if x < -1.99999999999999989e58Initial program 99.8%
Taylor expanded in z around 0 91.5%
associate-+r+91.5%
fma-def91.5%
sub-neg91.5%
metadata-eval91.5%
+-commutative91.5%
Simplified91.5%
Taylor expanded in b around inf 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in b around 0 85.4%
associate-+r+85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in t around 0 77.6%
if -1.99999999999999989e58 < x < 1.65000000000000002e-267Initial program 99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in y around 0 78.6%
associate-+r+78.6%
sub-neg78.6%
metadata-eval78.6%
Simplified78.6%
if 1.65000000000000002e-267 < x < 2.8e142Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around 0 84.1%
+-commutative84.1%
+-commutative84.1%
associate-+l+84.1%
+-commutative84.1%
Simplified84.1%
if 2.8e142 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
*-commutative94.1%
Simplified94.1%
Taylor expanded in y around 0 89.0%
Final simplification81.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.5e+135) (not (<= x 8.2e+142))) (+ a (+ t (+ z (* x (log y))))) (+ (* 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 <= -6.5e+135) || !(x <= 8.2e+142)) {
tmp = a + (t + (z + (x * log(y))));
} 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 <= (-6.5d+135)) .or. (.not. (x <= 8.2d+142))) then
tmp = a + (t + (z + (x * log(y))))
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 <= -6.5e+135) || !(x <= 8.2e+142)) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.5e+135) or not (x <= 8.2e+142): tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.5e+135) || !(x <= 8.2e+142)) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); 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 <= -6.5e+135) || ~((x <= 8.2e+142))) tmp = a + (t + (z + (x * log(y)))); 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, -6.5e+135], N[Not[LessEqual[x, 8.2e+142]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $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}\;x \leq -6.5 \cdot 10^{+135} \lor \neg \left(x \leq 8.2 \cdot 10^{+142}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -6.5000000000000003e135 or 8.19999999999999963e142 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in y around 0 83.9%
if -6.5000000000000003e135 < x < 8.19999999999999963e142Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x around 0 77.8%
+-commutative77.8%
+-commutative77.8%
associate-+l+77.8%
+-commutative77.8%
Simplified77.8%
Final simplification79.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -5e+84)
(+ a (+ (* y i) t_1))
(if (<= x 6.5e+142) (+ (* y i) (+ z (+ t a))) (+ 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 (x <= -5e+84) {
tmp = a + ((y * i) + t_1);
} else if (x <= 6.5e+142) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = 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 (x <= (-5d+84)) then
tmp = a + ((y * i) + t_1)
else if (x <= 6.5d+142) then
tmp = (y * i) + (z + (t + a))
else
tmp = 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 (x <= -5e+84) {
tmp = a + ((y * i) + t_1);
} else if (x <= 6.5e+142) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = 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 x <= -5e+84: tmp = a + ((y * i) + t_1) elif x <= 6.5e+142: tmp = (y * i) + (z + (t + a)) else: tmp = 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 (x <= -5e+84) tmp = Float64(a + Float64(Float64(y * i) + t_1)); elseif (x <= 6.5e+142) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); else tmp = 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 (x <= -5e+84) tmp = a + ((y * i) + t_1); elseif (x <= 6.5e+142) tmp = (y * i) + (z + (t + a)); else tmp = 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[x, -5e+84], N[(a + N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e+142], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -5 \cdot 10^{+84}:\\
\;\;\;\;a + \left(y \cdot i + t_1\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+142}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\end{array}
\end{array}
if x < -5.0000000000000001e84Initial program 99.7%
Taylor expanded in z around 0 89.5%
associate-+r+89.5%
fma-def89.5%
sub-neg89.5%
metadata-eval89.5%
+-commutative89.5%
Simplified89.5%
Taylor expanded in b around inf 89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in b around 0 82.1%
associate-+r+82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in t around 0 74.9%
if -5.0000000000000001e84 < x < 6.4999999999999997e142Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in x around 0 77.8%
+-commutative77.8%
+-commutative77.8%
associate-+l+77.8%
+-commutative77.8%
Simplified77.8%
if 6.4999999999999997e142 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
*-commutative94.1%
Simplified94.1%
Taylor expanded in y around 0 89.0%
Final simplification79.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.3e-6) (+ (* y i) (+ a (+ z (* x (log y))))) (+ a (+ t (+ (* y i) (* (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 <= -1.3e-6) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else {
tmp = a + (t + ((y * i) + (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 <= (-1.3d-6)) then
tmp = (y * i) + (a + (z + (x * log(y))))
else
tmp = a + (t + ((y * i) + (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 <= -1.3e-6) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = a + (t + ((y * i) + (Math.log(c) * (b - 0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.3e-6: tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = a + (t + ((y * i) + (math.log(c) * (b - 0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.3e-6) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + Float64(t + Float64(Float64(y * i) + 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 <= -1.3e-6) tmp = (y * i) + (a + (z + (x * log(y)))); else tmp = a + (t + ((y * i) + (log(c) * (b - 0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.3e-6], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-6}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\end{array}
\end{array}
if z < -1.30000000000000005e-6Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in t around 0 75.0%
if -1.30000000000000005e-6 < z Initial program 99.8%
Taylor expanded in z around 0 88.8%
associate-+r+88.8%
fma-def88.9%
sub-neg88.9%
metadata-eval88.9%
+-commutative88.9%
Simplified88.9%
Taylor expanded in x around 0 73.3%
Final simplification73.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.05e+158) (not (<= x 1.15e+218))) (+ a (+ t (* x (log y)))) (+ (* 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 <= -1.05e+158) || !(x <= 1.15e+218)) {
tmp = a + (t + (x * log(y)));
} 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 <= (-1.05d+158)) .or. (.not. (x <= 1.15d+218))) then
tmp = a + (t + (x * log(y)))
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 <= -1.05e+158) || !(x <= 1.15e+218)) {
tmp = a + (t + (x * Math.log(y)));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.05e+158) or not (x <= 1.15e+218): tmp = a + (t + (x * math.log(y))) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.05e+158) || !(x <= 1.15e+218)) tmp = Float64(a + Float64(t + Float64(x * log(y)))); 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 <= -1.05e+158) || ~((x <= 1.15e+218))) tmp = a + (t + (x * log(y))); 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, -1.05e+158], N[Not[LessEqual[x, 1.15e+218]], $MachinePrecision]], N[(a + N[(t + N[(x * N[Log[y], $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}\;x \leq -1.05 \cdot 10^{+158} \lor \neg \left(x \leq 1.15 \cdot 10^{+218}\right):\\
\;\;\;\;a + \left(t + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -1.0499999999999999e158 or 1.15e218 < x Initial program 99.7%
Taylor expanded in z around 0 87.5%
associate-+r+87.5%
fma-def87.5%
sub-neg87.5%
metadata-eval87.5%
+-commutative87.5%
Simplified87.5%
Taylor expanded in b around inf 87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in b around 0 82.9%
associate-+r+82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in y around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -1.0499999999999999e158 < x < 1.15e218Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around 0 75.3%
+-commutative75.3%
+-commutative75.3%
associate-+l+75.3%
+-commutative75.3%
Simplified75.3%
Final simplification75.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.85e-44) (+ (+ t a) (+ z (* (+ b -0.5) (log c)))) (+ (* y i) (+ a (+ 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 (y <= 1.85e-44) {
tmp = (t + a) + (z + ((b + -0.5) * log(c)));
} else {
tmp = (y * i) + (a + (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 (y <= 1.85d-44) then
tmp = (t + a) + (z + ((b + (-0.5d0)) * log(c)))
else
tmp = (y * i) + (a + (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 (y <= 1.85e-44) {
tmp = (t + a) + (z + ((b + -0.5) * Math.log(c)));
} else {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.85e-44: tmp = (t + a) + (z + ((b + -0.5) * math.log(c))) else: tmp = (y * i) + (a + (z + (x * math.log(y)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.85e-44) tmp = Float64(Float64(t + a) + Float64(z + Float64(Float64(b + -0.5) * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + 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 (y <= 1.85e-44) tmp = (t + a) + (z + ((b + -0.5) * log(c))); else tmp = (y * i) + (a + (z + (x * log(y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.85e-44], N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.85 \cdot 10^{-44}:\\
\;\;\;\;\left(t + a\right) + \left(z + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if y < 1.85e-44Initial program 99.8%
Taylor expanded in x around 0 85.4%
Taylor expanded in y around 0 82.1%
associate-+r+82.1%
sub-neg82.1%
metadata-eval82.1%
Simplified82.1%
if 1.85e-44 < y Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in t around 0 77.8%
Final simplification79.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4e+241) (not (<= x 7.5e+221))) (* x (log y)) (+ (* 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 <= -4e+241) || !(x <= 7.5e+221)) {
tmp = x * log(y);
} 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 <= (-4d+241)) .or. (.not. (x <= 7.5d+221))) then
tmp = x * log(y)
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 <= -4e+241) || !(x <= 7.5e+221)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4e+241) or not (x <= 7.5e+221): tmp = x * math.log(y) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4e+241) || !(x <= 7.5e+221)) tmp = Float64(x * log(y)); 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 <= -4e+241) || ~((x <= 7.5e+221))) tmp = x * log(y); 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, -4e+241], N[Not[LessEqual[x, 7.5e+221]], $MachinePrecision]], N[(x * N[Log[y], $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 -4 \cdot 10^{+241} \lor \neg \left(x \leq 7.5 \cdot 10^{+221}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -4.0000000000000002e241 or 7.50000000000000035e221 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around inf 69.9%
if -4.0000000000000002e241 < x < 7.50000000000000035e221Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x around 0 74.4%
+-commutative74.4%
+-commutative74.4%
associate-+l+74.4%
+-commutative74.4%
Simplified74.4%
Final simplification73.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.2e+146) z (if (<= z -4.3e-103) (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.2e+146) {
tmp = z;
} else if (z <= -4.3e-103) {
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 (z <= (-3.2d+146)) then
tmp = z
else if (z <= (-4.3d-103)) 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 (z <= -3.2e+146) {
tmp = z;
} else if (z <= -4.3e-103) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.2e+146: tmp = z elif z <= -4.3e-103: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.2e+146) tmp = z; elseif (z <= -4.3e-103) 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 (z <= -3.2e+146) tmp = z; elseif (z <= -4.3e-103) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.2e+146], z, If[LessEqual[z, -4.3e-103], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+146}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-103}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -3.2e146Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in z around inf 51.0%
if -3.2e146 < z < -4.30000000000000023e-103Initial program 99.8%
Taylor expanded in a around inf 48.0%
Taylor expanded in a around 0 28.0%
*-commutative28.0%
Simplified28.0%
if -4.30000000000000023e-103 < z Initial program 99.9%
Taylor expanded in a around inf 43.2%
Taylor expanded in a around inf 18.2%
Final simplification24.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.8e+175) z (+ 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 <= -2.8e+175) {
tmp = z;
} 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 <= (-2.8d+175)) then
tmp = z
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 <= -2.8e+175) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.8e+175: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.8e+175) tmp = z; 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 <= -2.8e+175) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.8e+175], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+175}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2.8000000000000001e175Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in z around inf 52.4%
if -2.8000000000000001e175 < z Initial program 99.8%
Taylor expanded in a around inf 44.0%
Final simplification44.8%
(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.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in x around 0 67.8%
+-commutative67.8%
+-commutative67.8%
associate-+l+67.8%
+-commutative67.8%
Simplified67.8%
Final simplification67.8%
(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.8%
Taylor expanded in t around 0 86.9%
Taylor expanded in z around inf 55.8%
Final simplification55.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -4.6e+136) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -4.6e+136) {
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 (z <= (-4.6d+136)) 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 (z <= -4.6e+136) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -4.6e+136: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -4.6e+136) 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 (z <= -4.6e+136) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -4.6e+136], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+136}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -4.6e136Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in z around inf 48.7%
if -4.6e136 < z Initial program 99.8%
Taylor expanded in a around inf 43.7%
Taylor expanded in a around inf 18.9%
Final simplification23.4%
(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%
Taylor expanded in a around inf 40.5%
Taylor expanded in a around inf 17.9%
Final simplification17.9%
herbie shell --seed 2024021
(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)))