
(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 (+ (* x (log y)) (+ (+ z t) (+ a (* (+ b -0.5) (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, ((x * log(y)) + ((z + t) + (a + ((b + -0.5) * log(c))))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, Float64(Float64(x * log(y)) + Float64(Float64(z + t) + Float64(a + Float64(Float64(b + -0.5) * log(c)))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + N[(a + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, x \cdot \log y + \left(\left(z + t\right) + \left(a + \left(b + -0.5\right) \cdot \log c\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t (+ (* x (log y)) z)))))
(if (<= y 5.5e-54)
(+ (* (log c) (- b 0.5)) t_1)
(+ (* y i) (+ t_1 (* b (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + ((x * log(y)) + z));
double tmp;
if (y <= 5.5e-54) {
tmp = (log(c) * (b - 0.5)) + t_1;
} else {
tmp = (y * i) + (t_1 + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (t + ((x * log(y)) + z))
if (y <= 5.5d-54) then
tmp = (log(c) * (b - 0.5d0)) + t_1
else
tmp = (y * i) + (t_1 + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + ((x * Math.log(y)) + z));
double tmp;
if (y <= 5.5e-54) {
tmp = (Math.log(c) * (b - 0.5)) + t_1;
} else {
tmp = (y * i) + (t_1 + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (t + ((x * math.log(y)) + z)) tmp = 0 if y <= 5.5e-54: tmp = (math.log(c) * (b - 0.5)) + t_1 else: tmp = (y * i) + (t_1 + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) tmp = 0.0 if (y <= 5.5e-54) tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + t_1); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (t + ((x * log(y)) + z)); tmp = 0.0; if (y <= 5.5e-54) tmp = (log(c) * (b - 0.5)) + t_1; else tmp = (y * i) + (t_1 + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.5e-54], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + \left(x \cdot \log y + z\right)\right)\\
\mathbf{if}\;y \leq 5.5 \cdot 10^{-54}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t_1 + b \cdot \log c\right)\\
\end{array}
\end{array}
if y < 5.50000000000000046e-54Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in c around inf 99.9%
associate-+r+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
if 5.50000000000000046e-54 < y Initial program 99.9%
Taylor expanded in b around inf 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification98.6%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (* (log c) (- b 0.5)) (+ a (+ t (+ (* x (log y)) z)))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((log(c) * (b - 0.5)) + (a + (t + ((x * log(y)) + z)))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((log(c) * (b - 0.5d0)) + (a + (t + ((x * log(y)) + z)))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((Math.log(c) * (b - 0.5)) + (a + (t + ((x * Math.log(y)) + z)))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((math.log(c) * (b - 0.5)) + (a + (t + ((x * math.log(y)) + z)))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(Float64(x * log(y)) + z)))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((log(c) * (b - 0.5)) + (a + (t + ((x * log(y)) + z)))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right)\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.75e+151)
(+ (* y i) (+ a (+ t (+ (* x (log y)) z))))
(if (<= x 1500000000.0)
(+ (* y i) (+ (* (log c) (- b 0.5)) (+ (+ z t) a)))
(+ (* y i) (fma x (log y) (+ z (+ t a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.75e+151) {
tmp = (y * i) + (a + (t + ((x * log(y)) + z)));
} else if (x <= 1500000000.0) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + t) + a));
} else {
tmp = (y * i) + fma(x, log(y), (z + (t + a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.75e+151) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(Float64(x * log(y)) + z)))); elseif (x <= 1500000000.0) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(Float64(z + t) + a))); else tmp = Float64(Float64(y * i) + fma(x, log(y), Float64(z + Float64(t + a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.75e+151], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1500000000.0], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+151}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right)\\
\mathbf{elif}\;x \leq 1500000000:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(\left(z + t\right) + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \mathsf{fma}\left(x, \log y, z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -1.7500000000000001e151Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 96.6%
if -1.7500000000000001e151 < x < 1.5e9Initial program 99.9%
Taylor expanded in x around 0 98.8%
if 1.5e9 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 90.8%
fma-udef90.8%
fma-def90.8%
associate-+l+90.8%
+-commutative90.8%
Applied egg-rr90.8%
Final simplification96.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ z t) a)))
(if (<= x -8e+150)
(fma y i (+ (* x (log y)) t_1))
(if (<= x 58000000.0)
(+ (* y i) (+ (* (log c) (- b 0.5)) t_1))
(+ (* y i) (fma x (log y) (+ z (+ t a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z + t) + a;
double tmp;
if (x <= -8e+150) {
tmp = fma(y, i, ((x * log(y)) + t_1));
} else if (x <= 58000000.0) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + t_1);
} else {
tmp = (y * i) + fma(x, log(y), (z + (t + a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z + t) + a) tmp = 0.0 if (x <= -8e+150) tmp = fma(y, i, Float64(Float64(x * log(y)) + t_1)); elseif (x <= 58000000.0) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + t_1)); else tmp = Float64(Float64(y * i) + fma(x, log(y), Float64(z + Float64(t + a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[x, -8e+150], N[(y * i + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 58000000.0], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + t\right) + a\\
\mathbf{if}\;x \leq -8 \cdot 10^{+150}:\\
\;\;\;\;\mathsf{fma}\left(y, i, x \cdot \log y + t_1\right)\\
\mathbf{elif}\;x \leq 58000000:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \mathsf{fma}\left(x, \log y, z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -7.99999999999999985e150Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 96.7%
if -7.99999999999999985e150 < x < 5.8e7Initial program 99.9%
Taylor expanded in x around 0 98.8%
if 5.8e7 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 90.8%
fma-udef90.8%
fma-def90.8%
associate-+l+90.8%
+-commutative90.8%
Applied egg-rr90.8%
Final simplification96.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -5e+203) (not (<= (- b 0.5) 2e+122))) (+ (* y i) (+ a (+ t (* (log c) (- b 0.5))))) (+ (* y i) (+ a (+ t (+ (* x (log y)) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -5e+203) || !((b - 0.5) <= 2e+122)) {
tmp = (y * i) + (a + (t + (log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (a + (t + ((x * log(y)) + z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((b - 0.5d0) <= (-5d+203)) .or. (.not. ((b - 0.5d0) <= 2d+122))) then
tmp = (y * i) + (a + (t + (log(c) * (b - 0.5d0))))
else
tmp = (y * i) + (a + (t + ((x * log(y)) + z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -5e+203) || !((b - 0.5) <= 2e+122)) {
tmp = (y * i) + (a + (t + (Math.log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (a + (t + ((x * Math.log(y)) + z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -5e+203) or not ((b - 0.5) <= 2e+122): tmp = (y * i) + (a + (t + (math.log(c) * (b - 0.5)))) else: tmp = (y * i) + (a + (t + ((x * math.log(y)) + z))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -5e+203) || !(Float64(b - 0.5) <= 2e+122)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(Float64(x * log(y)) + z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -5e+203) || ~(((b - 0.5) <= 2e+122))) tmp = (y * i) + (a + (t + (log(c) * (b - 0.5)))); else tmp = (y * i) + (a + (t + ((x * log(y)) + z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+203], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+122]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+203} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+122}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -4.99999999999999994e203 or 2.00000000000000003e122 < (-.f64 b 1/2) Initial program 99.8%
Taylor expanded in x around 0 95.0%
Taylor expanded in z around 0 86.7%
if -4.99999999999999994e203 < (-.f64 b 1/2) < 2.00000000000000003e122Initial program 99.9%
Taylor expanded in b around inf 96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in b around 0 92.9%
Final simplification91.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.1e+150) (not (<= x 1700000.0))) (+ (* y i) (+ a (+ t (+ (* x (log y)) z)))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ (+ z t) 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+150) || !(x <= 1700000.0)) {
tmp = (y * i) + (a + (t + ((x * log(y)) + z)));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + t) + 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+150)) .or. (.not. (x <= 1700000.0d0))) then
tmp = (y * i) + (a + (t + ((x * log(y)) + z)))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + ((z + t) + 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+150) || !(x <= 1700000.0)) {
tmp = (y * i) + (a + (t + ((x * Math.log(y)) + z)));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + ((z + t) + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.1e+150) or not (x <= 1700000.0): tmp = (y * i) + (a + (t + ((x * math.log(y)) + z))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + ((z + t) + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.1e+150) || !(x <= 1700000.0)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(Float64(x * log(y)) + z)))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(Float64(z + t) + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.1e+150) || ~((x <= 1700000.0))) tmp = (y * i) + (a + (t + ((x * log(y)) + z))); else tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + t) + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.1e+150], N[Not[LessEqual[x, 1700000.0]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+150} \lor \neg \left(x \leq 1700000\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(\left(z + t\right) + a\right)\right)\\
\end{array}
\end{array}
if x < -2.09999999999999998e150 or 1.7e6 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 93.3%
if -2.09999999999999998e150 < x < 1.7e6Initial program 99.9%
Taylor expanded in x around 0 98.8%
Final simplification96.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.4e+150) (not (<= x 1820000000.0))) (+ (* y i) (+ a (+ t (+ (* x (log y)) z)))) (+ (* y i) (+ (* b (log c)) (+ (+ z t) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.4e+150) || !(x <= 1820000000.0)) {
tmp = (y * i) + (a + (t + ((x * log(y)) + z)));
} else {
tmp = (y * i) + ((b * log(c)) + ((z + t) + 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.4d+150)) .or. (.not. (x <= 1820000000.0d0))) then
tmp = (y * i) + (a + (t + ((x * log(y)) + z)))
else
tmp = (y * i) + ((b * log(c)) + ((z + t) + 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.4e+150) || !(x <= 1820000000.0)) {
tmp = (y * i) + (a + (t + ((x * Math.log(y)) + z)));
} else {
tmp = (y * i) + ((b * Math.log(c)) + ((z + t) + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.4e+150) or not (x <= 1820000000.0): tmp = (y * i) + (a + (t + ((x * math.log(y)) + z))) else: tmp = (y * i) + ((b * math.log(c)) + ((z + t) + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.4e+150) || !(x <= 1820000000.0)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(Float64(x * log(y)) + z)))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(Float64(z + t) + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.4e+150) || ~((x <= 1820000000.0))) tmp = (y * i) + (a + (t + ((x * log(y)) + z))); else tmp = (y * i) + ((b * log(c)) + ((z + t) + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.4e+150], N[Not[LessEqual[x, 1820000000.0]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+150} \lor \neg \left(x \leq 1820000000\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(\left(z + t\right) + a\right)\right)\\
\end{array}
\end{array}
if x < -2.40000000000000003e150 or 1.82e9 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 93.3%
if -2.40000000000000003e150 < x < 1.82e9Initial program 99.9%
Taylor expanded in x around 0 98.8%
Taylor expanded in b around inf 94.2%
*-commutative95.4%
Simplified94.2%
Final simplification93.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.8e+156) (not (<= x 1.75e+168))) (+ t (+ z (+ (* x (log y)) (* y i)))) (+ a (+ t (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.8e+156) || !(x <= 1.75e+168)) {
tmp = t + (z + ((x * log(y)) + (y * i)));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-5.8d+156)) .or. (.not. (x <= 1.75d+168))) then
tmp = t + (z + ((x * log(y)) + (y * i)))
else
tmp = a + (t + (z + (y * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.8e+156) || !(x <= 1.75e+168)) {
tmp = t + (z + ((x * Math.log(y)) + (y * i)));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5.8e+156) or not (x <= 1.75e+168): tmp = t + (z + ((x * math.log(y)) + (y * i))) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.8e+156) || !(x <= 1.75e+168)) tmp = Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i)))); else tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -5.8e+156) || ~((x <= 1.75e+168))) tmp = t + (z + ((x * log(y)) + (y * i))); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.8e+156], N[Not[LessEqual[x, 1.75e+168]], $MachinePrecision]], N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+156} \lor \neg \left(x \leq 1.75 \cdot 10^{+168}\right):\\
\;\;\;\;t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -5.80000000000000021e156 or 1.7500000000000001e168 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 95.0%
Taylor expanded in a around 0 80.7%
if -5.80000000000000021e156 < x < 1.7500000000000001e168Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 80.9%
Taylor expanded in x around 0 78.0%
+-commutative78.0%
Simplified78.0%
Final simplification78.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.2e+156) (not (<= x 1.46e+168))) (+ t (+ z (+ (* x (log y)) (* y i)))) (+ (* y i) (+ (+ z a) (* -0.5 (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.2e+156) || !(x <= 1.46e+168)) {
tmp = t + (z + ((x * log(y)) + (y * i)));
} else {
tmp = (y * i) + ((z + a) + (-0.5 * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-5.2d+156)) .or. (.not. (x <= 1.46d+168))) then
tmp = t + (z + ((x * log(y)) + (y * i)))
else
tmp = (y * i) + ((z + a) + ((-0.5d0) * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.2e+156) || !(x <= 1.46e+168)) {
tmp = t + (z + ((x * Math.log(y)) + (y * i)));
} else {
tmp = (y * i) + ((z + a) + (-0.5 * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5.2e+156) or not (x <= 1.46e+168): tmp = t + (z + ((x * math.log(y)) + (y * i))) else: tmp = (y * i) + ((z + a) + (-0.5 * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.2e+156) || !(x <= 1.46e+168)) tmp = Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i)))); else tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(-0.5 * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -5.2e+156) || ~((x <= 1.46e+168))) tmp = t + (z + ((x * log(y)) + (y * i))); else tmp = (y * i) + ((z + a) + (-0.5 * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.2e+156], N[Not[LessEqual[x, 1.46e+168]], $MachinePrecision]], N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+156} \lor \neg \left(x \leq 1.46 \cdot 10^{+168}\right):\\
\;\;\;\;t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + -0.5 \cdot \log c\right)\\
\end{array}
\end{array}
if x < -5.20000000000000037e156 or 1.45999999999999996e168 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 95.0%
Taylor expanded in a around 0 80.7%
if -5.20000000000000037e156 < x < 1.45999999999999996e168Initial program 99.9%
Taylor expanded in x around 0 97.0%
Taylor expanded in b around 0 81.9%
Taylor expanded in t around 0 63.3%
associate-+r+63.3%
*-commutative63.3%
Simplified63.3%
Final simplification67.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -7.6e+122) (+ a (+ t (+ z (* y i)))) (+ (* y i) (+ a (+ 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 (z <= -7.6e+122) {
tmp = a + (t + (z + (y * i)));
} else {
tmp = (y * i) + (a + (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 (z <= (-7.6d+122)) then
tmp = a + (t + (z + (y * i)))
else
tmp = (y * i) + (a + (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 (z <= -7.6e+122) {
tmp = a + (t + (z + (y * i)));
} else {
tmp = (y * i) + (a + (t + (Math.log(c) * (b - 0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -7.6e+122: tmp = a + (t + (z + (y * i))) else: tmp = (y * i) + (a + (t + (math.log(c) * (b - 0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -7.6e+122) tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(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 (z <= -7.6e+122) tmp = a + (t + (z + (y * i))); else tmp = (y * i) + (a + (t + (log(c) * (b - 0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7.6e+122], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+122}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\end{array}
\end{array}
if z < -7.5999999999999996e122Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 94.3%
Taylor expanded in x around 0 86.0%
+-commutative86.0%
Simplified86.0%
if -7.5999999999999996e122 < z Initial program 99.9%
Taylor expanded in x around 0 83.5%
Taylor expanded in z around 0 71.1%
Final simplification73.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 8.5e-162)
z
(if (<= a 3.4e-44)
(* y i)
(if (<= a 105000000.0) z (if (<= a 1.4e+145) (* 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-162) {
tmp = z;
} else if (a <= 3.4e-44) {
tmp = y * i;
} else if (a <= 105000000.0) {
tmp = z;
} else if (a <= 1.4e+145) {
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-162) then
tmp = z
else if (a <= 3.4d-44) then
tmp = y * i
else if (a <= 105000000.0d0) then
tmp = z
else if (a <= 1.4d+145) 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-162) {
tmp = z;
} else if (a <= 3.4e-44) {
tmp = y * i;
} else if (a <= 105000000.0) {
tmp = z;
} else if (a <= 1.4e+145) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 8.5e-162: tmp = z elif a <= 3.4e-44: tmp = y * i elif a <= 105000000.0: tmp = z elif a <= 1.4e+145: 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-162) tmp = z; elseif (a <= 3.4e-44) tmp = Float64(y * i); elseif (a <= 105000000.0) tmp = z; elseif (a <= 1.4e+145) 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-162) tmp = z; elseif (a <= 3.4e-44) tmp = y * i; elseif (a <= 105000000.0) tmp = z; elseif (a <= 1.4e+145) 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-162], z, If[LessEqual[a, 3.4e-44], N[(y * i), $MachinePrecision], If[LessEqual[a, 105000000.0], z, If[LessEqual[a, 1.4e+145], N[(y * i), $MachinePrecision], a]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.5 \cdot 10^{-162}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-44}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 105000000:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+145}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 8.49999999999999955e-162 or 3.40000000000000016e-44 < a < 1.05e8Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in c around inf 99.9%
associate-+r+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 21.1%
if 8.49999999999999955e-162 < a < 3.40000000000000016e-44 or 1.05e8 < a < 1.3999999999999999e145Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around inf 35.6%
*-commutative35.6%
Simplified35.6%
if 1.3999999999999999e145 < a Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
fma-def100.0%
+-commutative100.0%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in c around inf 100.0%
associate-+r+100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 43.9%
Final simplification28.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -6e+214) z (if (or (<= z -2.3e+188) (not (<= z -1.5e+165))) (+ a (* y i)) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -6e+214) {
tmp = z;
} else if ((z <= -2.3e+188) || !(z <= -1.5e+165)) {
tmp = a + (y * i);
} else {
tmp = z;
}
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 <= (-6d+214)) then
tmp = z
else if ((z <= (-2.3d+188)) .or. (.not. (z <= (-1.5d+165)))) then
tmp = a + (y * i)
else
tmp = z
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 <= -6e+214) {
tmp = z;
} else if ((z <= -2.3e+188) || !(z <= -1.5e+165)) {
tmp = a + (y * i);
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -6e+214: tmp = z elif (z <= -2.3e+188) or not (z <= -1.5e+165): tmp = a + (y * i) else: tmp = z return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -6e+214) tmp = z; elseif ((z <= -2.3e+188) || !(z <= -1.5e+165)) tmp = Float64(a + Float64(y * i)); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -6e+214) tmp = z; elseif ((z <= -2.3e+188) || ~((z <= -1.5e+165))) tmp = a + (y * i); else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -6e+214], z, If[Or[LessEqual[z, -2.3e+188], N[Not[LessEqual[z, -1.5e+165]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+214}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+188} \lor \neg \left(z \leq -1.5 \cdot 10^{+165}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -6.0000000000000002e214 or -2.30000000000000011e188 < z < -1.49999999999999995e165Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in c around inf 99.9%
associate-+r+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 59.5%
if -6.0000000000000002e214 < z < -2.30000000000000011e188 or -1.49999999999999995e165 < z Initial program 99.9%
Taylor expanded in a around inf 41.9%
Final simplification43.4%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ t (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a + (t + (z + (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (y * i)));
}
def code(x, y, z, t, a, b, c, i): return a + (t + (z + (y * i)))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + Float64(z + Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (t + (z + (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \left(z + y \cdot i\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 84.4%
Taylor expanded in x around 0 69.7%
+-commutative69.7%
Simplified69.7%
Final simplification69.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 32000000000000.0) z (if (<= a 9.5e+103) a (if (<= a 2.2e+176) z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 32000000000000.0) {
tmp = z;
} else if (a <= 9.5e+103) {
tmp = a;
} else if (a <= 2.2e+176) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 32000000000000.0d0) then
tmp = z
else if (a <= 9.5d+103) then
tmp = a
else if (a <= 2.2d+176) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 32000000000000.0) {
tmp = z;
} else if (a <= 9.5e+103) {
tmp = a;
} else if (a <= 2.2e+176) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 32000000000000.0: tmp = z elif a <= 9.5e+103: tmp = a elif a <= 2.2e+176: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 32000000000000.0) tmp = z; elseif (a <= 9.5e+103) tmp = a; elseif (a <= 2.2e+176) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 32000000000000.0) tmp = z; elseif (a <= 9.5e+103) tmp = a; elseif (a <= 2.2e+176) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 32000000000000.0], z, If[LessEqual[a, 9.5e+103], a, If[LessEqual[a, 2.2e+176], z, a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 32000000000000:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+103}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+176}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 3.2e13 or 9.49999999999999922e103 < a < 2.20000000000000007e176Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in c around inf 99.9%
associate-+r+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 18.9%
if 3.2e13 < a < 9.49999999999999922e103 or 2.20000000000000007e176 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in c around inf 99.9%
associate-+r+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around inf 37.0%
Final simplification22.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 6.6e+90) (+ z (+ t a)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 6.6e+90) {
tmp = z + (t + a);
} 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 (y <= 6.6d+90) then
tmp = z + (t + a)
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 (y <= 6.6e+90) {
tmp = z + (t + a);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 6.6e+90: tmp = z + (t + a) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 6.6e+90) tmp = Float64(z + Float64(t + a)); 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 (y <= 6.6e+90) tmp = z + (t + a); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 6.6e+90], N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{+90}:\\
\;\;\;\;z + \left(t + a\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if y < 6.60000000000000016e90Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in c around inf 99.9%
associate-+r+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in z around inf 57.3%
if 6.60000000000000016e90 < y Initial program 99.9%
Taylor expanded in a around inf 57.9%
Final simplification57.6%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in c around inf 99.9%
associate-+r+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around inf 16.9%
Final simplification16.9%
herbie shell --seed 2023279
(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)))