
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ t a) (fma x (log y) z)) (+ (* 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 ((t + a) + fma(x, log(y), z)) + ((y * i) + ((b + -0.5) * log(c)));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(t + a) + fma(x, log(y), z)) + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(t + a), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right) + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= a 2.8e+158)
(+ (+ (* y i) (* (+ b -0.5) (log c))) (+ t (+ z t_1)))
(if (<= a 8.5e+212)
(+ a (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
(+ (+ z (+ t a)) (+ (* y i) (* b (log c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (a <= 2.8e+158) {
tmp = ((y * i) + ((b + -0.5) * log(c))) + (t + (z + t_1));
} else if (a <= 8.5e+212) {
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
} else {
tmp = (z + (t + a)) + ((y * i) + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (a <= 2.8d+158) then
tmp = ((y * i) + ((b + (-0.5d0)) * log(c))) + (t + (z + t_1))
else if (a <= 8.5d+212) then
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5d0)))))
else
tmp = (z + (t + a)) + ((y * i) + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (a <= 2.8e+158) {
tmp = ((y * i) + ((b + -0.5) * Math.log(c))) + (t + (z + t_1));
} else if (a <= 8.5e+212) {
tmp = a + (t + (z + (t_1 + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (z + (t + a)) + ((y * i) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if a <= 2.8e+158: tmp = ((y * i) + ((b + -0.5) * math.log(c))) + (t + (z + t_1)) elif a <= 8.5e+212: tmp = a + (t + (z + (t_1 + (math.log(c) * (b - 0.5))))) else: tmp = (z + (t + a)) + ((y * i) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (a <= 2.8e+158) tmp = Float64(Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c))) + Float64(t + Float64(z + t_1))); elseif (a <= 8.5e+212) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(z + Float64(t + a)) + Float64(Float64(y * i) + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (a <= 2.8e+158) tmp = ((y * i) + ((b + -0.5) * log(c))) + (t + (z + t_1)); elseif (a <= 8.5e+212) tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5))))); else tmp = (z + (t + a)) + ((y * i) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2.8e+158], N[(N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+212], N[(a + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq 2.8 \cdot 10^{+158}:\\
\;\;\;\;\left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right) + \left(t + \left(z + t\_1\right)\right)\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+212}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(t + a\right)\right) + \left(y \cdot i + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 2.80000000000000001e158Initial program 99.8%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 90.3%
if 2.80000000000000001e158 < a < 8.49999999999999979e212Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 70.7%
if 8.49999999999999979e212 < a Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-+r+100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification90.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.28e+231) (not (<= x 1.3e+187))) (* x (+ (log y) (/ z x))) (fma y i (+ (+ z (+ t a)) (* (+ b -0.5) (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.28e+231) || !(x <= 1.3e+187)) {
tmp = x * (log(y) + (z / x));
} else {
tmp = fma(y, i, ((z + (t + a)) + ((b + -0.5) * log(c))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.28e+231) || !(x <= 1.3e+187)) tmp = Float64(x * Float64(log(y) + Float64(z / x))); else tmp = fma(y, i, Float64(Float64(z + Float64(t + a)) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.28e+231], N[Not[LessEqual[x, 1.3e+187]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.28 \cdot 10^{+231} \lor \neg \left(x \leq 1.3 \cdot 10^{+187}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(z + \left(t + a\right)\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if x < -1.28e231 or 1.2999999999999999e187 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.9%
Taylor expanded in x around inf 99.8%
associate-+r+99.8%
associate-+r+99.8%
*-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 69.1%
if -1.28e231 < x < 1.2999999999999999e187Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 91.9%
associate-+r+91.9%
sub-neg91.9%
metadata-eval91.9%
associate-+r+91.9%
+-commutative91.9%
+-commutative91.9%
associate-+l+91.9%
+-commutative91.9%
+-commutative91.9%
Simplified91.9%
Final simplification88.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.75e+22) (+ a (+ t (+ z (+ (* x (log y)) (* (log c) (- b 0.5)))))) (fma y i (+ (+ z (+ t a)) (* (+ b -0.5) (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.75e+22) {
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (b - 0.5)))));
} else {
tmp = fma(y, i, ((z + (t + a)) + ((b + -0.5) * log(c))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.75e+22) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = fma(y, i, Float64(Float64(z + Float64(t + a)) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.75e+22], N[(a + N[(t + 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], N[(y * i + N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.75 \cdot 10^{+22}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(z + \left(t + a\right)\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if y < 1.75e22Initial program 99.8%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around 0 95.4%
if 1.75e22 < y Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 90.4%
associate-+r+90.4%
sub-neg90.4%
metadata-eval90.4%
associate-+r+90.4%
+-commutative90.4%
+-commutative90.4%
associate-+l+90.4%
+-commutative90.4%
+-commutative90.4%
Simplified90.4%
Final simplification93.1%
(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.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.6e+230) (not (<= x 2.4e+188))) (* x (+ (log y) (/ z x))) (+ a (+ t (+ z (+ (* 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 ((x <= -5.6e+230) || !(x <= 2.4e+188)) {
tmp = x * (log(y) + (z / x));
} else {
tmp = a + (t + (z + ((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 ((x <= (-5.6d+230)) .or. (.not. (x <= 2.4d+188))) then
tmp = x * (log(y) + (z / x))
else
tmp = a + (t + (z + ((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 ((x <= -5.6e+230) || !(x <= 2.4e+188)) {
tmp = x * (Math.log(y) + (z / x));
} else {
tmp = a + (t + (z + ((y * i) + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5.6e+230) or not (x <= 2.4e+188): tmp = x * (math.log(y) + (z / x)) else: tmp = a + (t + (z + ((y * i) + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.6e+230) || !(x <= 2.4e+188)) tmp = Float64(x * Float64(log(y) + Float64(z / x))); else tmp = Float64(a + Float64(t + Float64(z + 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 ((x <= -5.6e+230) || ~((x <= 2.4e+188))) tmp = x * (log(y) + (z / x)); else tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.6e+230], N[Not[LessEqual[x, 2.4e+188]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{+230} \lor \neg \left(x \leq 2.4 \cdot 10^{+188}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.6000000000000004e230 or 2.3999999999999999e188 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.9%
Taylor expanded in x around inf 99.8%
associate-+r+99.8%
associate-+r+99.8%
*-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 69.1%
if -5.6000000000000004e230 < x < 2.3999999999999999e188Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 91.9%
Final simplification88.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.3e+231) (not (<= x 1.06e+188))) (* x (+ (log y) (/ z x))) (+ (+ z (+ t a)) (+ (* y i) (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.3e+231) || !(x <= 1.06e+188)) {
tmp = x * (log(y) + (z / x));
} else {
tmp = (z + (t + a)) + ((y * i) + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.3d+231)) .or. (.not. (x <= 1.06d+188))) then
tmp = x * (log(y) + (z / x))
else
tmp = (z + (t + a)) + ((y * i) + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.3e+231) || !(x <= 1.06e+188)) {
tmp = x * (Math.log(y) + (z / x));
} else {
tmp = (z + (t + a)) + ((y * i) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.3e+231) or not (x <= 1.06e+188): tmp = x * (math.log(y) + (z / x)) else: tmp = (z + (t + a)) + ((y * i) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.3e+231) || !(x <= 1.06e+188)) tmp = Float64(x * Float64(log(y) + Float64(z / x))); else tmp = Float64(Float64(z + Float64(t + a)) + Float64(Float64(y * i) + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.3e+231) || ~((x <= 1.06e+188))) tmp = x * (log(y) + (z / x)); else tmp = (z + (t + a)) + ((y * i) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.3e+231], N[Not[LessEqual[x, 1.06e+188]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+231} \lor \neg \left(x \leq 1.06 \cdot 10^{+188}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(t + a\right)\right) + \left(y \cdot i + b \cdot \log c\right)\\
\end{array}
\end{array}
if x < -1.2999999999999999e231 or 1.06000000000000007e188 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.9%
Taylor expanded in x around inf 99.8%
associate-+r+99.8%
associate-+r+99.8%
*-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 69.1%
if -1.2999999999999999e231 < x < 1.06000000000000007e188Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 91.9%
associate-+r+91.9%
Simplified91.9%
Taylor expanded in b around inf 89.6%
*-commutative89.6%
Simplified89.6%
Final simplification86.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.1e+230) (not (<= x 2.4e+188))) (* x (+ (log y) (/ z x))) (+ (* 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.1e+230) || !(x <= 2.4e+188)) {
tmp = x * (log(y) + (z / x));
} 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.1d+230)) .or. (.not. (x <= 2.4d+188))) then
tmp = x * (log(y) + (z / x))
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.1e+230) || !(x <= 2.4e+188)) {
tmp = x * (Math.log(y) + (z / x));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.1e+230) or not (x <= 2.4e+188): tmp = x * (math.log(y) + (z / x)) 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.1e+230) || !(x <= 2.4e+188)) tmp = Float64(x * Float64(log(y) + Float64(z / x))); 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.1e+230) || ~((x <= 2.4e+188))) tmp = x * (log(y) + (z / x)); 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.1e+230], N[Not[LessEqual[x, 2.4e+188]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $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.1 \cdot 10^{+230} \lor \neg \left(x \leq 2.4 \cdot 10^{+188}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -6.0999999999999999e230 or 2.3999999999999999e188 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.9%
Taylor expanded in x around inf 99.8%
associate-+r+99.8%
associate-+r+99.8%
*-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 69.1%
if -6.0999999999999999e230 < x < 2.3999999999999999e188Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 91.9%
associate-+r+91.9%
Simplified91.9%
Taylor expanded in i around inf 77.1%
sub-neg77.1%
metadata-eval77.1%
associate-/l*77.0%
+-commutative77.0%
Simplified77.0%
Taylor expanded in i around inf 72.0%
*-commutative72.0%
Simplified72.0%
Final simplification71.5%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (* y i) (* (+ b -0.5) (log c))))) (if (<= z -8.8e+110) (+ z t_1) (+ a t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + ((b + -0.5) * log(c));
double tmp;
if (z <= -8.8e+110) {
tmp = z + t_1;
} 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 = (y * i) + ((b + (-0.5d0)) * log(c))
if (z <= (-8.8d+110)) then
tmp = z + t_1
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 = (y * i) + ((b + -0.5) * Math.log(c));
double tmp;
if (z <= -8.8e+110) {
tmp = z + t_1;
} else {
tmp = a + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + ((b + -0.5) * math.log(c)) tmp = 0 if z <= -8.8e+110: tmp = z + t_1 else: tmp = a + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c))) tmp = 0.0 if (z <= -8.8e+110) tmp = Float64(z + t_1); else tmp = Float64(a + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + ((b + -0.5) * log(c)); tmp = 0.0; if (z <= -8.8e+110) tmp = z + t_1; 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[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.8e+110], N[(z + t$95$1), $MachinePrecision], N[(a + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + \left(b + -0.5\right) \cdot \log c\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+110}:\\
\;\;\;\;z + t\_1\\
\mathbf{else}:\\
\;\;\;\;a + t\_1\\
\end{array}
\end{array}
if z < -8.79999999999999967e110Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 81.4%
if -8.79999999999999967e110 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 54.8%
Final simplification59.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.15e+142) (+ (* y i) (+ z (+ t a))) (+ 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) {
double tmp;
if (z <= -1.15e+142) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + ((y * i) + ((b + -0.5) * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.15d+142)) then
tmp = (y * i) + (z + (t + a))
else
tmp = a + ((y * i) + ((b + (-0.5d0)) * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.15e+142) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + ((y * i) + ((b + -0.5) * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.15e+142: tmp = (y * i) + (z + (t + a)) else: tmp = a + ((y * i) + ((b + -0.5) * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.15e+142) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); else tmp = Float64(a + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.15e+142) tmp = (y * i) + (z + (t + a)); else tmp = a + ((y * i) + ((b + -0.5) * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.15e+142], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+142}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if z < -1.15000000000000001e142Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 91.1%
associate-+r+91.1%
Simplified91.1%
Taylor expanded in i around inf 79.9%
sub-neg79.9%
metadata-eval79.9%
associate-/l*79.9%
+-commutative79.9%
Simplified79.9%
Taylor expanded in i around inf 78.4%
*-commutative78.4%
Simplified78.4%
if -1.15000000000000001e142 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 55.7%
Final simplification58.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 3e+20) (+ a (+ z (* (log c) (- b 0.5)))) (+ (* y i) (+ z (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 3e+20) {
tmp = a + (z + (log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= 3d+20) then
tmp = a + (z + (log(c) * (b - 0.5d0)))
else
tmp = (y * i) + (z + (t + a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 3e+20) {
tmp = a + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 3e+20: tmp = a + (z + (math.log(c) * (b - 0.5))) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 3e+20) tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 3e+20) tmp = a + (z + (log(c) * (b - 0.5))); else tmp = (y * i) + (z + (t + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 3e+20], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3 \cdot 10^{+20}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if y < 3e20Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 78.0%
associate-+r+78.0%
Simplified78.0%
Taylor expanded in y around 0 74.3%
associate-+r+74.3%
sub-neg74.3%
metadata-eval74.3%
+-commutative74.3%
Simplified74.3%
Taylor expanded in t around 0 58.5%
if 3e20 < y Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 89.1%
associate-+r+89.1%
Simplified89.1%
Taylor expanded in i around inf 79.0%
sub-neg79.0%
metadata-eval79.0%
associate-/l*79.0%
+-commutative79.0%
Simplified79.0%
Taylor expanded in i around inf 76.5%
*-commutative76.5%
Simplified76.5%
Final simplification67.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.02e+232) (not (<= x 1.7e+225))) (* 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.02e+232) || !(x <= 1.7e+225)) {
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 <= (-1.02d+232)) .or. (.not. (x <= 1.7d+225))) 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 <= -1.02e+232) || !(x <= 1.7e+225)) {
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 <= -1.02e+232) or not (x <= 1.7e+225): 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 <= -1.02e+232) || !(x <= 1.7e+225)) 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 <= -1.02e+232) || ~((x <= 1.7e+225))) 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, -1.02e+232], N[Not[LessEqual[x, 1.7e+225]], $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 -1.02 \cdot 10^{+232} \lor \neg \left(x \leq 1.7 \cdot 10^{+225}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -1.0199999999999999e232 or 1.70000000000000009e225 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.9%
Taylor expanded in x around inf 99.8%
associate-+r+99.8%
associate-+r+99.8%
*-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 75.7%
Taylor expanded in z around 0 64.5%
if -1.0199999999999999e232 < x < 1.70000000000000009e225Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 90.5%
associate-+r+90.5%
Simplified90.5%
Taylor expanded in i around inf 75.8%
sub-neg75.8%
metadata-eval75.8%
associate-/l*75.8%
+-commutative75.8%
Simplified75.8%
Taylor expanded in i around inf 71.4%
*-commutative71.4%
Simplified71.4%
Final simplification70.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.25e+100) z (if (<= z -9.4e-101) (* 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.25e+100) {
tmp = z;
} else if (z <= -9.4e-101) {
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.25d+100)) then
tmp = z
else if (z <= (-9.4d-101)) 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.25e+100) {
tmp = z;
} else if (z <= -9.4e-101) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.25e+100: tmp = z elif z <= -9.4e-101: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.25e+100) tmp = z; elseif (z <= -9.4e-101) 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.25e+100) tmp = z; elseif (z <= -9.4e-101) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.25e+100], z, If[LessEqual[z, -9.4e-101], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.25 \cdot 10^{+100}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -9.4 \cdot 10^{-101}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -3.25e100Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around inf 69.7%
associate-+r+69.7%
associate-+r+69.7%
*-commutative69.7%
sub-neg69.7%
metadata-eval69.7%
associate-/l*69.7%
+-commutative69.7%
Simplified69.7%
Taylor expanded in z around inf 41.1%
Taylor expanded in z around inf 33.6%
Taylor expanded in x around 0 52.4%
if -3.25e100 < z < -9.3999999999999999e-101Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 31.3%
*-commutative31.3%
Simplified31.3%
if -9.3999999999999999e-101 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 80.8%
associate-+r+80.8%
Simplified80.8%
Taylor expanded in y around 0 58.4%
associate-+r+58.4%
sub-neg58.4%
metadata-eval58.4%
+-commutative58.4%
Simplified58.4%
Taylor expanded in a around inf 15.3%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + (t + a));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + (z + (t + a))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + (t + a));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + (t + a))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + Float64(t + a))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + (t + a)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + \left(t + a\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 83.2%
associate-+r+83.2%
Simplified83.2%
Taylor expanded in i around inf 70.4%
sub-neg70.4%
metadata-eval70.4%
associate-/l*70.4%
+-commutative70.4%
Simplified70.4%
Taylor expanded in i around inf 66.1%
*-commutative66.1%
Simplified66.1%
Final simplification66.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -4.2e+96) 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.2e+96) {
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.2d+96)) 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.2e+96) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -4.2e+96: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -4.2e+96) 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.2e+96) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -4.2e+96], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+96}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -4.2000000000000002e96Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around inf 68.0%
associate-+r+68.0%
associate-+r+68.0%
*-commutative68.0%
sub-neg68.0%
metadata-eval68.0%
associate-/l*68.0%
+-commutative68.0%
Simplified68.0%
Taylor expanded in z around inf 42.5%
Taylor expanded in z around inf 35.2%
Taylor expanded in x around 0 51.2%
if -4.2000000000000002e96 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 81.4%
associate-+r+81.4%
Simplified81.4%
Taylor expanded in y around 0 58.3%
associate-+r+58.3%
sub-neg58.3%
metadata-eval58.3%
+-commutative58.3%
Simplified58.3%
Taylor expanded in a around inf 16.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.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 83.2%
associate-+r+83.2%
Simplified83.2%
Taylor expanded in y around 0 62.2%
associate-+r+62.2%
sub-neg62.2%
metadata-eval62.2%
+-commutative62.2%
Simplified62.2%
Taylor expanded in a around inf 15.6%
herbie shell --seed 2024172
(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)))