
(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 (+ a (+ t (+ z (+ (* (log (/ 1.0 c)) (- 0.5 b)) (+ (* x (log y)) (* i y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + ((log((1.0 / c)) * (0.5 - b)) + ((x * log(y)) + (i * y)))));
}
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 + ((log((1.0d0 / c)) * (0.5d0 - b)) + ((x * log(y)) + (i * y)))))
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 + ((Math.log((1.0 / c)) * (0.5 - b)) + ((x * Math.log(y)) + (i * y)))));
}
def code(x, y, z, t, a, b, c, i): return a + (t + (z + ((math.log((1.0 / c)) * (0.5 - b)) + ((x * math.log(y)) + (i * y)))))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + Float64(z + Float64(Float64(log(Float64(1.0 / c)) * Float64(0.5 - b)) + Float64(Float64(x * log(y)) + Float64(i * y)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (t + (z + ((log((1.0 / c)) * (0.5 - b)) + ((x * log(y)) + (i * y))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(z + N[(N[(N[Log[N[(1.0 / c), $MachinePrecision]], $MachinePrecision] * N[(0.5 - b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \left(z + \left(\log \left(\frac{1}{c}\right) \cdot \left(0.5 - b\right) + \left(x \cdot \log y + i \cdot y\right)\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (- b 0.5) (log c))) (* i y)))
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))))) + ((b - 0.5) * log(c))) + (i * y);
}
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))))) + ((b - 0.5d0) * log(c))) + (i * y)
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))))) + ((b - 0.5) * Math.log(c))) + (i * y);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + ((b - 0.5) * math.log(c))) + (i * y)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(Float64(b - 0.5) * log(c))) + Float64(i * y)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + ((b - 0.5) * log(c))) + (i * y); 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[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \left(b - 0.5\right) \cdot \log c\right) + i \cdot y
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ t (+ z (+ (+ (* x (log y)) (* i y)) (* b (log c)))))))
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)) + (i * 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 = a + (t + (z + (((x * log(y)) + (i * 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 a + (t + (z + (((x * Math.log(y)) + (i * y)) + (b * Math.log(c)))));
}
def code(x, y, z, t, a, b, c, i): return a + (t + (z + (((x * math.log(y)) + (i * y)) + (b * math.log(c)))))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + Float64(z + Float64(Float64(Float64(x * log(y)) + Float64(i * y)) + Float64(b * log(c)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (t + (z + (((x * log(y)) + (i * y)) + (b * log(c))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(z + N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \left(z + \left(\left(x \cdot \log y + i \cdot y\right) + b \cdot \log c\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in b around inf 98.1%
mul-1-neg98.1%
*-commutative98.1%
distribute-lft-neg-in98.1%
log-rec98.1%
remove-double-neg98.1%
Simplified98.1%
Final simplification98.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -5e+111) (not (<= (- b 0.5) 2.2e+186))) (+ z (+ (* i y) (* (log c) (+ b -0.5)))) (+ a (+ t (+ z (+ (* x (log y)) (* i y)))))))
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+111) || !((b - 0.5) <= 2.2e+186)) {
tmp = z + ((i * y) + (log(c) * (b + -0.5)));
} else {
tmp = a + (t + (z + ((x * log(y)) + (i * y))));
}
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+111)) .or. (.not. ((b - 0.5d0) <= 2.2d+186))) then
tmp = z + ((i * y) + (log(c) * (b + (-0.5d0))))
else
tmp = a + (t + (z + ((x * log(y)) + (i * y))))
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+111) || !((b - 0.5) <= 2.2e+186)) {
tmp = z + ((i * y) + (Math.log(c) * (b + -0.5)));
} else {
tmp = a + (t + (z + ((x * Math.log(y)) + (i * y))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -5e+111) or not ((b - 0.5) <= 2.2e+186): tmp = z + ((i * y) + (math.log(c) * (b + -0.5))) else: tmp = a + (t + (z + ((x * math.log(y)) + (i * y)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -5e+111) || !(Float64(b - 0.5) <= 2.2e+186)) tmp = Float64(z + Float64(Float64(i * y) + Float64(log(c) * Float64(b + -0.5)))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(i * y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -5e+111) || ~(((b - 0.5) <= 2.2e+186))) tmp = z + ((i * y) + (log(c) * (b + -0.5))); else tmp = a + (t + (z + ((x * log(y)) + (i * y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+111], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2.2e+186]], $MachinePrecision]], N[(z + N[(N[(i * y), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+111} \lor \neg \left(b - 0.5 \leq 2.2 \cdot 10^{+186}\right):\\
\;\;\;\;z + \left(i \cdot y + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + i \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -4.9999999999999997e111 or 2.1999999999999998e186 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 77.4%
if -4.9999999999999997e111 < (-.f64 b #s(literal 1/2 binary64)) < 2.1999999999999998e186Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in b around inf 97.6%
mul-1-neg97.6%
*-commutative97.6%
distribute-lft-neg-in97.6%
log-rec97.6%
remove-double-neg97.6%
Simplified97.6%
Taylor expanded in b around 0 91.6%
Final simplification88.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (+ b -0.5))) (t_2 (+ a (+ t (+ z (* x (log y)))))))
(if (<= x -1.7e+71)
t_2
(if (<= x 3.9e-38)
(+ t_1 (+ a (+ t z)))
(if (<= x 2.75e+109) (+ z (+ (* i y) t_1)) t_2)))))
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 + (t + (z + (x * log(y))));
double tmp;
if (x <= -1.7e+71) {
tmp = t_2;
} else if (x <= 3.9e-38) {
tmp = t_1 + (a + (t + z));
} else if (x <= 2.75e+109) {
tmp = z + ((i * y) + t_1);
} else {
tmp = t_2;
}
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 + (t + (z + (x * log(y))))
if (x <= (-1.7d+71)) then
tmp = t_2
else if (x <= 3.9d-38) then
tmp = t_1 + (a + (t + z))
else if (x <= 2.75d+109) then
tmp = z + ((i * y) + t_1)
else
tmp = t_2
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 + (t + (z + (x * Math.log(y))));
double tmp;
if (x <= -1.7e+71) {
tmp = t_2;
} else if (x <= 3.9e-38) {
tmp = t_1 + (a + (t + z));
} else if (x <= 2.75e+109) {
tmp = z + ((i * y) + t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b + -0.5) t_2 = a + (t + (z + (x * math.log(y)))) tmp = 0 if x <= -1.7e+71: tmp = t_2 elif x <= 3.9e-38: tmp = t_1 + (a + (t + z)) elif x <= 2.75e+109: tmp = z + ((i * y) + t_1) else: tmp = t_2 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(t + Float64(z + Float64(x * log(y))))) tmp = 0.0 if (x <= -1.7e+71) tmp = t_2; elseif (x <= 3.9e-38) tmp = Float64(t_1 + Float64(a + Float64(t + z))); elseif (x <= 2.75e+109) tmp = Float64(z + Float64(Float64(i * y) + t_1)); else tmp = t_2; 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 + (t + (z + (x * log(y)))); tmp = 0.0; if (x <= -1.7e+71) tmp = t_2; elseif (x <= 3.9e-38) tmp = t_1 + (a + (t + z)); elseif (x <= 2.75e+109) tmp = z + ((i * y) + t_1); else tmp = t_2; 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[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+71], t$95$2, If[LessEqual[x, 3.9e-38], N[(t$95$1 + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.75e+109], N[(z + N[(N[(i * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b + -0.5\right)\\
t_2 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-38}:\\
\;\;\;\;t\_1 + \left(a + \left(t + z\right)\right)\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{+109}:\\
\;\;\;\;z + \left(i \cdot y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.6999999999999999e71 or 2.7499999999999999e109 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in c around inf 99.7%
Taylor expanded in x around inf 74.9%
if -1.6999999999999999e71 < x < 3.8999999999999999e-38Initial program 99.8%
Taylor expanded in x around 0 99.6%
associate-+r+99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in i around inf 68.0%
associate-+r+68.0%
associate-+r+68.0%
sub-neg68.0%
metadata-eval68.0%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in i around 0 82.9%
associate-+r+82.9%
associate-+r+82.9%
+-commutative82.9%
sub-neg82.9%
metadata-eval82.9%
Simplified82.9%
if 3.8999999999999999e-38 < x < 2.7499999999999999e109Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 64.4%
Final simplification77.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.4e+71) (not (<= x 2.2e+109))) (+ a (+ t (+ z (+ (* x (log y)) (* i y))))) (+ (* i y) (+ (+ a t) (+ z (* (log c) (+ b -0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.4e+71) || !(x <= 2.2e+109)) {
tmp = a + (t + (z + ((x * log(y)) + (i * y))));
} else {
tmp = (i * y) + ((a + t) + (z + (log(c) * (b + -0.5))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-3.4d+71)) .or. (.not. (x <= 2.2d+109))) then
tmp = a + (t + (z + ((x * log(y)) + (i * y))))
else
tmp = (i * y) + ((a + t) + (z + (log(c) * (b + (-0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.4e+71) || !(x <= 2.2e+109)) {
tmp = a + (t + (z + ((x * Math.log(y)) + (i * y))));
} else {
tmp = (i * y) + ((a + t) + (z + (Math.log(c) * (b + -0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.4e+71) or not (x <= 2.2e+109): tmp = a + (t + (z + ((x * math.log(y)) + (i * y)))) else: tmp = (i * y) + ((a + t) + (z + (math.log(c) * (b + -0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.4e+71) || !(x <= 2.2e+109)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(i * y))))); else tmp = Float64(Float64(i * y) + Float64(Float64(a + t) + Float64(z + Float64(log(c) * Float64(b + -0.5))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3.4e+71) || ~((x <= 2.2e+109))) tmp = a + (t + (z + ((x * log(y)) + (i * y)))); else tmp = (i * y) + ((a + t) + (z + (log(c) * (b + -0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.4e+71], N[Not[LessEqual[x, 2.2e+109]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(N[(a + t), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{+71} \lor \neg \left(x \leq 2.2 \cdot 10^{+109}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + i \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot y + \left(\left(a + t\right) + \left(z + \log c \cdot \left(b + -0.5\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.3999999999999998e71 or 2.1999999999999999e109 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in c around inf 99.7%
Taylor expanded in b around inf 99.7%
mul-1-neg99.7%
*-commutative99.7%
distribute-lft-neg-in99.7%
log-rec99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in b around 0 91.6%
if -3.3999999999999998e71 < x < 2.1999999999999999e109Initial program 99.8%
Taylor expanded in x around 0 98.5%
associate-+r+98.5%
sub-neg98.5%
metadata-eval98.5%
+-commutative98.5%
Simplified98.5%
Final simplification96.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* i y) (* (- b 0.5) (log c)))))
(if (<= b -1.12e+177)
t_1
(if (<= b 9e-126)
(+ a (+ t (+ z (* i y))))
(if (<= b 2.15e+186) (+ a (+ t (+ z (* x (log y))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (i * y) + ((b - 0.5) * log(c));
double tmp;
if (b <= -1.12e+177) {
tmp = t_1;
} else if (b <= 9e-126) {
tmp = a + (t + (z + (i * y)));
} else if (b <= 2.15e+186) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (i * y) + ((b - 0.5d0) * log(c))
if (b <= (-1.12d+177)) then
tmp = t_1
else if (b <= 9d-126) then
tmp = a + (t + (z + (i * y)))
else if (b <= 2.15d+186) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = 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 = (i * y) + ((b - 0.5) * Math.log(c));
double tmp;
if (b <= -1.12e+177) {
tmp = t_1;
} else if (b <= 9e-126) {
tmp = a + (t + (z + (i * y)));
} else if (b <= 2.15e+186) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (i * y) + ((b - 0.5) * math.log(c)) tmp = 0 if b <= -1.12e+177: tmp = t_1 elif b <= 9e-126: tmp = a + (t + (z + (i * y))) elif b <= 2.15e+186: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(i * y) + Float64(Float64(b - 0.5) * log(c))) tmp = 0.0 if (b <= -1.12e+177) tmp = t_1; elseif (b <= 9e-126) tmp = Float64(a + Float64(t + Float64(z + Float64(i * y)))); elseif (b <= 2.15e+186) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (i * y) + ((b - 0.5) * log(c)); tmp = 0.0; if (b <= -1.12e+177) tmp = t_1; elseif (b <= 9e-126) tmp = a + (t + (z + (i * y))); elseif (b <= 2.15e+186) tmp = a + (t + (z + (x * log(y)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * y), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.12e+177], t$95$1, If[LessEqual[b, 9e-126], N[(a + N[(t + N[(z + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.15e+186], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot y + \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;b \leq -1.12 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-126}:\\
\;\;\;\;a + \left(t + \left(z + i \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 2.15 \cdot 10^{+186}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.1200000000000001e177 or 2.15e186 < b Initial program 99.5%
associate-+l+99.5%
associate-+l+99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in a around inf 84.7%
Taylor expanded in a around 0 79.1%
if -1.1200000000000001e177 < b < 9.0000000000000005e-126Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in c around inf 99.9%
Taylor expanded in b around inf 97.6%
mul-1-neg97.6%
*-commutative97.6%
distribute-lft-neg-in97.6%
log-rec97.6%
remove-double-neg97.6%
Simplified97.6%
Taylor expanded in i around inf 77.4%
if 9.0000000000000005e-126 < b < 2.15e186Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in x around inf 72.1%
Final simplification76.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -6.8e+175) (not (<= (- b 0.5) 1.65e+107))) (+ a (* (- b 0.5) (log c))) (+ a (+ t (+ z (* i y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -6.8e+175) || !((b - 0.5) <= 1.65e+107)) {
tmp = a + ((b - 0.5) * log(c));
} else {
tmp = a + (t + (z + (i * y)));
}
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) <= (-6.8d+175)) .or. (.not. ((b - 0.5d0) <= 1.65d+107))) then
tmp = a + ((b - 0.5d0) * log(c))
else
tmp = a + (t + (z + (i * y)))
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) <= -6.8e+175) || !((b - 0.5) <= 1.65e+107)) {
tmp = a + ((b - 0.5) * Math.log(c));
} else {
tmp = a + (t + (z + (i * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -6.8e+175) or not ((b - 0.5) <= 1.65e+107): tmp = a + ((b - 0.5) * math.log(c)) else: tmp = a + (t + (z + (i * y))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -6.8e+175) || !(Float64(b - 0.5) <= 1.65e+107)) tmp = Float64(a + Float64(Float64(b - 0.5) * log(c))); else tmp = Float64(a + Float64(t + Float64(z + Float64(i * y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -6.8e+175) || ~(((b - 0.5) <= 1.65e+107))) tmp = a + ((b - 0.5) * log(c)); else tmp = a + (t + (z + (i * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -6.8e+175], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 1.65e+107]], $MachinePrecision]], N[(a + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -6.8 \cdot 10^{+175} \lor \neg \left(b - 0.5 \leq 1.65 \cdot 10^{+107}\right):\\
\;\;\;\;a + \left(b - 0.5\right) \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + i \cdot y\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -6.80000000000000056e175 or 1.65000000000000016e107 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around inf 76.4%
Taylor expanded in y around 0 60.7%
if -6.80000000000000056e175 < (-.f64 b #s(literal 1/2 binary64)) < 1.65000000000000016e107Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in b around inf 97.5%
mul-1-neg97.5%
*-commutative97.5%
distribute-lft-neg-in97.5%
log-rec97.5%
remove-double-neg97.5%
Simplified97.5%
Taylor expanded in i around inf 74.7%
Final simplification70.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* i y) (* (log c) (+ b -0.5)))))
(if (<= z -9.8e+104)
(+ z t_1)
(if (<= z -6.5e+63) (+ a (+ t (+ z (* x (log y))))) (+ a t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (i * y) + (log(c) * (b + -0.5));
double tmp;
if (z <= -9.8e+104) {
tmp = z + t_1;
} else if (z <= -6.5e+63) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = a + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (i * y) + (log(c) * (b + (-0.5d0)))
if (z <= (-9.8d+104)) then
tmp = z + t_1
else if (z <= (-6.5d+63)) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = a + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (i * y) + (Math.log(c) * (b + -0.5));
double tmp;
if (z <= -9.8e+104) {
tmp = z + t_1;
} else if (z <= -6.5e+63) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = a + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (i * y) + (math.log(c) * (b + -0.5)) tmp = 0 if z <= -9.8e+104: tmp = z + t_1 elif z <= -6.5e+63: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = a + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(i * y) + Float64(log(c) * Float64(b + -0.5))) tmp = 0.0 if (z <= -9.8e+104) tmp = Float64(z + t_1); elseif (z <= -6.5e+63) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (i * y) + (log(c) * (b + -0.5)); tmp = 0.0; if (z <= -9.8e+104) tmp = z + t_1; elseif (z <= -6.5e+63) tmp = a + (t + (z + (x * log(y)))); else tmp = a + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * y), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.8e+104], N[(z + t$95$1), $MachinePrecision], If[LessEqual[z, -6.5e+63], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot y + \log c \cdot \left(b + -0.5\right)\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{+104}:\\
\;\;\;\;z + t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+63}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + t\_1\\
\end{array}
\end{array}
if z < -9.7999999999999997e104Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 68.3%
if -9.7999999999999997e104 < z < -6.49999999999999992e63Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in x around inf 85.9%
if -6.49999999999999992e63 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 58.0%
Final simplification60.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -2.1e+138)
(+ a (+ t (+ z (* i y))))
(if (<= z -5e+63)
(+ a (+ t (+ z (* x (log y)))))
(+ a (+ (* i y) (* (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 <= -2.1e+138) {
tmp = a + (t + (z + (i * y)));
} else if (z <= -5e+63) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = a + ((i * y) + (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 <= (-2.1d+138)) then
tmp = a + (t + (z + (i * y)))
else if (z <= (-5d+63)) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = a + ((i * y) + (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 <= -2.1e+138) {
tmp = a + (t + (z + (i * y)));
} else if (z <= -5e+63) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = a + ((i * y) + (Math.log(c) * (b + -0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.1e+138: tmp = a + (t + (z + (i * y))) elif z <= -5e+63: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = a + ((i * y) + (math.log(c) * (b + -0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.1e+138) tmp = Float64(a + Float64(t + Float64(z + Float64(i * y)))); elseif (z <= -5e+63) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + Float64(Float64(i * y) + 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 <= -2.1e+138) tmp = a + (t + (z + (i * y))); elseif (z <= -5e+63) tmp = a + (t + (z + (x * log(y)))); else tmp = a + ((i * y) + (log(c) * (b + -0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.1e+138], N[(a + N[(t + N[(z + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e+63], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(i * y), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+138}:\\
\;\;\;\;a + \left(t + \left(z + i \cdot y\right)\right)\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+63}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(i \cdot y + \log c \cdot \left(b + -0.5\right)\right)\\
\end{array}
\end{array}
if z < -2.10000000000000007e138Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in b around inf 99.8%
mul-1-neg99.8%
*-commutative99.8%
distribute-lft-neg-in99.8%
log-rec99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in i around inf 80.3%
if -2.10000000000000007e138 < z < -5.00000000000000011e63Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in x around inf 73.9%
if -5.00000000000000011e63 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 58.0%
Final simplification61.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.8e+71) (not (<= x 2.15e+99))) (+ a (+ t (+ z (* x (log y))))) (+ a (+ t (+ z (* i y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.8e+71) || !(x <= 2.15e+99)) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = a + (t + (z + (i * y)));
}
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.8d+71)) .or. (.not. (x <= 2.15d+99))) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = a + (t + (z + (i * y)))
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.8e+71) || !(x <= 2.15e+99)) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = a + (t + (z + (i * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.8e+71) or not (x <= 2.15e+99): tmp = a + (t + (z + (x * math.log(y)))) else: tmp = a + (t + (z + (i * y))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.8e+71) || !(x <= 2.15e+99)) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(i * y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.8e+71) || ~((x <= 2.15e+99))) tmp = a + (t + (z + (x * log(y)))); else tmp = a + (t + (z + (i * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.8e+71], N[Not[LessEqual[x, 2.15e+99]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+71} \lor \neg \left(x \leq 2.15 \cdot 10^{+99}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + i \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -2.80000000000000002e71 or 2.1500000000000001e99 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in c around inf 99.7%
Taylor expanded in x around inf 74.3%
if -2.80000000000000002e71 < x < 2.1500000000000001e99Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in b around inf 97.3%
mul-1-neg97.3%
*-commutative97.3%
distribute-lft-neg-in97.3%
log-rec97.3%
remove-double-neg97.3%
Simplified97.3%
Taylor expanded in i around inf 72.8%
Final simplification73.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4e+109) (not (<= x 6.5e+227))) (+ a (+ t (* x (log y)))) (+ a (+ t (+ z (* i y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4e+109) || !(x <= 6.5e+227)) {
tmp = a + (t + (x * log(y)));
} else {
tmp = a + (t + (z + (i * y)));
}
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 <= (-4d+109)) .or. (.not. (x <= 6.5d+227))) then
tmp = a + (t + (x * log(y)))
else
tmp = a + (t + (z + (i * y)))
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 <= -4e+109) || !(x <= 6.5e+227)) {
tmp = a + (t + (x * Math.log(y)));
} else {
tmp = a + (t + (z + (i * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4e+109) or not (x <= 6.5e+227): tmp = a + (t + (x * math.log(y))) else: tmp = a + (t + (z + (i * y))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4e+109) || !(x <= 6.5e+227)) tmp = Float64(a + Float64(t + Float64(x * log(y)))); else tmp = Float64(a + Float64(t + Float64(z + Float64(i * y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -4e+109) || ~((x <= 6.5e+227))) tmp = a + (t + (x * log(y))); else tmp = a + (t + (z + (i * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4e+109], N[Not[LessEqual[x, 6.5e+227]], $MachinePrecision]], N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+109} \lor \neg \left(x \leq 6.5 \cdot 10^{+227}\right):\\
\;\;\;\;a + \left(t + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + i \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -3.99999999999999993e109 or 6.50000000000000018e227 < x Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in c around inf 99.6%
add-cbrt-cube99.5%
pow399.6%
log-rec99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 67.9%
if -3.99999999999999993e109 < x < 6.50000000000000018e227Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in b around inf 97.6%
mul-1-neg97.6%
*-commutative97.6%
distribute-lft-neg-in97.6%
log-rec97.6%
remove-double-neg97.6%
Simplified97.6%
Taylor expanded in i around inf 71.4%
Final simplification70.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -1.36e+183) (not (<= i 8e+133))) (* i y) (+ a (+ t z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -1.36e+183) || !(i <= 8e+133)) {
tmp = i * y;
} else {
tmp = a + (t + 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 ((i <= (-1.36d+183)) .or. (.not. (i <= 8d+133))) then
tmp = i * y
else
tmp = a + (t + 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 ((i <= -1.36e+183) || !(i <= 8e+133)) {
tmp = i * y;
} else {
tmp = a + (t + z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -1.36e+183) or not (i <= 8e+133): tmp = i * y else: tmp = a + (t + z) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -1.36e+183) || !(i <= 8e+133)) tmp = Float64(i * y); else tmp = Float64(a + Float64(t + z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -1.36e+183) || ~((i <= 8e+133))) tmp = i * y; else tmp = a + (t + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -1.36e+183], N[Not[LessEqual[i, 8e+133]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.36 \cdot 10^{+183} \lor \neg \left(i \leq 8 \cdot 10^{+133}\right):\\
\;\;\;\;i \cdot y\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + z\right)\\
\end{array}
\end{array}
if i < -1.35999999999999995e183 or 8.0000000000000002e133 < i Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 58.5%
*-commutative58.5%
Simplified58.5%
if -1.35999999999999995e183 < i < 8.0000000000000002e133Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in z around inf 52.1%
Final simplification53.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -8.8e+182) (not (<= i 8.5e+29))) (* i y) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -8.8e+182) || !(i <= 8.5e+29)) {
tmp = i * y;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-8.8d+182)) .or. (.not. (i <= 8.5d+29))) then
tmp = i * y
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -8.8e+182) || !(i <= 8.5e+29)) {
tmp = i * y;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -8.8e+182) or not (i <= 8.5e+29): tmp = i * y else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -8.8e+182) || !(i <= 8.5e+29)) tmp = Float64(i * y); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -8.8e+182) || ~((i <= 8.5e+29))) tmp = i * y; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -8.8e+182], N[Not[LessEqual[i, 8.5e+29]], $MachinePrecision]], N[(i * y), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -8.8 \cdot 10^{+182} \lor \neg \left(i \leq 8.5 \cdot 10^{+29}\right):\\
\;\;\;\;i \cdot y\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if i < -8.79999999999999986e182 or 8.5000000000000006e29 < i Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 51.4%
*-commutative51.4%
Simplified51.4%
if -8.79999999999999986e182 < i < 8.5000000000000006e29Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 86.0%
Taylor expanded in a around inf 21.2%
Final simplification30.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.25e+149) (+ a (+ t z)) (+ a (+ t (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.25e+149) {
tmp = a + (t + z);
} else {
tmp = a + (t + (i * y));
}
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.25d+149)) then
tmp = a + (t + z)
else
tmp = a + (t + (i * y))
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.25e+149) {
tmp = a + (t + z);
} else {
tmp = a + (t + (i * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.25e+149: tmp = a + (t + z) else: tmp = a + (t + (i * y)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.25e+149) tmp = Float64(a + Float64(t + z)); else tmp = Float64(a + Float64(t + Float64(i * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.25e+149) tmp = a + (t + z); else tmp = a + (t + (i * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.25e+149], N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+149}:\\
\;\;\;\;a + \left(t + z\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + i \cdot y\right)\\
\end{array}
\end{array}
if z < -1.24999999999999998e149Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in z around inf 62.0%
if -1.24999999999999998e149 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
add-cbrt-cube99.7%
pow399.7%
log-rec99.7%
Applied egg-rr99.7%
Taylor expanded in i around inf 50.6%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ t (+ z (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (i * y)));
}
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 + (i * y)))
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 + (i * y)));
}
def code(x, y, z, t, a, b, c, i): return a + (t + (z + (i * y)))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + Float64(z + Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (t + (z + (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(z + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \left(z + i \cdot y\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in c around inf 99.8%
Taylor expanded in b around inf 98.1%
mul-1-neg98.1%
*-commutative98.1%
distribute-lft-neg-in98.1%
log-rec98.1%
remove-double-neg98.1%
Simplified98.1%
Taylor expanded in i around inf 62.1%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 88.7%
Taylor expanded in a around inf 17.4%
herbie shell --seed 2024170
(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)))