
(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 (fma y i (fma (- b 0.5) (log c) (+ (fma x (log y) (+ z 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), (fma(x, log(y), (z + t)) + a)));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b - 0.5), log(c), Float64(fma(x, log(y), Float64(z + 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[(N[(x * N[Log[y], $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(x, \log y, z + t\right) + a\right)\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (- 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 ((a + (t + (z + (x * log(y))))) + ((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 = ((a + (t + (z + (x * log(y))))) + ((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 ((a + (t + (z + (x * Math.log(y))))) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + ((b - 0.5) * math.log(c))) + (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(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + ((b - 0.5) * log(c))) + (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[(b - 0.5), $MachinePrecision] * N[Log[c], $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) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -1.2e+50) (not (<= i 4.5e-63))) (+ (* y i) (+ (* b (log c)) (+ a (+ z t)))) (+ (* (- b 0.5) (log c)) (+ a (+ 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 ((i <= -1.2e+50) || !(i <= 4.5e-63)) {
tmp = (y * i) + ((b * log(c)) + (a + (z + t)));
} else {
tmp = ((b - 0.5) * log(c)) + (a + (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 ((i <= (-1.2d+50)) .or. (.not. (i <= 4.5d-63))) then
tmp = (y * i) + ((b * log(c)) + (a + (z + t)))
else
tmp = ((b - 0.5d0) * log(c)) + (a + (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 ((i <= -1.2e+50) || !(i <= 4.5e-63)) {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
} else {
tmp = ((b - 0.5) * Math.log(c)) + (a + (z + (x * Math.log(y))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -1.2e+50) or not (i <= 4.5e-63): tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) else: tmp = ((b - 0.5) * math.log(c)) + (a + (z + (x * math.log(y)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -1.2e+50) || !(i <= 4.5e-63)) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(z + t)))); else tmp = Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(a + 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 ((i <= -1.2e+50) || ~((i <= 4.5e-63))) tmp = (y * i) + ((b * log(c)) + (a + (z + t))); else tmp = ((b - 0.5) * log(c)) + (a + (z + (x * log(y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -1.2e+50], N[Not[LessEqual[i, 4.5e-63]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.2 \cdot 10^{+50} \lor \neg \left(i \leq 4.5 \cdot 10^{-63}\right):\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if i < -1.2000000000000001e50 or 4.5e-63 < i Initial program 99.9%
Taylor expanded in x around 0 91.0%
Taylor expanded in b around inf 91.0%
if -1.2000000000000001e50 < i < 4.5e-63Initial program 99.9%
Taylor expanded in t around 0 81.5%
Taylor expanded in y around 0 80.8%
Final simplification86.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= i -1.15e+50)
(+ (* y i) (+ (* b (log c)) (+ a (+ z t))))
(if (<= i 2e-64)
(+ t_1 (+ a (+ z (* x (log y)))))
(fma y i (+ a (+ t_1 (+ z t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * log(c);
double tmp;
if (i <= -1.15e+50) {
tmp = (y * i) + ((b * log(c)) + (a + (z + t)));
} else if (i <= 2e-64) {
tmp = t_1 + (a + (z + (x * log(y))));
} else {
tmp = fma(y, i, (a + (t_1 + (z + t))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (i <= -1.15e+50) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(z + t)))); elseif (i <= 2e-64) tmp = Float64(t_1 + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = fma(y, i, Float64(a + Float64(t_1 + Float64(z + t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.15e+50], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2e-64], N[(t$95$1 + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t$95$1 + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;i \leq -1.15 \cdot 10^{+50}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{elif}\;i \leq 2 \cdot 10^{-64}:\\
\;\;\;\;t_1 + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t_1 + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if i < -1.14999999999999998e50Initial program 99.9%
Taylor expanded in x around 0 92.4%
Taylor expanded in b around inf 92.4%
if -1.14999999999999998e50 < i < 1.99999999999999993e-64Initial program 99.9%
Taylor expanded in t around 0 81.5%
Taylor expanded in y around 0 80.8%
if 1.99999999999999993e-64 < i Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 90.1%
Final simplification86.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* (- b 0.5) (log c)) (+ a (+ z (* x (log y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (((b - 0.5) * log(c)) + (a + (z + (x * log(y)))));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + (((b - 0.5d0) * log(c)) + (a + (z + (x * log(y)))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (((b - 0.5) * Math.log(c)) + (a + (z + (x * Math.log(y)))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (((b - 0.5) * math.log(c)) + (a + (z + (x * math.log(y)))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(a + Float64(z + Float64(x * log(y)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (((b - 0.5) * log(c)) + (a + (z + (x * log(y))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + x \cdot \log y\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in t around 0 84.4%
Final simplification84.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -7.5e+202) (not (<= x 8.2e+211))) (+ (+ a (+ z (* x (log y)))) (* b (log c))) (+ (* y i) (+ (* (- b 0.5) (log c)) (+ 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+202) || !(x <= 8.2e+211)) {
tmp = (a + (z + (x * log(y)))) + (b * log(c));
} else {
tmp = (y * i) + (((b - 0.5) * log(c)) + (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+202)) .or. (.not. (x <= 8.2d+211))) then
tmp = (a + (z + (x * log(y)))) + (b * log(c))
else
tmp = (y * i) + (((b - 0.5d0) * log(c)) + (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+202) || !(x <= 8.2e+211)) {
tmp = (a + (z + (x * Math.log(y)))) + (b * Math.log(c));
} else {
tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -7.5e+202) or not (x <= 8.2e+211): tmp = (a + (z + (x * math.log(y)))) + (b * math.log(c)) else: tmp = (y * i) + (((b - 0.5) * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -7.5e+202) || !(x <= 8.2e+211)) tmp = Float64(Float64(a + Float64(z + Float64(x * log(y)))) + Float64(b * log(c))); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + 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+202) || ~((x <= 8.2e+211))) tmp = (a + (z + (x * log(y)))) + (b * log(c)); else tmp = (y * i) + (((b - 0.5) * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -7.5e+202], N[Not[LessEqual[x, 8.2e+211]], $MachinePrecision]], N[(N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+202} \lor \neg \left(x \leq 8.2 \cdot 10^{+211}\right):\\
\;\;\;\;\left(a + \left(z + x \cdot \log y\right)\right) + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -7.4999999999999999e202 or 8.1999999999999998e211 < x Initial program 99.7%
Taylor expanded in t around 0 97.2%
Taylor expanded in y around 0 90.4%
Taylor expanded in b around inf 90.4%
if -7.4999999999999999e202 < x < 8.1999999999999998e211Initial program 99.9%
Taylor expanded in x around 0 94.5%
Final simplification94.0%
(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 -1.45e+222)
(+ t_2 t_1)
(if (<= x 2.8e+218) (+ (* y i) (+ t_2 (+ a (+ z t)))) (+ a (+ z t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = (b - 0.5) * log(c);
double tmp;
if (x <= -1.45e+222) {
tmp = t_2 + t_1;
} else if (x <= 2.8e+218) {
tmp = (y * i) + (t_2 + (a + (z + t)));
} else {
tmp = a + (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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = (b - 0.5d0) * log(c)
if (x <= (-1.45d+222)) then
tmp = t_2 + t_1
else if (x <= 2.8d+218) then
tmp = (y * i) + (t_2 + (a + (z + t)))
else
tmp = a + (z + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double t_2 = (b - 0.5) * Math.log(c);
double tmp;
if (x <= -1.45e+222) {
tmp = t_2 + t_1;
} else if (x <= 2.8e+218) {
tmp = (y * i) + (t_2 + (a + (z + t)));
} else {
tmp = a + (z + t_1);
}
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 <= -1.45e+222: tmp = t_2 + t_1 elif x <= 2.8e+218: tmp = (y * i) + (t_2 + (a + (z + t))) else: tmp = a + (z + t_1) 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 <= -1.45e+222) tmp = Float64(t_2 + t_1); elseif (x <= 2.8e+218) tmp = Float64(Float64(y * i) + Float64(t_2 + Float64(a + Float64(z + t)))); else tmp = Float64(a + Float64(z + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = (b - 0.5) * log(c); tmp = 0.0; if (x <= -1.45e+222) tmp = t_2 + t_1; elseif (x <= 2.8e+218) tmp = (y * i) + (t_2 + (a + (z + t))); else tmp = a + (z + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e+222], N[(t$95$2 + t$95$1), $MachinePrecision], If[LessEqual[x, 2.8e+218], N[(N[(y * i), $MachinePrecision] + N[(t$95$2 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + t$95$1), $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 -1.45 \cdot 10^{+222}:\\
\;\;\;\;t_2 + t_1\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+218}:\\
\;\;\;\;y \cdot i + \left(t_2 + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + t_1\right)\\
\end{array}
\end{array}
if x < -1.44999999999999991e222Initial program 99.7%
Taylor expanded in t around 0 93.5%
Taylor expanded in y around 0 83.5%
Taylor expanded in a around 0 83.5%
Taylor expanded in x around inf 82.3%
if -1.44999999999999991e222 < x < 2.7999999999999998e218Initial program 99.9%
Taylor expanded in x around 0 94.5%
if 2.7999999999999998e218 < x Initial program 99.8%
Taylor expanded in t around 0 99.8%
Taylor expanded in y around 0 95.3%
Taylor expanded in b around inf 95.3%
Taylor expanded in b around 0 90.3%
Final simplification93.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z (* b (log c)))))
(t_2 (fma y i (+ z a)))
(t_3 (+ a (+ z (* x (log y))))))
(if (<= i -4e+59)
t_2
(if (<= i -4.7e-182)
t_1
(if (<= i 1.45e-302)
t_3
(if (<= i 3.4e-195)
t_1
(if (<= i 9e-90) t_3 (if (<= i 0.00012) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (z + (b * log(c)));
double t_2 = fma(y, i, (z + a));
double t_3 = a + (z + (x * log(y)));
double tmp;
if (i <= -4e+59) {
tmp = t_2;
} else if (i <= -4.7e-182) {
tmp = t_1;
} else if (i <= 1.45e-302) {
tmp = t_3;
} else if (i <= 3.4e-195) {
tmp = t_1;
} else if (i <= 9e-90) {
tmp = t_3;
} else if (i <= 0.00012) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(z + Float64(b * log(c)))) t_2 = fma(y, i, Float64(z + a)) t_3 = Float64(a + Float64(z + Float64(x * log(y)))) tmp = 0.0 if (i <= -4e+59) tmp = t_2; elseif (i <= -4.7e-182) tmp = t_1; elseif (i <= 1.45e-302) tmp = t_3; elseif (i <= 3.4e-195) tmp = t_1; elseif (i <= 9e-90) tmp = t_3; elseif (i <= 0.00012) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -4e+59], t$95$2, If[LessEqual[i, -4.7e-182], t$95$1, If[LessEqual[i, 1.45e-302], t$95$3, If[LessEqual[i, 3.4e-195], t$95$1, If[LessEqual[i, 9e-90], t$95$3, If[LessEqual[i, 0.00012], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z + b \cdot \log c\right)\\
t_2 := \mathsf{fma}\left(y, i, z + a\right)\\
t_3 := a + \left(z + x \cdot \log y\right)\\
\mathbf{if}\;i \leq -4 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq -4.7 \cdot 10^{-182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.45 \cdot 10^{-302}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 3.4 \cdot 10^{-195}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 9 \cdot 10^{-90}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 0.00012:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if i < -3.99999999999999989e59 or 1.20000000000000003e-4 < i Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 90.5%
Taylor expanded in z around inf 70.9%
if -3.99999999999999989e59 < i < -4.7e-182 or 1.44999999999999997e-302 < i < 3.40000000000000001e-195 or 9.00000000000000017e-90 < i < 1.20000000000000003e-4Initial program 99.9%
Taylor expanded in t around 0 81.9%
Taylor expanded in y around 0 78.0%
Taylor expanded in b around inf 76.4%
Taylor expanded in x around 0 66.2%
if -4.7e-182 < i < 1.44999999999999997e-302 or 3.40000000000000001e-195 < i < 9.00000000000000017e-90Initial program 99.8%
Taylor expanded in t around 0 82.6%
Taylor expanded in y around 0 82.6%
Taylor expanded in b around inf 78.8%
Taylor expanded in b around 0 77.2%
Final simplification70.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c)))
(t_2 (+ a (+ z t_1)))
(t_3 (fma y i (+ z a)))
(t_4 (+ a (+ z (* x (log y))))))
(if (<= i -6.2e+59)
t_3
(if (<= i -3.5e-183)
t_2
(if (<= i 5.1e-304)
t_4
(if (<= i 5.5e-195)
(+ t_1 (+ a (+ z t)))
(if (<= i 5.5e-90) t_4 (if (<= i 0.000125) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double t_2 = a + (z + t_1);
double t_3 = fma(y, i, (z + a));
double t_4 = a + (z + (x * log(y)));
double tmp;
if (i <= -6.2e+59) {
tmp = t_3;
} else if (i <= -3.5e-183) {
tmp = t_2;
} else if (i <= 5.1e-304) {
tmp = t_4;
} else if (i <= 5.5e-195) {
tmp = t_1 + (a + (z + t));
} else if (i <= 5.5e-90) {
tmp = t_4;
} else if (i <= 0.000125) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) t_2 = Float64(a + Float64(z + t_1)) t_3 = fma(y, i, Float64(z + a)) t_4 = Float64(a + Float64(z + Float64(x * log(y)))) tmp = 0.0 if (i <= -6.2e+59) tmp = t_3; elseif (i <= -3.5e-183) tmp = t_2; elseif (i <= 5.1e-304) tmp = t_4; elseif (i <= 5.5e-195) tmp = Float64(t_1 + Float64(a + Float64(z + t))); elseif (i <= 5.5e-90) tmp = t_4; elseif (i <= 0.000125) tmp = t_2; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -6.2e+59], t$95$3, If[LessEqual[i, -3.5e-183], t$95$2, If[LessEqual[i, 5.1e-304], t$95$4, If[LessEqual[i, 5.5e-195], N[(t$95$1 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5.5e-90], t$95$4, If[LessEqual[i, 0.000125], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := a + \left(z + t_1\right)\\
t_3 := \mathsf{fma}\left(y, i, z + a\right)\\
t_4 := a + \left(z + x \cdot \log y\right)\\
\mathbf{if}\;i \leq -6.2 \cdot 10^{+59}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq -3.5 \cdot 10^{-183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 5.1 \cdot 10^{-304}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;i \leq 5.5 \cdot 10^{-195}:\\
\;\;\;\;t_1 + \left(a + \left(z + t\right)\right)\\
\mathbf{elif}\;i \leq 5.5 \cdot 10^{-90}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;i \leq 0.000125:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if i < -6.20000000000000029e59 or 1.25e-4 < i Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 90.5%
Taylor expanded in z around inf 70.9%
if -6.20000000000000029e59 < i < -3.49999999999999991e-183 or 5.5000000000000003e-90 < i < 1.25e-4Initial program 99.9%
Taylor expanded in t around 0 79.7%
Taylor expanded in y around 0 74.7%
Taylor expanded in b around inf 74.7%
Taylor expanded in x around 0 64.0%
if -3.49999999999999991e-183 < i < 5.09999999999999979e-304 or 5.5000000000000003e-195 < i < 5.5000000000000003e-90Initial program 99.8%
Taylor expanded in t around 0 82.6%
Taylor expanded in y around 0 82.6%
Taylor expanded in b around inf 78.8%
Taylor expanded in b around 0 77.2%
if 5.09999999999999979e-304 < i < 5.5000000000000003e-195Initial program 99.9%
Taylor expanded in x around 0 91.2%
Taylor expanded in y around 0 91.2%
Taylor expanded in b around inf 82.3%
Final simplification70.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z (* b (log c)))))
(t_2 (fma y i (+ z a)))
(t_3 (+ a (+ z (* x (log y))))))
(if (<= i -6.2e+59)
t_2
(if (<= i -6.5e-182)
t_1
(if (<= i 4.5e-304)
t_3
(if (<= i 2.8e-195)
(+ (* (- b 0.5) (log c)) (+ z a))
(if (<= i 1.5e-88) t_3 (if (<= i 0.00014) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (z + (b * log(c)));
double t_2 = fma(y, i, (z + a));
double t_3 = a + (z + (x * log(y)));
double tmp;
if (i <= -6.2e+59) {
tmp = t_2;
} else if (i <= -6.5e-182) {
tmp = t_1;
} else if (i <= 4.5e-304) {
tmp = t_3;
} else if (i <= 2.8e-195) {
tmp = ((b - 0.5) * log(c)) + (z + a);
} else if (i <= 1.5e-88) {
tmp = t_3;
} else if (i <= 0.00014) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(z + Float64(b * log(c)))) t_2 = fma(y, i, Float64(z + a)) t_3 = Float64(a + Float64(z + Float64(x * log(y)))) tmp = 0.0 if (i <= -6.2e+59) tmp = t_2; elseif (i <= -6.5e-182) tmp = t_1; elseif (i <= 4.5e-304) tmp = t_3; elseif (i <= 2.8e-195) tmp = Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(z + a)); elseif (i <= 1.5e-88) tmp = t_3; elseif (i <= 0.00014) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -6.2e+59], t$95$2, If[LessEqual[i, -6.5e-182], t$95$1, If[LessEqual[i, 4.5e-304], t$95$3, If[LessEqual[i, 2.8e-195], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.5e-88], t$95$3, If[LessEqual[i, 0.00014], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z + b \cdot \log c\right)\\
t_2 := \mathsf{fma}\left(y, i, z + a\right)\\
t_3 := a + \left(z + x \cdot \log y\right)\\
\mathbf{if}\;i \leq -6.2 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq -6.5 \cdot 10^{-182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 4.5 \cdot 10^{-304}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 2.8 \cdot 10^{-195}:\\
\;\;\;\;\left(b - 0.5\right) \cdot \log c + \left(z + a\right)\\
\mathbf{elif}\;i \leq 1.5 \cdot 10^{-88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 0.00014:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if i < -6.20000000000000029e59 or 1.3999999999999999e-4 < i Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 90.5%
Taylor expanded in z around inf 70.9%
if -6.20000000000000029e59 < i < -6.49999999999999997e-182 or 1.5e-88 < i < 1.3999999999999999e-4Initial program 99.9%
Taylor expanded in t around 0 79.7%
Taylor expanded in y around 0 74.7%
Taylor expanded in b around inf 74.7%
Taylor expanded in x around 0 64.0%
if -6.49999999999999997e-182 < i < 4.4999999999999998e-304 or 2.80000000000000003e-195 < i < 1.5e-88Initial program 99.8%
Taylor expanded in t around 0 82.6%
Taylor expanded in y around 0 82.6%
Taylor expanded in b around inf 78.8%
Taylor expanded in b around 0 77.2%
if 4.4999999999999998e-304 < i < 2.80000000000000003e-195Initial program 99.9%
Taylor expanded in x around 0 91.2%
Taylor expanded in y around 0 91.2%
Taylor expanded in t around 0 81.4%
Final simplification70.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z (* b (log c)))))
(t_2 (fma y i (+ z a)))
(t_3 (+ a (+ z (* x (log y))))))
(if (<= i -3.9e+59)
t_2
(if (<= i -2.5e-182)
t_1
(if (<= i 2.6e-303)
t_3
(if (<= i 3.7e-195)
(+ (* (- b 0.5) (log c)) (+ a (+ z t)))
(if (<= i 1.55e-89) t_3 (if (<= i 0.00014) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (z + (b * log(c)));
double t_2 = fma(y, i, (z + a));
double t_3 = a + (z + (x * log(y)));
double tmp;
if (i <= -3.9e+59) {
tmp = t_2;
} else if (i <= -2.5e-182) {
tmp = t_1;
} else if (i <= 2.6e-303) {
tmp = t_3;
} else if (i <= 3.7e-195) {
tmp = ((b - 0.5) * log(c)) + (a + (z + t));
} else if (i <= 1.55e-89) {
tmp = t_3;
} else if (i <= 0.00014) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(z + Float64(b * log(c)))) t_2 = fma(y, i, Float64(z + a)) t_3 = Float64(a + Float64(z + Float64(x * log(y)))) tmp = 0.0 if (i <= -3.9e+59) tmp = t_2; elseif (i <= -2.5e-182) tmp = t_1; elseif (i <= 2.6e-303) tmp = t_3; elseif (i <= 3.7e-195) tmp = Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(a + Float64(z + t))); elseif (i <= 1.55e-89) tmp = t_3; elseif (i <= 0.00014) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.9e+59], t$95$2, If[LessEqual[i, -2.5e-182], t$95$1, If[LessEqual[i, 2.6e-303], t$95$3, If[LessEqual[i, 3.7e-195], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.55e-89], t$95$3, If[LessEqual[i, 0.00014], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z + b \cdot \log c\right)\\
t_2 := \mathsf{fma}\left(y, i, z + a\right)\\
t_3 := a + \left(z + x \cdot \log y\right)\\
\mathbf{if}\;i \leq -3.9 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq -2.5 \cdot 10^{-182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 2.6 \cdot 10^{-303}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 3.7 \cdot 10^{-195}:\\
\;\;\;\;\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + t\right)\right)\\
\mathbf{elif}\;i \leq 1.55 \cdot 10^{-89}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 0.00014:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if i < -3.90000000000000021e59 or 1.3999999999999999e-4 < i Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 90.5%
Taylor expanded in z around inf 70.9%
if -3.90000000000000021e59 < i < -2.50000000000000012e-182 or 1.54999999999999998e-89 < i < 1.3999999999999999e-4Initial program 99.9%
Taylor expanded in t around 0 79.7%
Taylor expanded in y around 0 74.7%
Taylor expanded in b around inf 74.7%
Taylor expanded in x around 0 64.0%
if -2.50000000000000012e-182 < i < 2.60000000000000005e-303 or 3.69999999999999962e-195 < i < 1.54999999999999998e-89Initial program 99.8%
Taylor expanded in t around 0 82.6%
Taylor expanded in y around 0 82.6%
Taylor expanded in b around inf 78.8%
Taylor expanded in b around 0 77.2%
if 2.60000000000000005e-303 < i < 3.69999999999999962e-195Initial program 99.9%
Taylor expanded in x around 0 91.2%
Taylor expanded in y around 0 91.2%
Final simplification71.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.2e+253) (not (<= x 1.85e+220))) (+ a (+ z (* x (log y)))) (+ (* y i) (+ (* (- b 0.5) (log c)) (+ 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 <= -6.2e+253) || !(x <= 1.85e+220)) {
tmp = a + (z + (x * log(y)));
} else {
tmp = (y * i) + (((b - 0.5) * log(c)) + (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 <= (-6.2d+253)) .or. (.not. (x <= 1.85d+220))) then
tmp = a + (z + (x * log(y)))
else
tmp = (y * i) + (((b - 0.5d0) * log(c)) + (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 <= -6.2e+253) || !(x <= 1.85e+220)) {
tmp = a + (z + (x * Math.log(y)));
} else {
tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.2e+253) or not (x <= 1.85e+220): tmp = a + (z + (x * math.log(y))) else: tmp = (y * i) + (((b - 0.5) * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.2e+253) || !(x <= 1.85e+220)) tmp = Float64(a + Float64(z + Float64(x * log(y)))); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + 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 <= -6.2e+253) || ~((x <= 1.85e+220))) tmp = a + (z + (x * log(y))); else tmp = (y * i) + (((b - 0.5) * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.2e+253], N[Not[LessEqual[x, 1.85e+220]], $MachinePrecision]], N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+253} \lor \neg \left(x \leq 1.85 \cdot 10^{+220}\right):\\
\;\;\;\;a + \left(z + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.20000000000000013e253 or 1.85e220 < x Initial program 99.8%
Taylor expanded in t around 0 99.8%
Taylor expanded in y around 0 96.6%
Taylor expanded in b around inf 96.6%
Taylor expanded in b around 0 93.0%
if -6.20000000000000013e253 < x < 1.85e220Initial program 99.9%
Taylor expanded in x around 0 93.5%
Final simplification93.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.6e+253) (not (<= x 8e+222))) (+ a (+ z (* x (log y)))) (+ (* y i) (+ (* b (log c)) (+ 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 <= -6.6e+253) || !(x <= 8e+222)) {
tmp = a + (z + (x * log(y)));
} else {
tmp = (y * i) + ((b * log(c)) + (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 <= (-6.6d+253)) .or. (.not. (x <= 8d+222))) then
tmp = a + (z + (x * log(y)))
else
tmp = (y * i) + ((b * log(c)) + (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 <= -6.6e+253) || !(x <= 8e+222)) {
tmp = a + (z + (x * Math.log(y)));
} else {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.6e+253) or not (x <= 8e+222): tmp = a + (z + (x * math.log(y))) else: tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.6e+253) || !(x <= 8e+222)) tmp = Float64(a + Float64(z + Float64(x * log(y)))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + 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 <= -6.6e+253) || ~((x <= 8e+222))) tmp = a + (z + (x * log(y))); else tmp = (y * i) + ((b * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.6e+253], N[Not[LessEqual[x, 8e+222]], $MachinePrecision]], N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{+253} \lor \neg \left(x \leq 8 \cdot 10^{+222}\right):\\
\;\;\;\;a + \left(z + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.5999999999999998e253 or 8.0000000000000004e222 < x Initial program 99.8%
Taylor expanded in t around 0 99.8%
Taylor expanded in y around 0 96.6%
Taylor expanded in b around inf 96.6%
Taylor expanded in b around 0 93.0%
if -6.5999999999999998e253 < x < 8.0000000000000004e222Initial program 99.9%
Taylor expanded in x around 0 93.5%
Taylor expanded in b around inf 92.2%
Final simplification92.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -7.8e+59) (not (<= i 0.00015))) (fma y i (+ z a)) (+ a (+ z (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -7.8e+59) || !(i <= 0.00015)) {
tmp = fma(y, i, (z + a));
} else {
tmp = a + (z + (b * log(c)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -7.8e+59) || !(i <= 0.00015)) tmp = fma(y, i, Float64(z + a)); else tmp = Float64(a + Float64(z + Float64(b * log(c)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -7.8e+59], N[Not[LessEqual[i, 0.00015]], $MachinePrecision]], N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -7.8 \cdot 10^{+59} \lor \neg \left(i \leq 0.00015\right):\\
\;\;\;\;\mathsf{fma}\left(y, i, z + a\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + b \cdot \log c\right)\\
\end{array}
\end{array}
if i < -7.80000000000000043e59 or 1.49999999999999987e-4 < i Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 90.5%
Taylor expanded in z around inf 70.9%
if -7.80000000000000043e59 < i < 1.49999999999999987e-4Initial program 99.9%
Taylor expanded in t around 0 82.1%
Taylor expanded in y around 0 79.4%
Taylor expanded in b around inf 77.1%
Taylor expanded in x around 0 60.9%
Final simplification65.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1.05e+87)
(+ z (* y i))
(if (or (<= z -4.4e-46) (not (<= z -3.9e-78)))
(+ a (* y i))
(* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.05e+87) {
tmp = z + (y * i);
} else if ((z <= -4.4e-46) || !(z <= -3.9e-78)) {
tmp = a + (y * i);
} else {
tmp = b * log(c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.05d+87)) then
tmp = z + (y * i)
else if ((z <= (-4.4d-46)) .or. (.not. (z <= (-3.9d-78)))) then
tmp = a + (y * i)
else
tmp = b * log(c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.05e+87) {
tmp = z + (y * i);
} else if ((z <= -4.4e-46) || !(z <= -3.9e-78)) {
tmp = a + (y * i);
} else {
tmp = b * Math.log(c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.05e+87: tmp = z + (y * i) elif (z <= -4.4e-46) or not (z <= -3.9e-78): tmp = a + (y * i) else: tmp = b * math.log(c) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.05e+87) tmp = Float64(z + Float64(y * i)); elseif ((z <= -4.4e-46) || !(z <= -3.9e-78)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(b * log(c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.05e+87) tmp = z + (y * i); elseif ((z <= -4.4e-46) || ~((z <= -3.9e-78))) tmp = a + (y * i); else tmp = b * log(c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.05e+87], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -4.4e-46], N[Not[LessEqual[z, -3.9e-78]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+87}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-46} \lor \neg \left(z \leq -3.9 \cdot 10^{-78}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;b \cdot \log c\\
\end{array}
\end{array}
if z < -1.05e87Initial program 99.9%
Taylor expanded in z around inf 56.5%
if -1.05e87 < z < -4.4000000000000002e-46 or -3.9000000000000002e-78 < z Initial program 99.9%
Taylor expanded in a around inf 42.8%
if -4.4000000000000002e-46 < z < -3.9000000000000002e-78Initial program 100.0%
Taylor expanded in t around 0 66.8%
Taylor expanded in y around 0 66.8%
Taylor expanded in b around inf 66.8%
Taylor expanded in b around inf 66.8%
Final simplification45.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -3.65e+87)
(fma y i z)
(if (or (<= z -4.4e-46) (not (<= z -3.9e-78)))
(+ a (* y i))
(* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.65e+87) {
tmp = fma(y, i, z);
} else if ((z <= -4.4e-46) || !(z <= -3.9e-78)) {
tmp = a + (y * i);
} else {
tmp = b * log(c);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.65e+87) tmp = fma(y, i, z); elseif ((z <= -4.4e-46) || !(z <= -3.9e-78)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(b * log(c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.65e+87], N[(y * i + z), $MachinePrecision], If[Or[LessEqual[z, -4.4e-46], N[Not[LessEqual[z, -3.9e-78]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.65 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-46} \lor \neg \left(z \leq -3.9 \cdot 10^{-78}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;b \cdot \log c\\
\end{array}
\end{array}
if z < -3.64999999999999998e87Initial program 99.9%
Taylor expanded in z around inf 56.5%
Taylor expanded in z around 0 56.5%
+-commutative56.5%
*-commutative56.5%
fma-def56.5%
Simplified56.5%
if -3.64999999999999998e87 < z < -4.4000000000000002e-46 or -3.9000000000000002e-78 < z Initial program 99.9%
Taylor expanded in a around inf 42.8%
if -4.4000000000000002e-46 < z < -3.9000000000000002e-78Initial program 100.0%
Taylor expanded in t around 0 66.8%
Taylor expanded in y around 0 66.8%
Taylor expanded in b around inf 66.8%
Taylor expanded in b around inf 66.8%
Final simplification45.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -1.9e+205) (not (<= b 1.95e+239))) (* b (log c)) (fma y i (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -1.9e+205) || !(b <= 1.95e+239)) {
tmp = b * log(c);
} else {
tmp = fma(y, i, (z + a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -1.9e+205) || !(b <= 1.95e+239)) tmp = Float64(b * log(c)); else tmp = fma(y, i, Float64(z + a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -1.9e+205], N[Not[LessEqual[b, 1.95e+239]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{+205} \lor \neg \left(b \leq 1.95 \cdot 10^{+239}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z + a\right)\\
\end{array}
\end{array}
if b < -1.9e205 or 1.9499999999999999e239 < b Initial program 99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in y around 0 89.5%
Taylor expanded in b around inf 89.5%
Taylor expanded in b around inf 71.8%
if -1.9e205 < b < 1.9499999999999999e239Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 84.7%
Taylor expanded in z around inf 58.7%
Final simplification60.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.4e+246) z (if (or (<= z -3.1e+197) (not (<= z -4.9e+132))) (+ a (* y i)) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.4e+246) {
tmp = z;
} else if ((z <= -3.1e+197) || !(z <= -4.9e+132)) {
tmp = a + (y * i);
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.4d+246)) then
tmp = z
else if ((z <= (-3.1d+197)) .or. (.not. (z <= (-4.9d+132)))) then
tmp = a + (y * i)
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.4e+246) {
tmp = z;
} else if ((z <= -3.1e+197) || !(z <= -4.9e+132)) {
tmp = a + (y * i);
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.4e+246: tmp = z elif (z <= -3.1e+197) or not (z <= -4.9e+132): tmp = a + (y * i) else: tmp = z return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.4e+246) tmp = z; elseif ((z <= -3.1e+197) || !(z <= -4.9e+132)) tmp = Float64(a + Float64(y * i)); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.4e+246) tmp = z; elseif ((z <= -3.1e+197) || ~((z <= -4.9e+132))) tmp = a + (y * i); else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.4e+246], z, If[Or[LessEqual[z, -3.1e+197], N[Not[LessEqual[z, -4.9e+132]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+246}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+197} \lor \neg \left(z \leq -4.9 \cdot 10^{+132}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.39999999999999994e246 or -3.1e197 < z < -4.9000000000000002e132Initial program 99.9%
Taylor expanded in x around 0 87.8%
Taylor expanded in y around 0 80.4%
Taylor expanded in z around inf 53.0%
if -1.39999999999999994e246 < z < -3.1e197 or -4.9000000000000002e132 < z Initial program 99.9%
Taylor expanded in a around inf 41.6%
Final simplification42.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.6e+87) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.6e+87) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-3.6d+87)) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.6e+87) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.6e+87: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.6e+87) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -3.6e+87) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.6e+87], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+87}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -3.59999999999999994e87Initial program 99.9%
Taylor expanded in z around inf 56.5%
if -3.59999999999999994e87 < z Initial program 99.9%
Taylor expanded in a around inf 42.2%
Final simplification44.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.95e+87) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.95e+87) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.95d+87)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.95e+87) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.95e+87: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.95e+87) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.95e+87) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.95e+87], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.95 \cdot 10^{+87}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -2.9499999999999998e87Initial program 99.9%
Taylor expanded in x around 0 86.6%
Taylor expanded in y around 0 73.2%
Taylor expanded in z around inf 42.7%
if -2.9499999999999998e87 < z Initial program 99.9%
Taylor expanded in a around inf 42.2%
Taylor expanded in a around inf 19.4%
Final simplification23.4%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 39.4%
Taylor expanded in a around inf 18.1%
Final simplification18.1%
herbie shell --seed 2023274
(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)))