
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -8.8e+198) (not (<= x 1.9e+181))) (+ (* y i) (+ z (+ (* x (log y)) (* -0.5 (log c))))) (+ (* y i) (+ (+ t a) (+ z (* (+ b -0.5) (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -8.8e+198) || !(x <= 1.9e+181)) {
tmp = (y * i) + (z + ((x * log(y)) + (-0.5 * log(c))));
} else {
tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * log(c))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-8.8d+198)) .or. (.not. (x <= 1.9d+181))) then
tmp = (y * i) + (z + ((x * log(y)) + ((-0.5d0) * log(c))))
else
tmp = (y * i) + ((t + a) + (z + ((b + (-0.5d0)) * log(c))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -8.8e+198) || !(x <= 1.9e+181)) {
tmp = (y * i) + (z + ((x * Math.log(y)) + (-0.5 * Math.log(c))));
} else {
tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * Math.log(c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -8.8e+198) or not (x <= 1.9e+181): tmp = (y * i) + (z + ((x * math.log(y)) + (-0.5 * math.log(c)))) else: tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * math.log(c)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -8.8e+198) || !(x <= 1.9e+181)) tmp = Float64(Float64(y * i) + Float64(z + Float64(Float64(x * log(y)) + Float64(-0.5 * log(c))))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + Float64(z + Float64(Float64(b + -0.5) * log(c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -8.8e+198) || ~((x <= 1.9e+181))) tmp = (y * i) + (z + ((x * log(y)) + (-0.5 * log(c)))); else tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * log(c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -8.8e+198], N[Not[LessEqual[x, 1.9e+181]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+198} \lor \neg \left(x \leq 1.9 \cdot 10^{+181}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(x \cdot \log y + -0.5 \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\
\end{array}
\end{array}
if x < -8.7999999999999998e198 or 1.9000000000000001e181 < x Initial program 99.7%
Taylor expanded in a around 0 94.0%
Taylor expanded in b around 0 94.0%
+-commutative94.0%
fma-define94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in t around 0 93.8%
if -8.7999999999999998e198 < x < 1.9000000000000001e181Initial program 99.8%
Taylor expanded in x around 0 93.8%
associate-+r+93.8%
sub-neg93.8%
metadata-eval93.8%
+-commutative93.8%
Simplified93.8%
Final simplification93.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.7e+200) (not (<= x 1.5e+180))) (+ (* y i) (+ z (+ (* x (log y)) (* -0.5 (log c))))) (+ (* y i) (+ (fma (log c) (+ b -0.5) z) (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.7e+200) || !(x <= 1.5e+180)) {
tmp = (y * i) + (z + ((x * log(y)) + (-0.5 * log(c))));
} else {
tmp = (y * i) + (fma(log(c), (b + -0.5), z) + (t + a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.7e+200) || !(x <= 1.5e+180)) tmp = Float64(Float64(y * i) + Float64(z + Float64(Float64(x * log(y)) + Float64(-0.5 * log(c))))); else tmp = Float64(Float64(y * i) + Float64(fma(log(c), Float64(b + -0.5), z) + Float64(t + a))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.7e+200], N[Not[LessEqual[x, 1.5e+180]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+200} \lor \neg \left(x \leq 1.5 \cdot 10^{+180}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(x \cdot \log y + -0.5 \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\mathsf{fma}\left(\log c, b + -0.5, z\right) + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -2.70000000000000016e200 or 1.50000000000000001e180 < x Initial program 99.7%
Taylor expanded in a around 0 94.0%
Taylor expanded in b around 0 94.0%
+-commutative94.0%
fma-define94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in t around 0 93.8%
if -2.70000000000000016e200 < x < 1.50000000000000001e180Initial program 99.8%
Taylor expanded in x around 0 93.8%
associate-+r+93.8%
+-commutative93.8%
+-commutative93.8%
+-commutative93.8%
sub-neg93.8%
metadata-eval93.8%
fma-define93.8%
+-commutative93.8%
+-commutative93.8%
Simplified93.8%
Final simplification93.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -6.6e+104)
(+ (* y i) (+ t (+ z (+ t_1 (* b (log c))))))
(if (<= x 2.8e+179)
(+ (* y i) (+ (fma (log c) (+ b -0.5) z) (+ t a)))
(+ (* y i) (+ z (+ t_1 (* -0.5 (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 (x <= -6.6e+104) {
tmp = (y * i) + (t + (z + (t_1 + (b * log(c)))));
} else if (x <= 2.8e+179) {
tmp = (y * i) + (fma(log(c), (b + -0.5), z) + (t + a));
} else {
tmp = (y * i) + (z + (t_1 + (-0.5 * log(c))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -6.6e+104) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c)))))); elseif (x <= 2.8e+179) tmp = Float64(Float64(y * i) + Float64(fma(log(c), Float64(b + -0.5), z) + Float64(t + a))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t_1 + Float64(-0.5 * log(c))))); end return 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, -6.6e+104], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+179], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t$95$1 + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -6.6 \cdot 10^{+104}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+179}:\\
\;\;\;\;y \cdot i + \left(\mathsf{fma}\left(\log c, b + -0.5, z\right) + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t\_1 + -0.5 \cdot \log c\right)\right)\\
\end{array}
\end{array}
if x < -6.59999999999999969e104Initial program 99.6%
Taylor expanded in a around 0 90.5%
Taylor expanded in b around inf 90.5%
if -6.59999999999999969e104 < x < 2.8e179Initial program 99.9%
Taylor expanded in x around 0 96.2%
associate-+r+96.2%
+-commutative96.2%
+-commutative96.2%
+-commutative96.2%
sub-neg96.2%
metadata-eval96.2%
fma-define96.2%
+-commutative96.2%
+-commutative96.2%
Simplified96.2%
if 2.8e179 < x Initial program 99.7%
Taylor expanded in a around 0 89.0%
Taylor expanded in b around 0 89.0%
+-commutative89.0%
fma-define89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in t around 0 88.6%
Final simplification94.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= a 4e-29)
(+ (* y i) (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
(+ (* y i) (+ (+ a (+ t (+ z t_1))) (* b (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (a <= 4e-29) {
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (a <= 4d-29) then
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5d0)))))
else
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (a <= 4e-29) {
tmp = (y * i) + (t + (z + (t_1 + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (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 <= 4e-29: tmp = (y * i) + (t + (z + (t_1 + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + ((a + (t + (z + t_1))) + (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 <= 4e-29) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + t_1))) + 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 <= 4e-29) tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5))))); else tmp = (y * i) + ((a + (t + (z + t_1))) + (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, 4e-29], N[(N[(y * i), $MachinePrecision] + 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[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $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 4 \cdot 10^{-29}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + t\_1\right)\right)\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 3.99999999999999977e-29Initial program 99.8%
Taylor expanded in a around 0 90.5%
if 3.99999999999999977e-29 < a Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification93.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ t a) (* (+ b -0.5) (log c)))))
(if (<= z -1.35e+107)
(+ z (* y i))
(if (<= z -1.5e+81)
t_1
(if (<= z -1.35e-8)
(+ (* x (log y)) (* y i))
(if (<= z -1.5e-75) t_1 (fma y i a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + a) + ((b + -0.5) * log(c));
double tmp;
if (z <= -1.35e+107) {
tmp = z + (y * i);
} else if (z <= -1.5e+81) {
tmp = t_1;
} else if (z <= -1.35e-8) {
tmp = (x * log(y)) + (y * i);
} else if (z <= -1.5e-75) {
tmp = t_1;
} else {
tmp = fma(y, i, a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + a) + Float64(Float64(b + -0.5) * log(c))) tmp = 0.0 if (z <= -1.35e+107) tmp = Float64(z + Float64(y * i)); elseif (z <= -1.5e+81) tmp = t_1; elseif (z <= -1.35e-8) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (z <= -1.5e-75) tmp = t_1; else tmp = fma(y, i, a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+107], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e+81], t$95$1, If[LessEqual[z, -1.35e-8], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-75], t$95$1, N[(y * i + a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + a\right) + \left(b + -0.5\right) \cdot \log c\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+107}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if z < -1.3500000000000001e107Initial program 100.0%
Taylor expanded in z around inf 70.2%
if -1.3500000000000001e107 < z < -1.49999999999999999e81 or -1.35000000000000001e-8 < z < -1.4999999999999999e-75Initial program 99.7%
Taylor expanded in x around 0 82.1%
associate-+r+82.1%
sub-neg82.1%
metadata-eval82.1%
+-commutative82.1%
Simplified82.1%
Taylor expanded in z around 0 82.1%
associate-+r+82.1%
sub-neg82.1%
metadata-eval82.1%
+-commutative82.1%
Simplified82.1%
Taylor expanded in y around 0 52.5%
associate-+r+52.5%
+-commutative52.5%
sub-neg52.5%
metadata-eval52.5%
Simplified52.5%
if -1.49999999999999999e81 < z < -1.35000000000000001e-8Initial program 99.7%
Taylor expanded in x around inf 41.3%
if -1.4999999999999999e-75 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 81.7%
Taylor expanded in a around inf 35.3%
Final simplification42.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.1e+202) (not (<= x 1.5e+214))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ (+ t a) (+ z (* (+ b -0.5) (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.1e+202) || !(x <= 1.5e+214)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * log(c))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.1d+202)) .or. (.not. (x <= 1.5d+214))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + ((t + a) + (z + ((b + (-0.5d0)) * log(c))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.1e+202) || !(x <= 1.5e+214)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * Math.log(c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.1e+202) or not (x <= 1.5e+214): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * math.log(c)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.1e+202) || !(x <= 1.5e+214)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + Float64(z + Float64(Float64(b + -0.5) * log(c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.1e+202) || ~((x <= 1.5e+214))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + ((t + a) + (z + ((b + -0.5) * log(c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.1e+202], N[Not[LessEqual[x, 1.5e+214]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+202} \lor \neg \left(x \leq 1.5 \cdot 10^{+214}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\
\end{array}
\end{array}
if x < -1.09999999999999989e202 or 1.5000000000000001e214 < x Initial program 99.6%
Taylor expanded in x around inf 86.8%
if -1.09999999999999989e202 < x < 1.5000000000000001e214Initial program 99.8%
Taylor expanded in x around 0 93.1%
associate-+r+93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
Simplified93.1%
Final simplification92.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -6.2e+274)
(+ z (* y i))
(if (<= z -1.75e+108)
(+ a (+ t (+ z (* (log c) (- b 0.5)))))
(+ (* y i) (+ (+ 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 (z <= -6.2e+274) {
tmp = z + (y * i);
} else if (z <= -1.75e+108) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else {
tmp = (y * i) + ((t + a) + ((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 <= (-6.2d+274)) then
tmp = z + (y * i)
else if (z <= (-1.75d+108)) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else
tmp = (y * i) + ((t + a) + ((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 <= -6.2e+274) {
tmp = z + (y * i);
} else if (z <= -1.75e+108) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else {
tmp = (y * i) + ((t + a) + ((b + -0.5) * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -6.2e+274: tmp = z + (y * i) elif z <= -1.75e+108: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) else: tmp = (y * i) + ((t + a) + ((b + -0.5) * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -6.2e+274) tmp = Float64(z + Float64(y * i)); elseif (z <= -1.75e+108) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + 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 <= -6.2e+274) tmp = z + (y * i); elseif (z <= -1.75e+108) tmp = a + (t + (z + (log(c) * (b - 0.5)))); else tmp = (y * i) + ((t + a) + ((b + -0.5) * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -6.2e+274], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e+108], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+274}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{+108}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if z < -6.2e274Initial program 100.0%
Taylor expanded in z around inf 100.0%
if -6.2e274 < z < -1.7500000000000001e108Initial program 99.9%
Taylor expanded in x around 0 93.0%
associate-+r+93.0%
sub-neg93.0%
metadata-eval93.0%
+-commutative93.0%
Simplified93.0%
Taylor expanded in y around 0 79.3%
if -1.7500000000000001e108 < z Initial program 99.8%
Taylor expanded in x around 0 82.9%
associate-+r+82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in z around 0 70.7%
associate-+r+70.7%
sub-neg70.7%
metadata-eval70.7%
+-commutative70.7%
Simplified70.7%
Final simplification73.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ z (* y i))))
(if (<= i -9.4e+86)
t_1
(if (<= i 8.5e+19)
(+ a (+ t (+ z (* (log c) (- b 0.5)))))
(if (<= i 1.4e+220) t_1 (+ a (* y i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (y * i);
double tmp;
if (i <= -9.4e+86) {
tmp = t_1;
} else if (i <= 8.5e+19) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else if (i <= 1.4e+220) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z + (y * i)
if (i <= (-9.4d+86)) then
tmp = t_1
else if (i <= 8.5d+19) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else if (i <= 1.4d+220) then
tmp = t_1
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 t_1 = z + (y * i);
double tmp;
if (i <= -9.4e+86) {
tmp = t_1;
} else if (i <= 8.5e+19) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (i <= 1.4e+220) {
tmp = t_1;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = z + (y * i) tmp = 0 if i <= -9.4e+86: tmp = t_1 elif i <= 8.5e+19: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) elif i <= 1.4e+220: tmp = t_1 else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(z + Float64(y * i)) tmp = 0.0 if (i <= -9.4e+86) tmp = t_1; elseif (i <= 8.5e+19) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (i <= 1.4e+220) tmp = t_1; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = z + (y * i); tmp = 0.0; if (i <= -9.4e+86) tmp = t_1; elseif (i <= 8.5e+19) tmp = a + (t + (z + (log(c) * (b - 0.5)))); elseif (i <= 1.4e+220) tmp = t_1; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -9.4e+86], t$95$1, If[LessEqual[i, 8.5e+19], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.4e+220], t$95$1, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + y \cdot i\\
\mathbf{if}\;i \leq -9.4 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 8.5 \cdot 10^{+19}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;i \leq 1.4 \cdot 10^{+220}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if i < -9.4000000000000004e86 or 8.5e19 < i < 1.4e220Initial program 99.8%
Taylor expanded in z around inf 56.9%
if -9.4000000000000004e86 < i < 8.5e19Initial program 99.8%
Taylor expanded in x around 0 85.1%
associate-+r+85.1%
sub-neg85.1%
metadata-eval85.1%
+-commutative85.1%
Simplified85.1%
Taylor expanded in y around 0 78.4%
if 1.4e220 < i Initial program 99.8%
Taylor expanded in a around inf 54.3%
Final simplification70.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -9.8e+89) (+ z (* y i)) (if (<= z -6.4e-8) (+ (* x (log y)) (* y i)) (fma 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 <= -9.8e+89) {
tmp = z + (y * i);
} else if (z <= -6.4e-8) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = fma(y, i, a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -9.8e+89) tmp = Float64(z + Float64(y * i)); elseif (z <= -6.4e-8) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = fma(y, i, a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -9.8e+89], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.4e-8], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(y * i + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+89}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if z < -9.79999999999999992e89Initial program 100.0%
Taylor expanded in z around inf 68.7%
if -9.79999999999999992e89 < z < -6.4000000000000004e-8Initial program 99.8%
Taylor expanded in x around inf 40.5%
if -6.4000000000000004e-8 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 81.8%
Taylor expanded in a around inf 35.3%
Final simplification41.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -8e+100) (+ z (* y i)) (fma 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 <= -8e+100) {
tmp = z + (y * i);
} else {
tmp = fma(y, i, a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -8e+100) tmp = Float64(z + Float64(y * i)); else tmp = fma(y, i, a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -8e+100], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(y * i + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+100}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if z < -8.00000000000000013e100Initial program 100.0%
Taylor expanded in z around inf 68.7%
if -8.00000000000000013e100 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 81.7%
Taylor expanded in a around inf 34.5%
Final simplification40.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -9.8e+234) 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 <= -9.8e+234) {
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 <= (-9.8d+234)) 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 <= -9.8e+234) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -9.8e+234: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -9.8e+234) 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 <= -9.8e+234) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -9.8e+234], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+234}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -9.79999999999999979e234Initial program 100.0%
Taylor expanded in x around 0 97.3%
associate-+r+97.3%
sub-neg97.3%
metadata-eval97.3%
+-commutative97.3%
Simplified97.3%
add-sqr-sqrt45.0%
pow245.0%
+-commutative45.0%
*-commutative45.0%
Applied egg-rr45.0%
Taylor expanded in z around inf 79.0%
if -9.79999999999999979e234 < z Initial program 99.8%
Taylor expanded in a around inf 33.9%
Final simplification37.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -4.3e+105) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -4.3e+105) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-4.3d+105)) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -4.3e+105) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -4.3e+105: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -4.3e+105) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -4.3e+105) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -4.3e+105], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+105}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -4.3000000000000002e105Initial program 100.0%
Taylor expanded in z around inf 68.7%
if -4.3000000000000002e105 < z Initial program 99.8%
Taylor expanded in a around inf 34.5%
Final simplification40.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.2e+91) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.2e+91) {
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 <= (-1.2d+91)) 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 <= -1.2e+91) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.2e+91: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.2e+91) 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 <= -1.2e+91) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.2e+91], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+91}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.19999999999999991e91Initial program 100.0%
Taylor expanded in x around 0 95.4%
associate-+r+95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
Simplified95.4%
add-sqr-sqrt46.4%
pow246.4%
+-commutative46.4%
*-commutative46.4%
Applied egg-rr46.4%
Taylor expanded in z around inf 51.1%
if -1.19999999999999991e91 < z Initial program 99.8%
Taylor expanded in x around 0 82.7%
associate-+r+82.7%
sub-neg82.7%
metadata-eval82.7%
+-commutative82.7%
Simplified82.7%
add-sqr-sqrt35.6%
pow235.6%
+-commutative35.6%
*-commutative35.6%
Applied egg-rr35.6%
Taylor expanded in a around inf 15.6%
Final simplification21.6%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
Taylor expanded in x around 0 84.9%
associate-+r+84.9%
sub-neg84.9%
metadata-eval84.9%
+-commutative84.9%
Simplified84.9%
add-sqr-sqrt37.4%
pow237.4%
+-commutative37.4%
*-commutative37.4%
Applied egg-rr37.4%
Taylor expanded in a around inf 14.2%
Final simplification14.2%
herbie shell --seed 2024034
(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)))