
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (or (<= x -2.85e+171) (not (<= x 3.5e+195)))
(+ a (+ t (+ (* x (log y)) t_1)))
(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 <= -2.85e+171) || !(x <= 3.5e+195)) {
tmp = a + (t + ((x * log(y)) + t_1));
} 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 <= -2.85e+171) || !(x <= 3.5e+195)) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + t_1))); 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, -2.85e+171], N[Not[LessEqual[x, 3.5e+195]], $MachinePrecision]], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $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 -2.85 \cdot 10^{+171} \lor \neg \left(x \leq 3.5 \cdot 10^{+195}\right):\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + t\_1\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 < -2.85e171 or 3.5000000000000002e195 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around 0 88.2%
Taylor expanded in z around 0 87.4%
if -2.85e171 < x < 3.5000000000000002e195Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 94.9%
Final simplification93.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (or (<= x -1.9e+170) (not (<= x 1.9e+195)))
(+ a (+ t (+ (* x (log y)) t_1)))
(+ a (+ t (+ z (+ (* y i) 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.9e+170) || !(x <= 1.9e+195)) {
tmp = a + (t + ((x * log(y)) + t_1));
} else {
tmp = a + (t + (z + ((y * i) + 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 = log(c) * (b - 0.5d0)
if ((x <= (-1.9d+170)) .or. (.not. (x <= 1.9d+195))) then
tmp = a + (t + ((x * log(y)) + t_1))
else
tmp = a + (t + (z + ((y * i) + 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 = Math.log(c) * (b - 0.5);
double tmp;
if ((x <= -1.9e+170) || !(x <= 1.9e+195)) {
tmp = a + (t + ((x * Math.log(y)) + t_1));
} else {
tmp = a + (t + (z + ((y * i) + t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) tmp = 0 if (x <= -1.9e+170) or not (x <= 1.9e+195): tmp = a + (t + ((x * math.log(y)) + t_1)) else: tmp = a + (t + (z + ((y * i) + 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.9e+170) || !(x <= 1.9e+195)) tmp = Float64(a + Float64(t + Float64(Float64(x * log(y)) + t_1))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b - 0.5); tmp = 0.0; if ((x <= -1.9e+170) || ~((x <= 1.9e+195))) tmp = a + (t + ((x * log(y)) + t_1)); else tmp = a + (t + (z + ((y * i) + t_1))); end tmp_2 = 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.9e+170], N[Not[LessEqual[x, 1.9e+195]], $MachinePrecision]], N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + 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.9 \cdot 10^{+170} \lor \neg \left(x \leq 1.9 \cdot 10^{+195}\right):\\
\;\;\;\;a + \left(t + \left(x \cdot \log y + t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.8999999999999999e170 or 1.9e195 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around 0 88.2%
Taylor expanded in z around 0 87.4%
if -1.8999999999999999e170 < x < 1.9e195Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 94.9%
Final simplification93.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= y 35000.0)
(+ a (+ t (+ z (+ (* x (log y)) t_1))))
(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 (y <= 35000.0) {
tmp = a + (t + (z + ((x * log(y)) + t_1)));
} 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 (y <= 35000.0) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1)))); 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[LessEqual[y, 35000.0], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $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}\;y \leq 35000:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\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 y < 35000Initial 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.9%
Simplified99.9%
Taylor expanded in y around 0 97.5%
if 35000 < y Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 90.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 (+ (* 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.9%
Taylor expanded in b around inf 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification99.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.8e+194) (not (<= x 4.6e+185))) (+ a (+ (* x (log y)) (+ z t))) (+ 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 <= -4.8e+194) || !(x <= 4.6e+185)) {
tmp = a + ((x * log(y)) + (z + t));
} 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 <= (-4.8d+194)) .or. (.not. (x <= 4.6d+185))) then
tmp = a + ((x * log(y)) + (z + t))
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 <= -4.8e+194) || !(x <= 4.6e+185)) {
tmp = a + ((x * Math.log(y)) + (z + t));
} 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 <= -4.8e+194) or not (x <= 4.6e+185): tmp = a + ((x * math.log(y)) + (z + t)) 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 <= -4.8e+194) || !(x <= 4.6e+185)) tmp = Float64(a + Float64(Float64(x * log(y)) + Float64(z + t))); 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 <= -4.8e+194) || ~((x <= 4.6e+185))) tmp = a + ((x * log(y)) + (z + t)); 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, -4.8e+194], N[Not[LessEqual[x, 4.6e+185]], $MachinePrecision]], N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(z + t), $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 -4.8 \cdot 10^{+194} \lor \neg \left(x \leq 4.6 \cdot 10^{+185}\right):\\
\;\;\;\;a + \left(x \cdot \log y + \left(z + t\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 < -4.8e194 or 4.6000000000000003e185 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in b around 0 92.0%
associate-+r+92.0%
fma-define92.0%
+-commutative92.0%
*-commutative92.0%
fma-define92.0%
Simplified92.0%
Taylor expanded in y around 0 81.8%
Taylor expanded in x around inf 81.8%
if -4.8e194 < x < 4.6000000000000003e185Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 94.3%
Final simplification91.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.5e+171) (not (<= x 1.75e+192))) (+ (* x (log y)) (* y i)) (+ 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 <= -5.5e+171) || !(x <= 1.75e+192)) {
tmp = (x * log(y)) + (y * i);
} 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 <= (-5.5d+171)) .or. (.not. (x <= 1.75d+192))) then
tmp = (x * log(y)) + (y * i)
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 <= -5.5e+171) || !(x <= 1.75e+192)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = a + ((y * i) + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5.5e+171) or not (x <= 1.75e+192): tmp = (x * math.log(y)) + (y * i) else: tmp = a + ((y * i) + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.5e+171) || !(x <= 1.75e+192)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); 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 <= -5.5e+171) || ~((x <= 1.75e+192))) tmp = (x * log(y)) + (y * i); 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, -5.5e+171], N[Not[LessEqual[x, 1.75e+192]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $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 -5.5 \cdot 10^{+171} \lor \neg \left(x \leq 1.75 \cdot 10^{+192}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\
\end{array}
\end{array}
if x < -5.5000000000000003e171 or 1.74999999999999991e192 < x Initial program 99.7%
add-cbrt-cube99.8%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 74.4%
if -5.5000000000000003e171 < x < 1.74999999999999991e192Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in b around 0 81.2%
associate-+r+81.2%
fma-define81.2%
+-commutative81.2%
*-commutative81.2%
fma-define81.2%
Simplified81.2%
Taylor expanded in y around inf 75.1%
*-commutative75.1%
Simplified75.1%
Final simplification75.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 36000.0) (+ a (+ (* x (log y)) (+ z t))) (+ 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 (y <= 36000.0) {
tmp = a + ((x * log(y)) + (z + t));
} 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 (y <= 36000.0d0) then
tmp = a + ((x * log(y)) + (z + t))
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 (y <= 36000.0) {
tmp = a + ((x * Math.log(y)) + (z + t));
} else {
tmp = a + ((y * i) + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 36000.0: tmp = a + ((x * math.log(y)) + (z + t)) else: tmp = a + ((y * i) + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 36000.0) tmp = Float64(a + Float64(Float64(x * log(y)) + Float64(z + t))); 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 (y <= 36000.0) tmp = a + ((x * log(y)) + (z + t)); else tmp = a + ((y * i) + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 36000.0], N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 36000:\\
\;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\
\end{array}
\end{array}
if y < 36000Initial 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.9%
Simplified99.9%
Taylor expanded in b around 0 78.8%
associate-+r+78.8%
fma-define78.8%
+-commutative78.8%
*-commutative78.8%
fma-define78.8%
Simplified78.8%
Taylor expanded in y around 0 76.5%
Taylor expanded in x around inf 75.1%
if 36000 < y Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in b around 0 87.3%
associate-+r+87.3%
fma-define87.3%
+-commutative87.3%
*-commutative87.3%
fma-define87.3%
Simplified87.3%
Taylor expanded in y around inf 77.3%
*-commutative77.3%
Simplified77.3%
Final simplification76.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= b -5.2e+268) (* i (/ (* b (log c)) i)) (+ 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 <= -5.2e+268) {
tmp = i * ((b * log(c)) / i);
} 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 <= (-5.2d+268)) then
tmp = i * ((b * log(c)) / i)
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 <= -5.2e+268) {
tmp = i * ((b * Math.log(c)) / i);
} else {
tmp = a + ((y * i) + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if b <= -5.2e+268: tmp = i * ((b * math.log(c)) / i) else: tmp = a + ((y * i) + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (b <= -5.2e+268) tmp = Float64(i * Float64(Float64(b * log(c)) / i)); 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 <= -5.2e+268) tmp = i * ((b * log(c)) / i); else tmp = a + ((y * i) + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[b, -5.2e+268], N[(i * N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] / i), $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 -5.2 \cdot 10^{+268}:\\
\;\;\;\;i \cdot \frac{b \cdot \log c}{i}\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\
\end{array}
\end{array}
if b < -5.19999999999999986e268Initial 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.8%
Taylor expanded in i around inf 63.2%
Taylor expanded in x around 0 64.2%
associate-+r+64.2%
associate-+r+64.2%
sub-neg64.2%
metadata-eval64.2%
associate-/l*64.0%
+-commutative64.0%
Simplified64.0%
Taylor expanded in b around inf 64.2%
if -5.19999999999999986e268 < b Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in b around 0 86.2%
associate-+r+86.2%
fma-define86.2%
+-commutative86.2%
*-commutative86.2%
fma-define86.2%
Simplified86.2%
Taylor expanded in y around inf 65.3%
*-commutative65.3%
Simplified65.3%
Final simplification65.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= b -1.55e+268) (* i (* b (/ (log c) i))) (+ 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.55e+268) {
tmp = i * (b * (log(c) / i));
} 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.55d+268)) then
tmp = i * (b * (log(c) / i))
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.55e+268) {
tmp = i * (b * (Math.log(c) / i));
} else {
tmp = a + ((y * i) + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if b <= -1.55e+268: tmp = i * (b * (math.log(c) / i)) 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.55e+268) tmp = Float64(i * Float64(b * Float64(log(c) / i))); 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.55e+268) tmp = i * (b * (log(c) / i)); else tmp = a + ((y * i) + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[b, -1.55e+268], N[(i * N[(b * N[(N[Log[c], $MachinePrecision] / i), $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.55 \cdot 10^{+268}:\\
\;\;\;\;i \cdot \left(b \cdot \frac{\log c}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\
\end{array}
\end{array}
if b < -1.55000000000000005e268Initial 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.8%
Taylor expanded in i around inf 63.2%
Taylor expanded in x around 0 64.2%
associate-+r+64.2%
associate-+r+64.2%
sub-neg64.2%
metadata-eval64.2%
associate-/l*64.0%
+-commutative64.0%
Simplified64.0%
Taylor expanded in b around inf 64.2%
associate-/l*64.0%
Simplified64.0%
if -1.55000000000000005e268 < b Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in b around 0 86.2%
associate-+r+86.2%
fma-define86.2%
+-commutative86.2%
*-commutative86.2%
fma-define86.2%
Simplified86.2%
Taylor expanded in y around inf 65.3%
*-commutative65.3%
Simplified65.3%
Final simplification65.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -5.5e+148) z (if (<= z -2.1e-280) (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -5.5e+148) {
tmp = z;
} else if (z <= -2.1e-280) {
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 (z <= (-5.5d+148)) then
tmp = z
else if (z <= (-2.1d-280)) 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 (z <= -5.5e+148) {
tmp = z;
} else if (z <= -2.1e-280) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -5.5e+148: tmp = z elif z <= -2.1e-280: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -5.5e+148) tmp = z; elseif (z <= -2.1e-280) 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 (z <= -5.5e+148) tmp = z; elseif (z <= -2.1e-280) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -5.5e+148], z, If[LessEqual[z, -2.1e-280], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+148}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-280}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -5.5e148Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 39.1%
if -5.5e148 < z < -2.10000000000000001e-280Initial 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.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 35.4%
*-commutative35.4%
Simplified35.4%
if -2.10000000000000001e-280 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 16.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.8e+66) (+ t (+ 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 <= 4.8e+66) {
tmp = t + (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 <= 4.8d+66) then
tmp = t + (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 <= 4.8e+66) {
tmp = t + (z + (y * i));
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.8e+66: tmp = t + (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 <= 4.8e+66) tmp = Float64(t + 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 <= 4.8e+66) tmp = t + (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, 4.8e+66], N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.8 \cdot 10^{+66}:\\
\;\;\;\;t + \left(z + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 4.8000000000000003e66Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in b around 0 81.5%
associate-+r+81.5%
fma-define81.5%
+-commutative81.5%
*-commutative81.5%
fma-define81.5%
Simplified81.5%
Taylor expanded in y around inf 60.9%
*-commutative60.9%
Simplified60.9%
Taylor expanded in a around 0 54.8%
if 4.8000000000000003e66 < a Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 55.7%
Final simplification55.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 9e+66) (+ 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 <= 9e+66) {
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 <= 9d+66) 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 <= 9e+66) {
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 <= 9e+66: 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 <= 9e+66) 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 <= 9e+66) 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, 9e+66], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9 \cdot 10^{+66}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 8.9999999999999997e66Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 41.8%
if 8.9999999999999997e66 < a Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 55.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -8e+148) 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 <= -8e+148) {
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 <= (-8d+148)) 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 <= -8e+148) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -8e+148: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -8e+148) 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 <= -8e+148) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -8e+148], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+148}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -8.0000000000000004e148Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 39.1%
if -8.0000000000000004e148 < z Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 42.2%
(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%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in b around 0 83.0%
associate-+r+83.0%
fma-define83.0%
+-commutative83.0%
*-commutative83.0%
fma-define83.0%
Simplified83.0%
Taylor expanded in y around inf 63.0%
*-commutative63.0%
Simplified63.0%
Final simplification63.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 9.8e+66) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 9.8e+66) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 9.8d+66) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 9.8e+66) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 9.8e+66: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 9.8e+66) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 9.8e+66) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 9.8e+66], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.8 \cdot 10^{+66}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 9.7999999999999995e66Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 15.7%
if 9.7999999999999995e66 < a Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around inf 37.1%
(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%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 14.5%
herbie shell --seed 2024163
(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)))