
(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 21 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 (+ (+ (+ (+ (- z (* x (log (/ 1.0 y)))) 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 ((((z - (x * log((1.0 / y)))) + 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 = ((((z - (x * log((1.0d0 / y)))) + 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 ((((z - (x * Math.log((1.0 / y)))) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((((z - (x * math.log((1.0 / y)))) + 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(z - Float64(x * log(Float64(1.0 / y)))) + 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 = ((((z - (x * log((1.0 / y)))) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(z - N[(x * N[Log[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $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(z - x \cdot \log \left(\frac{1}{y}\right)\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.5%
Taylor expanded in y around inf 99.5%
Final simplification99.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.6e+86) (not (<= x 1.2e+175))) (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) -0.5))) (+ (* y i) (+ a (+ t (+ 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 <= -2.6e+86) || !(x <= 1.2e+175)) {
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * -0.5));
} else {
tmp = (y * i) + (a + (t + (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 <= (-2.6d+86)) .or. (.not. (x <= 1.2d+175))) then
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (-0.5d0)))
else
tmp = (y * i) + (a + (t + (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 <= -2.6e+86) || !(x <= 1.2e+175)) {
tmp = (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * -0.5));
} else {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * Math.log(c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.6e+86) or not (x <= 1.2e+175): tmp = (y * i) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * -0.5)) else: tmp = (y * i) + (a + (t + (z + ((b - 0.5) * math.log(c))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.6e+86) || !(x <= 1.2e+175)) tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * -0.5))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + 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 <= -2.6e+86) || ~((x <= 1.2e+175))) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * -0.5)); else tmp = (y * i) + (a + (t + (z + ((b - 0.5) * log(c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.6e+86], N[Not[LessEqual[x, 1.2e+175]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+86} \lor \neg \left(x \leq 1.2 \cdot 10^{+175}\right):\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.5999999999999998e86 or 1.2e175 < x Initial program 98.4%
Taylor expanded in b around 0 90.8%
*-commutative90.8%
Simplified90.8%
if -2.5999999999999998e86 < x < 1.2e175Initial program 99.9%
Taylor expanded in x around 0 97.7%
Final simplification95.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.8e+87) (not (<= x 2.15e+176))) (+ a (+ t (+ z (+ (* x (log y)) (* (log c) -0.5))))) (+ (* y i) (+ a (+ t (+ 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 <= -4.8e+87) || !(x <= 2.15e+176)) {
tmp = a + (t + (z + ((x * log(y)) + (log(c) * -0.5))));
} else {
tmp = (y * i) + (a + (t + (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 <= (-4.8d+87)) .or. (.not. (x <= 2.15d+176))) then
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (-0.5d0)))))
else
tmp = (y * i) + (a + (t + (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 <= -4.8e+87) || !(x <= 2.15e+176)) {
tmp = a + (t + (z + ((x * Math.log(y)) + (Math.log(c) * -0.5))));
} else {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * Math.log(c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.8e+87) or not (x <= 2.15e+176): tmp = a + (t + (z + ((x * math.log(y)) + (math.log(c) * -0.5)))) else: tmp = (y * i) + (a + (t + (z + ((b - 0.5) * math.log(c))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.8e+87) || !(x <= 2.15e+176)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * -0.5))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + 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 <= -4.8e+87) || ~((x <= 2.15e+176))) tmp = a + (t + (z + ((x * log(y)) + (log(c) * -0.5)))); else tmp = (y * i) + (a + (t + (z + ((b - 0.5) * log(c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.8e+87], N[Not[LessEqual[x, 2.15e+176]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+87} \lor \neg \left(x \leq 2.15 \cdot 10^{+176}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot -0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.79999999999999963e87 or 2.15000000000000013e176 < x Initial program 98.4%
Taylor expanded in b around 0 90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in y around 0 75.8%
if -4.79999999999999963e87 < x < 2.15000000000000013e176Initial program 99.9%
Taylor expanded in x around 0 97.7%
Final simplification91.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.65e+181) (not (<= x 3.3e+175))) (+ (* y i) (+ z (+ (* x (log y)) (* (log c) -0.5)))) (+ (* y i) (+ a (+ t (+ 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.65e+181) || !(x <= 3.3e+175)) {
tmp = (y * i) + (z + ((x * log(y)) + (log(c) * -0.5)));
} else {
tmp = (y * i) + (a + (t + (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.65d+181)) .or. (.not. (x <= 3.3d+175))) then
tmp = (y * i) + (z + ((x * log(y)) + (log(c) * (-0.5d0))))
else
tmp = (y * i) + (a + (t + (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.65e+181) || !(x <= 3.3e+175)) {
tmp = (y * i) + (z + ((x * Math.log(y)) + (Math.log(c) * -0.5)));
} else {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * Math.log(c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.65e+181) or not (x <= 3.3e+175): tmp = (y * i) + (z + ((x * math.log(y)) + (math.log(c) * -0.5))) else: tmp = (y * i) + (a + (t + (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.65e+181) || !(x <= 3.3e+175)) tmp = Float64(Float64(y * i) + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * -0.5)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + 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.65e+181) || ~((x <= 3.3e+175))) tmp = (y * i) + (z + ((x * log(y)) + (log(c) * -0.5))); else tmp = (y * i) + (a + (t + (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.65e+181], N[Not[LessEqual[x, 3.3e+175]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+181} \lor \neg \left(x \leq 3.3 \cdot 10^{+175}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(x \cdot \log y + \log c \cdot -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.65000000000000008e181 or 3.3000000000000002e175 < x Initial program 97.9%
Taylor expanded in b around 0 91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in a around 0 86.1%
Taylor expanded in t around 0 79.7%
if -1.65000000000000008e181 < x < 3.3000000000000002e175Initial program 99.9%
Taylor expanded in x around 0 95.4%
Final simplification91.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (* (- b 0.5) (log c))))
(if (<= x -4.2e+87)
(+ a (+ t (+ z (+ t_1 t_2))))
(if (<= x 4.5e+175)
(+ (* y i) (+ a (+ t (+ z t_2))))
(+ (* y i) (+ z (+ t_1 (* (log c) -0.5))))))))
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 t_2 = (b - 0.5) * log(c);
double tmp;
if (x <= -4.2e+87) {
tmp = a + (t + (z + (t_1 + t_2)));
} else if (x <= 4.5e+175) {
tmp = (y * i) + (a + (t + (z + t_2)));
} else {
tmp = (y * i) + (z + (t_1 + (log(c) * -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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = (b - 0.5d0) * log(c)
if (x <= (-4.2d+87)) then
tmp = a + (t + (z + (t_1 + t_2)))
else if (x <= 4.5d+175) then
tmp = (y * i) + (a + (t + (z + t_2)))
else
tmp = (y * i) + (z + (t_1 + (log(c) * (-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 t_1 = x * Math.log(y);
double t_2 = (b - 0.5) * Math.log(c);
double tmp;
if (x <= -4.2e+87) {
tmp = a + (t + (z + (t_1 + t_2)));
} else if (x <= 4.5e+175) {
tmp = (y * i) + (a + (t + (z + t_2)));
} else {
tmp = (y * i) + (z + (t_1 + (Math.log(c) * -0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = (b - 0.5) * math.log(c) tmp = 0 if x <= -4.2e+87: tmp = a + (t + (z + (t_1 + t_2))) elif x <= 4.5e+175: tmp = (y * i) + (a + (t + (z + t_2))) else: tmp = (y * i) + (z + (t_1 + (math.log(c) * -0.5))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (x <= -4.2e+87) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + t_2)))); elseif (x <= 4.5e+175) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + t_2)))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t_1 + Float64(log(c) * -0.5)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = (b - 0.5) * log(c); tmp = 0.0; if (x <= -4.2e+87) tmp = a + (t + (z + (t_1 + t_2))); elseif (x <= 4.5e+175) tmp = (y * i) + (a + (t + (z + t_2))); else tmp = (y * i) + (z + (t_1 + (log(c) * -0.5))); 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]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.2e+87], N[(a + N[(t + N[(z + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+175], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;x \leq -4.2 \cdot 10^{+87}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + t\_2\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+175}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t\_2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t\_1 + \log c \cdot -0.5\right)\right)\\
\end{array}
\end{array}
if x < -4.2e87Initial program 97.9%
Taylor expanded in y around 0 83.8%
if -4.2e87 < x < 4.49999999999999989e175Initial program 99.9%
Taylor expanded in x around 0 97.7%
if 4.49999999999999989e175 < x Initial program 99.7%
Taylor expanded in b around 0 95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in a around 0 86.5%
Taylor expanded in t around 0 78.4%
Final simplification93.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.5e+180) (not (<= x 4.8e+228))) (+ t (+ z (+ (* x (log y)) (* (log c) -0.5)))) (+ (* y i) (+ a (+ t (+ 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 <= -6.5e+180) || !(x <= 4.8e+228)) {
tmp = t + (z + ((x * log(y)) + (log(c) * -0.5)));
} else {
tmp = (y * i) + (a + (t + (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 <= (-6.5d+180)) .or. (.not. (x <= 4.8d+228))) then
tmp = t + (z + ((x * log(y)) + (log(c) * (-0.5d0))))
else
tmp = (y * i) + (a + (t + (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 <= -6.5e+180) || !(x <= 4.8e+228)) {
tmp = t + (z + ((x * Math.log(y)) + (Math.log(c) * -0.5)));
} else {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * Math.log(c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.5e+180) or not (x <= 4.8e+228): tmp = t + (z + ((x * math.log(y)) + (math.log(c) * -0.5))) else: tmp = (y * i) + (a + (t + (z + ((b - 0.5) * math.log(c))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.5e+180) || !(x <= 4.8e+228)) tmp = Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * -0.5)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + 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 <= -6.5e+180) || ~((x <= 4.8e+228))) tmp = t + (z + ((x * log(y)) + (log(c) * -0.5))); else tmp = (y * i) + (a + (t + (z + ((b - 0.5) * log(c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.5e+180], N[Not[LessEqual[x, 4.8e+228]], $MachinePrecision]], N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+180} \lor \neg \left(x \leq 4.8 \cdot 10^{+228}\right):\\
\;\;\;\;t + \left(z + \left(x \cdot \log y + \log c \cdot -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.5e180 or 4.79999999999999977e228 < x Initial program 97.5%
Taylor expanded in b around 0 91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in a around 0 89.0%
Taylor expanded in y around 0 74.0%
if -6.5e180 < x < 4.79999999999999977e228Initial program 99.9%
Taylor expanded in x around 0 93.3%
Final simplification89.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (- b 0.5) (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + ((b - 0.5) * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + ((b - 0.5d0) * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + ((b - 0.5) * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + ((b - 0.5) * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(Float64(b - 0.5) * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + ((b - 0.5) * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \left(b - 0.5\right) \cdot \log c\right)
\end{array}
Initial program 99.5%
Final simplification99.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (* b (log c))))
(if (<= a -3.1e-249)
z
(if (<= a -2.65e-281)
(* y i)
(if (<= a 4.9e-225)
z
(if (<= a 2.9e-130)
t_2
(if (<= a 9.5e-97)
z
(if (<= a 1.46e-21)
t_1
(if (<= a 3.9e+22)
(* y i)
(if (<= a 4.8e+127) t_2 (if (<= a 2.2e+145) t_1 a)))))))))))
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 t_2 = b * log(c);
double tmp;
if (a <= -3.1e-249) {
tmp = z;
} else if (a <= -2.65e-281) {
tmp = y * i;
} else if (a <= 4.9e-225) {
tmp = z;
} else if (a <= 2.9e-130) {
tmp = t_2;
} else if (a <= 9.5e-97) {
tmp = z;
} else if (a <= 1.46e-21) {
tmp = t_1;
} else if (a <= 3.9e+22) {
tmp = y * i;
} else if (a <= 4.8e+127) {
tmp = t_2;
} else if (a <= 2.2e+145) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = b * log(c)
if (a <= (-3.1d-249)) then
tmp = z
else if (a <= (-2.65d-281)) then
tmp = y * i
else if (a <= 4.9d-225) then
tmp = z
else if (a <= 2.9d-130) then
tmp = t_2
else if (a <= 9.5d-97) then
tmp = z
else if (a <= 1.46d-21) then
tmp = t_1
else if (a <= 3.9d+22) then
tmp = y * i
else if (a <= 4.8d+127) then
tmp = t_2
else if (a <= 2.2d+145) then
tmp = t_1
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 t_1 = x * Math.log(y);
double t_2 = b * Math.log(c);
double tmp;
if (a <= -3.1e-249) {
tmp = z;
} else if (a <= -2.65e-281) {
tmp = y * i;
} else if (a <= 4.9e-225) {
tmp = z;
} else if (a <= 2.9e-130) {
tmp = t_2;
} else if (a <= 9.5e-97) {
tmp = z;
} else if (a <= 1.46e-21) {
tmp = t_1;
} else if (a <= 3.9e+22) {
tmp = y * i;
} else if (a <= 4.8e+127) {
tmp = t_2;
} else if (a <= 2.2e+145) {
tmp = t_1;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = b * math.log(c) tmp = 0 if a <= -3.1e-249: tmp = z elif a <= -2.65e-281: tmp = y * i elif a <= 4.9e-225: tmp = z elif a <= 2.9e-130: tmp = t_2 elif a <= 9.5e-97: tmp = z elif a <= 1.46e-21: tmp = t_1 elif a <= 3.9e+22: tmp = y * i elif a <= 4.8e+127: tmp = t_2 elif a <= 2.2e+145: tmp = t_1 else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(b * log(c)) tmp = 0.0 if (a <= -3.1e-249) tmp = z; elseif (a <= -2.65e-281) tmp = Float64(y * i); elseif (a <= 4.9e-225) tmp = z; elseif (a <= 2.9e-130) tmp = t_2; elseif (a <= 9.5e-97) tmp = z; elseif (a <= 1.46e-21) tmp = t_1; elseif (a <= 3.9e+22) tmp = Float64(y * i); elseif (a <= 4.8e+127) tmp = t_2; elseif (a <= 2.2e+145) tmp = t_1; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = b * log(c); tmp = 0.0; if (a <= -3.1e-249) tmp = z; elseif (a <= -2.65e-281) tmp = y * i; elseif (a <= 4.9e-225) tmp = z; elseif (a <= 2.9e-130) tmp = t_2; elseif (a <= 9.5e-97) tmp = z; elseif (a <= 1.46e-21) tmp = t_1; elseif (a <= 3.9e+22) tmp = y * i; elseif (a <= 4.8e+127) tmp = t_2; elseif (a <= 2.2e+145) tmp = t_1; else tmp = a; 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]}, Block[{t$95$2 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e-249], z, If[LessEqual[a, -2.65e-281], N[(y * i), $MachinePrecision], If[LessEqual[a, 4.9e-225], z, If[LessEqual[a, 2.9e-130], t$95$2, If[LessEqual[a, 9.5e-97], z, If[LessEqual[a, 1.46e-21], t$95$1, If[LessEqual[a, 3.9e+22], N[(y * i), $MachinePrecision], If[LessEqual[a, 4.8e+127], t$95$2, If[LessEqual[a, 2.2e+145], t$95$1, a]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := b \cdot \log c\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{-249}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq -2.65 \cdot 10^{-281}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{-225}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-97}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 1.46 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+22}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -3.09999999999999986e-249 or -2.64999999999999997e-281 < a < 4.89999999999999971e-225 or 2.9e-130 < a < 9.5000000000000001e-97Initial program 99.2%
Taylor expanded in z around inf 13.5%
if -3.09999999999999986e-249 < a < -2.64999999999999997e-281 or 1.46000000000000006e-21 < a < 3.90000000000000021e22Initial program 99.9%
Taylor expanded in y around inf 35.5%
*-commutative35.5%
Simplified35.5%
if 4.89999999999999971e-225 < a < 2.9e-130 or 3.90000000000000021e22 < a < 4.8000000000000004e127Initial program 99.8%
Taylor expanded in b around inf 21.6%
*-commutative21.6%
Simplified21.6%
if 9.5000000000000001e-97 < a < 1.46000000000000006e-21 or 4.8000000000000004e127 < a < 2.20000000000000009e145Initial program 99.6%
Taylor expanded in x around inf 34.1%
if 2.20000000000000009e145 < a Initial program 100.0%
Taylor expanded in a around inf 54.2%
Final simplification23.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= a -7.4e-252)
z
(if (<= a -2.7e-281)
(* y i)
(if (<= a 5.2e-170)
z
(if (<= a 3.4e-130)
t_1
(if (<= a 2.15e-91)
z
(if (<= a 1.25e-21)
t_1
(if (<= a 3.8e+58)
(* y i)
(if (<= a 1e+137)
t_1
(if (<= a 1.15e+146) (* y i) a)))))))))))
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 <= -7.4e-252) {
tmp = z;
} else if (a <= -2.7e-281) {
tmp = y * i;
} else if (a <= 5.2e-170) {
tmp = z;
} else if (a <= 3.4e-130) {
tmp = t_1;
} else if (a <= 2.15e-91) {
tmp = z;
} else if (a <= 1.25e-21) {
tmp = t_1;
} else if (a <= 3.8e+58) {
tmp = y * i;
} else if (a <= 1e+137) {
tmp = t_1;
} else if (a <= 1.15e+146) {
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) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (a <= (-7.4d-252)) then
tmp = z
else if (a <= (-2.7d-281)) then
tmp = y * i
else if (a <= 5.2d-170) then
tmp = z
else if (a <= 3.4d-130) then
tmp = t_1
else if (a <= 2.15d-91) then
tmp = z
else if (a <= 1.25d-21) then
tmp = t_1
else if (a <= 3.8d+58) then
tmp = y * i
else if (a <= 1d+137) then
tmp = t_1
else if (a <= 1.15d+146) 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 t_1 = x * Math.log(y);
double tmp;
if (a <= -7.4e-252) {
tmp = z;
} else if (a <= -2.7e-281) {
tmp = y * i;
} else if (a <= 5.2e-170) {
tmp = z;
} else if (a <= 3.4e-130) {
tmp = t_1;
} else if (a <= 2.15e-91) {
tmp = z;
} else if (a <= 1.25e-21) {
tmp = t_1;
} else if (a <= 3.8e+58) {
tmp = y * i;
} else if (a <= 1e+137) {
tmp = t_1;
} else if (a <= 1.15e+146) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if a <= -7.4e-252: tmp = z elif a <= -2.7e-281: tmp = y * i elif a <= 5.2e-170: tmp = z elif a <= 3.4e-130: tmp = t_1 elif a <= 2.15e-91: tmp = z elif a <= 1.25e-21: tmp = t_1 elif a <= 3.8e+58: tmp = y * i elif a <= 1e+137: tmp = t_1 elif a <= 1.15e+146: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (a <= -7.4e-252) tmp = z; elseif (a <= -2.7e-281) tmp = Float64(y * i); elseif (a <= 5.2e-170) tmp = z; elseif (a <= 3.4e-130) tmp = t_1; elseif (a <= 2.15e-91) tmp = z; elseif (a <= 1.25e-21) tmp = t_1; elseif (a <= 3.8e+58) tmp = Float64(y * i); elseif (a <= 1e+137) tmp = t_1; elseif (a <= 1.15e+146) tmp = Float64(y * i); else tmp = a; 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 <= -7.4e-252) tmp = z; elseif (a <= -2.7e-281) tmp = y * i; elseif (a <= 5.2e-170) tmp = z; elseif (a <= 3.4e-130) tmp = t_1; elseif (a <= 2.15e-91) tmp = z; elseif (a <= 1.25e-21) tmp = t_1; elseif (a <= 3.8e+58) tmp = y * i; elseif (a <= 1e+137) tmp = t_1; elseif (a <= 1.15e+146) tmp = y * i; else tmp = a; 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, -7.4e-252], z, If[LessEqual[a, -2.7e-281], N[(y * i), $MachinePrecision], If[LessEqual[a, 5.2e-170], z, If[LessEqual[a, 3.4e-130], t$95$1, If[LessEqual[a, 2.15e-91], z, If[LessEqual[a, 1.25e-21], t$95$1, If[LessEqual[a, 3.8e+58], N[(y * i), $MachinePrecision], If[LessEqual[a, 1e+137], t$95$1, If[LessEqual[a, 1.15e+146], N[(y * i), $MachinePrecision], a]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq -7.4 \cdot 10^{-252}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-281}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-170}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{-91}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+58}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+146}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -7.4000000000000002e-252 or -2.6999999999999999e-281 < a < 5.2000000000000003e-170 or 3.40000000000000005e-130 < a < 2.15e-91Initial program 99.3%
Taylor expanded in z around inf 14.1%
if -7.4000000000000002e-252 < a < -2.6999999999999999e-281 or 1.24999999999999993e-21 < a < 3.7999999999999999e58 or 1e137 < a < 1.15e146Initial program 99.8%
Taylor expanded in y around inf 39.8%
*-commutative39.8%
Simplified39.8%
if 5.2000000000000003e-170 < a < 3.40000000000000005e-130 or 2.15e-91 < a < 1.24999999999999993e-21 or 3.7999999999999999e58 < a < 1e137Initial program 99.7%
Taylor expanded in x around inf 27.6%
if 1.15e146 < a Initial program 100.0%
Taylor expanded in a around inf 54.2%
Final simplification23.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -5e+111) (not (<= (- b 0.5) 1e+99))) (+ a (+ z (* (- b 0.5) (log c)))) (+ a (+ t (+ z (+ (* y i) (* (log c) -0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -5e+111) || !((b - 0.5) <= 1e+99)) {
tmp = a + (z + ((b - 0.5) * log(c)));
} else {
tmp = a + (t + (z + ((y * i) + (log(c) * -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 (((b - 0.5d0) <= (-5d+111)) .or. (.not. ((b - 0.5d0) <= 1d+99))) then
tmp = a + (z + ((b - 0.5d0) * log(c)))
else
tmp = a + (t + (z + ((y * i) + (log(c) * (-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 (((b - 0.5) <= -5e+111) || !((b - 0.5) <= 1e+99)) {
tmp = a + (z + ((b - 0.5) * Math.log(c)));
} else {
tmp = a + (t + (z + ((y * i) + (Math.log(c) * -0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -5e+111) or not ((b - 0.5) <= 1e+99): tmp = a + (z + ((b - 0.5) * math.log(c))) else: tmp = a + (t + (z + ((y * i) + (math.log(c) * -0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -5e+111) || !(Float64(b - 0.5) <= 1e+99)) tmp = Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c)))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * -0.5))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -5e+111) || ~(((b - 0.5) <= 1e+99))) tmp = a + (z + ((b - 0.5) * log(c))); else tmp = a + (t + (z + ((y * i) + (log(c) * -0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+111], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+99]], $MachinePrecision]], N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+111} \lor \neg \left(b - 0.5 \leq 10^{+99}\right):\\
\;\;\;\;a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot -0.5\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -4.9999999999999997e111 or 9.9999999999999997e98 < (-.f64 b 1/2) Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 90.2%
Taylor expanded in t around 0 80.3%
associate-+r+80.3%
sub-neg80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in y around 0 66.5%
if -4.9999999999999997e111 < (-.f64 b 1/2) < 9.9999999999999997e98Initial program 99.3%
associate-+l+99.3%
associate-+l+99.3%
+-commutative99.3%
+-commutative99.3%
associate-+r+99.3%
associate-+l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
fma-def99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 79.8%
Taylor expanded in b around 0 78.0%
Final simplification74.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -5e+111) (not (<= (- b 0.5) 1e+99))) (+ a (+ z (* (- b 0.5) (log c)))) (+ a (+ z (+ (* y i) (* (log c) -0.5))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -5e+111) || !((b - 0.5) <= 1e+99)) {
tmp = a + (z + ((b - 0.5) * log(c)));
} else {
tmp = a + (z + ((y * i) + (log(c) * -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 (((b - 0.5d0) <= (-5d+111)) .or. (.not. ((b - 0.5d0) <= 1d+99))) then
tmp = a + (z + ((b - 0.5d0) * log(c)))
else
tmp = a + (z + ((y * i) + (log(c) * (-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 (((b - 0.5) <= -5e+111) || !((b - 0.5) <= 1e+99)) {
tmp = a + (z + ((b - 0.5) * Math.log(c)));
} else {
tmp = a + (z + ((y * i) + (Math.log(c) * -0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -5e+111) or not ((b - 0.5) <= 1e+99): tmp = a + (z + ((b - 0.5) * math.log(c))) else: tmp = a + (z + ((y * i) + (math.log(c) * -0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -5e+111) || !(Float64(b - 0.5) <= 1e+99)) tmp = Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c)))); else tmp = Float64(a + Float64(z + Float64(Float64(y * i) + Float64(log(c) * -0.5)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -5e+111) || ~(((b - 0.5) <= 1e+99))) tmp = a + (z + ((b - 0.5) * log(c))); else tmp = a + (z + ((y * i) + (log(c) * -0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+111], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+99]], $MachinePrecision]], N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+111} \lor \neg \left(b - 0.5 \leq 10^{+99}\right):\\
\;\;\;\;a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + \left(y \cdot i + \log c \cdot -0.5\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -4.9999999999999997e111 or 9.9999999999999997e98 < (-.f64 b 1/2) Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 90.2%
Taylor expanded in t around 0 80.3%
associate-+r+80.3%
sub-neg80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in y around 0 66.5%
if -4.9999999999999997e111 < (-.f64 b 1/2) < 9.9999999999999997e98Initial program 99.3%
associate-+l+99.3%
associate-+l+99.3%
+-commutative99.3%
+-commutative99.3%
associate-+r+99.3%
associate-+l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
fma-def99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 79.8%
Taylor expanded in b around 0 78.0%
Taylor expanded in t around 0 63.4%
Final simplification64.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -6.6e+184)
(* (log (/ 1.0 y)) (- x))
(if (<= x 1.8e+287)
(+ (* y i) (+ a (+ t (+ z (* (- b 0.5) (log c))))))
(* x (log y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -6.6e+184) {
tmp = log((1.0 / y)) * -x;
} else if (x <= 1.8e+287) {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * log(c)))));
} else {
tmp = x * log(y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (x <= (-6.6d+184)) then
tmp = log((1.0d0 / y)) * -x
else if (x <= 1.8d+287) then
tmp = (y * i) + (a + (t + (z + ((b - 0.5d0) * log(c)))))
else
tmp = x * log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -6.6e+184) {
tmp = Math.log((1.0 / y)) * -x;
} else if (x <= 1.8e+287) {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * Math.log(c)))));
} else {
tmp = x * Math.log(y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -6.6e+184: tmp = math.log((1.0 / y)) * -x elif x <= 1.8e+287: tmp = (y * i) + (a + (t + (z + ((b - 0.5) * math.log(c))))) else: tmp = x * math.log(y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -6.6e+184) tmp = Float64(log(Float64(1.0 / y)) * Float64(-x)); elseif (x <= 1.8e+287) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(Float64(b - 0.5) * log(c)))))); else tmp = Float64(x * log(y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -6.6e+184) tmp = log((1.0 / y)) * -x; elseif (x <= 1.8e+287) tmp = (y * i) + (a + (t + (z + ((b - 0.5) * log(c))))); else tmp = x * log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -6.6e+184], N[(N[Log[N[(1.0 / y), $MachinePrecision]], $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[x, 1.8e+287], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{+184}:\\
\;\;\;\;\log \left(\frac{1}{y}\right) \cdot \left(-x\right)\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+287}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y\\
\end{array}
\end{array}
if x < -6.5999999999999996e184Initial program 96.8%
Taylor expanded in y around inf 96.8%
Taylor expanded in x around inf 60.7%
if -6.5999999999999996e184 < x < 1.7999999999999999e287Initial program 99.9%
Taylor expanded in x around 0 92.3%
if 1.7999999999999999e287 < x Initial program 100.0%
Taylor expanded in x around inf 100.0%
Final simplification88.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.25e+185)
(* (log (/ 1.0 y)) (- x))
(if (<= x 1.8e+287)
(+ a (+ z (+ (* y i) (* (- b 0.5) (log c)))))
(* x (log y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.25e+185) {
tmp = log((1.0 / y)) * -x;
} else if (x <= 1.8e+287) {
tmp = a + (z + ((y * i) + ((b - 0.5) * log(c))));
} else {
tmp = x * log(y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (x <= (-1.25d+185)) then
tmp = log((1.0d0 / y)) * -x
else if (x <= 1.8d+287) then
tmp = a + (z + ((y * i) + ((b - 0.5d0) * log(c))))
else
tmp = x * log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.25e+185) {
tmp = Math.log((1.0 / y)) * -x;
} else if (x <= 1.8e+287) {
tmp = a + (z + ((y * i) + ((b - 0.5) * Math.log(c))));
} else {
tmp = x * Math.log(y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -1.25e+185: tmp = math.log((1.0 / y)) * -x elif x <= 1.8e+287: tmp = a + (z + ((y * i) + ((b - 0.5) * math.log(c)))) else: tmp = x * math.log(y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.25e+185) tmp = Float64(log(Float64(1.0 / y)) * Float64(-x)); elseif (x <= 1.8e+287) tmp = Float64(a + Float64(z + Float64(Float64(y * i) + Float64(Float64(b - 0.5) * log(c))))); else tmp = Float64(x * log(y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -1.25e+185) tmp = log((1.0 / y)) * -x; elseif (x <= 1.8e+287) tmp = a + (z + ((y * i) + ((b - 0.5) * log(c)))); else tmp = x * log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.25e+185], N[(N[Log[N[(1.0 / y), $MachinePrecision]], $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[x, 1.8e+287], N[(a + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+185}:\\
\;\;\;\;\log \left(\frac{1}{y}\right) \cdot \left(-x\right)\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+287}:\\
\;\;\;\;a + \left(z + \left(y \cdot i + \left(b - 0.5\right) \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y\\
\end{array}
\end{array}
if x < -1.24999999999999997e185Initial program 96.8%
Taylor expanded in y around inf 96.8%
Taylor expanded in x around inf 60.7%
if -1.24999999999999997e185 < x < 1.7999999999999999e287Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 92.3%
Taylor expanded in t around 0 77.8%
if 1.7999999999999999e287 < x Initial program 100.0%
Taylor expanded in x around inf 100.0%
Final simplification75.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -6.2e+217) (not (<= b 1.15e+240))) (* b (log c)) (+ a (+ t (+ z (* (log c) -0.5))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -6.2e+217) || !(b <= 1.15e+240)) {
tmp = b * log(c);
} else {
tmp = a + (t + (z + (log(c) * -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 ((b <= (-6.2d+217)) .or. (.not. (b <= 1.15d+240))) then
tmp = b * log(c)
else
tmp = a + (t + (z + (log(c) * (-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 ((b <= -6.2e+217) || !(b <= 1.15e+240)) {
tmp = b * Math.log(c);
} else {
tmp = a + (t + (z + (Math.log(c) * -0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -6.2e+217) or not (b <= 1.15e+240): tmp = b * math.log(c) else: tmp = a + (t + (z + (math.log(c) * -0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -6.2e+217) || !(b <= 1.15e+240)) tmp = Float64(b * log(c)); else tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * -0.5)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -6.2e+217) || ~((b <= 1.15e+240))) tmp = b * log(c); else tmp = a + (t + (z + (log(c) * -0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -6.2e+217], N[Not[LessEqual[b, 1.15e+240]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+217} \lor \neg \left(b \leq 1.15 \cdot 10^{+240}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot -0.5\right)\right)\\
\end{array}
\end{array}
if b < -6.2000000000000003e217 or 1.15000000000000001e240 < b Initial program 99.5%
Taylor expanded in b around inf 73.0%
*-commutative73.0%
Simplified73.0%
if -6.2000000000000003e217 < b < 1.15000000000000001e240Initial program 99.4%
associate-+l+99.4%
associate-+l+99.4%
+-commutative99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
fma-def99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 81.2%
Taylor expanded in b around 0 74.9%
Taylor expanded in i around 0 51.1%
*-commutative51.1%
Simplified51.1%
Final simplification54.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x -1.25e+185) (* (log (/ 1.0 y)) (- x)) (if (<= x 2.7e+176) (+ a (+ z (* (- b 0.5) (log c)))) (* x (log y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.25e+185) {
tmp = log((1.0 / y)) * -x;
} else if (x <= 2.7e+176) {
tmp = a + (z + ((b - 0.5) * log(c)));
} else {
tmp = x * log(y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (x <= (-1.25d+185)) then
tmp = log((1.0d0 / y)) * -x
else if (x <= 2.7d+176) then
tmp = a + (z + ((b - 0.5d0) * log(c)))
else
tmp = x * log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.25e+185) {
tmp = Math.log((1.0 / y)) * -x;
} else if (x <= 2.7e+176) {
tmp = a + (z + ((b - 0.5) * Math.log(c)));
} else {
tmp = x * Math.log(y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -1.25e+185: tmp = math.log((1.0 / y)) * -x elif x <= 2.7e+176: tmp = a + (z + ((b - 0.5) * math.log(c))) else: tmp = x * math.log(y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.25e+185) tmp = Float64(log(Float64(1.0 / y)) * Float64(-x)); elseif (x <= 2.7e+176) tmp = Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c)))); else tmp = Float64(x * log(y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -1.25e+185) tmp = log((1.0 / y)) * -x; elseif (x <= 2.7e+176) tmp = a + (z + ((b - 0.5) * log(c))); else tmp = x * log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.25e+185], N[(N[Log[N[(1.0 / y), $MachinePrecision]], $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[x, 2.7e+176], N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+185}:\\
\;\;\;\;\log \left(\frac{1}{y}\right) \cdot \left(-x\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+176}:\\
\;\;\;\;a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y\\
\end{array}
\end{array}
if x < -1.24999999999999997e185Initial program 96.8%
Taylor expanded in y around inf 96.8%
Taylor expanded in x around inf 60.7%
if -1.24999999999999997e185 < x < 2.6999999999999998e176Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 95.4%
Taylor expanded in t around 0 80.7%
associate-+r+80.7%
sub-neg80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around 0 58.2%
if 2.6999999999999998e176 < x Initial program 99.7%
Taylor expanded in x around inf 57.3%
Final simplification58.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (* (log c) -0.5))))
(if (<= y 4.5e+67)
(+ a (+ z (* (- b 0.5) (log c))))
(if (<= y 3.4e+123) (+ a t_1) (+ z t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (log(c) * -0.5);
double tmp;
if (y <= 4.5e+67) {
tmp = a + (z + ((b - 0.5) * log(c)));
} else if (y <= 3.4e+123) {
tmp = a + t_1;
} 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 = (y * i) + (log(c) * (-0.5d0))
if (y <= 4.5d+67) then
tmp = a + (z + ((b - 0.5d0) * log(c)))
else if (y <= 3.4d+123) then
tmp = a + t_1
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 = (y * i) + (Math.log(c) * -0.5);
double tmp;
if (y <= 4.5e+67) {
tmp = a + (z + ((b - 0.5) * Math.log(c)));
} else if (y <= 3.4e+123) {
tmp = a + t_1;
} else {
tmp = z + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (math.log(c) * -0.5) tmp = 0 if y <= 4.5e+67: tmp = a + (z + ((b - 0.5) * math.log(c))) elif y <= 3.4e+123: tmp = a + t_1 else: tmp = z + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(log(c) * -0.5)) tmp = 0.0 if (y <= 4.5e+67) tmp = Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c)))); elseif (y <= 3.4e+123) tmp = Float64(a + t_1); else tmp = Float64(z + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (log(c) * -0.5); tmp = 0.0; if (y <= 4.5e+67) tmp = a + (z + ((b - 0.5) * log(c))); elseif (y <= 3.4e+123) tmp = a + t_1; 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[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4.5e+67], N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+123], N[(a + t$95$1), $MachinePrecision], N[(z + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + \log c \cdot -0.5\\
\mathbf{if}\;y \leq 4.5 \cdot 10^{+67}:\\
\;\;\;\;a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+123}:\\
\;\;\;\;a + t\_1\\
\mathbf{else}:\\
\;\;\;\;z + t\_1\\
\end{array}
\end{array}
if y < 4.4999999999999998e67Initial 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-def99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 80.3%
Taylor expanded in t around 0 66.1%
associate-+r+66.1%
sub-neg66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in y around 0 59.2%
if 4.4999999999999998e67 < y < 3.40000000000000001e123Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 92.0%
Taylor expanded in b around 0 85.3%
Taylor expanded in t around 0 74.4%
Taylor expanded in z around 0 63.2%
if 3.40000000000000001e123 < y Initial program 98.5%
associate-+l+98.5%
associate-+l+98.5%
+-commutative98.5%
+-commutative98.5%
associate-+r+98.5%
associate-+l+98.5%
+-commutative98.5%
associate-+l+98.5%
+-commutative98.5%
fma-def98.5%
+-commutative98.5%
fma-def98.5%
sub-neg98.5%
metadata-eval98.5%
+-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 86.8%
Taylor expanded in b around 0 80.9%
Taylor expanded in t around 0 70.9%
Taylor expanded in a around 0 56.7%
Final simplification58.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -2.6e+215) (not (<= b 1.2e+240))) (* b (log c)) (+ a (+ z (* (log c) -0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -2.6e+215) || !(b <= 1.2e+240)) {
tmp = b * log(c);
} else {
tmp = a + (z + (log(c) * -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 ((b <= (-2.6d+215)) .or. (.not. (b <= 1.2d+240))) then
tmp = b * log(c)
else
tmp = a + (z + (log(c) * (-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 ((b <= -2.6e+215) || !(b <= 1.2e+240)) {
tmp = b * Math.log(c);
} else {
tmp = a + (z + (Math.log(c) * -0.5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -2.6e+215) or not (b <= 1.2e+240): tmp = b * math.log(c) else: tmp = a + (z + (math.log(c) * -0.5)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -2.6e+215) || !(b <= 1.2e+240)) tmp = Float64(b * log(c)); else tmp = Float64(a + Float64(z + Float64(log(c) * -0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -2.6e+215) || ~((b <= 1.2e+240))) tmp = b * log(c); else tmp = a + (z + (log(c) * -0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -2.6e+215], N[Not[LessEqual[b, 1.2e+240]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+215} \lor \neg \left(b \leq 1.2 \cdot 10^{+240}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + \log c \cdot -0.5\right)\\
\end{array}
\end{array}
if b < -2.6e215 or 1.1999999999999999e240 < b Initial program 99.5%
Taylor expanded in b around inf 73.0%
*-commutative73.0%
Simplified73.0%
if -2.6e215 < b < 1.1999999999999999e240Initial program 99.4%
associate-+l+99.4%
associate-+l+99.4%
+-commutative99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
fma-def99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 81.2%
Taylor expanded in b around 0 74.9%
Taylor expanded in t around 0 59.8%
Taylor expanded in i around 0 36.4%
*-commutative36.4%
Simplified36.4%
Final simplification42.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.95e+67) (+ a (+ z (* (- b 0.5) (log c)))) (+ a (+ (* y i) (* (log c) -0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.95e+67) {
tmp = a + (z + ((b - 0.5) * log(c)));
} else {
tmp = a + ((y * i) + (log(c) * -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 (y <= 1.95d+67) then
tmp = a + (z + ((b - 0.5d0) * log(c)))
else
tmp = a + ((y * i) + (log(c) * (-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 (y <= 1.95e+67) {
tmp = a + (z + ((b - 0.5) * Math.log(c)));
} else {
tmp = a + ((y * i) + (Math.log(c) * -0.5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.95e+67: tmp = a + (z + ((b - 0.5) * math.log(c))) else: tmp = a + ((y * i) + (math.log(c) * -0.5)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.95e+67) tmp = Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c)))); else tmp = Float64(a + Float64(Float64(y * i) + Float64(log(c) * -0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 1.95e+67) tmp = a + (z + ((b - 0.5) * log(c))); else tmp = a + ((y * i) + (log(c) * -0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.95e+67], N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.95 \cdot 10^{+67}:\\
\;\;\;\;a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \log c \cdot -0.5\right)\\
\end{array}
\end{array}
if y < 1.95000000000000003e67Initial 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-def99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 80.3%
Taylor expanded in t around 0 66.1%
associate-+r+66.1%
sub-neg66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in y around 0 59.2%
if 1.95000000000000003e67 < y Initial program 98.9%
associate-+l+98.9%
associate-+l+98.9%
+-commutative98.9%
+-commutative98.9%
associate-+r+98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+l+98.9%
+-commutative98.9%
fma-def98.9%
+-commutative98.9%
fma-def98.9%
sub-neg98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
Taylor expanded in x around 0 88.2%
Taylor expanded in b around 0 82.1%
Taylor expanded in t around 0 71.8%
Taylor expanded in z around 0 63.7%
Final simplification60.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a -1.1e-241)
z
(if (<= a -8.5e-281)
(* y i)
(if (<= a 1.26e-33) z (if (<= a 5.8e+145) (* 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 <= -1.1e-241) {
tmp = z;
} else if (a <= -8.5e-281) {
tmp = y * i;
} else if (a <= 1.26e-33) {
tmp = z;
} else if (a <= 5.8e+145) {
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 <= (-1.1d-241)) then
tmp = z
else if (a <= (-8.5d-281)) then
tmp = y * i
else if (a <= 1.26d-33) then
tmp = z
else if (a <= 5.8d+145) 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 <= -1.1e-241) {
tmp = z;
} else if (a <= -8.5e-281) {
tmp = y * i;
} else if (a <= 1.26e-33) {
tmp = z;
} else if (a <= 5.8e+145) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -1.1e-241: tmp = z elif a <= -8.5e-281: tmp = y * i elif a <= 1.26e-33: tmp = z elif a <= 5.8e+145: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -1.1e-241) tmp = z; elseif (a <= -8.5e-281) tmp = Float64(y * i); elseif (a <= 1.26e-33) tmp = z; elseif (a <= 5.8e+145) 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 <= -1.1e-241) tmp = z; elseif (a <= -8.5e-281) tmp = y * i; elseif (a <= 1.26e-33) tmp = z; elseif (a <= 5.8e+145) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -1.1e-241], z, If[LessEqual[a, -8.5e-281], N[(y * i), $MachinePrecision], If[LessEqual[a, 1.26e-33], z, If[LessEqual[a, 5.8e+145], N[(y * i), $MachinePrecision], a]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-241}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-281}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 1.26 \cdot 10^{-33}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{+145}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.1e-241 or -8.4999999999999994e-281 < a < 1.26000000000000005e-33Initial program 99.3%
Taylor expanded in z around inf 15.1%
if -1.1e-241 < a < -8.4999999999999994e-281 or 1.26000000000000005e-33 < a < 5.8000000000000001e145Initial program 99.8%
Taylor expanded in y around inf 32.7%
*-commutative32.7%
Simplified32.7%
if 5.8000000000000001e145 < a Initial program 100.0%
Taylor expanded in a around inf 54.2%
Final simplification23.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.3e+110) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.3e+110) {
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 <= 4.3d+110) 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 <= 4.3e+110) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.3e+110: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.3e+110) 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 <= 4.3e+110) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.3e+110], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.3 \cdot 10^{+110}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.30000000000000007e110Initial program 99.4%
Taylor expanded in z around inf 14.8%
if 4.30000000000000007e110 < a Initial program 100.0%
Taylor expanded in a around inf 47.4%
Final simplification19.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.5%
Taylor expanded in a around inf 19.5%
Final simplification19.5%
herbie shell --seed 2024027
(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)))