
(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.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (or (<= x -1.1e+128) (not (<= x 1.9e+43)))
(+ a (+ t (+ z (+ t_1 (* x (log y))))))
(fma y i (+ a (+ t (+ z t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if ((x <= -1.1e+128) || !(x <= 1.9e+43)) {
tmp = a + (t + (z + (t_1 + (x * log(y)))));
} else {
tmp = fma(y, i, (a + (t + (z + t_1))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if ((x <= -1.1e+128) || !(x <= 1.9e+43)) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(x * log(y)))))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + t_1)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -1.1e+128], N[Not[LessEqual[x, 1.9e+43]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(t$95$1 + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{+128} \lor \neg \left(x \leq 1.9 \cdot 10^{+43}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.10000000000000008e128 or 1.90000000000000004e43 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 86.2%
if -1.10000000000000008e128 < x < 1.90000000000000004e43Initial 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%
Taylor expanded in x around 0 99.8%
Final simplification94.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.2e+153) (not (<= x 4.95e+154))) (+ a (+ t (+ z (+ (* -0.5 (log c)) (* x (log y)))))) (fma y i (+ a (+ t (+ z (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.2e+153) || !(x <= 4.95e+154)) {
tmp = a + (t + (z + ((-0.5 * log(c)) + (x * log(y)))));
} else {
tmp = fma(y, i, (a + (t + (z + (log(c) * (b - 0.5))))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.2e+153) || !(x <= 4.95e+154)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(-0.5 * log(c)) + Float64(x * log(y)))))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.2e+153], N[Not[LessEqual[x, 4.95e+154]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+153} \lor \neg \left(x \leq 4.95 \cdot 10^{+154}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(-0.5 \cdot \log c + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.2e153 or 4.95e154 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 89.5%
Taylor expanded in b around 0 83.5%
if -2.2e153 < x < 4.95e154Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 95.8%
Final simplification92.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.75e+152) (not (<= x 4.8e+154))) (+ a (+ t (+ z (+ (* -0.5 (log c)) (* x (log y)))))) (+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.75e+152) || !(x <= 4.8e+154)) {
tmp = a + (t + (z + ((-0.5 * log(c)) + (x * log(y)))));
} else {
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-3.75d+152)) .or. (.not. (x <= 4.8d+154))) then
tmp = a + (t + (z + (((-0.5d0) * log(c)) + (x * log(y)))))
else
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.75e+152) || !(x <= 4.8e+154)) {
tmp = a + (t + (z + ((-0.5 * Math.log(c)) + (x * Math.log(y)))));
} else {
tmp = a + (t + (z + ((y * i) + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.75e+152) or not (x <= 4.8e+154): tmp = a + (t + (z + ((-0.5 * math.log(c)) + (x * math.log(y))))) else: tmp = a + (t + (z + ((y * i) + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.75e+152) || !(x <= 4.8e+154)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(-0.5 * log(c)) + Float64(x * log(y)))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3.75e+152) || ~((x <= 4.8e+154))) tmp = a + (t + (z + ((-0.5 * log(c)) + (x * log(y))))); else tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.75e+152], N[Not[LessEqual[x, 4.8e+154]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.75 \cdot 10^{+152} \lor \neg \left(x \leq 4.8 \cdot 10^{+154}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(-0.5 \cdot \log c + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.75000000000000023e152 or 4.8000000000000003e154 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 89.5%
Taylor expanded in b around 0 83.5%
if -3.75000000000000023e152 < x < 4.8000000000000003e154Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 95.8%
Final simplification92.7%
(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.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.5e+248) (not (<= x 4e+158))) (* x (log y)) (+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.5e+248) || !(x <= 4e+158)) {
tmp = x * log(y);
} else {
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.5d+248)) .or. (.not. (x <= 4d+158))) then
tmp = x * log(y)
else
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.5e+248) || !(x <= 4e+158)) {
tmp = x * Math.log(y);
} else {
tmp = a + (t + (z + ((y * i) + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.5e+248) or not (x <= 4e+158): tmp = x * math.log(y) else: tmp = a + (t + (z + ((y * i) + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.5e+248) || !(x <= 4e+158)) tmp = Float64(x * log(y)); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.5e+248) || ~((x <= 4e+158))) tmp = x * log(y); else tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.5e+248], N[Not[LessEqual[x, 4e+158]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+248} \lor \neg \left(x \leq 4 \cdot 10^{+158}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.5e248 or 3.99999999999999981e158 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around -inf 61.8%
Taylor expanded in x around inf 70.7%
mul-1-neg70.7%
*-commutative70.7%
distribute-rgt-neg-in70.7%
Simplified70.7%
if -1.5e248 < x < 3.99999999999999981e158Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 94.4%
Final simplification89.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.1e+247) (not (<= x 4e+158))) (* x (log y)) (+ (* y i) (+ a (+ z (* (log c) (- b 0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.1e+247) || !(x <= 4e+158)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (a + (z + (log(c) * (b - 0.5))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-5.1d+247)) .or. (.not. (x <= 4d+158))) then
tmp = x * log(y)
else
tmp = (y * i) + (a + (z + (log(c) * (b - 0.5d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.1e+247) || !(x <= 4e+158)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (a + (z + (Math.log(c) * (b - 0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5.1e+247) or not (x <= 4e+158): tmp = x * math.log(y) else: tmp = (y * i) + (a + (z + (math.log(c) * (b - 0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.1e+247) || !(x <= 4e+158)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -5.1e+247) || ~((x <= 4e+158))) tmp = x * log(y); else tmp = (y * i) + (a + (z + (log(c) * (b - 0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.1e+247], N[Not[LessEqual[x, 4e+158]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.1 \cdot 10^{+247} \lor \neg \left(x \leq 4 \cdot 10^{+158}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.10000000000000002e247 or 3.99999999999999981e158 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around -inf 61.8%
Taylor expanded in x around inf 70.7%
mul-1-neg70.7%
*-commutative70.7%
distribute-rgt-neg-in70.7%
Simplified70.7%
if -5.10000000000000002e247 < x < 3.99999999999999981e158Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 94.4%
associate-+r+94.4%
sub-neg94.4%
metadata-eval94.4%
+-commutative94.4%
Simplified94.4%
Taylor expanded in t around 0 81.8%
Final simplification79.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -4.5e+74) (not (<= i 1.3e-69))) (+ (* y i) (+ z (+ t a))) (+ a (+ t (+ z (* (log c) (- b 0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -4.5e+74) || !(i <= 1.3e-69)) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-4.5d+74)) .or. (.not. (i <= 1.3d-69))) then
tmp = (y * i) + (z + (t + a))
else
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -4.5e+74) || !(i <= 1.3e-69)) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -4.5e+74) or not (i <= 1.3e-69): tmp = (y * i) + (z + (t + a)) else: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -4.5e+74) || !(i <= 1.3e-69)) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); else tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -4.5e+74) || ~((i <= 1.3e-69))) tmp = (y * i) + (z + (t + a)); else tmp = a + (t + (z + (log(c) * (b - 0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -4.5e+74], N[Not[LessEqual[i, 1.3e-69]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.5 \cdot 10^{+74} \lor \neg \left(i \leq 1.3 \cdot 10^{-69}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\end{array}
\end{array}
if i < -4.5e74 or 1.3000000000000001e-69 < i Initial program 99.9%
add-cbrt-cube99.8%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 82.8%
associate-+r+82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in z around inf 75.4%
if -4.5e74 < i < 1.3000000000000001e-69Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 96.8%
Taylor expanded in x around 0 74.4%
Final simplification74.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -2.85e+50) (not (<= i 1.3e-69))) (+ (* y i) (+ z (+ t a))) (+ a (+ t (+ z (* b (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -2.85e+50) || !(i <= 1.3e-69)) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + (t + (z + (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 ((i <= (-2.85d+50)) .or. (.not. (i <= 1.3d-69))) then
tmp = (y * i) + (z + (t + a))
else
tmp = a + (t + (z + (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 ((i <= -2.85e+50) || !(i <= 1.3e-69)) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + (t + (z + (b * Math.log(c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -2.85e+50) or not (i <= 1.3e-69): tmp = (y * i) + (z + (t + a)) else: tmp = a + (t + (z + (b * math.log(c)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -2.85e+50) || !(i <= 1.3e-69)) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); else tmp = Float64(a + Float64(t + Float64(z + Float64(b * log(c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -2.85e+50) || ~((i <= 1.3e-69))) tmp = (y * i) + (z + (t + a)); else tmp = a + (t + (z + (b * log(c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -2.85e+50], N[Not[LessEqual[i, 1.3e-69]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.85 \cdot 10^{+50} \lor \neg \left(i \leq 1.3 \cdot 10^{-69}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\
\end{array}
\end{array}
if i < -2.8500000000000001e50 or 1.3000000000000001e-69 < i Initial program 99.9%
add-cbrt-cube99.8%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 82.9%
associate-+r+82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in z around inf 74.8%
if -2.8500000000000001e50 < i < 1.3000000000000001e-69Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.7%
Taylor expanded in y around 0 97.5%
Taylor expanded in x around 0 74.5%
Taylor expanded in b around inf 72.7%
Final simplification73.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -7.5e+247) (not (<= x 4e+158))) (* x (log y)) (+ (* y i) (+ z (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -7.5e+247) || !(x <= 4e+158)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (z + (t + 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 ((x <= (-7.5d+247)) .or. (.not. (x <= 4d+158))) then
tmp = x * log(y)
else
tmp = (y * i) + (z + (t + 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 ((x <= -7.5e+247) || !(x <= 4e+158)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -7.5e+247) or not (x <= 4e+158): tmp = x * math.log(y) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -7.5e+247) || !(x <= 4e+158)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -7.5e+247) || ~((x <= 4e+158))) tmp = x * log(y); else tmp = (y * i) + (z + (t + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -7.5e+247], N[Not[LessEqual[x, 4e+158]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+247} \lor \neg \left(x \leq 4 \cdot 10^{+158}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -7.499999999999999e247 or 3.99999999999999981e158 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around -inf 61.8%
Taylor expanded in x around inf 70.7%
mul-1-neg70.7%
*-commutative70.7%
distribute-rgt-neg-in70.7%
Simplified70.7%
if -7.499999999999999e247 < x < 3.99999999999999981e158Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 94.4%
associate-+r+94.4%
sub-neg94.4%
metadata-eval94.4%
+-commutative94.4%
Simplified94.4%
Taylor expanded in z around inf 73.4%
Final simplification72.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -8.8e+192) (not (<= b 1.25e+227))) (* b (log c)) (+ (* y i) (+ z (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -8.8e+192) || !(b <= 1.25e+227)) {
tmp = b * log(c);
} else {
tmp = (y * i) + (z + (t + 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 ((b <= (-8.8d+192)) .or. (.not. (b <= 1.25d+227))) then
tmp = b * log(c)
else
tmp = (y * i) + (z + (t + 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 ((b <= -8.8e+192) || !(b <= 1.25e+227)) {
tmp = b * Math.log(c);
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -8.8e+192) or not (b <= 1.25e+227): tmp = b * math.log(c) else: tmp = (y * i) + (z + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -8.8e+192) || !(b <= 1.25e+227)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -8.8e+192) || ~((b <= 1.25e+227))) tmp = b * log(c); else tmp = (y * i) + (z + (t + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -8.8e+192], N[Not[LessEqual[b, 1.25e+227]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+192} \lor \neg \left(b \leq 1.25 \cdot 10^{+227}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if b < -8.8000000000000003e192 or 1.2499999999999999e227 < b Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in t around -inf 64.1%
Taylor expanded in b around inf 69.2%
mul-1-neg69.2%
*-commutative69.2%
distribute-rgt-neg-in69.2%
Simplified69.2%
if -8.8000000000000003e192 < b < 1.2499999999999999e227Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 77.9%
associate-+r+77.9%
sub-neg77.9%
metadata-eval77.9%
+-commutative77.9%
Simplified77.9%
Taylor expanded in z around inf 70.3%
Final simplification70.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.3e-131) z (if (<= a 2.45e+207) (* 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 <= 4.3e-131) {
tmp = z;
} else if (a <= 2.45e+207) {
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 <= 4.3d-131) then
tmp = z
else if (a <= 2.45d+207) 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 <= 4.3e-131) {
tmp = z;
} else if (a <= 2.45e+207) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.3e-131: tmp = z elif a <= 2.45e+207: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.3e-131) tmp = z; elseif (a <= 2.45e+207) 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 <= 4.3e-131) tmp = z; elseif (a <= 2.45e+207) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.3e-131], z, If[LessEqual[a, 2.45e+207], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.3 \cdot 10^{-131}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{+207}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.30000000000000019e-131Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 15.2%
if 4.30000000000000019e-131 < a < 2.45e207Initial 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%
Taylor expanded in y around inf 26.4%
*-commutative26.4%
Simplified26.4%
if 2.45e207 < a 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%
Taylor expanded in a around inf 57.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.02e+163) (+ 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.02e+163) {
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.02d+163)) 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.02e+163) {
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.02e+163: 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.02e+163) 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.02e+163) 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.02e+163], 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.02 \cdot 10^{+163}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.02e163Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 68.8%
if -1.02e163 < z Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 41.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.85e+184) 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.85e+184) {
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.85d+184)) 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.85e+184) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.85e+184: 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.85e+184) 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.85e+184) 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.85e+184], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+184}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.8499999999999999e184Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 54.4%
if -1.8499999999999999e184 < z Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 41.4%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + (t + 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 = (y * i) + (z + (t + a))
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) + (z + (t + a));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + (t + a))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + Float64(t + a))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + (t + a)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + \left(t + a\right)\right)
\end{array}
Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 80.1%
associate-+r+80.1%
sub-neg80.1%
metadata-eval80.1%
+-commutative80.1%
Simplified80.1%
Taylor expanded in z around inf 62.7%
Final simplification62.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.7e+162) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.7e+162) {
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 <= (-1.7d+162)) 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 <= -1.7e+162) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.7e+162: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.7e+162) 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 <= -1.7e+162) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.7e+162], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+162}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.70000000000000001e162Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 45.6%
if -1.70000000000000001e162 < z Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in a around inf 17.0%
(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%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in a around inf 15.1%
herbie shell --seed 2024144
(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)))