
(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.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 (* x (log y))))
(if (<= x -5.7e+125)
(+ a (+ t (+ z (+ t_1 (* y i)))))
(if (<= x 1.38e+104)
(fma y i (+ a (+ t (+ z (* (log c) (- b 0.5))))))
(+ a (+ t (+ z (+ t_1 (* b (log c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -5.7e+125) {
tmp = a + (t + (z + (t_1 + (y * i))));
} else if (x <= 1.38e+104) {
tmp = fma(y, i, (a + (t + (z + (log(c) * (b - 0.5))))));
} else {
tmp = a + (t + (z + (t_1 + (b * log(c)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -5.7e+125) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(y * i))))); elseif (x <= 1.38e+104) tmp = fma(y, i, Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c)))))); 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, -5.7e+125], N[(a + N[(t + N[(z + N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.38e+104], N[(y * i + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -5.7 \cdot 10^{+125}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + y \cdot i\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.38 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.6999999999999996e125Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in b around 0 93.2%
if -5.6999999999999996e125 < x < 1.38e104Initial 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 97.6%
if 1.38e104 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 97.0%
Final simplification96.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -6.2e+124)
(+ a (+ t (+ z (+ t_1 (* y i)))))
(if (<= x 5.2e+103)
(+ (+ z t) (+ (* y i) (fma (log c) (+ b -0.5) a)))
(+ a (+ t (+ z (+ t_1 (* b (log c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -6.2e+124) {
tmp = a + (t + (z + (t_1 + (y * i))));
} else if (x <= 5.2e+103) {
tmp = (z + t) + ((y * i) + fma(log(c), (b + -0.5), a));
} else {
tmp = a + (t + (z + (t_1 + (b * log(c)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -6.2e+124) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(y * i))))); elseif (x <= 5.2e+103) tmp = Float64(Float64(z + t) + Float64(Float64(y * i) + fma(log(c), Float64(b + -0.5), a))); else tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c)))))); 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, -6.2e+124], N[(a + N[(t + N[(z + N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.2e+103], N[(N[(z + t), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+124}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + y \cdot i\right)\right)\right)\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+103}:\\
\;\;\;\;\left(z + t\right) + \left(y \cdot i + \mathsf{fma}\left(\log c, b + -0.5, a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.2000000000000004e124Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in b around 0 93.2%
if -6.2000000000000004e124 < x < 5.2000000000000003e103Initial program 99.9%
Taylor expanded in x around 0 97.6%
+-commutative97.6%
associate-+r+97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
*-commutative97.6%
fma-undefine97.6%
associate-+l+97.6%
fma-undefine97.6%
+-commutative97.6%
associate-+r+97.6%
fma-define97.6%
+-commutative97.6%
Simplified97.6%
if 5.2000000000000003e103 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 97.0%
Final simplification96.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.26e+126)
(+ a (+ t (+ z (+ t_1 (* y i)))))
(if (<= x 2.7e+104)
(+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))
(+ a (+ t (+ z (+ t_1 (* b (log c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.26e+126) {
tmp = a + (t + (z + (t_1 + (y * i))));
} else if (x <= 2.7e+104) {
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
} else {
tmp = a + (t + (z + (t_1 + (b * log(c)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (x <= (-1.26d+126)) then
tmp = a + (t + (z + (t_1 + (y * i))))
else if (x <= 2.7d+104) then
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5d0)))))
else
tmp = a + (t + (z + (t_1 + (b * log(c)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -1.26e+126) {
tmp = a + (t + (z + (t_1 + (y * i))));
} else if (x <= 2.7e+104) {
tmp = a + (t + (z + ((y * i) + (Math.log(c) * (b - 0.5)))));
} else {
tmp = a + (t + (z + (t_1 + (b * Math.log(c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -1.26e+126: tmp = a + (t + (z + (t_1 + (y * i)))) elif x <= 2.7e+104: tmp = a + (t + (z + ((y * i) + (math.log(c) * (b - 0.5))))) else: tmp = a + (t + (z + (t_1 + (b * math.log(c))))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.26e+126) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(y * i))))); elseif (x <= 2.7e+104) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (x <= -1.26e+126) tmp = a + (t + (z + (t_1 + (y * i)))); elseif (x <= 2.7e+104) tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5))))); else tmp = a + (t + (z + (t_1 + (b * log(c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.26e+126], N[(a + N[(t + N[(z + N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e+104], 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], N[(a + N[(t + N[(z + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.26 \cdot 10^{+126}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + y \cdot i\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+104}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.26000000000000004e126Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in b around 0 93.2%
if -1.26000000000000004e126 < x < 2.69999999999999985e104Initial program 99.9%
Taylor expanded in x around 0 97.6%
if 2.69999999999999985e104 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 97.0%
Final simplification96.8%
(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 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Final simplification97.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (- b 0.5) -5e+114)
(+ a (+ (+ z t) (* (+ b -0.5) (log c))))
(if (<= (- b 0.5) 4e+235)
(+ a (+ t (+ z (+ (* x (log y)) (* y i)))))
(+ (+ z t) (+ (* y i) (* b (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b - 0.5) <= -5e+114) {
tmp = a + ((z + t) + ((b + -0.5) * log(c)));
} else if ((b - 0.5) <= 4e+235) {
tmp = a + (t + (z + ((x * log(y)) + (y * i))));
} else {
tmp = (z + t) + ((y * i) + (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 ((b - 0.5d0) <= (-5d+114)) then
tmp = a + ((z + t) + ((b + (-0.5d0)) * log(c)))
else if ((b - 0.5d0) <= 4d+235) then
tmp = a + (t + (z + ((x * log(y)) + (y * i))))
else
tmp = (z + t) + ((y * i) + (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 ((b - 0.5) <= -5e+114) {
tmp = a + ((z + t) + ((b + -0.5) * Math.log(c)));
} else if ((b - 0.5) <= 4e+235) {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
} else {
tmp = (z + t) + ((y * i) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b - 0.5) <= -5e+114: tmp = a + ((z + t) + ((b + -0.5) * math.log(c))) elif (b - 0.5) <= 4e+235: tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) else: tmp = (z + t) + ((y * i) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(b - 0.5) <= -5e+114) tmp = Float64(a + Float64(Float64(z + t) + Float64(Float64(b + -0.5) * log(c)))); elseif (Float64(b - 0.5) <= 4e+235) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i))))); else tmp = Float64(Float64(z + t) + Float64(Float64(y * i) + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b - 0.5) <= -5e+114) tmp = a + ((z + t) + ((b + -0.5) * log(c))); elseif ((b - 0.5) <= 4e+235) tmp = a + (t + (z + ((x * log(y)) + (y * i)))); else tmp = (z + t) + ((y * i) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+114], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 4e+235], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+114}:\\
\;\;\;\;a + \left(\left(z + t\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{elif}\;b - 0.5 \leq 4 \cdot 10^{+235}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(y \cdot i + b \cdot \log c\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -5.0000000000000001e114Initial program 99.7%
Taylor expanded in x around 0 92.4%
+-commutative92.4%
associate-+r+92.4%
+-commutative92.4%
sub-neg92.4%
metadata-eval92.4%
*-commutative92.4%
fma-undefine92.4%
associate-+l+92.4%
fma-undefine92.4%
+-commutative92.4%
associate-+r+92.4%
fma-define92.4%
+-commutative92.4%
Simplified92.4%
Taylor expanded in y around 0 83.8%
associate-+r+83.8%
+-commutative83.8%
sub-neg83.8%
metadata-eval83.8%
Simplified83.8%
if -5.0000000000000001e114 < (-.f64 b #s(literal 1/2 binary64)) < 4.0000000000000002e235Initial program 99.9%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in b around 0 92.5%
if 4.0000000000000002e235 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.5%
Taylor expanded in x around 0 95.2%
+-commutative95.2%
associate-+r+95.2%
+-commutative95.2%
sub-neg95.2%
metadata-eval95.2%
*-commutative95.2%
fma-undefine95.2%
associate-+l+95.2%
fma-undefine95.2%
+-commutative95.2%
associate-+r+95.2%
fma-define95.2%
+-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 87.9%
*-commutative87.9%
Simplified87.9%
Final simplification91.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.8e+125) (not (<= x 1.9e+72))) (+ a (+ t (+ z (+ (* x (log y)) (* y i))))) (+ 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 <= -6.8e+125) || !(x <= 1.9e+72)) {
tmp = a + (t + (z + ((x * log(y)) + (y * i))));
} 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 <= (-6.8d+125)) .or. (.not. (x <= 1.9d+72))) then
tmp = a + (t + (z + ((x * log(y)) + (y * i))))
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 <= -6.8e+125) || !(x <= 1.9e+72)) {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
} 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 <= -6.8e+125) or not (x <= 1.9e+72): tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) 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 <= -6.8e+125) || !(x <= 1.9e+72)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i))))); 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 <= -6.8e+125) || ~((x <= 1.9e+72))) tmp = a + (t + (z + ((x * log(y)) + (y * i)))); 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, -6.8e+125], N[Not[LessEqual[x, 1.9e+72]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $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 -6.8 \cdot 10^{+125} \lor \neg \left(x \leq 1.9 \cdot 10^{+72}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + y \cdot i\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 < -6.7999999999999998e125 or 1.90000000000000003e72 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 92.8%
if -6.7999999999999998e125 < x < 1.90000000000000003e72Initial program 99.9%
Taylor expanded in x around 0 98.5%
Final simplification96.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.25e+78) (+ (+ z t) (+ (* y i) (* b (log c)))) (+ (+ z t) (+ 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 <= 2.25e+78) {
tmp = (z + t) + ((y * i) + (b * log(c)));
} else {
tmp = (z + t) + (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 <= 2.25d+78) then
tmp = (z + t) + ((y * i) + (b * log(c)))
else
tmp = (z + t) + (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 <= 2.25e+78) {
tmp = (z + t) + ((y * i) + (b * Math.log(c)));
} else {
tmp = (z + t) + (a + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.25e+78: tmp = (z + t) + ((y * i) + (b * math.log(c))) else: tmp = (z + t) + (a + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.25e+78) tmp = Float64(Float64(z + t) + Float64(Float64(y * i) + Float64(b * log(c)))); else tmp = Float64(Float64(z + t) + 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 <= 2.25e+78) tmp = (z + t) + ((y * i) + (b * log(c))); else tmp = (z + t) + (a + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.25e+78], N[(N[(z + t), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.25 \cdot 10^{+78}:\\
\;\;\;\;\left(z + t\right) + \left(y \cdot i + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\end{array}
\end{array}
if a < 2.25e78Initial program 99.8%
Taylor expanded in x around 0 80.1%
+-commutative80.1%
associate-+r+80.1%
+-commutative80.1%
sub-neg80.1%
metadata-eval80.1%
*-commutative80.1%
fma-undefine80.1%
associate-+l+80.1%
fma-undefine80.1%
+-commutative80.1%
associate-+r+80.1%
fma-define80.1%
+-commutative80.1%
Simplified80.1%
Taylor expanded in b around inf 71.1%
*-commutative71.1%
Simplified71.1%
if 2.25e78 < a Initial program 99.9%
Taylor expanded in x around 0 91.1%
+-commutative91.1%
associate-+r+91.1%
+-commutative91.1%
sub-neg91.1%
metadata-eval91.1%
*-commutative91.1%
fma-undefine91.1%
associate-+l+91.1%
fma-undefine91.1%
+-commutative91.1%
associate-+r+91.1%
fma-define91.1%
+-commutative91.1%
Simplified91.1%
Taylor expanded in a around inf 88.3%
Final simplification74.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.06e+20) (+ a (+ (+ z t) (* (+ b -0.5) (log c)))) (+ (+ z t) (+ a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.06e+20) {
tmp = a + ((z + t) + ((b + -0.5) * log(c)));
} else {
tmp = (z + t) + (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 (y <= 1.06d+20) then
tmp = a + ((z + t) + ((b + (-0.5d0)) * log(c)))
else
tmp = (z + t) + (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 (y <= 1.06e+20) {
tmp = a + ((z + t) + ((b + -0.5) * Math.log(c)));
} else {
tmp = (z + t) + (a + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.06e+20: tmp = a + ((z + t) + ((b + -0.5) * math.log(c))) else: tmp = (z + t) + (a + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.06e+20) tmp = Float64(a + Float64(Float64(z + t) + Float64(Float64(b + -0.5) * log(c)))); else tmp = Float64(Float64(z + t) + 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 (y <= 1.06e+20) tmp = a + ((z + t) + ((b + -0.5) * log(c))); else tmp = (z + t) + (a + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.06e+20], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.06 \cdot 10^{+20}:\\
\;\;\;\;a + \left(\left(z + t\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\end{array}
\end{array}
if y < 1.06e20Initial program 99.8%
Taylor expanded in x around 0 79.6%
+-commutative79.6%
associate-+r+79.6%
+-commutative79.6%
sub-neg79.6%
metadata-eval79.6%
*-commutative79.6%
fma-undefine79.6%
associate-+l+79.6%
fma-undefine79.6%
+-commutative79.6%
associate-+r+79.6%
fma-define79.6%
+-commutative79.6%
Simplified79.6%
Taylor expanded in y around 0 74.7%
associate-+r+74.7%
+-commutative74.7%
sub-neg74.7%
metadata-eval74.7%
Simplified74.7%
if 1.06e20 < y Initial program 99.8%
Taylor expanded in x around 0 85.0%
+-commutative85.0%
associate-+r+85.0%
+-commutative85.0%
sub-neg85.0%
metadata-eval85.0%
*-commutative85.0%
fma-undefine85.0%
associate-+l+85.0%
fma-undefine85.0%
+-commutative85.0%
associate-+r+85.0%
fma-define85.0%
+-commutative85.0%
Simplified85.0%
Taylor expanded in a around inf 73.0%
Final simplification73.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.42e+225) (not (<= x 3.8e+196))) (* x (log y)) (+ (+ z t) (+ a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.42e+225) || !(x <= 3.8e+196)) {
tmp = x * log(y);
} else {
tmp = (z + t) + (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 ((x <= (-1.42d+225)) .or. (.not. (x <= 3.8d+196))) then
tmp = x * log(y)
else
tmp = (z + t) + (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 ((x <= -1.42e+225) || !(x <= 3.8e+196)) {
tmp = x * Math.log(y);
} else {
tmp = (z + t) + (a + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.42e+225) or not (x <= 3.8e+196): tmp = x * math.log(y) else: tmp = (z + t) + (a + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.42e+225) || !(x <= 3.8e+196)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(z + t) + 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 ((x <= -1.42e+225) || ~((x <= 3.8e+196))) tmp = x * log(y); else tmp = (z + t) + (a + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.42e+225], N[Not[LessEqual[x, 3.8e+196]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.42 \cdot 10^{+225} \lor \neg \left(x \leq 3.8 \cdot 10^{+196}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\end{array}
\end{array}
if x < -1.42e225 or 3.8000000000000001e196 < x Initial program 99.5%
Taylor expanded in b around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around inf 78.7%
if -1.42e225 < x < 3.8000000000000001e196Initial program 99.9%
Taylor expanded in x around 0 93.1%
+-commutative93.1%
associate-+r+93.1%
+-commutative93.1%
sub-neg93.1%
metadata-eval93.1%
*-commutative93.1%
fma-undefine93.1%
associate-+l+93.1%
fma-undefine93.1%
+-commutative93.1%
associate-+r+93.1%
fma-define93.1%
+-commutative93.1%
Simplified93.1%
Taylor expanded in a around inf 73.7%
Final simplification74.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -2.8e+196) (not (<= b 1.2e+259))) (* b (log c)) (+ (+ z t) (+ a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -2.8e+196) || !(b <= 1.2e+259)) {
tmp = b * log(c);
} else {
tmp = (z + t) + (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 ((b <= (-2.8d+196)) .or. (.not. (b <= 1.2d+259))) then
tmp = b * log(c)
else
tmp = (z + t) + (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 ((b <= -2.8e+196) || !(b <= 1.2e+259)) {
tmp = b * Math.log(c);
} else {
tmp = (z + t) + (a + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -2.8e+196) or not (b <= 1.2e+259): tmp = b * math.log(c) else: tmp = (z + t) + (a + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -2.8e+196) || !(b <= 1.2e+259)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(z + t) + 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 ((b <= -2.8e+196) || ~((b <= 1.2e+259))) tmp = b * log(c); else tmp = (z + t) + (a + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -2.8e+196], N[Not[LessEqual[b, 1.2e+259]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+196} \lor \neg \left(b \leq 1.2 \cdot 10^{+259}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\end{array}
\end{array}
if b < -2.8000000000000002e196 or 1.2e259 < b Initial program 99.6%
Taylor expanded in i around inf 48.5%
+-commutative48.5%
+-commutative48.5%
associate-+l+48.5%
Simplified48.3%
Taylor expanded in b around inf 31.8%
associate-*r/53.9%
*-commutative53.9%
Applied egg-rr53.9%
associate-/l*31.8%
*-commutative31.8%
associate-*r/31.7%
associate-*r*54.0%
Simplified54.0%
Taylor expanded in i around 0 73.3%
if -2.8000000000000002e196 < b < 1.2e259Initial program 99.8%
Taylor expanded in x around 0 80.5%
+-commutative80.5%
associate-+r+80.5%
+-commutative80.5%
sub-neg80.5%
metadata-eval80.5%
*-commutative80.5%
fma-undefine80.5%
associate-+l+80.5%
fma-undefine80.5%
+-commutative80.5%
associate-+r+80.5%
fma-define80.5%
+-commutative80.5%
Simplified80.5%
Taylor expanded in a around inf 70.4%
Final simplification70.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 5e-280)
z
(if (<= a 3.3e-127)
(* y i)
(if (<= a 4.9e+45) z (if (<= a 9e+112) (* 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 <= 5e-280) {
tmp = z;
} else if (a <= 3.3e-127) {
tmp = y * i;
} else if (a <= 4.9e+45) {
tmp = z;
} else if (a <= 9e+112) {
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 <= 5d-280) then
tmp = z
else if (a <= 3.3d-127) then
tmp = y * i
else if (a <= 4.9d+45) then
tmp = z
else if (a <= 9d+112) 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 <= 5e-280) {
tmp = z;
} else if (a <= 3.3e-127) {
tmp = y * i;
} else if (a <= 4.9e+45) {
tmp = z;
} else if (a <= 9e+112) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 5e-280: tmp = z elif a <= 3.3e-127: tmp = y * i elif a <= 4.9e+45: tmp = z elif a <= 9e+112: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 5e-280) tmp = z; elseif (a <= 3.3e-127) tmp = Float64(y * i); elseif (a <= 4.9e+45) tmp = z; elseif (a <= 9e+112) 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 <= 5e-280) tmp = z; elseif (a <= 3.3e-127) tmp = y * i; elseif (a <= 4.9e+45) tmp = z; elseif (a <= 9e+112) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 5e-280], z, If[LessEqual[a, 3.3e-127], N[(y * i), $MachinePrecision], If[LessEqual[a, 4.9e+45], z, If[LessEqual[a, 9e+112], N[(y * i), $MachinePrecision], a]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{-280}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-127}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{+45}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+112}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 5.00000000000000028e-280 or 3.29999999999999981e-127 < a < 4.9000000000000002e45Initial program 99.8%
Taylor expanded in z around inf 18.5%
if 5.00000000000000028e-280 < a < 3.29999999999999981e-127 or 4.9000000000000002e45 < a < 8.9999999999999998e112Initial program 99.8%
Taylor expanded in y around inf 32.6%
*-commutative32.6%
Simplified32.6%
if 8.9999999999999998e112 < a Initial program 99.9%
Taylor expanded in a around inf 49.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= a 4.2e+116) (and (not (<= a 4e+134)) (<= a 7.8e+171))) (+ (* 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 ((a <= 4.2e+116) || (!(a <= 4e+134) && (a <= 7.8e+171))) {
tmp = (y * i) + (z + t);
} 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.2d+116) .or. (.not. (a <= 4d+134)) .and. (a <= 7.8d+171)) then
tmp = (y * i) + (z + t)
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.2e+116) || (!(a <= 4e+134) && (a <= 7.8e+171))) {
tmp = (y * i) + (z + t);
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a <= 4.2e+116) or (not (a <= 4e+134) and (a <= 7.8e+171)): tmp = (y * i) + (z + t) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((a <= 4.2e+116) || (!(a <= 4e+134) && (a <= 7.8e+171))) tmp = Float64(Float64(y * i) + Float64(z + t)); 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.2e+116) || (~((a <= 4e+134)) && (a <= 7.8e+171))) tmp = (y * i) + (z + t); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[a, 4.2e+116], And[N[Not[LessEqual[a, 4e+134]], $MachinePrecision], LessEqual[a, 7.8e+171]]], N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.2 \cdot 10^{+116} \lor \neg \left(a \leq 4 \cdot 10^{+134}\right) \land a \leq 7.8 \cdot 10^{+171}:\\
\;\;\;\;y \cdot i + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.2000000000000002e116 or 3.99999999999999969e134 < a < 7.8e171Initial program 99.8%
Taylor expanded in x around 0 79.7%
+-commutative79.7%
associate-+r+79.7%
+-commutative79.7%
sub-neg79.7%
metadata-eval79.7%
*-commutative79.7%
fma-undefine79.7%
associate-+l+79.7%
fma-undefine79.7%
+-commutative79.7%
associate-+r+79.7%
fma-define79.7%
+-commutative79.7%
Simplified79.7%
Taylor expanded in y around inf 66.8%
associate-+r+66.8%
associate-/l*66.8%
sub-neg66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in i around inf 54.2%
if 4.2000000000000002e116 < a < 3.99999999999999969e134 or 7.8e171 < a Initial program 99.9%
Taylor expanded in a around inf 55.0%
Final simplification54.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.15e+108) (+ (* y i) (+ z t)) (if (<= a 2.1e+215) (+ (+ z t) (* y (/ a y))) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.15e+108) {
tmp = (y * i) + (z + t);
} else if (a <= 2.1e+215) {
tmp = (z + t) + (y * (a / y));
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.15d+108) then
tmp = (y * i) + (z + t)
else if (a <= 2.1d+215) then
tmp = (z + t) + (y * (a / y))
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.15e+108) {
tmp = (y * i) + (z + t);
} else if (a <= 2.1e+215) {
tmp = (z + t) + (y * (a / y));
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.15e+108: tmp = (y * i) + (z + t) elif a <= 2.1e+215: tmp = (z + t) + (y * (a / y)) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.15e+108) tmp = Float64(Float64(y * i) + Float64(z + t)); elseif (a <= 2.1e+215) tmp = Float64(Float64(z + t) + Float64(y * Float64(a / y))); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.15e+108) tmp = (y * i) + (z + t); elseif (a <= 2.1e+215) tmp = (z + t) + (y * (a / y)); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.15e+108], N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+215], N[(N[(z + t), $MachinePrecision] + N[(y * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.15 \cdot 10^{+108}:\\
\;\;\;\;y \cdot i + \left(z + t\right)\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+215}:\\
\;\;\;\;\left(z + t\right) + y \cdot \frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.1499999999999999e108Initial program 99.8%
Taylor expanded in x around 0 80.4%
+-commutative80.4%
associate-+r+80.4%
+-commutative80.4%
sub-neg80.4%
metadata-eval80.4%
*-commutative80.4%
fma-undefine80.4%
associate-+l+80.4%
fma-undefine80.4%
+-commutative80.4%
associate-+r+80.4%
fma-define80.4%
+-commutative80.4%
Simplified80.4%
Taylor expanded in y around inf 67.2%
associate-+r+67.2%
associate-/l*67.2%
sub-neg67.2%
metadata-eval67.2%
Simplified67.2%
Taylor expanded in i around inf 54.3%
if 1.1499999999999999e108 < a < 2.1000000000000002e215Initial program 99.9%
Taylor expanded in x around 0 79.3%
+-commutative79.3%
associate-+r+79.3%
+-commutative79.3%
sub-neg79.3%
metadata-eval79.3%
*-commutative79.3%
fma-undefine79.3%
associate-+l+79.3%
fma-undefine79.3%
+-commutative79.3%
associate-+r+79.3%
fma-define79.3%
+-commutative79.3%
Simplified79.3%
Taylor expanded in y around inf 72.8%
associate-+r+72.8%
associate-/l*72.7%
sub-neg72.7%
metadata-eval72.7%
Simplified72.7%
Taylor expanded in a around inf 59.2%
if 2.1000000000000002e215 < a Initial program 99.9%
Taylor expanded in a around inf 58.7%
Final simplification55.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ z t) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (z + t) + (a + (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 = (z + t) + (a + (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 (z + t) + (a + (y * i));
}
def code(x, y, z, t, a, b, c, i): return (z + t) + (a + (y * i))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(z + t) + Float64(a + Float64(y * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (z + t) + (a + (y * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + t\right) + \left(a + y \cdot i\right)
\end{array}
Initial program 99.8%
Taylor expanded in x around 0 82.1%
+-commutative82.1%
associate-+r+82.1%
+-commutative82.1%
sub-neg82.1%
metadata-eval82.1%
*-commutative82.1%
fma-undefine82.1%
associate-+l+82.1%
fma-undefine82.1%
+-commutative82.1%
associate-+r+82.1%
fma-define82.1%
+-commutative82.1%
Simplified82.1%
Taylor expanded in a around inf 64.9%
Final simplification64.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 7e+113) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7e+113) {
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 <= 7d+113) 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 <= 7e+113) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7e+113: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7e+113) 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 <= 7e+113) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7e+113], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7 \cdot 10^{+113}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 7.0000000000000001e113Initial program 99.8%
Taylor expanded in z around inf 17.5%
if 7.0000000000000001e113 < a Initial program 99.9%
Taylor expanded in a around inf 49.4%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
Taylor expanded in a around inf 14.1%
herbie shell --seed 2024110
(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)))