
(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 19 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 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (* b (- 1.0 (/ 0.5 b))) (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 * (1.0 - (0.5 / b))) * 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 * (1.0d0 - (0.5d0 / b))) * 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 * (1.0 - (0.5 / b))) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b * (1.0 - (0.5 / b))) * 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 * Float64(1.0 - Float64(0.5 / b))) * 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 * (1.0 - (0.5 / b))) * 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 * N[(1.0 - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $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 \cdot \left(1 - \frac{0.5}{b}\right)\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= i -2.3e+47)
(+ (* y i) (+ (+ z a) (* (* b (- 1.0 (/ 0.5 b))) (log c))))
(if (<= i 1.15e-68)
(+ a (+ t (+ z (+ (* x (log y)) t_1))))
(+ (* 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 (i <= -2.3e+47) {
tmp = (y * i) + ((z + a) + ((b * (1.0 - (0.5 / b))) * log(c)));
} else if (i <= 1.15e-68) {
tmp = a + (t + (z + ((x * log(y)) + t_1)));
} else {
tmp = (y * i) + (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 (i <= (-2.3d+47)) then
tmp = (y * i) + ((z + a) + ((b * (1.0d0 - (0.5d0 / b))) * log(c)))
else if (i <= 1.15d-68) then
tmp = a + (t + (z + ((x * log(y)) + t_1)))
else
tmp = (y * i) + (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 (i <= -2.3e+47) {
tmp = (y * i) + ((z + a) + ((b * (1.0 - (0.5 / b))) * Math.log(c)));
} else if (i <= 1.15e-68) {
tmp = a + (t + (z + ((x * Math.log(y)) + t_1)));
} else {
tmp = (y * i) + (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 i <= -2.3e+47: tmp = (y * i) + ((z + a) + ((b * (1.0 - (0.5 / b))) * math.log(c))) elif i <= 1.15e-68: tmp = a + (t + (z + ((x * math.log(y)) + t_1))) else: tmp = (y * i) + (a + (t + (z + t_1))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (i <= -2.3e+47) tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(Float64(b * Float64(1.0 - Float64(0.5 / b))) * log(c)))); elseif (i <= 1.15e-68) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1)))); else tmp = Float64(Float64(y * i) + 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 (i <= -2.3e+47) tmp = (y * i) + ((z + a) + ((b * (1.0 - (0.5 / b))) * log(c))); elseif (i <= 1.15e-68) tmp = a + (t + (z + ((x * log(y)) + t_1))); else tmp = (y * i) + (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[i, -2.3e+47], N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(N[(b * N[(1.0 - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.15e-68], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;i \leq -2.3 \cdot 10^{+47}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + \left(b \cdot \left(1 - \frac{0.5}{b}\right)\right) \cdot \log c\right)\\
\mathbf{elif}\;i \leq 1.15 \cdot 10^{-68}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if i < -2.2999999999999999e47Initial program 99.9%
Taylor expanded in t around 0 84.7%
Taylor expanded in x around 0 70.1%
associate-+r+70.1%
sub-neg70.1%
metadata-eval70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in b around inf 70.1%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
if -2.2999999999999999e47 < i < 1.14999999999999998e-68Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 68.5%
Taylor expanded in y around 0 98.0%
if 1.14999999999999998e-68 < i Initial program 99.9%
Taylor expanded in x around 0 95.2%
Final simplification92.1%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ (+ (+ (* x (log y)) z) t) a) (* (log c) (- b 0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (((((x * log(y)) + z) + t) + a) + (log(c) * (b - 0.5)));
}
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) + (((((x * log(y)) + z) + t) + a) + (log(c) * (b - 0.5d0)))
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) + (((((x * Math.log(y)) + z) + t) + a) + (Math.log(c) * (b - 0.5)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (((((x * math.log(y)) + z) + t) + a) + (math.log(c) * (b - 0.5)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(log(c) * Float64(b - 0.5)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (((((x * log(y)) + z) + t) + a) + (log(c) * (b - 0.5))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -2.3e+211)
(+ t (+ z (+ t_1 (* (log c) (- b 0.5)))))
(if (<= x 1.55e+117)
(+ (* y i) (+ a (+ (* (* b (- 1.0 (/ 0.5 b))) (log c)) (+ z t))))
(+ (* y i) (+ t_1 a))))))
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 <= -2.3e+211) {
tmp = t + (z + (t_1 + (log(c) * (b - 0.5))));
} else if (x <= 1.55e+117) {
tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * log(c)) + (z + t)));
} else {
tmp = (y * i) + (t_1 + 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) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (x <= (-2.3d+211)) then
tmp = t + (z + (t_1 + (log(c) * (b - 0.5d0))))
else if (x <= 1.55d+117) then
tmp = (y * i) + (a + (((b * (1.0d0 - (0.5d0 / b))) * log(c)) + (z + t)))
else
tmp = (y * i) + (t_1 + 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 t_1 = x * Math.log(y);
double tmp;
if (x <= -2.3e+211) {
tmp = t + (z + (t_1 + (Math.log(c) * (b - 0.5))));
} else if (x <= 1.55e+117) {
tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * Math.log(c)) + (z + t)));
} else {
tmp = (y * i) + (t_1 + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -2.3e+211: tmp = t + (z + (t_1 + (math.log(c) * (b - 0.5)))) elif x <= 1.55e+117: tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * math.log(c)) + (z + t))) else: tmp = (y * i) + (t_1 + a) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -2.3e+211) tmp = Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5))))); elseif (x <= 1.55e+117) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(Float64(b * Float64(1.0 - Float64(0.5 / b))) * log(c)) + Float64(z + t)))); else tmp = Float64(Float64(y * i) + Float64(t_1 + a)); 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 <= -2.3e+211) tmp = t + (z + (t_1 + (log(c) * (b - 0.5)))); elseif (x <= 1.55e+117) tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * log(c)) + (z + t))); else tmp = (y * i) + (t_1 + a); 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, -2.3e+211], N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e+117], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(N[(b * N[(1.0 - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+211}:\\
\;\;\;\;t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+117}:\\
\;\;\;\;y \cdot i + \left(a + \left(\left(b \cdot \left(1 - \frac{0.5}{b}\right)\right) \cdot \log c + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + a\right)\\
\end{array}
\end{array}
if x < -2.30000000000000011e211Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 59.4%
Taylor expanded in y around 0 84.8%
Taylor expanded in a around 0 79.6%
if -2.30000000000000011e211 < x < 1.54999999999999988e117Initial program 99.9%
Taylor expanded in b around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 96.1%
associate-+r+96.1%
associate-*r/96.1%
metadata-eval96.1%
*-commutative96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
if 1.54999999999999988e117 < x Initial program 99.8%
Taylor expanded in t around 0 92.2%
Taylor expanded in z around inf 65.2%
associate-/l*65.2%
associate-/l*65.2%
sub-neg65.2%
metadata-eval65.2%
+-commutative65.2%
Simplified65.2%
Taylor expanded in x around inf 75.5%
Final simplification91.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ a (+ z (+ (* x (log y)) (* (log c) (- b 0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (a + (z + ((x * log(y)) + (log(c) * (b - 0.5)))));
}
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 + (z + ((x * log(y)) + (log(c) * (b - 0.5d0)))))
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 + (z + ((x * Math.log(y)) + (Math.log(c) * (b - 0.5)))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (a + (z + ((x * math.log(y)) + (math.log(c) * (b - 0.5)))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (a + (z + ((x * log(y)) + (log(c) * (b - 0.5))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(a + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in t around 0 82.5%
Final simplification82.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.2e+210) (not (<= x 1.3e+117))) (+ (* y i) (+ (* x (log y)) a)) (+ (* y i) (+ a (+ (* (* b (- 1.0 (/ 0.5 b))) (log c)) (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.2e+210) || !(x <= 1.3e+117)) {
tmp = (y * i) + ((x * log(y)) + a);
} else {
tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * log(c)) + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2.2d+210)) .or. (.not. (x <= 1.3d+117))) then
tmp = (y * i) + ((x * log(y)) + a)
else
tmp = (y * i) + (a + (((b * (1.0d0 - (0.5d0 / b))) * log(c)) + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.2e+210) || !(x <= 1.3e+117)) {
tmp = (y * i) + ((x * Math.log(y)) + a);
} else {
tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * Math.log(c)) + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.2e+210) or not (x <= 1.3e+117): tmp = (y * i) + ((x * math.log(y)) + a) else: tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * math.log(c)) + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.2e+210) || !(x <= 1.3e+117)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + a)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(Float64(b * Float64(1.0 - Float64(0.5 / b))) * log(c)) + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.2e+210) || ~((x <= 1.3e+117))) tmp = (y * i) + ((x * log(y)) + a); else tmp = (y * i) + (a + (((b * (1.0 - (0.5 / b))) * log(c)) + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.2e+210], N[Not[LessEqual[x, 1.3e+117]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(N[(b * N[(1.0 - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+210} \lor \neg \left(x \leq 1.3 \cdot 10^{+117}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(\left(b \cdot \left(1 - \frac{0.5}{b}\right)\right) \cdot \log c + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.19999999999999987e210 or 1.3e117 < x Initial program 99.8%
Taylor expanded in t around 0 91.2%
Taylor expanded in z around inf 60.2%
associate-/l*60.2%
associate-/l*60.2%
sub-neg60.2%
metadata-eval60.2%
+-commutative60.2%
Simplified60.2%
Taylor expanded in x around inf 76.4%
if -2.19999999999999987e210 < x < 1.3e117Initial program 99.9%
Taylor expanded in b around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 96.1%
associate-+r+96.1%
associate-*r/96.1%
metadata-eval96.1%
*-commutative96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Final simplification91.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.2e+210) (not (<= x 1.25e+117))) (+ (* y i) (+ (* x (log y)) a)) (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.2e+210) || !(x <= 1.25e+117)) {
tmp = (y * i) + ((x * log(y)) + a);
} else {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2.2d+210)) .or. (.not. (x <= 1.25d+117))) then
tmp = (y * i) + ((x * log(y)) + a)
else
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.2e+210) || !(x <= 1.25e+117)) {
tmp = (y * i) + ((x * Math.log(y)) + a);
} else {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.2e+210) or not (x <= 1.25e+117): tmp = (y * i) + ((x * math.log(y)) + a) else: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.2e+210) || !(x <= 1.25e+117)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + a)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.2e+210) || ~((x <= 1.25e+117))) tmp = (y * i) + ((x * log(y)) + a); else tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.2e+210], N[Not[LessEqual[x, 1.25e+117]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+210} \lor \neg \left(x \leq 1.25 \cdot 10^{+117}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.19999999999999987e210 or 1.24999999999999996e117 < x Initial program 99.8%
Taylor expanded in t around 0 91.2%
Taylor expanded in z around inf 60.2%
associate-/l*60.2%
associate-/l*60.2%
sub-neg60.2%
metadata-eval60.2%
+-commutative60.2%
Simplified60.2%
Taylor expanded in x around inf 76.4%
if -2.19999999999999987e210 < x < 1.24999999999999996e117Initial program 99.9%
Taylor expanded in x around 0 96.1%
Final simplification91.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1e+211) (not (<= x 1.3e+117))) (+ (* y i) (+ (* x (log y)) a)) (+ (* y i) (+ (+ z a) (* (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 <= -1e+211) || !(x <= 1.3e+117)) {
tmp = (y * i) + ((x * log(y)) + a);
} else {
tmp = (y * i) + ((z + a) + (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 <= (-1d+211)) .or. (.not. (x <= 1.3d+117))) then
tmp = (y * i) + ((x * log(y)) + a)
else
tmp = (y * i) + ((z + a) + (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 <= -1e+211) || !(x <= 1.3e+117)) {
tmp = (y * i) + ((x * Math.log(y)) + a);
} else {
tmp = (y * i) + ((z + a) + (Math.log(c) * (b + -0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1e+211) or not (x <= 1.3e+117): tmp = (y * i) + ((x * math.log(y)) + a) else: tmp = (y * i) + ((z + a) + (math.log(c) * (b + -0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1e+211) || !(x <= 1.3e+117)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + a)); else tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + 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 <= -1e+211) || ~((x <= 1.3e+117))) tmp = (y * i) + ((x * log(y)) + a); else tmp = (y * i) + ((z + a) + (log(c) * (b + -0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1e+211], N[Not[LessEqual[x, 1.3e+117]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+211} \lor \neg \left(x \leq 1.3 \cdot 10^{+117}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\end{array}
\end{array}
if x < -9.9999999999999996e210 or 1.3e117 < x Initial program 99.8%
Taylor expanded in t around 0 91.2%
Taylor expanded in z around inf 60.2%
associate-/l*60.2%
associate-/l*60.2%
sub-neg60.2%
metadata-eval60.2%
+-commutative60.2%
Simplified60.2%
Taylor expanded in x around inf 76.4%
if -9.9999999999999996e210 < x < 1.3e117Initial program 99.9%
Taylor expanded in t around 0 80.0%
Taylor expanded in x around 0 76.3%
associate-+r+76.3%
sub-neg76.3%
metadata-eval76.3%
+-commutative76.3%
Simplified76.3%
Final simplification76.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.2e+210) (not (<= x 4.2e+233))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.2e+210) || !(x <= 4.2e+233)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-3.2d+210)) .or. (.not. (x <= 4.2d+233))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.2e+210) || !(x <= 4.2e+233)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.2e+210) or not (x <= 4.2e+233): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.2e+210) || !(x <= 4.2e+233)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3.2e+210) || ~((x <= 4.2e+233))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.2e+210], N[Not[LessEqual[x, 4.2e+233]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+210} \lor \neg \left(x \leq 4.2 \cdot 10^{+233}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if x < -3.2000000000000002e210 or 4.19999999999999993e233 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 81.1%
if -3.2000000000000002e210 < x < 4.19999999999999993e233Initial program 99.9%
Taylor expanded in t around 0 80.5%
Taylor expanded in z around inf 72.6%
associate-/l*72.6%
associate-/l*72.6%
sub-neg72.6%
metadata-eval72.6%
+-commutative72.6%
Simplified72.6%
Taylor expanded in z around inf 59.5%
Final simplification62.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1e+47) (+ (* y i) (+ z (* (log c) (- b 0.5)))) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1e+47) {
tmp = (y * i) + (z + (log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + 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 <= 1d+47) then
tmp = (y * i) + (z + (log(c) * (b - 0.5d0)))
else
tmp = (y * i) + (z + 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 <= 1e+47) {
tmp = (y * i) + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1e+47: tmp = (y * i) + (z + (math.log(c) * (b - 0.5))) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1e+47) tmp = Float64(Float64(y * i) + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1e+47) tmp = (y * i) + (z + (log(c) * (b - 0.5))); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1e+47], 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[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{+47}:\\
\;\;\;\;y \cdot i + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if a < 1e47Initial program 99.8%
Taylor expanded in t around 0 83.2%
Taylor expanded in x around 0 70.2%
associate-+r+70.2%
sub-neg70.2%
metadata-eval70.2%
+-commutative70.2%
Simplified70.2%
Taylor expanded in a around 0 59.1%
if 1e47 < a Initial program 99.9%
Taylor expanded in t around 0 79.3%
Taylor expanded in z around inf 54.9%
associate-/l*54.9%
associate-/l*54.9%
sub-neg54.9%
metadata-eval54.9%
+-commutative54.9%
Simplified54.9%
Taylor expanded in z around inf 60.0%
Final simplification59.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 4.6e+122) (+ a (+ (+ z t) (* (log c) (+ b -0.5)))) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 4.6e+122) {
tmp = a + ((z + t) + (log(c) * (b + -0.5)));
} else {
tmp = (y * i) + (z + 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 (y <= 4.6d+122) then
tmp = a + ((z + t) + (log(c) * (b + (-0.5d0))))
else
tmp = (y * i) + (z + 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 (y <= 4.6e+122) {
tmp = a + ((z + t) + (Math.log(c) * (b + -0.5)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 4.6e+122: tmp = a + ((z + t) + (math.log(c) * (b + -0.5))) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 4.6e+122) tmp = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 4.6e+122) tmp = a + ((z + t) + (log(c) * (b + -0.5))); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4.6e+122], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+122}:\\
\;\;\;\;a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if y < 4.6000000000000001e122Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 54.7%
Taylor expanded in y around 0 92.1%
Taylor expanded in x around 0 75.9%
associate-+r+75.9%
+-commutative75.9%
sub-neg75.9%
metadata-eval75.9%
Simplified75.9%
if 4.6000000000000001e122 < y Initial program 99.9%
Taylor expanded in t around 0 88.8%
Taylor expanded in z around inf 80.2%
associate-/l*80.2%
associate-/l*80.2%
sub-neg80.2%
metadata-eval80.2%
+-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 75.5%
Final simplification75.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3e+238) (not (<= x 9.5e+221))) (+ (* x (log y)) a) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3e+238) || !(x <= 9.5e+221)) {
tmp = (x * log(y)) + a;
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-3d+238)) .or. (.not. (x <= 9.5d+221))) then
tmp = (x * log(y)) + a
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3e+238) || !(x <= 9.5e+221)) {
tmp = (x * Math.log(y)) + a;
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3e+238) or not (x <= 9.5e+221): tmp = (x * math.log(y)) + a else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3e+238) || !(x <= 9.5e+221)) tmp = Float64(Float64(x * log(y)) + a); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3e+238) || ~((x <= 9.5e+221))) tmp = (x * log(y)) + a; else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3e+238], N[Not[LessEqual[x, 9.5e+221]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+238} \lor \neg \left(x \leq 9.5 \cdot 10^{+221}\right):\\
\;\;\;\;x \cdot \log y + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if x < -3e238 or 9.50000000000000044e221 < x Initial program 99.8%
Taylor expanded in t around 0 93.9%
Taylor expanded in z around inf 58.8%
associate-/l*58.8%
associate-/l*58.8%
sub-neg58.8%
metadata-eval58.8%
+-commutative58.8%
Simplified58.8%
Taylor expanded in x around inf 82.3%
Taylor expanded in y around 0 65.4%
if -3e238 < x < 9.50000000000000044e221Initial program 99.9%
Taylor expanded in t around 0 80.8%
Taylor expanded in z around inf 71.7%
associate-/l*71.7%
associate-/l*71.6%
sub-neg71.6%
metadata-eval71.6%
+-commutative71.6%
Simplified71.6%
Taylor expanded in z around inf 59.6%
Final simplification60.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 4.9e+122) (+ a (+ z (* (log c) (- b 0.5)))) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 4.9e+122) {
tmp = a + (z + (log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + 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 (y <= 4.9d+122) then
tmp = a + (z + (log(c) * (b - 0.5d0)))
else
tmp = (y * i) + (z + 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 (y <= 4.9e+122) {
tmp = a + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 4.9e+122: tmp = a + (z + (math.log(c) * (b - 0.5))) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 4.9e+122) tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 4.9e+122) tmp = a + (z + (log(c) * (b - 0.5))); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4.9e+122], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.9 \cdot 10^{+122}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if y < 4.8999999999999998e122Initial program 99.8%
Taylor expanded in t around 0 79.2%
Taylor expanded in x around 0 63.6%
associate-+r+63.6%
sub-neg63.6%
metadata-eval63.6%
+-commutative63.6%
Simplified63.6%
Taylor expanded in i around inf 44.8%
associate-/l*44.8%
sub-neg44.8%
metadata-eval44.8%
Simplified44.8%
Taylor expanded in i around 0 56.0%
if 4.8999999999999998e122 < y Initial program 99.9%
Taylor expanded in t around 0 88.8%
Taylor expanded in z around inf 80.2%
associate-/l*80.2%
associate-/l*80.2%
sub-neg80.2%
metadata-eval80.2%
+-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 75.5%
Final simplification62.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.1e+244) (not (<= x 2.9e+243))) (* x (log y)) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.1e+244) || !(x <= 2.9e+243)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2.1d+244)) .or. (.not. (x <= 2.9d+243))) then
tmp = x * log(y)
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.1e+244) || !(x <= 2.9e+243)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.1e+244) or not (x <= 2.9e+243): tmp = x * math.log(y) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.1e+244) || !(x <= 2.9e+243)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.1e+244) || ~((x <= 2.9e+243))) tmp = x * log(y); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.1e+244], N[Not[LessEqual[x, 2.9e+243]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+244} \lor \neg \left(x \leq 2.9 \cdot 10^{+243}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if x < -2.1000000000000001e244 or 2.90000000000000006e243 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 61.1%
Taylor expanded in x around inf 65.9%
mul-1-neg65.9%
log-rec65.9%
Applied egg-rr65.9%
if -2.1000000000000001e244 < x < 2.90000000000000006e243Initial program 99.9%
Taylor expanded in t around 0 80.7%
Taylor expanded in z around inf 71.9%
associate-/l*71.8%
associate-/l*71.8%
sub-neg71.8%
metadata-eval71.8%
+-commutative71.8%
Simplified71.8%
Taylor expanded in z around inf 59.2%
Final simplification60.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.6e+54) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.6e+54) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.6d+54)) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.6e+54) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.6e+54: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.6e+54) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.6e+54) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.6e+54], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+54}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.6e54Initial program 100.0%
Taylor expanded in z around inf 58.4%
if -1.6e54 < z Initial program 99.8%
Taylor expanded in a around inf 42.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 8.5e+49) (* 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 <= 8.5e+49) {
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 <= 8.5d+49) 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 <= 8.5e+49) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 8.5e+49: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 8.5e+49) 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 <= 8.5e+49) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 8.5e+49], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.5 \cdot 10^{+49}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 8.4999999999999996e49Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 25.8%
*-commutative25.8%
Simplified25.8%
if 8.4999999999999996e49 < a Initial program 99.9%
Taylor expanded in a around inf 48.0%
Taylor expanded in a around inf 35.3%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + a);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + (z + a)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + a);
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + a)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + a)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + a); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + a\right)
\end{array}
Initial program 99.9%
Taylor expanded in t around 0 82.5%
Taylor expanded in z around inf 70.0%
associate-/l*70.0%
associate-/l*69.9%
sub-neg69.9%
metadata-eval69.9%
+-commutative69.9%
Simplified69.9%
Taylor expanded in z around inf 55.5%
Final simplification55.5%
(FPCore (x y z t a b c i) :precision binary64 (+ a (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 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 = 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 a + (y * i);
}
def code(x, y, z, t, a, b, c, i): return a + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + y \cdot i
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 38.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.9%
Taylor expanded in a around inf 38.4%
Taylor expanded in a around inf 16.7%
herbie shell --seed 2024135
(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)))