
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1e+165) (not (<= x 6.8e+174))) (+ (* y i) (+ (* b (log c)) (+ a (+ t (* x (log y)))))) (+ (* y i) (+ (+ a (+ z t)) (* (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+165) || !(x <= 6.8e+174)) {
tmp = (y * i) + ((b * log(c)) + (a + (t + (x * log(y)))));
} else {
tmp = (y * i) + ((a + (z + t)) + (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+165)) .or. (.not. (x <= 6.8d+174))) then
tmp = (y * i) + ((b * log(c)) + (a + (t + (x * log(y)))))
else
tmp = (y * i) + ((a + (z + t)) + (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+165) || !(x <= 6.8e+174)) {
tmp = (y * i) + ((b * Math.log(c)) + (a + (t + (x * Math.log(y)))));
} else {
tmp = (y * i) + ((a + (z + t)) + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1e+165) or not (x <= 6.8e+174): tmp = (y * i) + ((b * math.log(c)) + (a + (t + (x * math.log(y))))) else: tmp = (y * i) + ((a + (z + t)) + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1e+165) || !(x <= 6.8e+174)) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(t + Float64(x * log(y)))))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + 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+165) || ~((x <= 6.8e+174))) tmp = (y * i) + ((b * log(c)) + (a + (t + (x * log(y))))); else tmp = (y * i) + ((a + (z + t)) + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1e+165], N[Not[LessEqual[x, 6.8e+174]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $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^{+165} \lor \neg \left(x \leq 6.8 \cdot 10^{+174}\right):\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(t + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if x < -9.99999999999999899e164 or 6.8000000000000002e174 < x Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 94.0%
if -9.99999999999999899e164 < x < 6.8000000000000002e174Initial program 99.9%
Taylor expanded in x around 0 95.8%
Final simplification95.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))) (t_2 (+ a (+ z t))))
(if (<= i -3.1e+46)
(+ (* y i) (+ (* b (log c)) t_2))
(if (<= i 9.2e+21)
(+ a (+ t (+ z (+ (* x (log y)) t_1))))
(+ (* y i) (+ t_2 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 t_2 = a + (z + t);
double tmp;
if (i <= -3.1e+46) {
tmp = (y * i) + ((b * log(c)) + t_2);
} else if (i <= 9.2e+21) {
tmp = a + (t + (z + ((x * log(y)) + t_1)));
} else {
tmp = (y * i) + (t_2 + 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) :: t_2
real(8) :: tmp
t_1 = log(c) * (b - 0.5d0)
t_2 = a + (z + t)
if (i <= (-3.1d+46)) then
tmp = (y * i) + ((b * log(c)) + t_2)
else if (i <= 9.2d+21) then
tmp = a + (t + (z + ((x * log(y)) + t_1)))
else
tmp = (y * i) + (t_2 + 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 t_2 = a + (z + t);
double tmp;
if (i <= -3.1e+46) {
tmp = (y * i) + ((b * Math.log(c)) + t_2);
} else if (i <= 9.2e+21) {
tmp = a + (t + (z + ((x * Math.log(y)) + t_1)));
} else {
tmp = (y * i) + (t_2 + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) t_2 = a + (z + t) tmp = 0 if i <= -3.1e+46: tmp = (y * i) + ((b * math.log(c)) + t_2) elif i <= 9.2e+21: tmp = a + (t + (z + ((x * math.log(y)) + t_1))) else: tmp = (y * i) + (t_2 + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) t_2 = Float64(a + Float64(z + t)) tmp = 0.0 if (i <= -3.1e+46) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + t_2)); elseif (i <= 9.2e+21) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1)))); else tmp = Float64(Float64(y * i) + Float64(t_2 + 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); t_2 = a + (z + t); tmp = 0.0; if (i <= -3.1e+46) tmp = (y * i) + ((b * log(c)) + t_2); elseif (i <= 9.2e+21) tmp = a + (t + (z + ((x * log(y)) + t_1))); else tmp = (y * i) + (t_2 + 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]}, Block[{t$95$2 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.1e+46], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 9.2e+21], 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[(t$95$2 + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := a + \left(z + t\right)\\
\mathbf{if}\;i \leq -3.1 \cdot 10^{+46}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + t\_2\right)\\
\mathbf{elif}\;i \leq 9.2 \cdot 10^{+21}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_2 + t\_1\right)\\
\end{array}
\end{array}
if i < -3.09999999999999975e46Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 92.0%
if -3.09999999999999975e46 < i < 9.2e21Initial 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 i around inf 44.2%
associate-/l*44.1%
sub-neg44.1%
metadata-eval44.1%
associate-/l*44.1%
+-commutative44.1%
Simplified44.1%
Taylor expanded in i around 0 96.3%
if 9.2e21 < i Initial program 99.9%
Taylor expanded in x around 0 92.0%
Final simplification94.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -6.6e+180)
(* x (+ (log y) (/ (* y i) x)))
(if (<= x 2.05e+220)
(+ (* y i) (+ (+ a (+ z t)) (* (log c) (- b 0.5))))
(* x (+ (log y) (/ (* b (log c)) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -6.6e+180) {
tmp = x * (log(y) + ((y * i) / x));
} else if (x <= 2.05e+220) {
tmp = (y * i) + ((a + (z + t)) + (log(c) * (b - 0.5)));
} else {
tmp = x * (log(y) + ((b * log(c)) / x));
}
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.6d+180)) then
tmp = x * (log(y) + ((y * i) / x))
else if (x <= 2.05d+220) then
tmp = (y * i) + ((a + (z + t)) + (log(c) * (b - 0.5d0)))
else
tmp = x * (log(y) + ((b * log(c)) / x))
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.6e+180) {
tmp = x * (Math.log(y) + ((y * i) / x));
} else if (x <= 2.05e+220) {
tmp = (y * i) + ((a + (z + t)) + (Math.log(c) * (b - 0.5)));
} else {
tmp = x * (Math.log(y) + ((b * Math.log(c)) / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -6.6e+180: tmp = x * (math.log(y) + ((y * i) / x)) elif x <= 2.05e+220: tmp = (y * i) + ((a + (z + t)) + (math.log(c) * (b - 0.5))) else: tmp = x * (math.log(y) + ((b * math.log(c)) / x)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -6.6e+180) tmp = Float64(x * Float64(log(y) + Float64(Float64(y * i) / x))); elseif (x <= 2.05e+220) tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(x * Float64(log(y) + Float64(Float64(b * log(c)) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -6.6e+180) tmp = x * (log(y) + ((y * i) / x)); elseif (x <= 2.05e+220) tmp = (y * i) + ((a + (z + t)) + (log(c) * (b - 0.5))); else tmp = x * (log(y) + ((b * log(c)) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -6.6e+180], N[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(y * i), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.05e+220], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{+180}:\\
\;\;\;\;x \cdot \left(\log y + \frac{y \cdot i}{x}\right)\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+220}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{b \cdot \log c}{x}\right)\\
\end{array}
\end{array}
if x < -6.59999999999999978e180Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around -inf 99.6%
Taylor expanded in i around inf 77.2%
*-commutative77.2%
Simplified77.2%
if -6.59999999999999978e180 < x < 2.0499999999999999e220Initial program 99.9%
Taylor expanded in x around 0 92.6%
if 2.0499999999999999e220 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around -inf 99.7%
Taylor expanded in b around inf 80.6%
Final simplification90.4%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.5e+178) (not (<= x 1.7e+184))) (* x (+ (log y) (/ (* y i) x))) (+ (* y i) (+ (+ a (+ z t)) (* (log c) (- b 0.5))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.5e+178) || !(x <= 1.7e+184)) {
tmp = x * (log(y) + ((y * i) / x));
} else {
tmp = (y * i) + ((a + (z + t)) + (log(c) * (b - 0.5)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-4.5d+178)) .or. (.not. (x <= 1.7d+184))) then
tmp = x * (log(y) + ((y * i) / x))
else
tmp = (y * i) + ((a + (z + t)) + (log(c) * (b - 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.5e+178) || !(x <= 1.7e+184)) {
tmp = x * (Math.log(y) + ((y * i) / x));
} else {
tmp = (y * i) + ((a + (z + t)) + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.5e+178) or not (x <= 1.7e+184): tmp = x * (math.log(y) + ((y * i) / x)) else: tmp = (y * i) + ((a + (z + t)) + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.5e+178) || !(x <= 1.7e+184)) tmp = Float64(x * Float64(log(y) + Float64(Float64(y * i) / x))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + Float64(log(c) * Float64(b - 0.5)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -4.5e+178) || ~((x <= 1.7e+184))) tmp = x * (log(y) + ((y * i) / x)); else tmp = (y * i) + ((a + (z + t)) + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.5e+178], N[Not[LessEqual[x, 1.7e+184]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(y * i), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+178} \lor \neg \left(x \leq 1.7 \cdot 10^{+184}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{y \cdot i}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if x < -4.4999999999999997e178 or 1.7000000000000001e184 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.7%
Taylor expanded in x around -inf 99.7%
Taylor expanded in i around inf 73.8%
*-commutative73.8%
Simplified73.8%
if -4.4999999999999997e178 < x < 1.7000000000000001e184Initial program 99.9%
Taylor expanded in x around 0 94.2%
Final simplification90.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.4e+181) (not (<= x 2.7e+184))) (* x (+ (log y) (/ (* y i) x))) (+ (* y i) (+ (* b (log c)) (+ a (+ 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.4e+181) || !(x <= 2.7e+184)) {
tmp = x * (log(y) + ((y * i) / x));
} else {
tmp = (y * i) + ((b * log(c)) + (a + (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.4d+181)) .or. (.not. (x <= 2.7d+184))) then
tmp = x * (log(y) + ((y * i) / x))
else
tmp = (y * i) + ((b * log(c)) + (a + (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.4e+181) || !(x <= 2.7e+184)) {
tmp = x * (Math.log(y) + ((y * i) / x));
} else {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.4e+181) or not (x <= 2.7e+184): tmp = x * (math.log(y) + ((y * i) / x)) else: tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.4e+181) || !(x <= 2.7e+184)) tmp = Float64(x * Float64(log(y) + Float64(Float64(y * i) / x))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + 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.4e+181) || ~((x <= 2.7e+184))) tmp = x * (log(y) + ((y * i) / x)); else tmp = (y * i) + ((b * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.4e+181], N[Not[LessEqual[x, 2.7e+184]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(y * i), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+181} \lor \neg \left(x \leq 2.7 \cdot 10^{+184}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{y \cdot i}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.40000000000000002e181 or 2.6999999999999999e184 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.7%
Taylor expanded in x around -inf 99.7%
Taylor expanded in i around inf 73.8%
*-commutative73.8%
Simplified73.8%
if -2.40000000000000002e181 < x < 2.6999999999999999e184Initial program 99.9%
Taylor expanded in b around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in x around 0 91.4%
Final simplification87.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x -5.6e+170) (* x (+ (log y) (/ a x))) (+ (* y i) (+ (* b (log c)) (+ a (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -5.6e+170) {
tmp = x * (log(y) + (a / x));
} else {
tmp = (y * i) + ((b * log(c)) + (a + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (x <= (-5.6d+170)) then
tmp = x * (log(y) + (a / x))
else
tmp = (y * i) + ((b * log(c)) + (a + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -5.6e+170) {
tmp = x * (Math.log(y) + (a / x));
} else {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= -5.6e+170: tmp = x * (math.log(y) + (a / x)) else: tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -5.6e+170) tmp = Float64(x * Float64(log(y) + Float64(a / x))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= -5.6e+170) tmp = x * (log(y) + (a / x)); else tmp = (y * i) + ((b * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -5.6e+170], N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{+170}:\\
\;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.6000000000000003e170Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around -inf 99.7%
Taylor expanded in a around inf 61.4%
if -5.6000000000000003e170 < x Initial program 99.9%
Taylor expanded in b around inf 97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in x around 0 87.6%
Final simplification84.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 8.6e+155) (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))) (+ (* y i) (+ (+ t 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 <= 8.6e+155) {
tmp = t + (z + ((y * i) + (log(c) * (b - 0.5))));
} else {
tmp = (y * i) + ((t + 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 <= 8.6d+155) then
tmp = t + (z + ((y * i) + (log(c) * (b - 0.5d0))))
else
tmp = (y * i) + ((t + 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 <= 8.6e+155) {
tmp = t + (z + ((y * i) + (Math.log(c) * (b - 0.5))));
} else {
tmp = (y * i) + ((t + a) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 8.6e+155: tmp = t + (z + ((y * i) + (math.log(c) * (b - 0.5)))) else: tmp = (y * i) + ((t + a) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 8.6e+155) tmp = Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + 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 <= 8.6e+155) tmp = t + (z + ((y * i) + (log(c) * (b - 0.5)))); else tmp = (y * i) + ((t + a) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 8.6e+155], N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.6 \cdot 10^{+155}:\\
\;\;\;\;t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 8.6000000000000005e155Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in a around inf 60.6%
associate-+r+60.6%
*-commutative60.6%
associate-/l*60.6%
sub-neg60.6%
metadata-eval60.6%
+-commutative60.6%
Simplified60.6%
Taylor expanded in x around 0 49.8%
associate-*r/47.9%
associate-*r/47.9%
sub-neg47.9%
metadata-eval47.9%
Simplified47.9%
Taylor expanded in a around 0 71.6%
if 8.6000000000000005e155 < a Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around inf 89.4%
Final simplification73.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.45e+232) z (+ (* y i) (+ (+ t 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 <= -1.45e+232) {
tmp = z;
} else {
tmp = (y * i) + ((t + 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 <= (-1.45d+232)) then
tmp = z
else
tmp = (y * i) + ((t + 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 <= -1.45e+232) {
tmp = z;
} else {
tmp = (y * i) + ((t + a) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.45e+232: tmp = z else: tmp = (y * i) + ((t + a) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.45e+232) tmp = z; else tmp = Float64(Float64(y * i) + Float64(Float64(t + 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 <= -1.45e+232) tmp = z; else tmp = (y * i) + ((t + a) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.45e+232], z, N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+232}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if z < -1.45000000000000012e232Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 76.9%
associate-+r+76.9%
*-commutative76.9%
associate-/l*76.9%
sub-neg76.9%
metadata-eval76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in z around inf 76.8%
if -1.45000000000000012e232 < z Initial program 99.8%
Taylor expanded in b around inf 97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in t around inf 72.5%
Final simplification72.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.3e+158) z (if (or (<= z 1.75e-284) (not (<= z 1e-17))) (* i (+ y (/ a i))) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.3e+158) {
tmp = z;
} else if ((z <= 1.75e-284) || !(z <= 1e-17)) {
tmp = i * (y + (a / i));
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-3.3d+158)) then
tmp = z
else if ((z <= 1.75d-284) .or. (.not. (z <= 1d-17))) then
tmp = i * (y + (a / i))
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.3e+158) {
tmp = z;
} else if ((z <= 1.75e-284) || !(z <= 1e-17)) {
tmp = i * (y + (a / i));
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.3e+158: tmp = z elif (z <= 1.75e-284) or not (z <= 1e-17): tmp = i * (y + (a / i)) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.3e+158) tmp = z; elseif ((z <= 1.75e-284) || !(z <= 1e-17)) tmp = Float64(i * Float64(y + Float64(a / i))); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -3.3e+158) tmp = z; elseif ((z <= 1.75e-284) || ~((z <= 1e-17))) tmp = i * (y + (a / i)); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.3e+158], z, If[Or[LessEqual[z, 1.75e-284], N[Not[LessEqual[z, 1e-17]], $MachinePrecision]], N[(i * N[(y + N[(a / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+158}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-284} \lor \neg \left(z \leq 10^{-17}\right):\\
\;\;\;\;i \cdot \left(y + \frac{a}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -3.30000000000000017e158Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 53.6%
associate-+r+53.6%
*-commutative53.6%
associate-/l*53.6%
sub-neg53.6%
metadata-eval53.6%
+-commutative53.6%
Simplified53.6%
Taylor expanded in z around inf 37.5%
if -3.30000000000000017e158 < z < 1.74999999999999988e-284 or 1.00000000000000007e-17 < z Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in i around inf 67.5%
associate-/l*67.5%
sub-neg67.5%
metadata-eval67.5%
associate-/l*67.5%
+-commutative67.5%
Simplified67.5%
Taylor expanded in a around inf 30.5%
if 1.74999999999999988e-284 < z < 1.00000000000000007e-17Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.9%
Taylor expanded in t around inf 73.1%
Taylor expanded in a around inf 23.9%
Final simplification29.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -7.2e+78) z (if (<= z -5.8e-44) a (if (<= z -2.7e-128) (* y i) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -7.2e+78) {
tmp = z;
} else if (z <= -5.8e-44) {
tmp = a;
} else if (z <= -2.7e-128) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-7.2d+78)) then
tmp = z
else if (z <= (-5.8d-44)) then
tmp = a
else if (z <= (-2.7d-128)) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -7.2e+78) {
tmp = z;
} else if (z <= -5.8e-44) {
tmp = a;
} else if (z <= -2.7e-128) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -7.2e+78: tmp = z elif z <= -5.8e-44: tmp = a elif z <= -2.7e-128: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -7.2e+78) tmp = z; elseif (z <= -5.8e-44) tmp = a; elseif (z <= -2.7e-128) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -7.2e+78) tmp = z; elseif (z <= -5.8e-44) tmp = a; elseif (z <= -2.7e-128) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7.2e+78], z, If[LessEqual[z, -5.8e-44], a, If[LessEqual[z, -2.7e-128], N[(y * i), $MachinePrecision], a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+78}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-44}:\\
\;\;\;\;a\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-128}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -7.20000000000000039e78Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around inf 54.3%
associate-+r+54.3%
*-commutative54.3%
associate-/l*54.2%
sub-neg54.2%
metadata-eval54.2%
+-commutative54.2%
Simplified54.2%
Taylor expanded in z around inf 26.9%
if -7.20000000000000039e78 < z < -5.8000000000000003e-44 or -2.70000000000000006e-128 < z Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 71.5%
Taylor expanded in a around inf 19.7%
if -5.8000000000000003e-44 < z < -2.70000000000000006e-128Initial 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.9%
Taylor expanded in y around inf 37.7%
*-commutative37.7%
Simplified37.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.26e+148) (* i (+ y (/ z i))) (* a (+ (+ (/ t a) (/ z a)) 1.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.26e+148) {
tmp = i * (y + (z / i));
} else {
tmp = a * (((t / a) + (z / a)) + 1.0);
}
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.26d+148) then
tmp = i * (y + (z / i))
else
tmp = a * (((t / a) + (z / a)) + 1.0d0)
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.26e+148) {
tmp = i * (y + (z / i));
} else {
tmp = a * (((t / a) + (z / a)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.26e+148: tmp = i * (y + (z / i)) else: tmp = a * (((t / a) + (z / a)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.26e+148) tmp = Float64(i * Float64(y + Float64(z / i))); else tmp = Float64(a * Float64(Float64(Float64(t / a) + Float64(z / a)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.26e+148) tmp = i * (y + (z / i)); else tmp = a * (((t / a) + (z / a)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.26e+148], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(N[(t / a), $MachinePrecision] + N[(z / a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.26 \cdot 10^{+148}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\left(\frac{t}{a} + \frac{z}{a}\right) + 1\right)\\
\end{array}
\end{array}
if a < 1.25999999999999997e148Initial 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 i around inf 67.6%
associate-/l*67.6%
sub-neg67.6%
metadata-eval67.6%
associate-/l*67.5%
+-commutative67.5%
Simplified67.5%
Taylor expanded in z around inf 28.2%
if 1.25999999999999997e148 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified100.0%
Taylor expanded in a around inf 99.9%
associate-+r+99.9%
*-commutative99.9%
associate-/l*99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 71.4%
Final simplification33.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 9.5e+195) (* i (+ y (/ z i))) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 9.5e+195) {
tmp = i * (y + (z / 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 <= 9.5d+195) then
tmp = i * (y + (z / 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 <= 9.5e+195) {
tmp = i * (y + (z / i));
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 9.5e+195: tmp = i * (y + (z / i)) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 9.5e+195) tmp = Float64(i * Float64(y + Float64(z / 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 <= 9.5e+195) tmp = i * (y + (z / i)); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 9.5e+195], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.5 \cdot 10^{+195}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 9.5000000000000004e195Initial 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 i around inf 68.4%
associate-/l*68.4%
sub-neg68.4%
metadata-eval68.4%
associate-/l*68.4%
+-commutative68.4%
Simplified68.4%
Taylor expanded in z around inf 28.4%
if 9.5000000000000004e195 < a Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 59.1%
Taylor expanded in a around inf 65.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.1e+78) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.1e+78) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.1d+78)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.1e+78) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.1e+78: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.1e+78) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.1e+78) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.1e+78], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+78}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -2.1000000000000001e78Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around inf 54.3%
associate-+r+54.3%
*-commutative54.3%
associate-/l*54.2%
sub-neg54.2%
metadata-eval54.2%
+-commutative54.2%
Simplified54.2%
Taylor expanded in z around inf 26.9%
if -2.1000000000000001e78 < z Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 71.3%
Taylor expanded in a around inf 19.3%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.9%
Taylor expanded in t around inf 71.3%
Taylor expanded in a around inf 17.6%
herbie shell --seed 2024086
(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)))