
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+l+99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
associate-+l+99.4%
+-commutative99.4%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -2e+52) (not (<= (- b 0.5) 1e+142))) (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5)))))) (+ (* 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 tmp;
if (((b - 0.5) <= -2e+52) || !((b - 0.5) <= 1e+142)) {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
} 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) :: tmp
if (((b - 0.5d0) <= (-2d+52)) .or. (.not. ((b - 0.5d0) <= 1d+142))) then
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
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 tmp;
if (((b - 0.5) <= -2e+52) || !((b - 0.5) <= 1e+142)) {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
} 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): tmp = 0 if ((b - 0.5) <= -2e+52) or not ((b - 0.5) <= 1e+142): tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) 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) tmp = 0.0 if ((Float64(b - 0.5) <= -2e+52) || !(Float64(b - 0.5) <= 1e+142)) 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(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) tmp = 0.0; if (((b - 0.5) <= -2e+52) || ~(((b - 0.5) <= 1e+142))) tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); 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_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+52], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+142]], $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], 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}
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+52} \lor \neg \left(b - 0.5 \leq 10^{+142}\right):\\
\;\;\;\;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 + \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 b #s(literal 1/2 binary64)) < -2e52 or 1.00000000000000005e142 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.7%
Taylor expanded in x around 0 95.0%
if -2e52 < (-.f64 b #s(literal 1/2 binary64)) < 1.00000000000000005e142Initial program 99.4%
Taylor expanded in b around 0 98.6%
*-commutative98.6%
Simplified98.6%
Final simplification97.5%
(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.4%
Final simplification99.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (* x (+ (log y) (/ z x))))))
(if (<= x -1.8e+184)
t_1
(if (<= x 9.6e-151)
(+ a (+ t (+ z (* (log c) (- b 0.5)))))
(if (<= x 8.8e-82)
(+ (* y i) (+ a (+ t (* b (log c)))))
(if (<= x 2.4e+97) (+ (* y i) (+ a (+ z t))) 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) + (x * (log(y) + (z / x)));
double tmp;
if (x <= -1.8e+184) {
tmp = t_1;
} else if (x <= 9.6e-151) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else if (x <= 8.8e-82) {
tmp = (y * i) + (a + (t + (b * log(c))));
} else if (x <= 2.4e+97) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (y * i) + (x * (log(y) + (z / x)))
if (x <= (-1.8d+184)) then
tmp = t_1
else if (x <= 9.6d-151) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else if (x <= 8.8d-82) then
tmp = (y * i) + (a + (t + (b * log(c))))
else if (x <= 2.4d+97) then
tmp = (y * i) + (a + (z + t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (x * (Math.log(y) + (z / x)));
double tmp;
if (x <= -1.8e+184) {
tmp = t_1;
} else if (x <= 9.6e-151) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (x <= 8.8e-82) {
tmp = (y * i) + (a + (t + (b * Math.log(c))));
} else if (x <= 2.4e+97) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (x * (math.log(y) + (z / x))) tmp = 0 if x <= -1.8e+184: tmp = t_1 elif x <= 9.6e-151: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) elif x <= 8.8e-82: tmp = (y * i) + (a + (t + (b * math.log(c)))) elif x <= 2.4e+97: tmp = (y * i) + (a + (z + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(z / x)))) tmp = 0.0 if (x <= -1.8e+184) tmp = t_1; elseif (x <= 9.6e-151) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (x <= 8.8e-82) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(b * log(c))))); elseif (x <= 2.4e+97) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (x * (log(y) + (z / x))); tmp = 0.0; if (x <= -1.8e+184) tmp = t_1; elseif (x <= 9.6e-151) tmp = a + (t + (z + (log(c) * (b - 0.5)))); elseif (x <= 8.8e-82) tmp = (y * i) + (a + (t + (b * log(c)))); elseif (x <= 2.4e+97) tmp = (y * i) + (a + (z + t)); else tmp = 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[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e+184], t$95$1, If[LessEqual[x, 9.6e-151], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.8e-82], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e+97], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 9.6 \cdot 10^{-151}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-82}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + b \cdot \log c\right)\right)\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+97}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.80000000000000007e184 or 2.4e97 < x Initial program 98.3%
Taylor expanded in z around inf 62.8%
associate-/l*62.8%
sub-neg62.8%
metadata-eval62.8%
associate-/l*62.8%
Simplified62.8%
Taylor expanded in x around inf 59.3%
associate-*r/59.3%
Simplified59.3%
Taylor expanded in x around inf 79.2%
if -1.80000000000000007e184 < x < 9.6e-151Initial program 99.9%
Taylor expanded in x around 0 97.8%
Taylor expanded in y around 0 83.7%
if 9.6e-151 < x < 8.79999999999999943e-82Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in b around inf 89.9%
*-commutative89.9%
Simplified89.9%
if 8.79999999999999943e-82 < x < 2.4e97Initial program 99.9%
Taylor expanded in x around 0 93.6%
Taylor expanded in z around inf 76.4%
Final simplification81.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (* x (+ (log y) (/ z x))))))
(if (<= x -1.9e+184)
t_1
(if (<= x 1.7e-135)
(+ a (+ t (+ z (* (log c) (- b 0.5)))))
(if (<= x 3.3e+96) (+ (* y i) (+ a (+ z t))) 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) + (x * (log(y) + (z / x)));
double tmp;
if (x <= -1.9e+184) {
tmp = t_1;
} else if (x <= 1.7e-135) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else if (x <= 3.3e+96) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (y * i) + (x * (log(y) + (z / x)))
if (x <= (-1.9d+184)) then
tmp = t_1
else if (x <= 1.7d-135) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else if (x <= 3.3d+96) then
tmp = (y * i) + (a + (z + t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (x * (Math.log(y) + (z / x)));
double tmp;
if (x <= -1.9e+184) {
tmp = t_1;
} else if (x <= 1.7e-135) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (x <= 3.3e+96) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (x * (math.log(y) + (z / x))) tmp = 0 if x <= -1.9e+184: tmp = t_1 elif x <= 1.7e-135: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) elif x <= 3.3e+96: tmp = (y * i) + (a + (z + t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(z / x)))) tmp = 0.0 if (x <= -1.9e+184) tmp = t_1; elseif (x <= 1.7e-135) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (x <= 3.3e+96) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (x * (log(y) + (z / x))); tmp = 0.0; if (x <= -1.9e+184) tmp = t_1; elseif (x <= 1.7e-135) tmp = a + (t + (z + (log(c) * (b - 0.5)))); elseif (x <= 3.3e+96) tmp = (y * i) + (a + (z + t)); else tmp = 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[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e+184], t$95$1, If[LessEqual[x, 1.7e-135], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e+96], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-135}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+96}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.9000000000000001e184 or 3.29999999999999984e96 < x Initial program 98.3%
Taylor expanded in z around inf 62.8%
associate-/l*62.8%
sub-neg62.8%
metadata-eval62.8%
associate-/l*62.8%
Simplified62.8%
Taylor expanded in x around inf 59.3%
associate-*r/59.3%
Simplified59.3%
Taylor expanded in x around inf 79.2%
if -1.9000000000000001e184 < x < 1.69999999999999995e-135Initial program 99.9%
Taylor expanded in x around 0 97.8%
Taylor expanded in y around 0 83.4%
if 1.69999999999999995e-135 < x < 3.29999999999999984e96Initial program 99.9%
Taylor expanded in x around 0 95.2%
Taylor expanded in z around inf 74.0%
Final simplification80.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.15e+189) (not (<= x 5.2e+141))) (+ (* y i) (* x (+ (log y) (/ z x)))) (+ (* 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.15e+189) || !(x <= 5.2e+141)) {
tmp = (y * i) + (x * (log(y) + (z / x)));
} 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.15d+189)) .or. (.not. (x <= 5.2d+141))) then
tmp = (y * i) + (x * (log(y) + (z / x)))
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.15e+189) || !(x <= 5.2e+141)) {
tmp = (y * i) + (x * (Math.log(y) + (z / x)));
} 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.15e+189) or not (x <= 5.2e+141): tmp = (y * i) + (x * (math.log(y) + (z / x))) 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.15e+189) || !(x <= 5.2e+141)) tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(z / x)))); 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.15e+189) || ~((x <= 5.2e+141))) tmp = (y * i) + (x * (log(y) + (z / x))); 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.15e+189], N[Not[LessEqual[x, 5.2e+141]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $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.15 \cdot 10^{+189} \lor \neg \left(x \leq 5.2 \cdot 10^{+141}\right):\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{z}{x}\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.14999999999999999e189 or 5.1999999999999999e141 < x Initial program 98.2%
Taylor expanded in z around inf 64.5%
associate-/l*64.4%
sub-neg64.4%
metadata-eval64.4%
associate-/l*64.4%
Simplified64.4%
Taylor expanded in x around inf 60.5%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in x around inf 82.9%
if -2.14999999999999999e189 < x < 5.1999999999999999e141Initial program 99.9%
Taylor expanded in x around 0 96.0%
Final simplification92.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -3.6e+185)
(* x (+ (log y) (* i (/ y x))))
(if (<= x 1.4e-135)
(+ a (+ t (+ z (* (log c) (- b 0.5)))))
(if (<= x 3.8e+80)
(+ (* y i) (+ a (+ z t)))
(+ a (+ t (+ z (* 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 <= -3.6e+185) {
tmp = x * (log(y) + (i * (y / x)));
} else if (x <= 1.4e-135) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else if (x <= 3.8e+80) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + (t + (z + (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 <= (-3.6d+185)) then
tmp = x * (log(y) + (i * (y / x)))
else if (x <= 1.4d-135) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else if (x <= 3.8d+80) then
tmp = (y * i) + (a + (z + t))
else
tmp = a + (t + (z + (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 <= -3.6e+185) {
tmp = x * (Math.log(y) + (i * (y / x)));
} else if (x <= 1.4e-135) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (x <= 3.8e+80) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + (t + (z + (x * Math.log(y))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -3.6e+185: tmp = x * (math.log(y) + (i * (y / x))) elif x <= 1.4e-135: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) elif x <= 3.8e+80: tmp = (y * i) + (a + (z + t)) else: tmp = a + (t + (z + (x * math.log(y)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -3.6e+185) tmp = Float64(x * Float64(log(y) + Float64(i * Float64(y / x)))); elseif (x <= 1.4e-135) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (x <= 3.8e+80) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(a + Float64(t + Float64(z + 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 <= -3.6e+185) tmp = x * (log(y) + (i * (y / x))); elseif (x <= 1.4e-135) tmp = a + (t + (z + (log(c) * (b - 0.5)))); elseif (x <= 3.8e+80) tmp = (y * i) + (a + (z + t)); else tmp = a + (t + (z + (x * log(y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -3.6e+185], N[(x * N[(N[Log[y], $MachinePrecision] + N[(i * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-135], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+80], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+185}:\\
\;\;\;\;x \cdot \left(\log y + i \cdot \frac{y}{x}\right)\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-135}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+80}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if x < -3.60000000000000029e185Initial program 96.7%
Taylor expanded in z around inf 60.2%
associate-/l*60.0%
sub-neg60.0%
metadata-eval60.0%
associate-/l*60.0%
Simplified60.0%
Taylor expanded in b around 0 60.0%
associate-*r/60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in x around inf 79.7%
Taylor expanded in x around inf 79.6%
associate-/l*82.7%
Simplified82.7%
if -3.60000000000000029e185 < x < 1.40000000000000012e-135Initial program 99.9%
Taylor expanded in x around 0 97.8%
Taylor expanded in y around 0 83.4%
if 1.40000000000000012e-135 < x < 3.79999999999999997e80Initial program 99.9%
Taylor expanded in x around 0 96.6%
Taylor expanded in z around inf 75.7%
if 3.79999999999999997e80 < x Initial program 99.6%
Taylor expanded in y around 0 83.9%
Taylor expanded in x around inf 73.7%
Final simplification80.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -4.6e+184)
(* x (+ (log y) (* i (/ y x))))
(if (<= x 6.2e-137)
(+ a (+ t (+ z (* b (log c)))))
(if (<= x 4.2e+80)
(+ (* y i) (+ a (+ z t)))
(+ a (+ t (+ z (* 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 <= -4.6e+184) {
tmp = x * (log(y) + (i * (y / x)));
} else if (x <= 6.2e-137) {
tmp = a + (t + (z + (b * log(c))));
} else if (x <= 4.2e+80) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + (t + (z + (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 <= (-4.6d+184)) then
tmp = x * (log(y) + (i * (y / x)))
else if (x <= 6.2d-137) then
tmp = a + (t + (z + (b * log(c))))
else if (x <= 4.2d+80) then
tmp = (y * i) + (a + (z + t))
else
tmp = a + (t + (z + (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 <= -4.6e+184) {
tmp = x * (Math.log(y) + (i * (y / x)));
} else if (x <= 6.2e-137) {
tmp = a + (t + (z + (b * Math.log(c))));
} else if (x <= 4.2e+80) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + (t + (z + (x * Math.log(y))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -4.6e+184: tmp = x * (math.log(y) + (i * (y / x))) elif x <= 6.2e-137: tmp = a + (t + (z + (b * math.log(c)))) elif x <= 4.2e+80: tmp = (y * i) + (a + (z + t)) else: tmp = a + (t + (z + (x * math.log(y)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -4.6e+184) tmp = Float64(x * Float64(log(y) + Float64(i * Float64(y / x)))); elseif (x <= 6.2e-137) tmp = Float64(a + Float64(t + Float64(z + Float64(b * log(c))))); elseif (x <= 4.2e+80) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(a + Float64(t + Float64(z + 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 <= -4.6e+184) tmp = x * (log(y) + (i * (y / x))); elseif (x <= 6.2e-137) tmp = a + (t + (z + (b * log(c)))); elseif (x <= 4.2e+80) tmp = (y * i) + (a + (z + t)); else tmp = a + (t + (z + (x * log(y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -4.6e+184], N[(x * N[(N[Log[y], $MachinePrecision] + N[(i * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e-137], N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e+80], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+184}:\\
\;\;\;\;x \cdot \left(\log y + i \cdot \frac{y}{x}\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-137}:\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+80}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if x < -4.6e184Initial program 96.7%
Taylor expanded in z around inf 60.2%
associate-/l*60.0%
sub-neg60.0%
metadata-eval60.0%
associate-/l*60.0%
Simplified60.0%
Taylor expanded in b around 0 60.0%
associate-*r/60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in x around inf 79.7%
Taylor expanded in x around inf 79.6%
associate-/l*82.7%
Simplified82.7%
if -4.6e184 < x < 6.19999999999999955e-137Initial program 99.9%
Taylor expanded in y around 0 85.0%
Taylor expanded in b around inf 81.5%
*-commutative81.5%
Simplified81.5%
if 6.19999999999999955e-137 < x < 4.20000000000000003e80Initial program 99.9%
Taylor expanded in x around 0 96.6%
Taylor expanded in z around inf 75.7%
if 4.20000000000000003e80 < x Initial program 99.6%
Taylor expanded in y around 0 83.9%
Taylor expanded in x around inf 73.7%
Final simplification79.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.5e+189) (not (<= x 2.45e+145))) (* x (+ (log y) (* i (/ y x)))) (+ (* y i) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.5e+189) || !(x <= 2.45e+145)) {
tmp = x * (log(y) + (i * (y / x)));
} else {
tmp = (y * i) + (a + (z + t));
}
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.5d+189)) .or. (.not. (x <= 2.45d+145))) then
tmp = x * (log(y) + (i * (y / x)))
else
tmp = (y * i) + (a + (z + t))
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.5e+189) || !(x <= 2.45e+145)) {
tmp = x * (Math.log(y) + (i * (y / x)));
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.5e+189) or not (x <= 2.45e+145): tmp = x * (math.log(y) + (i * (y / x))) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.5e+189) || !(x <= 2.45e+145)) tmp = Float64(x * Float64(log(y) + Float64(i * Float64(y / x)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.5e+189) || ~((x <= 2.45e+145))) tmp = x * (log(y) + (i * (y / x))); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.5e+189], N[Not[LessEqual[x, 2.45e+145]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(i * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+189} \lor \neg \left(x \leq 2.45 \cdot 10^{+145}\right):\\
\;\;\;\;x \cdot \left(\log y + i \cdot \frac{y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if x < -1.4999999999999999e189 or 2.45000000000000001e145 < x Initial program 98.1%
Taylor expanded in z around inf 63.3%
associate-/l*63.2%
sub-neg63.2%
metadata-eval63.2%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in b around 0 63.2%
associate-*r/63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in x around inf 80.2%
Taylor expanded in x around inf 80.2%
associate-/l*81.8%
Simplified81.8%
if -1.4999999999999999e189 < x < 2.45000000000000001e145Initial program 99.9%
Taylor expanded in x around 0 95.9%
Taylor expanded in z around inf 73.7%
Final simplification75.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -4.8e+186)
(* x (+ (log y) (* i (/ y x))))
(if (<= x 9.8e+79)
(+ (* y i) (+ a (+ z t)))
(+ a (+ t (+ z (* 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 <= -4.8e+186) {
tmp = x * (log(y) + (i * (y / x)));
} else if (x <= 9.8e+79) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + (t + (z + (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 <= (-4.8d+186)) then
tmp = x * (log(y) + (i * (y / x)))
else if (x <= 9.8d+79) then
tmp = (y * i) + (a + (z + t))
else
tmp = a + (t + (z + (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 <= -4.8e+186) {
tmp = x * (Math.log(y) + (i * (y / x)));
} else if (x <= 9.8e+79) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = a + (t + (z + (x * Math.log(y))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -4.8e+186: tmp = x * (math.log(y) + (i * (y / x))) elif x <= 9.8e+79: tmp = (y * i) + (a + (z + t)) else: tmp = a + (t + (z + (x * math.log(y)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -4.8e+186) tmp = Float64(x * Float64(log(y) + Float64(i * Float64(y / x)))); elseif (x <= 9.8e+79) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(a + Float64(t + Float64(z + 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 <= -4.8e+186) tmp = x * (log(y) + (i * (y / x))); elseif (x <= 9.8e+79) tmp = (y * i) + (a + (z + t)); else tmp = a + (t + (z + (x * log(y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -4.8e+186], N[(x * N[(N[Log[y], $MachinePrecision] + N[(i * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e+79], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+186}:\\
\;\;\;\;x \cdot \left(\log y + i \cdot \frac{y}{x}\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+79}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if x < -4.7999999999999999e186Initial program 96.7%
Taylor expanded in z around inf 60.2%
associate-/l*60.0%
sub-neg60.0%
metadata-eval60.0%
associate-/l*60.0%
Simplified60.0%
Taylor expanded in b around 0 60.0%
associate-*r/60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in x around inf 79.7%
Taylor expanded in x around inf 79.6%
associate-/l*82.7%
Simplified82.7%
if -4.7999999999999999e186 < x < 9.7999999999999997e79Initial program 99.9%
Taylor expanded in x around 0 97.4%
Taylor expanded in z around inf 75.9%
if 9.7999999999999997e79 < x Initial program 99.6%
Taylor expanded in y around 0 83.9%
Taylor expanded in x around inf 73.7%
Final simplification76.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.5e+189) (not (<= x 2.45e+145))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.5e+189) || !(x <= 2.45e+145)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (z + t));
}
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.5d+189)) .or. (.not. (x <= 2.45d+145))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (a + (z + t))
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.5e+189) || !(x <= 2.45e+145)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.5e+189) or not (x <= 2.45e+145): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.5e+189) || !(x <= 2.45e+145)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.5e+189) || ~((x <= 2.45e+145))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.5e+189], N[Not[LessEqual[x, 2.45e+145]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+189} \lor \neg \left(x \leq 2.45 \cdot 10^{+145}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if x < -2.5000000000000002e189 or 2.45000000000000001e145 < x Initial program 98.1%
Taylor expanded in z around inf 63.3%
associate-/l*63.2%
sub-neg63.2%
metadata-eval63.2%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in b around 0 63.2%
associate-*r/63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in x around inf 80.2%
if -2.5000000000000002e189 < x < 2.45000000000000001e145Initial program 99.9%
Taylor expanded in x around 0 95.9%
Taylor expanded in z around inf 73.7%
Final simplification75.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -7.5e+237) (not (<= x 9e+187))) (* x (log y)) (+ (* y i) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -7.5e+237) || !(x <= 9e+187)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (a + (z + t));
}
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 <= (-7.5d+237)) .or. (.not. (x <= 9d+187))) then
tmp = x * log(y)
else
tmp = (y * i) + (a + (z + t))
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 <= -7.5e+237) || !(x <= 9e+187)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -7.5e+237) or not (x <= 9e+187): tmp = x * math.log(y) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -7.5e+237) || !(x <= 9e+187)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -7.5e+237) || ~((x <= 9e+187))) tmp = x * log(y); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -7.5e+237], N[Not[LessEqual[x, 9e+187]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+237} \lor \neg \left(x \leq 9 \cdot 10^{+187}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if x < -7.5e237 or 9.00000000000000052e187 < x Initial program 97.0%
Taylor expanded in x around inf 68.8%
if -7.5e237 < x < 9.00000000000000052e187Initial program 99.8%
Taylor expanded in x around 0 91.9%
Taylor expanded in z around inf 72.0%
Final simplification71.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a -1.8e-237) z (if (<= a 5.8e-144) (* y i) (if (<= a 4e+146) z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -1.8e-237) {
tmp = z;
} else if (a <= 5.8e-144) {
tmp = y * i;
} else if (a <= 4e+146) {
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 <= (-1.8d-237)) then
tmp = z
else if (a <= 5.8d-144) then
tmp = y * i
else if (a <= 4d+146) 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 <= -1.8e-237) {
tmp = z;
} else if (a <= 5.8e-144) {
tmp = y * i;
} else if (a <= 4e+146) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -1.8e-237: tmp = z elif a <= 5.8e-144: tmp = y * i elif a <= 4e+146: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -1.8e-237) tmp = z; elseif (a <= 5.8e-144) tmp = Float64(y * i); elseif (a <= 4e+146) 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 <= -1.8e-237) tmp = z; elseif (a <= 5.8e-144) tmp = y * i; elseif (a <= 4e+146) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -1.8e-237], z, If[LessEqual[a, 5.8e-144], N[(y * i), $MachinePrecision], If[LessEqual[a, 4e+146], z, a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-237}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-144}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 4 \cdot 10^{+146}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.79999999999999998e-237 or 5.8000000000000004e-144 < a < 3.99999999999999973e146Initial program 99.2%
Taylor expanded in z around inf 20.7%
if -1.79999999999999998e-237 < a < 5.8000000000000004e-144Initial program 99.9%
Taylor expanded in y around inf 31.9%
*-commutative31.9%
Simplified31.9%
if 3.99999999999999973e146 < a Initial program 99.9%
Taylor expanded in a around inf 35.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.25e+145) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.25e+145) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 2.25d+145) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.25e+145) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.25e+145: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.25e+145) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.25e+145) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.25e+145], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.25 \cdot 10^{+145}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 2.2499999999999999e145Initial program 99.4%
Taylor expanded in z around inf 69.6%
associate-/l*69.6%
sub-neg69.6%
metadata-eval69.6%
associate-/l*69.6%
Simplified69.6%
Taylor expanded in x around inf 49.4%
associate-*r/48.9%
Simplified48.9%
Taylor expanded in x around 0 39.8%
*-commutative39.8%
Simplified39.8%
if 2.2499999999999999e145 < a Initial program 99.9%
Taylor expanded in x around 0 86.6%
Taylor expanded in a around inf 56.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2e+188) z (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2e+188) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2d+188)) then
tmp = z
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2e+188) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2e+188: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2e+188) tmp = z; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2e+188) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2e+188], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+188}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2e188Initial program 100.0%
Taylor expanded in z around inf 69.8%
if -2e188 < z Initial program 99.4%
Taylor expanded in x around 0 81.7%
Taylor expanded in a around inf 38.3%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ a (+ z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (a + (z + t));
}
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 + (z + t))
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 + (z + t));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (a + (z + t))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(a + Float64(z + t))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (a + (z + t)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(a + \left(z + t\right)\right)
\end{array}
Initial program 99.4%
Taylor expanded in x around 0 82.8%
Taylor expanded in z around inf 65.0%
Final simplification65.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.2e+145) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.2e+145) {
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 <= 3.2d+145) 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 <= 3.2e+145) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.2e+145: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.2e+145) 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 <= 3.2e+145) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.2e+145], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.2 \cdot 10^{+145}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 3.20000000000000008e145Initial program 99.4%
Taylor expanded in z around inf 19.2%
if 3.20000000000000008e145 < a Initial program 99.9%
Taylor expanded in a around inf 35.2%
(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.4%
Taylor expanded in a around inf 16.2%
herbie shell --seed 2024108
(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)))