
(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.1%
associate-+l+99.1%
associate-+l+99.1%
+-commutative99.1%
associate-+l+99.1%
+-commutative99.1%
associate-+l+99.1%
+-commutative99.1%
associate-+l+99.1%
+-commutative99.1%
fma-define99.1%
+-commutative99.1%
fma-define99.5%
Simplified99.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= t_1 -5e+166)
(+ (* y i) (+ z (* b (log c))))
(if (<= t_1 5e+84)
(+ a (+ t (+ z (+ (* x (log y)) (* 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 (t_1 <= -5e+166) {
tmp = (y * i) + (z + (b * log(c)));
} else if (t_1 <= 5e+84) {
tmp = a + (t + (z + ((x * log(y)) + (y * i))));
} else {
tmp = a + (t + (z + 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 (t_1 <= (-5d+166)) then
tmp = (y * i) + (z + (b * log(c)))
else if (t_1 <= 5d+84) then
tmp = a + (t + (z + ((x * log(y)) + (y * i))))
else
tmp = a + (t + (z + 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 (t_1 <= -5e+166) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else if (t_1 <= 5e+84) {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
} else {
tmp = a + (t + (z + 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 t_1 <= -5e+166: tmp = (y * i) + (z + (b * math.log(c))) elif t_1 <= 5e+84: tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) else: tmp = 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 (t_1 <= -5e+166) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); elseif (t_1 <= 5e+84) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i))))); else tmp = Float64(a + Float64(t + Float64(z + 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 (t_1 <= -5e+166) tmp = (y * i) + (z + (b * log(c))); elseif (t_1 <= 5e+84) tmp = a + (t + (z + ((x * log(y)) + (y * i)))); else tmp = a + (t + (z + 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[LessEqual[t$95$1, -5e+166], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+84], 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 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+166}:\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+84}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -5.0000000000000002e166Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 99.8%
Taylor expanded in z around inf 84.5%
if -5.0000000000000002e166 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 5.0000000000000001e84Initial program 99.3%
add-cbrt-cube99.3%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in b around inf 97.2%
Taylor expanded in b around 0 94.1%
if 5.0000000000000001e84 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 97.7%
associate-+l+97.7%
associate-+l+97.7%
+-commutative97.7%
associate-+l+97.7%
+-commutative97.7%
associate-+l+97.7%
+-commutative97.7%
associate-+l+97.7%
+-commutative97.7%
fma-define97.7%
+-commutative97.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 94.1%
Taylor expanded in y around 0 84.7%
Final simplification91.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -4.3e+164)
(+ a (+ t (* x (+ (+ (log y) (/ z x)) (* i (/ y x))))))
(if (<= x 2.3e+149)
(fma y i (+ a (+ t (+ z (* (log c) (- b 0.5))))))
(+ 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) {
double tmp;
if (x <= -4.3e+164) {
tmp = a + (t + (x * ((log(y) + (z / x)) + (i * (y / x)))));
} else if (x <= 2.3e+149) {
tmp = fma(y, i, (a + (t + (z + (log(c) * (b - 0.5))))));
} else {
tmp = a + (t + (z + ((x * log(y)) + (b * log(c)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -4.3e+164) tmp = Float64(a + Float64(t + Float64(x * Float64(Float64(log(y) + Float64(z / x)) + Float64(i * Float64(y / x)))))); elseif (x <= 2.3e+149) 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(Float64(x * log(y)) + Float64(b * log(c)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -4.3e+164], N[(a + N[(t + N[(x * N[(N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(i * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+149], 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[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+164}:\\
\;\;\;\;a + \left(t + x \cdot \left(\left(\log y + \frac{z}{x}\right) + i \cdot \frac{y}{x}\right)\right)\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+149}:\\
\;\;\;\;\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(x \cdot \log y + b \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.3e164Initial program 93.3%
add-cbrt-cube93.3%
pow393.3%
Applied egg-rr93.3%
Taylor expanded in b around inf 93.3%
Taylor expanded in b around 0 93.6%
Taylor expanded in x around inf 96.8%
associate-+r+96.8%
associate-/l*96.8%
Simplified96.8%
if -4.3e164 < x < 2.2999999999999998e149Initial 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 97.4%
if 2.2999999999999998e149 < x Initial program 99.6%
add-cbrt-cube99.3%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in b around inf 99.3%
Taylor expanded in y around 0 90.6%
Final simplification96.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.06e+164)
(+ a (+ t (* x (+ (+ (log y) (/ z x)) (* i (/ y x))))))
(if (<= x 8.8e+148)
(+ a (+ t (+ z (+ (* (log c) (- b 0.5)) (* 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) {
double tmp;
if (x <= -1.06e+164) {
tmp = a + (t + (x * ((log(y) + (z / x)) + (i * (y / x)))));
} else if (x <= 8.8e+148) {
tmp = a + (t + (z + ((log(c) * (b - 0.5)) + (y * i))));
} else {
tmp = a + (t + (z + ((x * log(y)) + (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 (x <= (-1.06d+164)) then
tmp = a + (t + (x * ((log(y) + (z / x)) + (i * (y / x)))))
else if (x <= 8.8d+148) then
tmp = a + (t + (z + ((log(c) * (b - 0.5d0)) + (y * i))))
else
tmp = a + (t + (z + ((x * log(y)) + (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 (x <= -1.06e+164) {
tmp = a + (t + (x * ((Math.log(y) + (z / x)) + (i * (y / x)))));
} else if (x <= 8.8e+148) {
tmp = a + (t + (z + ((Math.log(c) * (b - 0.5)) + (y * i))));
} else {
tmp = a + (t + (z + ((x * Math.log(y)) + (b * Math.log(c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -1.06e+164: tmp = a + (t + (x * ((math.log(y) + (z / x)) + (i * (y / x))))) elif x <= 8.8e+148: tmp = a + (t + (z + ((math.log(c) * (b - 0.5)) + (y * i)))) else: tmp = a + (t + (z + ((x * math.log(y)) + (b * math.log(c))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.06e+164) tmp = Float64(a + Float64(t + Float64(x * Float64(Float64(log(y) + Float64(z / x)) + Float64(i * Float64(y / x)))))); elseif (x <= 8.8e+148) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(y * i))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(b * log(c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -1.06e+164) tmp = a + (t + (x * ((log(y) + (z / x)) + (i * (y / x))))); elseif (x <= 8.8e+148) tmp = a + (t + (z + ((log(c) * (b - 0.5)) + (y * i)))); else tmp = a + (t + (z + ((x * log(y)) + (b * log(c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.06e+164], N[(a + N[(t + N[(x * N[(N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(i * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.8e+148], N[(a + N[(t + N[(z + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.06 \cdot 10^{+164}:\\
\;\;\;\;a + \left(t + x \cdot \left(\left(\log y + \frac{z}{x}\right) + i \cdot \frac{y}{x}\right)\right)\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{+148}:\\
\;\;\;\;a + \left(t + \left(z + \left(\log c \cdot \left(b - 0.5\right) + y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.05999999999999997e164Initial program 93.3%
add-cbrt-cube93.3%
pow393.3%
Applied egg-rr93.3%
Taylor expanded in b around inf 93.3%
Taylor expanded in b around 0 93.6%
Taylor expanded in x around inf 96.8%
associate-+r+96.8%
associate-/l*96.8%
Simplified96.8%
if -1.05999999999999997e164 < x < 8.7999999999999995e148Initial 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 97.4%
if 8.7999999999999995e148 < x Initial program 99.6%
add-cbrt-cube99.3%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in b around inf 99.3%
Taylor expanded in y around 0 90.6%
Final simplification96.5%
(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.1%
Final simplification99.1%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.1%
Taylor expanded in b around inf 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.5e+164) (not (<= x 1.8e+48))) (+ a (+ t (+ z (+ (* x (log y)) (* y i))))) (+ a (+ t (+ z (+ (* (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) {
double tmp;
if ((x <= -6.5e+164) || !(x <= 1.8e+48)) {
tmp = a + (t + (z + ((x * log(y)) + (y * i))));
} else {
tmp = a + (t + (z + ((log(c) * (b - 0.5)) + (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 <= (-6.5d+164)) .or. (.not. (x <= 1.8d+48))) then
tmp = a + (t + (z + ((x * log(y)) + (y * i))))
else
tmp = a + (t + (z + ((log(c) * (b - 0.5d0)) + (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 <= -6.5e+164) || !(x <= 1.8e+48)) {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
} else {
tmp = a + (t + (z + ((Math.log(c) * (b - 0.5)) + (y * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.5e+164) or not (x <= 1.8e+48): tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) else: tmp = a + (t + (z + ((math.log(c) * (b - 0.5)) + (y * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.5e+164) || !(x <= 1.8e+48)) 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(log(c) * Float64(b - 0.5)) + Float64(y * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -6.5e+164) || ~((x <= 1.8e+48))) tmp = a + (t + (z + ((x * log(y)) + (y * i)))); else tmp = a + (t + (z + ((log(c) * (b - 0.5)) + (y * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.5e+164], N[Not[LessEqual[x, 1.8e+48]], $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[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+164} \lor \neg \left(x \leq 1.8 \cdot 10^{+48}\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(\log c \cdot \left(b - 0.5\right) + y \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.5000000000000003e164 or 1.79999999999999992e48 < x Initial program 97.6%
add-cbrt-cube97.4%
pow397.5%
Applied egg-rr97.5%
Taylor expanded in b around inf 97.5%
Taylor expanded in b around 0 88.5%
if -6.5000000000000003e164 < x < 1.79999999999999992e48Initial 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 99.9%
Final simplification95.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.35e+164)
(+ a (+ t (* x (+ (+ (log y) (/ z x)) (* i (/ y x))))))
(if (<= x 7.8e+45)
(+ a (+ t (+ z (+ (* (log c) (- b 0.5)) (* y i)))))
(+ a (+ t (+ z (+ (* x (log y)) (* 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.35e+164) {
tmp = a + (t + (x * ((log(y) + (z / x)) + (i * (y / x)))));
} else if (x <= 7.8e+45) {
tmp = a + (t + (z + ((log(c) * (b - 0.5)) + (y * i))));
} else {
tmp = a + (t + (z + ((x * log(y)) + (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.35d+164)) then
tmp = a + (t + (x * ((log(y) + (z / x)) + (i * (y / x)))))
else if (x <= 7.8d+45) then
tmp = a + (t + (z + ((log(c) * (b - 0.5d0)) + (y * i))))
else
tmp = a + (t + (z + ((x * log(y)) + (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.35e+164) {
tmp = a + (t + (x * ((Math.log(y) + (z / x)) + (i * (y / x)))));
} else if (x <= 7.8e+45) {
tmp = a + (t + (z + ((Math.log(c) * (b - 0.5)) + (y * i))));
} else {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -1.35e+164: tmp = a + (t + (x * ((math.log(y) + (z / x)) + (i * (y / x))))) elif x <= 7.8e+45: tmp = a + (t + (z + ((math.log(c) * (b - 0.5)) + (y * i)))) else: tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.35e+164) tmp = Float64(a + Float64(t + Float64(x * Float64(Float64(log(y) + Float64(z / x)) + Float64(i * Float64(y / x)))))); elseif (x <= 7.8e+45) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(y * i))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + 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.35e+164) tmp = a + (t + (x * ((log(y) + (z / x)) + (i * (y / x))))); elseif (x <= 7.8e+45) tmp = a + (t + (z + ((log(c) * (b - 0.5)) + (y * i)))); else tmp = a + (t + (z + ((x * log(y)) + (y * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.35e+164], N[(a + N[(t + N[(x * N[(N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(i * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e+45], N[(a + N[(t + N[(z + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+164}:\\
\;\;\;\;a + \left(t + x \cdot \left(\left(\log y + \frac{z}{x}\right) + i \cdot \frac{y}{x}\right)\right)\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+45}:\\
\;\;\;\;a + \left(t + \left(z + \left(\log c \cdot \left(b - 0.5\right) + y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.35000000000000003e164Initial program 93.3%
add-cbrt-cube93.3%
pow393.3%
Applied egg-rr93.3%
Taylor expanded in b around inf 93.3%
Taylor expanded in b around 0 93.6%
Taylor expanded in x around inf 96.8%
associate-+r+96.8%
associate-/l*96.8%
Simplified96.8%
if -1.35000000000000003e164 < x < 7.7999999999999999e45Initial 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 99.9%
if 7.7999999999999999e45 < x Initial program 99.8%
add-cbrt-cube99.6%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in b around inf 99.5%
Taylor expanded in b around 0 85.8%
Final simplification96.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.2e+164) (not (<= x 4.4e+150))) (+ a (+ t (+ z (* x (log y))))) (+ a (+ t (+ z (* 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.2e+164) || !(x <= 4.4e+150)) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = a + (t + (z + (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.2d+164)) .or. (.not. (x <= 4.4d+150))) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = a + (t + (z + (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.2e+164) || !(x <= 4.4e+150)) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.2e+164) or not (x <= 4.4e+150): tmp = a + (t + (z + (x * math.log(y)))) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.2e+164) || !(x <= 4.4e+150)) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + Float64(t + Float64(z + 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.2e+164) || ~((x <= 4.4e+150))) tmp = a + (t + (z + (x * log(y)))); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.2e+164], N[Not[LessEqual[x, 4.4e+150]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+164} \lor \neg \left(x \leq 4.4 \cdot 10^{+150}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -1.20000000000000005e164 or 4.39999999999999999e150 < x Initial program 96.4%
add-cbrt-cube96.3%
pow396.3%
Applied egg-rr96.3%
Taylor expanded in b around inf 96.3%
Taylor expanded in b around 0 86.1%
Taylor expanded in i around 0 78.4%
if -1.20000000000000005e164 < x < 4.39999999999999999e150Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in b around inf 98.0%
Taylor expanded in b around 0 79.2%
Taylor expanded in x around 0 76.7%
Final simplification77.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.85e+84) (+ (* y i) (+ z (* (log c) (- b 0.5)))) (+ (* y i) (+ a (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.85e+84) {
tmp = (y * i) + (z + (log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (a + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.85d+84) then
tmp = (y * i) + (z + (log(c) * (b - 0.5d0)))
else
tmp = (y * i) + (a + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.85e+84) {
tmp = (y * i) + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.85e+84: tmp = (y * i) + (z + (math.log(c) * (b - 0.5))) else: tmp = (y * i) + (a + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.85e+84) tmp = Float64(Float64(y * i) + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.85e+84) tmp = (y * i) + (z + (log(c) * (b - 0.5))); else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.85e+84], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.85 \cdot 10^{+84}:\\
\;\;\;\;y \cdot i + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 1.85e84Initial program 99.4%
add-cbrt-cube99.3%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in z around inf 57.8%
if 1.85e84 < a Initial program 97.7%
add-cbrt-cube97.7%
pow397.8%
Applied egg-rr97.8%
Taylor expanded in b around inf 97.8%
Taylor expanded in a around inf 79.1%
Final simplification61.7%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* b (log c)))) (if (<= a 1.1e+85) (+ (* y i) (+ z t_1)) (+ (* y i) (+ a t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double tmp;
if (a <= 1.1e+85) {
tmp = (y * i) + (z + t_1);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = b * log(c)
if (a <= 1.1d+85) then
tmp = (y * i) + (z + t_1)
else
tmp = (y * i) + (a + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * Math.log(c);
double tmp;
if (a <= 1.1e+85) {
tmp = (y * i) + (z + t_1);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if a <= 1.1e+85: tmp = (y * i) + (z + t_1) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (a <= 1.1e+85) tmp = Float64(Float64(y * i) + Float64(z + t_1)); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if (a <= 1.1e+85) tmp = (y * i) + (z + t_1); else tmp = (y * i) + (a + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.1e+85], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;a \leq 1.1 \cdot 10^{+85}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if a < 1.1000000000000001e85Initial program 99.4%
add-cbrt-cube99.3%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in b around inf 97.5%
Taylor expanded in z around inf 56.0%
if 1.1000000000000001e85 < a Initial program 97.7%
add-cbrt-cube97.7%
pow397.8%
Applied egg-rr97.8%
Taylor expanded in b around inf 97.8%
Taylor expanded in a around inf 79.1%
Final simplification60.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.4e+100) (+ a (+ t (+ z (* y i)))) (+ (* y i) (+ a (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.4e+100) {
tmp = a + (t + (z + (y * i)));
} else {
tmp = (y * i) + (a + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-3.4d+100)) then
tmp = a + (t + (z + (y * i)))
else
tmp = (y * i) + (a + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.4e+100) {
tmp = a + (t + (z + (y * i)));
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.4e+100: tmp = a + (t + (z + (y * i))) else: tmp = (y * i) + (a + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.4e+100) tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -3.4e+100) tmp = a + (t + (z + (y * i))); else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.4e+100], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+100}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if z < -3.39999999999999994e100Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 99.8%
Taylor expanded in b around 0 75.7%
Taylor expanded in x around 0 66.4%
if -3.39999999999999994e100 < z Initial program 98.9%
add-cbrt-cube98.8%
pow398.8%
Applied egg-rr98.8%
Taylor expanded in b around inf 97.0%
Taylor expanded in a around inf 56.8%
Final simplification58.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -9e+253) (not (<= x 3.2e+161))) (* x (log y)) (+ a (+ t (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -9e+253) || !(x <= 3.2e+161)) {
tmp = x * log(y);
} else {
tmp = a + (t + (z + (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 <= (-9d+253)) .or. (.not. (x <= 3.2d+161))) then
tmp = x * log(y)
else
tmp = a + (t + (z + (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 <= -9e+253) || !(x <= 3.2e+161)) {
tmp = x * Math.log(y);
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -9e+253) or not (x <= 3.2e+161): tmp = x * math.log(y) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -9e+253) || !(x <= 3.2e+161)) tmp = Float64(x * log(y)); else tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -9e+253) || ~((x <= 3.2e+161))) tmp = x * log(y); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -9e+253], N[Not[LessEqual[x, 3.2e+161]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+253} \lor \neg \left(x \leq 3.2 \cdot 10^{+161}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -8.99999999999999943e253 or 3.20000000000000002e161 < x Initial program 94.7%
add-cbrt-cube94.5%
pow394.5%
Applied egg-rr94.5%
Taylor expanded in b around inf 94.5%
Taylor expanded in x around inf 64.9%
if -8.99999999999999943e253 < x < 3.20000000000000002e161Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in b around inf 98.1%
Taylor expanded in b around 0 80.8%
Taylor expanded in x around 0 75.6%
Final simplification73.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -3.7e+244) (not (<= b 1.8e+228))) (* b (log c)) (+ a (+ t (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -3.7e+244) || !(b <= 1.8e+228)) {
tmp = b * log(c);
} else {
tmp = a + (t + (z + (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 <= (-3.7d+244)) .or. (.not. (b <= 1.8d+228))) then
tmp = b * log(c)
else
tmp = a + (t + (z + (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 <= -3.7e+244) || !(b <= 1.8e+228)) {
tmp = b * Math.log(c);
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -3.7e+244) or not (b <= 1.8e+228): tmp = b * math.log(c) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -3.7e+244) || !(b <= 1.8e+228)) tmp = Float64(b * log(c)); else tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -3.7e+244) || ~((b <= 1.8e+228))) tmp = b * log(c); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -3.7e+244], N[Not[LessEqual[b, 1.8e+228]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{+244} \lor \neg \left(b \leq 1.8 \cdot 10^{+228}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if b < -3.7000000000000002e244 or 1.8e228 < b Initial program 96.3%
associate-+l+96.3%
associate-+l+96.3%
+-commutative96.3%
associate-+l+96.3%
+-commutative96.3%
associate-+l+96.3%
+-commutative96.3%
associate-+l+96.3%
+-commutative96.3%
fma-define96.3%
+-commutative96.3%
fma-define99.5%
Simplified99.5%
Taylor expanded in t around inf 66.5%
associate-/l*66.5%
associate-/l*66.5%
sub-neg66.5%
metadata-eval66.5%
associate-/l*69.6%
+-commutative69.6%
Simplified69.6%
Taylor expanded in b around inf 52.2%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in t around 0 72.7%
if -3.7000000000000002e244 < b < 1.8e228Initial program 99.4%
add-cbrt-cube99.4%
pow399.4%
Applied egg-rr99.4%
Taylor expanded in b around inf 97.7%
Taylor expanded in b around 0 88.8%
Taylor expanded in x around 0 73.4%
Final simplification73.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.25e-233) z (if (<= a 3.5e+95) (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.25e-233) {
tmp = z;
} else if (a <= 3.5e+95) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.25d-233) then
tmp = z
else if (a <= 3.5d+95) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.25e-233) {
tmp = z;
} else if (a <= 3.5e+95) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.25e-233: tmp = z elif a <= 3.5e+95: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.25e-233) tmp = z; elseif (a <= 3.5e+95) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.25e-233) tmp = z; elseif (a <= 3.5e+95) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.25e-233], z, If[LessEqual[a, 3.5e+95], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.25 \cdot 10^{-233}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+95}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.25000000000000003e-233Initial 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 23.1%
if 1.25000000000000003e-233 < a < 3.5e95Initial program 97.0%
associate-+l+97.0%
associate-+l+97.0%
+-commutative97.0%
associate-+l+97.0%
+-commutative97.0%
associate-+l+97.0%
+-commutative97.0%
associate-+l+97.0%
+-commutative97.0%
fma-define97.0%
+-commutative97.0%
fma-define98.4%
Simplified98.4%
Taylor expanded in y around inf 33.6%
*-commutative33.6%
Simplified33.6%
if 3.5e95 < 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-define99.9%
Simplified99.9%
Taylor expanded in a around inf 52.6%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ t (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (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 + (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 + (y * i)));
}
def code(x, y, z, t, a, b, c, i): return a + (t + (z + (y * i)))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + Float64(z + Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (t + (z + (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \left(z + y \cdot i\right)\right)
\end{array}
Initial program 99.1%
add-cbrt-cube99.0%
pow399.0%
Applied egg-rr99.0%
Taylor expanded in b around inf 97.6%
Taylor expanded in b around 0 80.9%
Taylor expanded in x around 0 67.3%
Final simplification67.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 7.5e+83) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.5e+83) {
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 <= 7.5d+83) 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 <= 7.5e+83) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7.5e+83: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7.5e+83) 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 <= 7.5e+83) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7.5e+83], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.5 \cdot 10^{+83}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 7.49999999999999989e83Initial program 99.4%
associate-+l+99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
fma-define99.4%
+-commutative99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in z around inf 19.6%
if 7.49999999999999989e83 < a Initial program 97.7%
associate-+l+97.7%
associate-+l+97.7%
+-commutative97.7%
associate-+l+97.7%
+-commutative97.7%
associate-+l+97.7%
+-commutative97.7%
associate-+l+97.7%
+-commutative97.7%
fma-define97.7%
+-commutative97.7%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 49.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.1%
associate-+l+99.1%
associate-+l+99.1%
+-commutative99.1%
associate-+l+99.1%
+-commutative99.1%
associate-+l+99.1%
+-commutative99.1%
associate-+l+99.1%
+-commutative99.1%
fma-define99.1%
+-commutative99.1%
fma-define99.5%
Simplified99.5%
Taylor expanded in a around inf 18.0%
herbie shell --seed 2024157
(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)))