
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (or (<= t_1 -4e+79) (not (<= t_1 1e+177)))
(+ (* y i) (+ a (+ z t_1)))
(+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* -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 = log(c) * (b - 0.5);
double tmp;
if ((t_1 <= -4e+79) || !(t_1 <= 1e+177)) {
tmp = (y * i) + (a + (z + t_1));
} else {
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (-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) :: t_1
real(8) :: tmp
t_1 = log(c) * (b - 0.5d0)
if ((t_1 <= (-4d+79)) .or. (.not. (t_1 <= 1d+177))) then
tmp = (y * i) + (a + (z + t_1))
else
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + ((-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 t_1 = Math.log(c) * (b - 0.5);
double tmp;
if ((t_1 <= -4e+79) || !(t_1 <= 1e+177)) {
tmp = (y * i) + (a + (z + t_1));
} else {
tmp = (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (-0.5 * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) tmp = 0 if (t_1 <= -4e+79) or not (t_1 <= 1e+177): tmp = (y * i) + (a + (z + t_1)) else: tmp = (y * i) + ((a + (t + (z + (x * math.log(y))))) + (-0.5 * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if ((t_1 <= -4e+79) || !(t_1 <= 1e+177)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t_1))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(-0.5 * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b - 0.5); tmp = 0.0; if ((t_1 <= -4e+79) || ~((t_1 <= 1e+177))) tmp = (y * i) + (a + (z + t_1)); else tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (-0.5 * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+79], N[Not[LessEqual[t$95$1, 1e+177]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+79} \lor \neg \left(t\_1 \leq 10^{+177}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + -0.5 \cdot \log c\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -3.99999999999999987e79 or 1e177 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.8%
Taylor expanded in x around inf 58.4%
sub-neg58.4%
metadata-eval58.4%
associate-/l*58.3%
+-commutative58.3%
Simplified58.3%
Taylor expanded in t around 0 53.6%
Taylor expanded in x around 0 87.8%
if -3.99999999999999987e79 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 1e177Initial program 99.9%
Taylor expanded in b around 0 97.5%
Final simplification94.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.9e+168) (not (<= x 2.7e+140))) (+ (* y i) (+ a (+ z (+ (* x (log y)) (* -0.5 (log c)))))) (+ (* y i) (+ a (+ t (+ z (* (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 <= -2.9e+168) || !(x <= 2.7e+140)) {
tmp = (y * i) + (a + (z + ((x * log(y)) + (-0.5 * log(c)))));
} else {
tmp = (y * i) + (a + (t + (z + (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 <= (-2.9d+168)) .or. (.not. (x <= 2.7d+140))) then
tmp = (y * i) + (a + (z + ((x * log(y)) + ((-0.5d0) * log(c)))))
else
tmp = (y * i) + (a + (t + (z + (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 <= -2.9e+168) || !(x <= 2.7e+140)) {
tmp = (y * i) + (a + (z + ((x * Math.log(y)) + (-0.5 * Math.log(c)))));
} else {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.9e+168) or not (x <= 2.7e+140): tmp = (y * i) + (a + (z + ((x * math.log(y)) + (-0.5 * math.log(c))))) else: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.9e+168) || !(x <= 2.7e+140)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(x * log(y)) + Float64(-0.5 * log(c)))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + 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 <= -2.9e+168) || ~((x <= 2.7e+140))) tmp = (y * i) + (a + (z + ((x * log(y)) + (-0.5 * log(c))))); else tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.9e+168], N[Not[LessEqual[x, 2.7e+140]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + 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 -2.9 \cdot 10^{+168} \lor \neg \left(x \leq 2.7 \cdot 10^{+140}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + \left(x \cdot \log y + -0.5 \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.9e168 or 2.70000000000000018e140 < x Initial program 99.7%
Taylor expanded in b around 0 92.7%
Taylor expanded in t around 0 85.9%
if -2.9e168 < x < 2.70000000000000018e140Initial program 99.9%
Taylor expanded in x around 0 98.0%
Final simplification95.3%
(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.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.9e+214)
(+ (* y i) (* x (+ (log y) (* b (/ (log c) x)))))
(if (<= x 1.26e+171)
(+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))
(+ (* y i) (* x (+ (log y) (/ a x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.9e+214) {
tmp = (y * i) + (x * (log(y) + (b * (log(c) / x))));
} else if (x <= 1.26e+171) {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (x * (log(y) + (a / x)));
}
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.9d+214)) then
tmp = (y * i) + (x * (log(y) + (b * (log(c) / x))))
else if (x <= 1.26d+171) then
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
else
tmp = (y * i) + (x * (log(y) + (a / x)))
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.9e+214) {
tmp = (y * i) + (x * (Math.log(y) + (b * (Math.log(c) / x))));
} else if (x <= 1.26e+171) {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (x * (Math.log(y) + (a / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -1.9e+214: tmp = (y * i) + (x * (math.log(y) + (b * (math.log(c) / x)))) elif x <= 1.26e+171: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + (x * (math.log(y) + (a / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.9e+214) tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(b * Float64(log(c) / x))))); elseif (x <= 1.26e+171) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(a / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -1.9e+214) tmp = (y * i) + (x * (log(y) + (b * (log(c) / x)))); elseif (x <= 1.26e+171) tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); else tmp = (y * i) + (x * (log(y) + (a / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.9e+214], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(b * N[(N[Log[c], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.26e+171], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+214}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + b \cdot \frac{\log c}{x}\right)\\
\mathbf{elif}\;x \leq 1.26 \cdot 10^{+171}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\
\end{array}
\end{array}
if x < -1.89999999999999999e214Initial program 99.8%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 94.2%
associate-/l*94.2%
Simplified94.2%
if -1.89999999999999999e214 < x < 1.26000000000000004e171Initial program 99.9%
Taylor expanded in x around 0 95.1%
if 1.26000000000000004e171 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in a around inf 83.9%
Final simplification94.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -6.4e+209)
(+ (* y i) (* x (+ (log y) (/ z x))))
(if (<= x 1.15e+171)
(+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))
(+ (* y i) (* x (+ (log y) (/ a x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -6.4e+209) {
tmp = (y * i) + (x * (log(y) + (z / x)));
} else if (x <= 1.15e+171) {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (x * (log(y) + (a / x)));
}
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+209)) then
tmp = (y * i) + (x * (log(y) + (z / x)))
else if (x <= 1.15d+171) then
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
else
tmp = (y * i) + (x * (log(y) + (a / x)))
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+209) {
tmp = (y * i) + (x * (Math.log(y) + (z / x)));
} else if (x <= 1.15e+171) {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (x * (Math.log(y) + (a / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -6.4e+209: tmp = (y * i) + (x * (math.log(y) + (z / x))) elif x <= 1.15e+171: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + (x * (math.log(y) + (a / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -6.4e+209) tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(z / x)))); elseif (x <= 1.15e+171) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(a / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -6.4e+209) tmp = (y * i) + (x * (log(y) + (z / x))); elseif (x <= 1.15e+171) tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); else tmp = (y * i) + (x * (log(y) + (a / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -6.4e+209], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+171], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+209}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+171}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\
\end{array}
\end{array}
if x < -6.3999999999999999e209Initial program 99.8%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 87.9%
if -6.3999999999999999e209 < x < 1.15000000000000009e171Initial program 99.9%
Taylor expanded in x around 0 95.1%
if 1.15000000000000009e171 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in a around inf 83.9%
Final simplification93.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -3.3e+153)
(+ z (* y i))
(if (<= z -7.2e+19)
(+ (* y i) (* x (+ (log y) (/ a x))))
(if (<= z -5.6e-198) (+ (* (log c) (- b 0.5)) (* 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 <= -3.3e+153) {
tmp = z + (y * i);
} else if (z <= -7.2e+19) {
tmp = (y * i) + (x * (log(y) + (a / x)));
} else if (z <= -5.6e-198) {
tmp = (log(c) * (b - 0.5)) + (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 <= (-3.3d+153)) then
tmp = z + (y * i)
else if (z <= (-7.2d+19)) then
tmp = (y * i) + (x * (log(y) + (a / x)))
else if (z <= (-5.6d-198)) then
tmp = (log(c) * (b - 0.5d0)) + (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 <= -3.3e+153) {
tmp = z + (y * i);
} else if (z <= -7.2e+19) {
tmp = (y * i) + (x * (Math.log(y) + (a / x)));
} else if (z <= -5.6e-198) {
tmp = (Math.log(c) * (b - 0.5)) + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.3e+153: tmp = z + (y * i) elif z <= -7.2e+19: tmp = (y * i) + (x * (math.log(y) + (a / x))) elif z <= -5.6e-198: tmp = (math.log(c) * (b - 0.5)) + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.3e+153) tmp = Float64(z + Float64(y * i)); elseif (z <= -7.2e+19) tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(a / x)))); elseif (z <= -5.6e-198) tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + 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 <= -3.3e+153) tmp = z + (y * i); elseif (z <= -7.2e+19) tmp = (y * i) + (x * (log(y) + (a / x))); elseif (z <= -5.6e-198) tmp = (log(c) * (b - 0.5)) + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.3e+153], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e+19], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.6e-198], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+153}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{+19}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-198}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -3.29999999999999994e153Initial program 99.9%
Taylor expanded in z around inf 68.2%
if -3.29999999999999994e153 < z < -7.2e19Initial program 99.7%
Taylor expanded in x around inf 58.9%
sub-neg58.9%
metadata-eval58.9%
associate-/l*58.9%
+-commutative58.9%
Simplified58.9%
Taylor expanded in a around inf 52.3%
if -7.2e19 < z < -5.5999999999999998e-198Initial program 99.8%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 91.8%
associate-+r+91.8%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in z around inf 49.0%
Taylor expanded in z around 0 48.8%
if -5.5999999999999998e-198 < z Initial program 99.9%
Taylor expanded in a around inf 36.4%
Final simplification44.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.8e+210)
(+ (* y i) (* x (+ (log y) (/ z x))))
(if (<= x 1.06e+171)
(+ (* y i) (+ a (+ z (* (log c) (- b 0.5)))))
(+ (* y i) (* x (+ (log y) (/ a x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.8e+210) {
tmp = (y * i) + (x * (log(y) + (z / x)));
} else if (x <= 1.06e+171) {
tmp = (y * i) + (a + (z + (log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (x * (log(y) + (a / x)));
}
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.8d+210)) then
tmp = (y * i) + (x * (log(y) + (z / x)))
else if (x <= 1.06d+171) then
tmp = (y * i) + (a + (z + (log(c) * (b - 0.5d0))))
else
tmp = (y * i) + (x * (log(y) + (a / x)))
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.8e+210) {
tmp = (y * i) + (x * (Math.log(y) + (z / x)));
} else if (x <= 1.06e+171) {
tmp = (y * i) + (a + (z + (Math.log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (x * (Math.log(y) + (a / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -1.8e+210: tmp = (y * i) + (x * (math.log(y) + (z / x))) elif x <= 1.06e+171: tmp = (y * i) + (a + (z + (math.log(c) * (b - 0.5)))) else: tmp = (y * i) + (x * (math.log(y) + (a / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.8e+210) tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(z / x)))); elseif (x <= 1.06e+171) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(a / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -1.8e+210) tmp = (y * i) + (x * (log(y) + (z / x))); elseif (x <= 1.06e+171) tmp = (y * i) + (a + (z + (log(c) * (b - 0.5)))); else tmp = (y * i) + (x * (log(y) + (a / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.8e+210], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.06e+171], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+210}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{elif}\;x \leq 1.06 \cdot 10^{+171}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\
\end{array}
\end{array}
if x < -1.8000000000000001e210Initial program 99.8%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
metadata-eval99.8%
associate-/l*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 87.9%
if -1.8000000000000001e210 < x < 1.06000000000000001e171Initial program 99.9%
Taylor expanded in x around inf 66.2%
sub-neg66.2%
metadata-eval66.2%
associate-/l*66.2%
+-commutative66.2%
Simplified66.2%
Taylor expanded in t around 0 54.9%
Taylor expanded in x around 0 76.5%
if 1.06000000000000001e171 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in a around inf 83.9%
Final simplification77.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.75e+158) (+ z (* y i)) (if (<= z -5.5e-198) (+ (* (log c) (- b 0.5)) (* 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 <= -1.75e+158) {
tmp = z + (y * i);
} else if (z <= -5.5e-198) {
tmp = (log(c) * (b - 0.5)) + (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 <= (-1.75d+158)) then
tmp = z + (y * i)
else if (z <= (-5.5d-198)) then
tmp = (log(c) * (b - 0.5d0)) + (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 <= -1.75e+158) {
tmp = z + (y * i);
} else if (z <= -5.5e-198) {
tmp = (Math.log(c) * (b - 0.5)) + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.75e+158: tmp = z + (y * i) elif z <= -5.5e-198: tmp = (math.log(c) * (b - 0.5)) + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.75e+158) tmp = Float64(z + Float64(y * i)); elseif (z <= -5.5e-198) tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + 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 <= -1.75e+158) tmp = z + (y * i); elseif (z <= -5.5e-198) tmp = (log(c) * (b - 0.5)) + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.75e+158], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.5e-198], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+158}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-198}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.7500000000000001e158Initial program 99.9%
Taylor expanded in z around inf 68.2%
if -1.7500000000000001e158 < z < -5.5000000000000001e-198Initial program 99.8%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 90.7%
associate-+r+90.7%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in z around inf 46.8%
Taylor expanded in z around 0 46.6%
if -5.5000000000000001e-198 < z Initial program 99.9%
Taylor expanded in a around inf 36.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.8e+158) (+ z (* y i)) (if (<= z -9e-195) (+ (* y i) (* b (log c))) (+ a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.8e+158) {
tmp = z + (y * i);
} else if (z <= -9e-195) {
tmp = (y * i) + (b * log(c));
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.8d+158)) then
tmp = z + (y * i)
else if (z <= (-9d-195)) then
tmp = (y * i) + (b * log(c))
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.8e+158) {
tmp = z + (y * i);
} else if (z <= -9e-195) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.8e+158: tmp = z + (y * i) elif z <= -9e-195: tmp = (y * i) + (b * math.log(c)) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.8e+158) tmp = Float64(z + Float64(y * i)); elseif (z <= -9e-195) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.8e+158) tmp = z + (y * i); elseif (z <= -9e-195) tmp = (y * i) + (b * log(c)); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.8e+158], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-195], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+158}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-195}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2.80000000000000001e158Initial program 99.9%
Taylor expanded in z around inf 68.2%
if -2.80000000000000001e158 < z < -9e-195Initial program 99.8%
Taylor expanded in x around inf 77.6%
sub-neg77.6%
metadata-eval77.6%
associate-/l*77.6%
+-commutative77.6%
Simplified77.6%
Taylor expanded in b around inf 41.6%
*-commutative41.6%
Simplified41.6%
if -9e-195 < z Initial program 99.9%
Taylor expanded in a around inf 36.4%
Final simplification42.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.75e+221) (+ (* y i) (+ z (* (log c) (- b 0.5)))) (+ 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 <= 1.75e+221) {
tmp = (y * i) + (z + (log(c) * (b - 0.5)));
} 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 <= 1.75d+221) then
tmp = (y * i) + (z + (log(c) * (b - 0.5d0)))
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 <= 1.75e+221) {
tmp = (y * i) + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.75e+221: tmp = (y * i) + (z + (math.log(c) * (b - 0.5))) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.75e+221) tmp = Float64(Float64(y * i) + Float64(z + Float64(log(c) * Float64(b - 0.5)))); 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 <= 1.75e+221) tmp = (y * i) + (z + (log(c) * (b - 0.5))); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.75e+221], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.75 \cdot 10^{+221}:\\
\;\;\;\;y \cdot i + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 1.7500000000000001e221Initial program 99.9%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 78.0%
associate-+r+78.0%
associate-/l*78.0%
Simplified78.0%
Taylor expanded in z around inf 56.8%
if 1.7500000000000001e221 < a Initial program 99.9%
Taylor expanded in a around inf 64.4%
Final simplification57.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.4e+147) (+ z (* (log c) (- b 0.5))) (+ 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.4e+147) {
tmp = z + (log(c) * (b - 0.5));
} 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.4d+147) then
tmp = z + (log(c) * (b - 0.5d0))
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.4e+147) {
tmp = z + (Math.log(c) * (b - 0.5));
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.4e+147: tmp = z + (math.log(c) * (b - 0.5)) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.4e+147) tmp = Float64(z + Float64(log(c) * Float64(b - 0.5))); 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.4e+147) tmp = z + (log(c) * (b - 0.5)); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.4e+147], N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.4 \cdot 10^{+147}:\\
\;\;\;\;z + \log c \cdot \left(b - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 2.40000000000000002e147Initial program 99.9%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 76.6%
associate-+r+76.6%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in z around inf 56.9%
Taylor expanded in y around 0 38.8%
if 2.40000000000000002e147 < a Initial program 99.9%
Taylor expanded in a around inf 53.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2e+153) (+ 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 <= -2e+153) {
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 <= (-2d+153)) 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 <= -2e+153) {
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 <= -2e+153: 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 <= -2e+153) 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 <= -2e+153) 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, -2e+153], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+153}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2e153Initial program 99.9%
Taylor expanded in z around inf 68.2%
if -2e153 < z Initial program 99.9%
Taylor expanded in a around inf 37.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.2e+195) (* i (/ z 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 <= -3.2e+195) {
tmp = i * (z / 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 <= (-3.2d+195)) then
tmp = i * (z / 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 <= -3.2e+195) {
tmp = i * (z / i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.2e+195: tmp = i * (z / i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.2e+195) tmp = Float64(i * Float64(z / 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 <= -3.2e+195) tmp = i * (z / i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.2e+195], N[(i * N[(z / i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+195}:\\
\;\;\;\;i \cdot \frac{z}{i}\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -3.19999999999999982e195Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in i around inf 59.6%
+-commutative59.6%
+-commutative59.6%
associate-+l+59.6%
Simplified59.5%
Taylor expanded in z around inf 36.9%
if -3.19999999999999982e195 < z Initial program 99.9%
Taylor expanded in a around inf 36.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.5e+120) (* i (/ z i)) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.5e+120) {
tmp = i * (z / i);
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.5d+120)) then
tmp = i * (z / i)
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.5e+120) {
tmp = i * (z / i);
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.5e+120: tmp = i * (z / i) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.5e+120) tmp = Float64(i * Float64(z / i)); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.5e+120) tmp = i * (z / i); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.5e+120], N[(i * N[(z / i), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+120}:\\
\;\;\;\;i \cdot \frac{z}{i}\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.5e120Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in i around inf 62.3%
+-commutative62.3%
+-commutative62.3%
associate-+l+62.3%
Simplified62.2%
Taylor expanded in z around inf 34.4%
if -1.5e120 < z Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in i around inf 65.4%
+-commutative65.4%
+-commutative65.4%
associate-+l+65.4%
Simplified65.3%
Taylor expanded in a around inf 11.0%
Taylor expanded in i around 0 18.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.15e+156) (* 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.15e+156) {
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.15d+156) 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.15e+156) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.15e+156: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.15e+156) 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.15e+156) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.15e+156], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.15 \cdot 10^{+156}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.14999999999999993e156Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 20.4%
*-commutative20.4%
Simplified20.4%
if 2.14999999999999993e156 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in i around inf 54.9%
+-commutative54.9%
+-commutative54.9%
associate-+l+54.9%
Simplified54.9%
Taylor expanded in a around inf 18.4%
Taylor expanded in i around 0 37.9%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in i around inf 64.9%
+-commutative64.9%
+-commutative64.9%
associate-+l+64.9%
Simplified64.8%
Taylor expanded in a around inf 10.4%
Taylor expanded in i around 0 16.6%
herbie shell --seed 2024116
(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)))