
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.7e+158)
(+ (* y i) (+ z t_1))
(if (<= x 1.6e+63)
(+ a (+ (+ z t) (fma (log c) (+ b -0.5) (* y i))))
(if (<= x 1.7e+184)
(+ a (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
(+ (* 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 = x * log(y);
double tmp;
if (x <= -1.7e+158) {
tmp = (y * i) + (z + t_1);
} else if (x <= 1.6e+63) {
tmp = a + ((z + t) + fma(log(c), (b + -0.5), (y * i)));
} else if (x <= 1.7e+184) {
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.7e+158) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (x <= 1.6e+63) tmp = Float64(a + Float64(Float64(z + t) + fma(log(c), Float64(b + -0.5), Float64(y * i)))); elseif (x <= 1.7e+184) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+158], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+63], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+184], N[(a + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+158}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+63}:\\
\;\;\;\;a + \left(\left(z + t\right) + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+184}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if x < -1.7e158Initial program 99.8%
Taylor expanded in x around inf 99.8%
Taylor expanded in z around inf 90.6%
Taylor expanded in x around 0 90.6%
if -1.7e158 < x < 1.60000000000000006e63Initial program 99.9%
Taylor expanded in x around 0 98.2%
associate-+r+98.2%
+-commutative98.2%
sub-neg98.2%
metadata-eval98.2%
*-commutative98.2%
fma-undefine98.2%
+-commutative98.2%
Simplified98.2%
if 1.60000000000000006e63 < x < 1.7000000000000001e184Initial program 99.9%
Taylor expanded in y around 0 94.2%
if 1.7000000000000001e184 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in a around inf 91.6%
Taylor expanded in x around 0 91.6%
Final simplification96.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.65e+158)
(+ (* y i) (+ z t_1))
(if (<= x 3.4e+174)
(+ a (+ (+ z t) (fma (log c) (+ b -0.5) (* y i))))
(+ (* 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 = x * log(y);
double tmp;
if (x <= -1.65e+158) {
tmp = (y * i) + (z + t_1);
} else if (x <= 3.4e+174) {
tmp = a + ((z + t) + fma(log(c), (b + -0.5), (y * i)));
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.65e+158) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (x <= 3.4e+174) tmp = Float64(a + Float64(Float64(z + t) + fma(log(c), Float64(b + -0.5), Float64(y * i)))); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+158], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.4e+174], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+158}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+174}:\\
\;\;\;\;a + \left(\left(z + t\right) + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if x < -1.65000000000000009e158Initial program 99.8%
Taylor expanded in x around inf 99.8%
Taylor expanded in z around inf 90.6%
Taylor expanded in x around 0 90.6%
if -1.65000000000000009e158 < x < 3.4000000000000001e174Initial program 99.9%
Taylor expanded in x around 0 95.2%
associate-+r+95.2%
+-commutative95.2%
sub-neg95.2%
metadata-eval95.2%
*-commutative95.2%
fma-undefine95.2%
+-commutative95.2%
Simplified95.2%
if 3.4000000000000001e174 < x Initial program 99.7%
Taylor expanded in x around inf 99.8%
Taylor expanded in a around inf 89.7%
Taylor expanded in x around 0 89.7%
Final simplification94.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.65e+158)
(+ (* y i) (+ z t_1))
(if (<= x 3.5e+173)
(+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))
(+ (* 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 = x * log(y);
double tmp;
if (x <= -1.65e+158) {
tmp = (y * i) + (z + t_1);
} else if (x <= 3.5e+173) {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
} 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 = x * log(y)
if (x <= (-1.65d+158)) then
tmp = (y * i) + (z + t_1)
else if (x <= 3.5d+173) then
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
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 = x * Math.log(y);
double tmp;
if (x <= -1.65e+158) {
tmp = (y * i) + (z + t_1);
} else if (x <= 3.5e+173) {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -1.65e+158: tmp = (y * i) + (z + t_1) elif x <= 3.5e+173: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.65e+158) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (x <= 3.5e+173) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (x <= -1.65e+158) tmp = (y * i) + (z + t_1); elseif (x <= 3.5e+173) tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); 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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+158], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+173], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+158}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+173}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if x < -1.65000000000000009e158Initial program 99.8%
Taylor expanded in x around inf 99.8%
Taylor expanded in z around inf 90.6%
Taylor expanded in x around 0 90.6%
if -1.65000000000000009e158 < x < 3.4999999999999999e173Initial program 99.9%
Taylor expanded in x around 0 95.2%
if 3.4999999999999999e173 < x Initial program 99.7%
Taylor expanded in x around inf 99.8%
Taylor expanded in a around inf 89.7%
Taylor expanded in x around 0 89.7%
Final simplification93.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y 1.8e-101)
(+ a (+ t (+ z (* (log c) (- b 0.5)))))
(if (<= y 4.5e-63)
(+ (* y i) (+ z (* x (log y))))
(+ a (+ (+ z t) (* y (+ i (* b (/ (log c) y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.8e-101) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else if (y <= 4.5e-63) {
tmp = (y * i) + (z + (x * log(y)));
} else {
tmp = a + ((z + t) + (y * (i + (b * (log(c) / 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 (y <= 1.8d-101) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else if (y <= 4.5d-63) then
tmp = (y * i) + (z + (x * log(y)))
else
tmp = a + ((z + t) + (y * (i + (b * (log(c) / 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 (y <= 1.8e-101) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (y <= 4.5e-63) {
tmp = (y * i) + (z + (x * Math.log(y)));
} else {
tmp = a + ((z + t) + (y * (i + (b * (Math.log(c) / y)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.8e-101: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) elif y <= 4.5e-63: tmp = (y * i) + (z + (x * math.log(y))) else: tmp = a + ((z + t) + (y * (i + (b * (math.log(c) / y))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.8e-101) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (y <= 4.5e-63) tmp = Float64(Float64(y * i) + Float64(z + Float64(x * log(y)))); else tmp = Float64(a + Float64(Float64(z + t) + Float64(y * Float64(i + Float64(b * Float64(log(c) / y)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 1.8e-101) tmp = a + (t + (z + (log(c) * (b - 0.5)))); elseif (y <= 4.5e-63) tmp = (y * i) + (z + (x * log(y))); else tmp = a + ((z + t) + (y * (i + (b * (log(c) / y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.8e-101], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-63], N[(N[(y * i), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(z + t), $MachinePrecision] + N[(y * N[(i + N[(b * N[(N[Log[c], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-101}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-63}:\\
\;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(\left(z + t\right) + y \cdot \left(i + b \cdot \frac{\log c}{y}\right)\right)\\
\end{array}
\end{array}
if y < 1.8e-101Initial program 99.9%
Taylor expanded in y around 0 97.8%
Taylor expanded in x around 0 71.9%
if 1.8e-101 < y < 4.5e-63Initial program 99.9%
Taylor expanded in x around inf 80.8%
Taylor expanded in z around inf 63.9%
Taylor expanded in x around 0 76.5%
if 4.5e-63 < y Initial program 99.9%
Taylor expanded in x around 0 89.7%
associate-+r+89.7%
+-commutative89.7%
sub-neg89.7%
metadata-eval89.7%
*-commutative89.7%
fma-undefine89.7%
+-commutative89.7%
Simplified89.7%
Taylor expanded in y around inf 88.6%
Taylor expanded in b around inf 87.5%
associate-/l*87.4%
Simplified87.4%
Final simplification81.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -1.6e+210) (not (<= b 3.9e+133))) (+ a (+ (+ z t) (* b (log c)))) (+ a (+ (* y i) (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -1.6e+210) || !(b <= 3.9e+133)) {
tmp = a + ((z + t) + (b * log(c)));
} else {
tmp = a + ((y * i) + (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 ((b <= (-1.6d+210)) .or. (.not. (b <= 3.9d+133))) then
tmp = a + ((z + t) + (b * log(c)))
else
tmp = a + ((y * i) + (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 ((b <= -1.6e+210) || !(b <= 3.9e+133)) {
tmp = a + ((z + t) + (b * Math.log(c)));
} else {
tmp = a + ((y * i) + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -1.6e+210) or not (b <= 3.9e+133): tmp = a + ((z + t) + (b * math.log(c))) else: tmp = a + ((y * i) + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -1.6e+210) || !(b <= 3.9e+133)) tmp = Float64(a + Float64(Float64(z + t) + Float64(b * log(c)))); else tmp = Float64(a + Float64(Float64(y * i) + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -1.6e+210) || ~((b <= 3.9e+133))) tmp = a + ((z + t) + (b * log(c))); else tmp = a + ((y * i) + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -1.6e+210], N[Not[LessEqual[b, 3.9e+133]], $MachinePrecision]], N[(a + N[(N[(z + t), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{+210} \lor \neg \left(b \leq 3.9 \cdot 10^{+133}\right):\\
\;\;\;\;a + \left(\left(z + t\right) + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\
\end{array}
\end{array}
if b < -1.6000000000000001e210 or 3.90000000000000014e133 < b Initial program 99.8%
Taylor expanded in x around 0 94.1%
associate-+r+94.1%
+-commutative94.1%
sub-neg94.1%
metadata-eval94.1%
*-commutative94.1%
fma-undefine94.1%
+-commutative94.1%
Simplified94.1%
Taylor expanded in b around inf 81.0%
*-commutative81.0%
Simplified81.0%
if -1.6000000000000001e210 < b < 3.90000000000000014e133Initial program 99.9%
Taylor expanded in x around 0 78.1%
associate-+r+78.1%
+-commutative78.1%
sub-neg78.1%
metadata-eval78.1%
*-commutative78.1%
fma-undefine78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in y around inf 72.2%
Final simplification73.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= z -5e+144)
(+ (* y i) (+ z t_1))
(if (<= z -3.65e+18)
(+ a (+ (+ z t) (* b (log c))))
(+ (* 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 = x * log(y);
double tmp;
if (z <= -5e+144) {
tmp = (y * i) + (z + t_1);
} else if (z <= -3.65e+18) {
tmp = a + ((z + t) + (b * log(c)));
} 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 = x * log(y)
if (z <= (-5d+144)) then
tmp = (y * i) + (z + t_1)
else if (z <= (-3.65d+18)) then
tmp = a + ((z + t) + (b * log(c)))
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 = x * Math.log(y);
double tmp;
if (z <= -5e+144) {
tmp = (y * i) + (z + t_1);
} else if (z <= -3.65e+18) {
tmp = a + ((z + t) + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if z <= -5e+144: tmp = (y * i) + (z + t_1) elif z <= -3.65e+18: tmp = a + ((z + t) + (b * math.log(c))) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (z <= -5e+144) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (z <= -3.65e+18) tmp = Float64(a + Float64(Float64(z + t) + Float64(b * log(c)))); 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 = x * log(y); tmp = 0.0; if (z <= -5e+144) tmp = (y * i) + (z + t_1); elseif (z <= -3.65e+18) tmp = a + ((z + t) + (b * log(c))); 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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+144], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.65e+18], N[(a + N[(N[(z + t), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;z \leq -5 \cdot 10^{+144}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{elif}\;z \leq -3.65 \cdot 10^{+18}:\\
\;\;\;\;a + \left(\left(z + t\right) + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if z < -4.9999999999999999e144Initial program 99.9%
Taylor expanded in x around inf 70.4%
Taylor expanded in z around inf 59.0%
Taylor expanded in x around 0 73.6%
if -4.9999999999999999e144 < z < -3.65e18Initial program 99.8%
Taylor expanded in x around 0 85.2%
associate-+r+85.2%
+-commutative85.2%
sub-neg85.2%
metadata-eval85.2%
*-commutative85.2%
fma-undefine85.2%
+-commutative85.2%
Simplified85.2%
Taylor expanded in b around inf 56.9%
*-commutative56.9%
Simplified56.9%
if -3.65e18 < z Initial program 99.9%
Taylor expanded in x around inf 75.5%
Taylor expanded in a around inf 52.8%
Taylor expanded in x around 0 59.9%
Final simplification61.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -3.1e+143)
(+ a (+ (* y i) (+ z t)))
(if (<= z -3.6e+18)
(+ a (+ (+ z t) (* b (log c))))
(+ (* y i) (+ a (* x (log y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.1e+143) {
tmp = a + ((y * i) + (z + t));
} else if (z <= -3.6e+18) {
tmp = a + ((z + t) + (b * log(c)));
} else {
tmp = (y * i) + (a + (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 (z <= (-3.1d+143)) then
tmp = a + ((y * i) + (z + t))
else if (z <= (-3.6d+18)) then
tmp = a + ((z + t) + (b * log(c)))
else
tmp = (y * i) + (a + (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 (z <= -3.1e+143) {
tmp = a + ((y * i) + (z + t));
} else if (z <= -3.6e+18) {
tmp = a + ((z + t) + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (x * Math.log(y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.1e+143: tmp = a + ((y * i) + (z + t)) elif z <= -3.6e+18: tmp = a + ((z + t) + (b * math.log(c))) else: tmp = (y * i) + (a + (x * math.log(y))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.1e+143) tmp = Float64(a + Float64(Float64(y * i) + Float64(z + t))); elseif (z <= -3.6e+18) tmp = Float64(a + Float64(Float64(z + t) + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -3.1e+143) tmp = a + ((y * i) + (z + t)); elseif (z <= -3.6e+18) tmp = a + ((z + t) + (b * log(c))); else tmp = (y * i) + (a + (x * log(y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.1e+143], N[(a + N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e+18], N[(a + N[(N[(z + t), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+143}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+18}:\\
\;\;\;\;a + \left(\left(z + t\right) + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + x \cdot \log y\right)\\
\end{array}
\end{array}
if z < -3.0999999999999999e143Initial program 99.9%
Taylor expanded in x around 0 89.1%
associate-+r+89.1%
+-commutative89.1%
sub-neg89.1%
metadata-eval89.1%
*-commutative89.1%
fma-undefine89.1%
+-commutative89.1%
Simplified89.1%
Taylor expanded in y around inf 86.1%
if -3.0999999999999999e143 < z < -3.6e18Initial program 99.8%
Taylor expanded in x around 0 85.2%
associate-+r+85.2%
+-commutative85.2%
sub-neg85.2%
metadata-eval85.2%
*-commutative85.2%
fma-undefine85.2%
+-commutative85.2%
Simplified85.2%
Taylor expanded in b around inf 56.9%
*-commutative56.9%
Simplified56.9%
if -3.6e18 < z Initial program 99.9%
Taylor expanded in x around inf 75.5%
Taylor expanded in a around inf 52.8%
Taylor expanded in x around 0 59.9%
Final simplification62.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.9e+36) (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))) (+ (* y i) (+ a (* x (log y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.9e+36) {
tmp = t + (z + ((y * i) + (log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (a + (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 (a <= 3.9d+36) then
tmp = t + (z + ((y * i) + (log(c) * (b - 0.5d0))))
else
tmp = (y * i) + (a + (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 (a <= 3.9e+36) {
tmp = t + (z + ((y * i) + (Math.log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (a + (x * Math.log(y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.9e+36: tmp = t + (z + ((y * i) + (math.log(c) * (b - 0.5)))) else: tmp = (y * i) + (a + (x * math.log(y))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.9e+36) tmp = Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 3.9e+36) tmp = t + (z + ((y * i) + (log(c) * (b - 0.5)))); else tmp = (y * i) + (a + (x * log(y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.9e+36], N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.9 \cdot 10^{+36}:\\
\;\;\;\;t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + x \cdot \log y\right)\\
\end{array}
\end{array}
if a < 3.90000000000000021e36Initial program 99.9%
Taylor expanded in x around 0 81.6%
associate-+r+81.6%
+-commutative81.6%
sub-neg81.6%
metadata-eval81.6%
*-commutative81.6%
fma-undefine81.6%
+-commutative81.6%
Simplified81.6%
Taylor expanded in a around 0 70.6%
if 3.90000000000000021e36 < a Initial program 99.9%
Taylor expanded in x around inf 84.3%
Taylor expanded in a around inf 58.8%
Taylor expanded in x around 0 66.8%
Final simplification69.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.4e+224) (not (<= x 1.56e+218))) (* x (log y)) (+ a (+ (* y i) (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.4e+224) || !(x <= 1.56e+218)) {
tmp = x * log(y);
} else {
tmp = a + ((y * i) + (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 <= (-4.4d+224)) .or. (.not. (x <= 1.56d+218))) then
tmp = x * log(y)
else
tmp = a + ((y * i) + (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 <= -4.4e+224) || !(x <= 1.56e+218)) {
tmp = x * Math.log(y);
} else {
tmp = a + ((y * i) + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.4e+224) or not (x <= 1.56e+218): tmp = x * math.log(y) else: tmp = a + ((y * i) + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.4e+224) || !(x <= 1.56e+218)) tmp = Float64(x * log(y)); else tmp = Float64(a + Float64(Float64(y * i) + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -4.4e+224) || ~((x <= 1.56e+218))) tmp = x * log(y); else tmp = a + ((y * i) + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.4e+224], N[Not[LessEqual[x, 1.56e+218]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+224} \lor \neg \left(x \leq 1.56 \cdot 10^{+218}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\
\end{array}
\end{array}
if x < -4.3999999999999999e224 or 1.55999999999999997e218 < x Initial program 99.8%
Taylor expanded in x around inf 76.2%
if -4.3999999999999999e224 < x < 1.55999999999999997e218Initial program 99.9%
Taylor expanded in x around 0 92.5%
associate-+r+92.5%
+-commutative92.5%
sub-neg92.5%
metadata-eval92.5%
*-commutative92.5%
fma-undefine92.5%
+-commutative92.5%
Simplified92.5%
Taylor expanded in y around inf 72.3%
Final simplification72.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.15e+83) (+ 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 <= -1.15e+83) {
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 <= (-1.15d+83)) 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 <= -1.15e+83) {
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 <= -1.15e+83: 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 <= -1.15e+83) 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 <= -1.15e+83) 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, -1.15e+83], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+83}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.14999999999999997e83Initial program 99.9%
Taylor expanded in x around inf 70.0%
Taylor expanded in z around inf 60.9%
Taylor expanded in x around 0 60.7%
+-commutative60.7%
Simplified60.7%
if -1.14999999999999997e83 < z Initial program 99.9%
Taylor expanded in x around inf 76.7%
Taylor expanded in a around inf 52.7%
Taylor expanded in x around 0 41.0%
Final simplification43.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.75e+170) z (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.75e+170) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.75d+170)) then
tmp = z
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.75e+170) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.75e+170: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.75e+170) tmp = z; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.75e+170) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.75e+170], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+170}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.75000000000000003e170Initial program 99.9%
Taylor expanded in z around inf 56.3%
if -1.75000000000000003e170 < z Initial program 99.9%
Taylor expanded in x around inf 75.8%
Taylor expanded in a around inf 52.3%
Taylor expanded in x around 0 40.7%
Final simplification41.9%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ (* y i) (+ z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + ((y * i) + (z + t));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a + ((y * i) + (z + t))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + ((y * i) + (z + t));
}
def code(x, y, z, t, a, b, c, i): return a + ((y * i) + (z + t))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(Float64(y * i) + Float64(z + t))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + ((y * i) + (z + t)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(y \cdot i + \left(z + t\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 81.2%
associate-+r+81.2%
+-commutative81.2%
sub-neg81.2%
metadata-eval81.2%
*-commutative81.2%
fma-undefine81.3%
+-commutative81.3%
Simplified81.3%
Taylor expanded in y around inf 64.3%
Final simplification64.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 8.8e+71) z (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 8.8e+71) {
tmp = z;
} else {
tmp = 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 (y <= 8.8d+71) then
tmp = z
else
tmp = 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 (y <= 8.8e+71) {
tmp = z;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 8.8e+71: tmp = z else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 8.8e+71) tmp = z; else tmp = Float64(y * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 8.8e+71) tmp = z; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 8.8e+71], z, N[(y * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.8 \cdot 10^{+71}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if y < 8.79999999999999978e71Initial program 99.9%
Taylor expanded in z around inf 14.0%
if 8.79999999999999978e71 < y Initial program 99.9%
Taylor expanded in y around inf 52.4%
*-commutative52.4%
Simplified52.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -8.5e+94) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -8.5e+94) {
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 <= (-8.5d+94)) 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 <= -8.5e+94) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -8.5e+94: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -8.5e+94) 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 <= -8.5e+94) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -8.5e+94], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+94}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -8.50000000000000054e94Initial program 99.9%
Taylor expanded in z around inf 43.8%
if -8.50000000000000054e94 < z Initial program 99.9%
Taylor expanded in a around inf 16.2%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 15.7%
herbie shell --seed 2024087
(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)))