
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ t a) (fma x (log y) z)) (+ (* (+ 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 ((t + a) + fma(x, log(y), z)) + (((b + -0.5) * log(c)) + (y * i));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(t + a) + fma(x, log(y), z)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(t + a), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (or (<= x -5.3e+162) (not (<= x 4.6e+158)))
(+ (* y i) (+ (* x (log y)) t_1))
(+ (* y i) (+ t_1 (+ a (+ z t)))))))
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 tmp;
if ((x <= -5.3e+162) || !(x <= 4.6e+158)) {
tmp = (y * i) + ((x * log(y)) + t_1);
} else {
tmp = (y * i) + (t_1 + (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) :: t_1
real(8) :: tmp
t_1 = b * log(c)
if ((x <= (-5.3d+162)) .or. (.not. (x <= 4.6d+158))) then
tmp = (y * i) + ((x * log(y)) + t_1)
else
tmp = (y * i) + (t_1 + (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 t_1 = b * Math.log(c);
double tmp;
if ((x <= -5.3e+162) || !(x <= 4.6e+158)) {
tmp = (y * i) + ((x * Math.log(y)) + t_1);
} else {
tmp = (y * i) + (t_1 + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if (x <= -5.3e+162) or not (x <= 4.6e+158): tmp = (y * i) + ((x * math.log(y)) + t_1) else: tmp = (y * i) + (t_1 + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if ((x <= -5.3e+162) || !(x <= 4.6e+158)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + t_1)); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if ((x <= -5.3e+162) || ~((x <= 4.6e+158))) tmp = (y * i) + ((x * log(y)) + t_1); else tmp = (y * i) + (t_1 + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -5.3e+162], N[Not[LessEqual[x, 4.6e+158]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;x \leq -5.3 \cdot 10^{+162} \lor \neg \left(x \leq 4.6 \cdot 10^{+158}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.3000000000000002e162 or 4.59999999999999971e158 < x Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in a around inf 72.0%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in z around 0 71.4%
associate-+r+71.4%
associate-*r/71.3%
Simplified71.3%
Taylor expanded in x around inf 76.2%
if -5.3000000000000002e162 < x < 4.59999999999999971e158Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 95.8%
Final simplification91.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (* (log c) (- b 0.5))))
(if (<= x -1.6e+93)
(+ a (+ t (+ z (+ t_1 t_2))))
(if (<= x 4.6e+158)
(+ (* y i) (+ (+ a (+ z t)) t_2))
(+ (* y i) (+ t_1 (* b (log c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = log(c) * (b - 0.5);
double tmp;
if (x <= -1.6e+93) {
tmp = a + (t + (z + (t_1 + t_2)));
} else if (x <= 4.6e+158) {
tmp = (y * i) + ((a + (z + t)) + t_2);
} else {
tmp = (y * i) + (t_1 + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = log(c) * (b - 0.5d0)
if (x <= (-1.6d+93)) then
tmp = a + (t + (z + (t_1 + t_2)))
else if (x <= 4.6d+158) then
tmp = (y * i) + ((a + (z + t)) + t_2)
else
tmp = (y * i) + (t_1 + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double t_2 = Math.log(c) * (b - 0.5);
double tmp;
if (x <= -1.6e+93) {
tmp = a + (t + (z + (t_1 + t_2)));
} else if (x <= 4.6e+158) {
tmp = (y * i) + ((a + (z + t)) + t_2);
} else {
tmp = (y * i) + (t_1 + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = math.log(c) * (b - 0.5) tmp = 0 if x <= -1.6e+93: tmp = a + (t + (z + (t_1 + t_2))) elif x <= 4.6e+158: tmp = (y * i) + ((a + (z + t)) + t_2) else: tmp = (y * i) + (t_1 + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (x <= -1.6e+93) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + t_2)))); elseif (x <= 4.6e+158) tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + t_2)); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = log(c) * (b - 0.5); tmp = 0.0; if (x <= -1.6e+93) tmp = a + (t + (z + (t_1 + t_2))); elseif (x <= 4.6e+158) tmp = (y * i) + ((a + (z + t)) + t_2); else tmp = (y * i) + (t_1 + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e+93], N[(a + N[(t + N[(z + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e+158], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+93}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + t\_2\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+158}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + b \cdot \log c\right)\\
\end{array}
\end{array}
if x < -1.6000000000000001e93Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 89.5%
if -1.6000000000000001e93 < x < 4.59999999999999971e158Initial program 99.9%
Taylor expanded in x around 0 97.5%
if 4.59999999999999971e158 < x Initial program 99.5%
Taylor expanded in b around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in a around inf 64.5%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in z around 0 64.5%
associate-+r+64.5%
associate-*r/64.5%
Simplified64.5%
Taylor expanded in x around inf 87.4%
Final simplification95.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (<= z -5e+146)
(+ (* y i) (+ t_1 (+ a (+ z t))))
(+ (* y i) (+ t_1 (+ a (+ t (* x (log y)))))))))
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 tmp;
if (z <= -5e+146) {
tmp = (y * i) + (t_1 + (a + (z + t)));
} else {
tmp = (y * i) + (t_1 + (a + (t + (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) :: t_1
real(8) :: tmp
t_1 = b * log(c)
if (z <= (-5d+146)) then
tmp = (y * i) + (t_1 + (a + (z + t)))
else
tmp = (y * i) + (t_1 + (a + (t + (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 t_1 = b * Math.log(c);
double tmp;
if (z <= -5e+146) {
tmp = (y * i) + (t_1 + (a + (z + t)));
} else {
tmp = (y * i) + (t_1 + (a + (t + (x * Math.log(y)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if z <= -5e+146: tmp = (y * i) + (t_1 + (a + (z + t))) else: tmp = (y * i) + (t_1 + (a + (t + (x * math.log(y))))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (z <= -5e+146) tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(z + t)))); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(t + Float64(x * log(y)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if (z <= -5e+146) tmp = (y * i) + (t_1 + (a + (z + t))); else tmp = (y * i) + (t_1 + (a + (t + (x * log(y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+146], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;z \leq -5 \cdot 10^{+146}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(t + x \cdot \log y\right)\right)\right)\\
\end{array}
\end{array}
if z < -4.9999999999999999e146Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 95.8%
if -4.9999999999999999e146 < z Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 92.7%
Final simplification93.1%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (* b (log c)))) (t_2 (+ z (* y i))))
(if (<= a -5.6e-263)
t_2
(if (<= a 4.45e-156)
t_1
(if (<= a 1.55e+143) t_2 (if (<= a 8.5e+185) t_1 (+ a (* y i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (b * log(c));
double t_2 = z + (y * i);
double tmp;
if (a <= -5.6e-263) {
tmp = t_2;
} else if (a <= 4.45e-156) {
tmp = t_1;
} else if (a <= 1.55e+143) {
tmp = t_2;
} else if (a <= 8.5e+185) {
tmp = t_1;
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * i) + (b * log(c))
t_2 = z + (y * i)
if (a <= (-5.6d-263)) then
tmp = t_2
else if (a <= 4.45d-156) then
tmp = t_1
else if (a <= 1.55d+143) then
tmp = t_2
else if (a <= 8.5d+185) then
tmp = t_1
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (b * Math.log(c));
double t_2 = z + (y * i);
double tmp;
if (a <= -5.6e-263) {
tmp = t_2;
} else if (a <= 4.45e-156) {
tmp = t_1;
} else if (a <= 1.55e+143) {
tmp = t_2;
} else if (a <= 8.5e+185) {
tmp = t_1;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (b * math.log(c)) t_2 = z + (y * i) tmp = 0 if a <= -5.6e-263: tmp = t_2 elif a <= 4.45e-156: tmp = t_1 elif a <= 1.55e+143: tmp = t_2 elif a <= 8.5e+185: tmp = t_1 else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(b * log(c))) t_2 = Float64(z + Float64(y * i)) tmp = 0.0 if (a <= -5.6e-263) tmp = t_2; elseif (a <= 4.45e-156) tmp = t_1; elseif (a <= 1.55e+143) tmp = t_2; elseif (a <= 8.5e+185) tmp = t_1; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (b * log(c)); t_2 = z + (y * i); tmp = 0.0; if (a <= -5.6e-263) tmp = t_2; elseif (a <= 4.45e-156) tmp = t_1; elseif (a <= 1.55e+143) tmp = t_2; elseif (a <= 8.5e+185) tmp = t_1; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e-263], t$95$2, If[LessEqual[a, 4.45e-156], t$95$1, If[LessEqual[a, 1.55e+143], t$95$2, If[LessEqual[a, 8.5e+185], t$95$1, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + b \cdot \log c\\
t_2 := z + y \cdot i\\
\mathbf{if}\;a \leq -5.6 \cdot 10^{-263}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 4.45 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+143}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < -5.6000000000000001e-263 or 4.4500000000000001e-156 < a < 1.54999999999999995e143Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 83.6%
Taylor expanded in z around inf 36.1%
if -5.6000000000000001e-263 < a < 4.4500000000000001e-156 or 1.54999999999999995e143 < a < 8.50000000000000013e185Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 79.6%
Taylor expanded in b around inf 47.3%
if 8.50000000000000013e185 < a Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 83.8%
Taylor expanded in a around inf 71.3%
Final simplification42.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ z (* y i))))
(if (<= a -8e-262)
t_1
(if (<= a 2.1e-155)
(+ (* y i) (* (log c) (- b 0.5)))
(if (<= a 3.3e+143)
t_1
(if (<= a 4.3e+186) (+ (* y i) (* b (log c))) (+ a (* y i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (y * i);
double tmp;
if (a <= -8e-262) {
tmp = t_1;
} else if (a <= 2.1e-155) {
tmp = (y * i) + (log(c) * (b - 0.5));
} else if (a <= 3.3e+143) {
tmp = t_1;
} else if (a <= 4.3e+186) {
tmp = (y * i) + (b * log(c));
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = z + (y * i)
if (a <= (-8d-262)) then
tmp = t_1
else if (a <= 2.1d-155) then
tmp = (y * i) + (log(c) * (b - 0.5d0))
else if (a <= 3.3d+143) then
tmp = t_1
else if (a <= 4.3d+186) then
tmp = (y * i) + (b * log(c))
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (y * i);
double tmp;
if (a <= -8e-262) {
tmp = t_1;
} else if (a <= 2.1e-155) {
tmp = (y * i) + (Math.log(c) * (b - 0.5));
} else if (a <= 3.3e+143) {
tmp = t_1;
} else if (a <= 4.3e+186) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = z + (y * i) tmp = 0 if a <= -8e-262: tmp = t_1 elif a <= 2.1e-155: tmp = (y * i) + (math.log(c) * (b - 0.5)) elif a <= 3.3e+143: tmp = t_1 elif a <= 4.3e+186: tmp = (y * i) + (b * math.log(c)) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(z + Float64(y * i)) tmp = 0.0 if (a <= -8e-262) tmp = t_1; elseif (a <= 2.1e-155) tmp = Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))); elseif (a <= 3.3e+143) tmp = t_1; elseif (a <= 4.3e+186) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = z + (y * i); tmp = 0.0; if (a <= -8e-262) tmp = t_1; elseif (a <= 2.1e-155) tmp = (y * i) + (log(c) * (b - 0.5)); elseif (a <= 3.3e+143) tmp = t_1; elseif (a <= 4.3e+186) tmp = (y * i) + (b * log(c)); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e-262], t$95$1, If[LessEqual[a, 2.1e-155], N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e+143], t$95$1, If[LessEqual[a, 4.3e+186], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + y \cdot i\\
\mathbf{if}\;a \leq -8 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-155}:\\
\;\;\;\;y \cdot i + \log c \cdot \left(b - 0.5\right)\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+186}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < -8.0000000000000001e-262 or 2.1000000000000002e-155 < a < 3.3e143Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 83.6%
Taylor expanded in z around inf 36.1%
if -8.0000000000000001e-262 < a < 2.1000000000000002e-155Initial program 99.8%
Taylor expanded in t around inf 76.1%
Taylor expanded in t around 0 63.6%
if 3.3e143 < a < 4.3e186Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 54.6%
Taylor expanded in b around inf 11.2%
if 4.3e186 < a Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 83.8%
Taylor expanded in a around inf 71.3%
Final simplification42.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.25e+187) (not (<= x 1.32e+246))) (* z (+ 1.0 (/ (* x (log y)) z))) (+ (* 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 <= -3.25e+187) || !(x <= 1.32e+246)) {
tmp = z * (1.0 + ((x * log(y)) / z));
} 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 <= (-3.25d+187)) .or. (.not. (x <= 1.32d+246))) then
tmp = z * (1.0d0 + ((x * log(y)) / z))
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 <= -3.25e+187) || !(x <= 1.32e+246)) {
tmp = z * (1.0 + ((x * Math.log(y)) / z));
} 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 <= -3.25e+187) or not (x <= 1.32e+246): tmp = z * (1.0 + ((x * math.log(y)) / z)) 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 <= -3.25e+187) || !(x <= 1.32e+246)) tmp = Float64(z * Float64(1.0 + Float64(Float64(x * log(y)) / z))); 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 <= -3.25e+187) || ~((x <= 1.32e+246))) tmp = z * (1.0 + ((x * log(y)) / z)); 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, -3.25e+187], N[Not[LessEqual[x, 1.32e+246]], $MachinePrecision]], N[(z * N[(1.0 + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] / z), $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 -3.25 \cdot 10^{+187} \lor \neg \left(x \leq 1.32 \cdot 10^{+246}\right):\\
\;\;\;\;z \cdot \left(1 + \frac{x \cdot \log y}{z}\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 < -3.24999999999999984e187 or 1.32000000000000004e246 < x Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 48.3%
associate-/l*48.3%
associate-/l*48.4%
sub-neg48.4%
metadata-eval48.4%
associate-/l*48.4%
+-commutative48.4%
Simplified48.4%
Taylor expanded in x around inf 25.8%
if -3.24999999999999984e187 < x < 1.32000000000000004e246Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 92.6%
Final simplification82.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 7.8e+149)
(+ z (* y i))
(if (<= a 6.4e+184)
(+ t (* (log c) (- b 0.5)))
(if (or (<= a 3.4e+189) (not (<= a 3.6e+252)))
(+ a (* y i))
(* a (+ 1.0 (/ z a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.8e+149) {
tmp = z + (y * i);
} else if (a <= 6.4e+184) {
tmp = t + (log(c) * (b - 0.5));
} else if ((a <= 3.4e+189) || !(a <= 3.6e+252)) {
tmp = a + (y * i);
} else {
tmp = a * (1.0 + (z / 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 <= 7.8d+149) then
tmp = z + (y * i)
else if (a <= 6.4d+184) then
tmp = t + (log(c) * (b - 0.5d0))
else if ((a <= 3.4d+189) .or. (.not. (a <= 3.6d+252))) then
tmp = a + (y * i)
else
tmp = a * (1.0d0 + (z / 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 <= 7.8e+149) {
tmp = z + (y * i);
} else if (a <= 6.4e+184) {
tmp = t + (Math.log(c) * (b - 0.5));
} else if ((a <= 3.4e+189) || !(a <= 3.6e+252)) {
tmp = a + (y * i);
} else {
tmp = a * (1.0 + (z / a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7.8e+149: tmp = z + (y * i) elif a <= 6.4e+184: tmp = t + (math.log(c) * (b - 0.5)) elif (a <= 3.4e+189) or not (a <= 3.6e+252): tmp = a + (y * i) else: tmp = a * (1.0 + (z / a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7.8e+149) tmp = Float64(z + Float64(y * i)); elseif (a <= 6.4e+184) tmp = Float64(t + Float64(log(c) * Float64(b - 0.5))); elseif ((a <= 3.4e+189) || !(a <= 3.6e+252)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(a * Float64(1.0 + Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 7.8e+149) tmp = z + (y * i); elseif (a <= 6.4e+184) tmp = t + (log(c) * (b - 0.5)); elseif ((a <= 3.4e+189) || ~((a <= 3.6e+252))) tmp = a + (y * i); else tmp = a * (1.0 + (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7.8e+149], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4e+184], N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 3.4e+189], N[Not[LessEqual[a, 3.6e+252]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 + N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{+184}:\\
\;\;\;\;t + \log c \cdot \left(b - 0.5\right)\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+189} \lor \neg \left(a \leq 3.6 \cdot 10^{+252}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\
\end{array}
\end{array}
if a < 7.7999999999999998e149Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 84.9%
Taylor expanded in z around inf 41.0%
if 7.7999999999999998e149 < a < 6.39999999999999966e184Initial program 99.8%
Taylor expanded in t around inf 32.0%
Taylor expanded in y around 0 31.5%
if 6.39999999999999966e184 < a < 3.39999999999999983e189 or 3.5999999999999999e252 < a Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 80.9%
Taylor expanded in a around inf 80.9%
if 3.39999999999999983e189 < a < 3.5999999999999999e252Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 54.8%
associate-/l*54.8%
associate-/l*54.8%
sub-neg54.8%
metadata-eval54.8%
associate-/l*54.8%
+-commutative54.8%
Simplified54.8%
Taylor expanded in a around inf 34.8%
Taylor expanded in a around inf 50.3%
Final simplification43.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.3e+156) (+ z (* y i)) (+ (* y i) (+ a (* (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 (z <= -3.3e+156) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (a + (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 (z <= (-3.3d+156)) then
tmp = z + (y * i)
else
tmp = (y * i) + (a + (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 (z <= -3.3e+156) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (a + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.3e+156: tmp = z + (y * i) else: tmp = (y * i) + (a + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.3e+156) tmp = Float64(z + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + 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 (z <= -3.3e+156) tmp = z + (y * i); else tmp = (y * i) + (a + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.3e+156], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+156}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -3.2999999999999999e156Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 95.7%
Taylor expanded in z around inf 66.9%
if -3.2999999999999999e156 < z Initial program 99.8%
Taylor expanded in a around inf 54.0%
Final simplification55.8%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* b (log c)))) (if (<= a 2.1e+175) (+ (* y i) (+ t_1 (+ z t))) (+ (* y i) (+ a t_1)))))
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 tmp;
if (a <= 2.1e+175) {
tmp = (y * i) + (t_1 + (z + t));
} else {
tmp = (y * i) + (a + 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 = b * log(c)
if (a <= 2.1d+175) then
tmp = (y * i) + (t_1 + (z + t))
else
tmp = (y * i) + (a + 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 = b * Math.log(c);
double tmp;
if (a <= 2.1e+175) {
tmp = (y * i) + (t_1 + (z + t));
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if a <= 2.1e+175: tmp = (y * i) + (t_1 + (z + t)) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (a <= 2.1e+175) tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(z + t))); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if (a <= 2.1e+175) tmp = (y * i) + (t_1 + (z + t)); else tmp = (y * i) + (a + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2.1e+175], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;a \leq 2.1 \cdot 10^{+175}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if a < 2.0999999999999999e175Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 83.1%
Taylor expanded in a around 0 75.7%
associate-+r+75.7%
Simplified75.7%
if 2.0999999999999999e175 < a Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in a around inf 71.9%
Final simplification75.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 7.8e+149)
(+ z (* y i))
(if (<= a 2.3e+184)
(* (log c) (- b 0.5))
(if (or (<= a 2.3e+189) (not (<= a 3.45e+252)))
(+ a (* y i))
(* a (+ 1.0 (/ z a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.8e+149) {
tmp = z + (y * i);
} else if (a <= 2.3e+184) {
tmp = log(c) * (b - 0.5);
} else if ((a <= 2.3e+189) || !(a <= 3.45e+252)) {
tmp = a + (y * i);
} else {
tmp = a * (1.0 + (z / 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 <= 7.8d+149) then
tmp = z + (y * i)
else if (a <= 2.3d+184) then
tmp = log(c) * (b - 0.5d0)
else if ((a <= 2.3d+189) .or. (.not. (a <= 3.45d+252))) then
tmp = a + (y * i)
else
tmp = a * (1.0d0 + (z / 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 <= 7.8e+149) {
tmp = z + (y * i);
} else if (a <= 2.3e+184) {
tmp = Math.log(c) * (b - 0.5);
} else if ((a <= 2.3e+189) || !(a <= 3.45e+252)) {
tmp = a + (y * i);
} else {
tmp = a * (1.0 + (z / a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7.8e+149: tmp = z + (y * i) elif a <= 2.3e+184: tmp = math.log(c) * (b - 0.5) elif (a <= 2.3e+189) or not (a <= 3.45e+252): tmp = a + (y * i) else: tmp = a * (1.0 + (z / a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7.8e+149) tmp = Float64(z + Float64(y * i)); elseif (a <= 2.3e+184) tmp = Float64(log(c) * Float64(b - 0.5)); elseif ((a <= 2.3e+189) || !(a <= 3.45e+252)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(a * Float64(1.0 + Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 7.8e+149) tmp = z + (y * i); elseif (a <= 2.3e+184) tmp = log(c) * (b - 0.5); elseif ((a <= 2.3e+189) || ~((a <= 3.45e+252))) tmp = a + (y * i); else tmp = a * (1.0 + (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7.8e+149], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e+184], N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 2.3e+189], N[Not[LessEqual[a, 3.45e+252]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 + N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+184}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right)\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+189} \lor \neg \left(a \leq 3.45 \cdot 10^{+252}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\
\end{array}
\end{array}
if a < 7.7999999999999998e149Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 84.9%
Taylor expanded in z around inf 41.0%
if 7.7999999999999998e149 < a < 2.3e184Initial program 99.8%
Taylor expanded in t around inf 34.2%
Taylor expanded in y around 0 33.7%
Taylor expanded in t around 0 11.9%
if 2.3e184 < a < 2.3e189 or 3.45e252 < a Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 82.0%
Taylor expanded in a around inf 76.5%
if 2.3e189 < a < 3.45e252Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 54.8%
associate-/l*54.8%
associate-/l*54.8%
sub-neg54.8%
metadata-eval54.8%
associate-/l*54.8%
+-commutative54.8%
Simplified54.8%
Taylor expanded in a around inf 34.8%
Taylor expanded in a around inf 50.3%
Final simplification42.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.05e+156) (+ z (* y i)) (+ (* y i) (+ a (* 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 <= -2.05e+156) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (a + (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 <= (-2.05d+156)) then
tmp = z + (y * i)
else
tmp = (y * i) + (a + (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 <= -2.05e+156) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.05e+156: tmp = z + (y * i) else: tmp = (y * i) + (a + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.05e+156) tmp = Float64(z + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + 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 <= -2.05e+156) tmp = z + (y * i); else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.05e+156], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+156}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if z < -2.0500000000000001e156Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 95.7%
Taylor expanded in z around inf 66.9%
if -2.0500000000000001e156 < z Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around inf 53.9%
Final simplification55.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 7.8e+149)
(+ z (* y i))
(if (<= a 2.3e+184)
(* b (log c))
(if (or (<= a 2.8e+189) (not (<= a 3.3e+252)))
(+ a (* y i))
(* a (+ 1.0 (/ z a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.8e+149) {
tmp = z + (y * i);
} else if (a <= 2.3e+184) {
tmp = b * log(c);
} else if ((a <= 2.8e+189) || !(a <= 3.3e+252)) {
tmp = a + (y * i);
} else {
tmp = a * (1.0 + (z / 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 <= 7.8d+149) then
tmp = z + (y * i)
else if (a <= 2.3d+184) then
tmp = b * log(c)
else if ((a <= 2.8d+189) .or. (.not. (a <= 3.3d+252))) then
tmp = a + (y * i)
else
tmp = a * (1.0d0 + (z / 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 <= 7.8e+149) {
tmp = z + (y * i);
} else if (a <= 2.3e+184) {
tmp = b * Math.log(c);
} else if ((a <= 2.8e+189) || !(a <= 3.3e+252)) {
tmp = a + (y * i);
} else {
tmp = a * (1.0 + (z / a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7.8e+149: tmp = z + (y * i) elif a <= 2.3e+184: tmp = b * math.log(c) elif (a <= 2.8e+189) or not (a <= 3.3e+252): tmp = a + (y * i) else: tmp = a * (1.0 + (z / a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7.8e+149) tmp = Float64(z + Float64(y * i)); elseif (a <= 2.3e+184) tmp = Float64(b * log(c)); elseif ((a <= 2.8e+189) || !(a <= 3.3e+252)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(a * Float64(1.0 + Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 7.8e+149) tmp = z + (y * i); elseif (a <= 2.3e+184) tmp = b * log(c); elseif ((a <= 2.8e+189) || ~((a <= 3.3e+252))) tmp = a + (y * i); else tmp = a * (1.0 + (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7.8e+149], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e+184], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 2.8e+189], N[Not[LessEqual[a, 3.3e+252]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 + N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+184}:\\
\;\;\;\;b \cdot \log c\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+189} \lor \neg \left(a \leq 3.3 \cdot 10^{+252}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\
\end{array}
\end{array}
if a < 7.7999999999999998e149Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 84.9%
Taylor expanded in z around inf 41.0%
if 7.7999999999999998e149 < a < 2.3e184Initial program 99.8%
Taylor expanded in t around inf 34.2%
Taylor expanded in b around inf 11.9%
*-commutative11.9%
Simplified11.9%
if 2.3e184 < a < 2.80000000000000006e189 or 3.3000000000000001e252 < a Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 82.0%
Taylor expanded in a around inf 76.5%
if 2.80000000000000006e189 < a < 3.3000000000000001e252Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 54.8%
associate-/l*54.8%
associate-/l*54.8%
sub-neg54.8%
metadata-eval54.8%
associate-/l*54.8%
+-commutative54.8%
Simplified54.8%
Taylor expanded in a around inf 34.8%
Taylor expanded in a around inf 50.3%
Final simplification42.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -2e+32) (not (<= i 1.5e+98))) (+ a (* 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 ((i <= -2e+32) || !(i <= 1.5e+98)) {
tmp = a + (y * i);
} else {
tmp = z + 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 ((i <= (-2d+32)) .or. (.not. (i <= 1.5d+98))) then
tmp = a + (y * i)
else
tmp = z + 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 ((i <= -2e+32) || !(i <= 1.5e+98)) {
tmp = a + (y * i);
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -2e+32) or not (i <= 1.5e+98): tmp = a + (y * i) else: tmp = z + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -2e+32) || !(i <= 1.5e+98)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -2e+32) || ~((i <= 1.5e+98))) tmp = a + (y * i); else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -2e+32], N[Not[LessEqual[i, 1.5e+98]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2 \cdot 10^{+32} \lor \neg \left(i \leq 1.5 \cdot 10^{+98}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if i < -2.00000000000000011e32 or 1.5000000000000001e98 < i Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 86.3%
Taylor expanded in a around inf 63.4%
if -2.00000000000000011e32 < i < 1.5000000000000001e98Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 64.2%
associate-/l*62.9%
associate-/l*62.9%
sub-neg62.9%
metadata-eval62.9%
associate-/l*62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in a around inf 26.1%
Taylor expanded in z around 0 29.9%
+-commutative29.9%
Simplified29.9%
Final simplification43.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -7.5e+32) (not (<= i 1e+131))) (* 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 ((i <= -7.5e+32) || !(i <= 1e+131)) {
tmp = y * i;
} else {
tmp = z + 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 ((i <= (-7.5d+32)) .or. (.not. (i <= 1d+131))) then
tmp = y * i
else
tmp = z + 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 ((i <= -7.5e+32) || !(i <= 1e+131)) {
tmp = y * i;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -7.5e+32) or not (i <= 1e+131): tmp = y * i else: tmp = z + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -7.5e+32) || !(i <= 1e+131)) tmp = Float64(y * i); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -7.5e+32) || ~((i <= 1e+131))) tmp = y * i; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -7.5e+32], N[Not[LessEqual[i, 1e+131]], $MachinePrecision]], N[(y * i), $MachinePrecision], N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -7.5 \cdot 10^{+32} \lor \neg \left(i \leq 10^{+131}\right):\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if i < -7.49999999999999959e32 or 9.9999999999999991e130 < i Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 55.7%
*-commutative55.7%
Simplified55.7%
if -7.49999999999999959e32 < i < 9.9999999999999991e130Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 65.4%
associate-/l*64.1%
associate-/l*64.1%
sub-neg64.1%
metadata-eval64.1%
associate-/l*64.1%
+-commutative64.1%
Simplified64.1%
Taylor expanded in a around inf 26.9%
Taylor expanded in z around 0 30.4%
+-commutative30.4%
Simplified30.4%
Final simplification39.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 7.5e+113) (+ 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 <= 7.5e+113) {
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 <= 7.5d+113) 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 <= 7.5e+113) {
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 <= 7.5e+113: 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 <= 7.5e+113) 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 <= 7.5e+113) 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, 7.5e+113], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.5 \cdot 10^{+113}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 7.5000000000000001e113Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 85.1%
Taylor expanded in z around inf 41.2%
if 7.5000000000000001e113 < a Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 73.4%
Taylor expanded in a around inf 48.8%
Final simplification42.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.2e+188) (* y i) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.2e+188) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.2d+188) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.2e+188) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.2e+188: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.2e+188) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.2e+188) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.2e+188], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.2 \cdot 10^{+188}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.2e188Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 26.4%
*-commutative26.4%
Simplified26.4%
if 1.2e188 < a Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 66.3%
associate-/l*66.3%
associate-/l*66.3%
sub-neg66.3%
metadata-eval66.3%
associate-/l*66.3%
+-commutative66.3%
Simplified66.3%
Taylor expanded in a around inf 41.8%
Taylor expanded in z around 0 55.8%
Final simplification29.7%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 65.1%
associate-/l*64.2%
associate-/l*64.2%
sub-neg64.2%
metadata-eval64.2%
associate-/l*64.2%
+-commutative64.2%
Simplified64.2%
Taylor expanded in a around inf 22.4%
Taylor expanded in z around 0 15.0%
Final simplification15.0%
herbie shell --seed 2024079
(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)))