
(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 18 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.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.9%
Simplified99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ t a) (fma x (log y) z)) (+ (* (+ 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 ((t + a) + fma(x, log(y), z)) + (((b + -0.5) * log(c)) + (y * i));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(t + a) + fma(x, log(y), z)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))) 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[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.3e+143)
(+ (* y i) (+ (* b (log c)) (+ (+ t a) t_1)))
(if (<= x 3.05e+78)
(+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))
(+ (* y i) (+ a (+ t (+ z t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.3e+143) {
tmp = (y * i) + ((b * log(c)) + ((t + a) + t_1));
} else if (x <= 3.05e+78) {
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (a + (t + (z + t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (x <= (-1.3d+143)) then
tmp = (y * i) + ((b * log(c)) + ((t + a) + t_1))
else if (x <= 3.05d+78) then
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5d0)))))
else
tmp = (y * i) + (a + (t + (z + t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -1.3e+143) {
tmp = (y * i) + ((b * Math.log(c)) + ((t + a) + t_1));
} else if (x <= 3.05e+78) {
tmp = a + (t + (z + ((y * i) + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (a + (t + (z + t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -1.3e+143: tmp = (y * i) + ((b * math.log(c)) + ((t + a) + t_1)) elif x <= 3.05e+78: tmp = a + (t + (z + ((y * i) + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + (a + (t + (z + t_1))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.3e+143) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(Float64(t + a) + t_1))); elseif (x <= 3.05e+78) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (x <= -1.3e+143) tmp = (y * i) + ((b * log(c)) + ((t + a) + t_1)); elseif (x <= 3.05e+78) tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5))))); else tmp = (y * i) + (a + (t + (z + t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e+143], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.05e+78], 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], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+143}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(\left(t + a\right) + t\_1\right)\right)\\
\mathbf{elif}\;x \leq 3.05 \cdot 10^{+78}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.2999999999999999e143Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 96.8%
associate-+r+96.8%
Simplified96.8%
if -1.2999999999999999e143 < x < 3.05000000000000006e78Initial 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 98.7%
if 3.05000000000000006e78 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 94.2%
Final simplification97.3%
(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) (+ (* b (log c)) (+ a (+ t (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * Math.log(c)) + (a + (t + (z + (x * Math.log(y))))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((b * math.log(c)) + (a + (t + (z + (x * math.log(y))))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y)))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t (+ z (* x (log y)))))))
(if (<= x -9.6e+184)
t_1
(if (<= x -1.2e-252)
(+ a (+ t (+ z (* y i))))
(if (<= x 1.5e+84) (+ a (+ (* (+ b -0.5) (log c)) (* y i))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + (z + (x * log(y))));
double tmp;
if (x <= -9.6e+184) {
tmp = t_1;
} else if (x <= -1.2e-252) {
tmp = a + (t + (z + (y * i)));
} else if (x <= 1.5e+84) {
tmp = a + (((b + -0.5) * log(c)) + (y * i));
} else {
tmp = 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 = a + (t + (z + (x * log(y))))
if (x <= (-9.6d+184)) then
tmp = t_1
else if (x <= (-1.2d-252)) then
tmp = a + (t + (z + (y * i)))
else if (x <= 1.5d+84) then
tmp = a + (((b + (-0.5d0)) * log(c)) + (y * i))
else
tmp = 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 = a + (t + (z + (x * Math.log(y))));
double tmp;
if (x <= -9.6e+184) {
tmp = t_1;
} else if (x <= -1.2e-252) {
tmp = a + (t + (z + (y * i)));
} else if (x <= 1.5e+84) {
tmp = a + (((b + -0.5) * Math.log(c)) + (y * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + (z + (x * math.log(y)))) tmp = 0 if x <= -9.6e+184: tmp = t_1 elif x <= -1.2e-252: tmp = a + (t + (z + (y * i))) elif x <= 1.5e+84: tmp = a + (((b + -0.5) * math.log(c)) + (y * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) tmp = 0.0 if (x <= -9.6e+184) tmp = t_1; elseif (x <= -1.2e-252) tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); elseif (x <= 1.5e+84) tmp = Float64(a + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + (z + (x * log(y)))); tmp = 0.0; if (x <= -9.6e+184) tmp = t_1; elseif (x <= -1.2e-252) tmp = a + (t + (z + (y * i))); elseif (x <= 1.5e+84) tmp = a + (((b + -0.5) * log(c)) + (y * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.6e+184], t$95$1, If[LessEqual[x, -1.2e-252], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+84], N[(a + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -9.6 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-252}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+84}:\\
\;\;\;\;a + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -9.59999999999999986e184 or 1.49999999999999998e84 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 92.7%
Taylor expanded in y around 0 82.6%
if -9.59999999999999986e184 < x < -1.2000000000000001e-252Initial 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 95.1%
Taylor expanded in i around inf 78.6%
*-commutative78.6%
Simplified78.6%
if -1.2000000000000001e-252 < x < 1.49999999999999998e84Initial 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 62.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.6e+142) (not (<= x 2e+77))) (+ (* y i) (+ a (+ t (+ z (* x (log y)))))) (+ 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 <= -1.6e+142) || !(x <= 2e+77)) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} 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 <= (-1.6d+142)) .or. (.not. (x <= 2d+77))) then
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
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 <= -1.6e+142) || !(x <= 2e+77)) {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
} 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 <= -1.6e+142) or not (x <= 2e+77): tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) 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 <= -1.6e+142) || !(x <= 2e+77)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); 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 <= -1.6e+142) || ~((x <= 2e+77))) tmp = (y * i) + (a + (t + (z + (x * log(y))))); 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, -1.6e+142], N[Not[LessEqual[x, 2e+77]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -1.6 \cdot 10^{+142} \lor \neg \left(x \leq 2 \cdot 10^{+77}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\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 < -1.60000000000000003e142 or 1.99999999999999997e77 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 92.3%
if -1.60000000000000003e142 < x < 1.99999999999999997e77Initial 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 98.7%
Final simplification96.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* (+ b -0.5) (log c)) (* y i))))
(if (<= b -5.4e+199)
(+ a t_1)
(if (<= b 7e+167)
(+ (* y i) (+ a (+ t (+ z (* x (log y))))))
(+ z t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((b + -0.5) * log(c)) + (y * i);
double tmp;
if (b <= -5.4e+199) {
tmp = a + t_1;
} else if (b <= 7e+167) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else {
tmp = 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 = ((b + (-0.5d0)) * log(c)) + (y * i)
if (b <= (-5.4d+199)) then
tmp = a + t_1
else if (b <= 7d+167) then
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
else
tmp = 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 = ((b + -0.5) * Math.log(c)) + (y * i);
double tmp;
if (b <= -5.4e+199) {
tmp = a + t_1;
} else if (b <= 7e+167) {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
} else {
tmp = z + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((b + -0.5) * math.log(c)) + (y * i) tmp = 0 if b <= -5.4e+199: tmp = a + t_1 elif b <= 7e+167: tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) else: tmp = z + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i)) tmp = 0.0 if (b <= -5.4e+199) tmp = Float64(a + t_1); elseif (b <= 7e+167) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); else tmp = Float64(z + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((b + -0.5) * log(c)) + (y * i); tmp = 0.0; if (b <= -5.4e+199) tmp = a + t_1; elseif (b <= 7e+167) tmp = (y * i) + (a + (t + (z + (x * log(y))))); else tmp = z + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.4e+199], N[(a + t$95$1), $MachinePrecision], If[LessEqual[b, 7e+167], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b + -0.5\right) \cdot \log c + y \cdot i\\
\mathbf{if}\;b \leq -5.4 \cdot 10^{+199}:\\
\;\;\;\;a + t\_1\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+167}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z + t\_1\\
\end{array}
\end{array}
if b < -5.3999999999999998e199Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 81.1%
if -5.3999999999999998e199 < b < 6.99999999999999975e167Initial program 99.9%
Taylor expanded in b around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around 0 94.1%
if 6.99999999999999975e167 < b Initial 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 z around inf 76.9%
Final simplification91.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.4e+188) (not (<= x 2.3e+84))) (+ a (+ t (+ z (* x (log y))))) (+ a (+ t (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -6.4e+188) || !(x <= 2.3e+84)) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = a + (t + (z + (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 ((x <= (-6.4d+188)) .or. (.not. (x <= 2.3d+84))) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = a + (t + (z + (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 ((x <= -6.4e+188) || !(x <= 2.3e+84)) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.4e+188) or not (x <= 2.3e+84): tmp = a + (t + (z + (x * math.log(y)))) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.4e+188) || !(x <= 2.3e+84)) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -6.4e+188) || ~((x <= 2.3e+84))) tmp = a + (t + (z + (x * log(y)))); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.4e+188], N[Not[LessEqual[x, 2.3e+84]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+188} \lor \neg \left(x \leq 2.3 \cdot 10^{+84}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -6.39999999999999941e188 or 2.2999999999999999e84 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 92.7%
Taylor expanded in y around 0 82.6%
if -6.39999999999999941e188 < x < 2.2999999999999999e84Initial 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 96.9%
Taylor expanded in i around inf 75.8%
*-commutative75.8%
Simplified75.8%
Final simplification78.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.04e+186) (not (<= x 8.5e+136))) (+ z (* x (log y))) (+ a (+ t (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.04e+186) || !(x <= 8.5e+136)) {
tmp = z + (x * log(y));
} else {
tmp = a + (t + (z + (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 ((x <= (-1.04d+186)) .or. (.not. (x <= 8.5d+136))) then
tmp = z + (x * log(y))
else
tmp = a + (t + (z + (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 ((x <= -1.04e+186) || !(x <= 8.5e+136)) {
tmp = z + (x * Math.log(y));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.04e+186) or not (x <= 8.5e+136): tmp = z + (x * math.log(y)) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.04e+186) || !(x <= 8.5e+136)) tmp = Float64(z + Float64(x * log(y))); else tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.04e+186) || ~((x <= 8.5e+136))) tmp = z + (x * log(y)); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.04e+186], N[Not[LessEqual[x, 8.5e+136]], $MachinePrecision]], N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.04 \cdot 10^{+186} \lor \neg \left(x \leq 8.5 \cdot 10^{+136}\right):\\
\;\;\;\;z + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -1.04e186 or 8.49999999999999966e136 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around inf 99.5%
associate-+r+99.5%
associate-+r+99.5%
*-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
associate-/l*99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in z around inf 68.0%
Taylor expanded in x around 0 68.1%
if -1.04e186 < x < 8.49999999999999966e136Initial 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 96.1%
Taylor expanded in i around inf 75.5%
*-commutative75.5%
Simplified75.5%
Final simplification73.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.45e+147)
(+ (* y i) t_1)
(if (<= x 6.4e+137) (+ a (+ t (+ z (* y i)))) (+ 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 <= -1.45e+147) {
tmp = (y * i) + t_1;
} else if (x <= 6.4e+137) {
tmp = a + (t + (z + (y * i)));
} else {
tmp = 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 <= (-1.45d+147)) then
tmp = (y * i) + t_1
else if (x <= 6.4d+137) then
tmp = a + (t + (z + (y * i)))
else
tmp = 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 <= -1.45e+147) {
tmp = (y * i) + t_1;
} else if (x <= 6.4e+137) {
tmp = a + (t + (z + (y * i)));
} else {
tmp = 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 <= -1.45e+147: tmp = (y * i) + t_1 elif x <= 6.4e+137: tmp = a + (t + (z + (y * i))) else: tmp = 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 <= -1.45e+147) tmp = Float64(Float64(y * i) + t_1); elseif (x <= 6.4e+137) tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); else tmp = 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 <= -1.45e+147) tmp = (y * i) + t_1; elseif (x <= 6.4e+137) tmp = a + (t + (z + (y * i))); else tmp = 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, -1.45e+147], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 6.4e+137], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+147}:\\
\;\;\;\;y \cdot i + t\_1\\
\mathbf{elif}\;x \leq 6.4 \cdot 10^{+137}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z + t\_1\\
\end{array}
\end{array}
if x < -1.4499999999999999e147Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in b around 0 88.5%
Taylor expanded in x around inf 68.8%
if -1.4499999999999999e147 < x < 6.40000000000000038e137Initial 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 97.7%
Taylor expanded in i around inf 76.5%
*-commutative76.5%
Simplified76.5%
if 6.40000000000000038e137 < 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.8%
Taylor expanded in x around inf 99.7%
associate-+r+99.7%
associate-+r+99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 68.5%
Taylor expanded in x around 0 68.6%
Final simplification74.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.45e+196) (not (<= x 4.2e+208))) (* x (log y)) (+ a (+ t (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.45e+196) || !(x <= 4.2e+208)) {
tmp = x * log(y);
} else {
tmp = a + (t + (z + (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 ((x <= (-1.45d+196)) .or. (.not. (x <= 4.2d+208))) then
tmp = x * log(y)
else
tmp = a + (t + (z + (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 ((x <= -1.45e+196) || !(x <= 4.2e+208)) {
tmp = x * Math.log(y);
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.45e+196) or not (x <= 4.2e+208): tmp = x * math.log(y) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.45e+196) || !(x <= 4.2e+208)) tmp = Float64(x * log(y)); else tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.45e+196) || ~((x <= 4.2e+208))) tmp = x * log(y); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.45e+196], N[Not[LessEqual[x, 4.2e+208]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+196} \lor \neg \left(x \leq 4.2 \cdot 10^{+208}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -1.45e196 or 4.1999999999999997e208 < x Initial program 99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in x around inf 99.4%
associate-+r+99.4%
associate-+r+99.4%
*-commutative99.4%
sub-neg99.4%
metadata-eval99.4%
associate-/l*99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in z around inf 76.0%
Taylor expanded in z around 0 72.3%
if -1.45e196 < x < 4.1999999999999997e208Initial 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 92.5%
Taylor expanded in i around inf 73.5%
*-commutative73.5%
Simplified73.5%
Final simplification73.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.1e+59) z (if (<= a 3.1e+122) (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.1e+59) {
tmp = z;
} else if (a <= 3.1e+122) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 2.1d+59) then
tmp = z
else if (a <= 3.1d+122) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.1e+59) {
tmp = z;
} else if (a <= 3.1e+122) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.1e+59: tmp = z elif a <= 3.1e+122: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.1e+59) tmp = z; elseif (a <= 3.1e+122) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.1e+59) tmp = z; elseif (a <= 3.1e+122) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.1e+59], z, If[LessEqual[a, 3.1e+122], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.1 \cdot 10^{+59}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+122}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.09999999999999984e59Initial 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.8%
Taylor expanded in x around inf 75.4%
associate-+r+75.4%
associate-+r+75.4%
*-commutative75.4%
sub-neg75.4%
metadata-eval75.4%
associate-/l*75.4%
+-commutative75.4%
Simplified75.4%
Taylor expanded in z around inf 31.2%
Taylor expanded in x around 0 15.6%
if 2.09999999999999984e59 < a < 3.09999999999999999e122Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.9%
Taylor expanded in y around inf 34.5%
*-commutative34.5%
Simplified34.5%
if 3.09999999999999999e122 < a Initial 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 i around -inf 56.2%
Taylor expanded in a around inf 49.1%
mul-1-neg49.1%
Simplified49.1%
Taylor expanded in a around 0 49.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.2e+96) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.2e+96) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 2.2d+96) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.2e+96) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.2e+96: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.2e+96) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.2e+96) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.2e+96], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.2 \cdot 10^{+96}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 2.1999999999999999e96Initial program 99.8%
Taylor expanded in b around inf 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in b around 0 81.6%
Taylor expanded in z around inf 37.1%
if 2.1999999999999999e96 < a Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 91.9%
Taylor expanded in a around inf 58.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.1e+204) 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 <= -1.1e+204) {
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 <= (-1.1d+204)) 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 <= -1.1e+204) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.1e+204: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.1e+204) 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 <= -1.1e+204) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.1e+204], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+204}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.10000000000000006e204Initial 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.8%
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.1%
+-commutative68.1%
Simplified68.1%
Taylor expanded in z around inf 47.1%
Taylor expanded in x around 0 52.5%
if -1.10000000000000006e204 < z Initial program 99.8%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in b around 0 82.9%
Taylor expanded in a around inf 34.0%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ t (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a + (t + (z + (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (y * i)));
}
def code(x, y, z, t, a, b, c, i): return a + (t + (z + (y * i)))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + Float64(z + Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (t + (z + (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \left(z + y \cdot i\right)\right)
\end{array}
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.9%
Simplified99.9%
Taylor expanded in x around 0 80.4%
Taylor expanded in i around inf 64.2%
*-commutative64.2%
Simplified64.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 7.5e+122) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.5e+122) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 7.5d+122) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.5e+122) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7.5e+122: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7.5e+122) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 7.5e+122) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7.5e+122], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.5 \cdot 10^{+122}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 7.5000000000000002e122Initial 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.8%
Taylor expanded in x around inf 75.4%
associate-+r+75.4%
associate-+r+75.4%
*-commutative75.4%
sub-neg75.4%
metadata-eval75.4%
associate-/l*75.4%
+-commutative75.4%
Simplified75.4%
Taylor expanded in z around inf 31.6%
Taylor expanded in x around 0 14.9%
if 7.5000000000000002e122 < a Initial 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 i around -inf 56.2%
Taylor expanded in a around inf 49.1%
mul-1-neg49.1%
Simplified49.1%
Taylor expanded in a around 0 49.1%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.8%
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.9%
Simplified99.9%
Taylor expanded in i around -inf 69.9%
Taylor expanded in a around inf 13.2%
mul-1-neg13.2%
Simplified13.2%
Taylor expanded in a around 0 13.2%
herbie shell --seed 2024146
(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)))