
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= y 350000000.0)
(+ a (+ t (+ z (+ (* x (log y)) t_1))))
(+ (* y i) (+ t_1 (+ a (+ z t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if (y <= 350000000.0) {
tmp = a + (t + (z + ((x * log(y)) + t_1)));
} else {
tmp = (y * i) + (t_1 + (a + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = log(c) * (b - 0.5d0)
if (y <= 350000000.0d0) then
tmp = a + (t + (z + ((x * log(y)) + t_1)))
else
tmp = (y * i) + (t_1 + (a + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = Math.log(c) * (b - 0.5);
double tmp;
if (y <= 350000000.0) {
tmp = a + (t + (z + ((x * Math.log(y)) + t_1)));
} else {
tmp = (y * i) + (t_1 + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) tmp = 0 if y <= 350000000.0: tmp = a + (t + (z + ((x * math.log(y)) + t_1))) else: tmp = (y * i) + (t_1 + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (y <= 350000000.0) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1)))); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b - 0.5); tmp = 0.0; if (y <= 350000000.0) tmp = a + (t + (z + ((x * log(y)) + t_1))); else tmp = (y * i) + (t_1 + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 350000000.0], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;y \leq 350000000:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if y < 3.5e8Initial program 99.8%
Taylor expanded in y around 0 99.1%
if 3.5e8 < y Initial program 99.9%
Taylor expanded in x around 0 91.1%
Final simplification95.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 98.3%
*-commutative98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.8e+46) (not (<= x 2.4e+53))) (+ a (+ t (+ z (+ (* x (log y)) (* y i))))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.8e+46) || !(x <= 2.4e+53)) {
tmp = a + (t + (z + ((x * log(y)) + (y * i))));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-3.8d+46)) .or. (.not. (x <= 2.4d+53))) then
tmp = a + (t + (z + ((x * log(y)) + (y * i))))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.8e+46) || !(x <= 2.4e+53)) {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.8e+46) or not (x <= 2.4e+53): tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.8e+46) || !(x <= 2.4e+53)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i))))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3.8e+46) || ~((x <= 2.4e+53))) tmp = a + (t + (z + ((x * log(y)) + (y * i)))); else tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.8e+46], N[Not[LessEqual[x, 2.4e+53]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+46} \lor \neg \left(x \leq 2.4 \cdot 10^{+53}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.7999999999999999e46 or 2.4e53 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 90.0%
if -3.7999999999999999e46 < x < 2.4e53Initial program 99.9%
Taylor expanded in x around 0 99.9%
Final simplification96.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (<= b -3.6e+257)
t_1
(if (<= b 2e+249)
(+ a (+ t (+ z (+ (* x (log y)) (* y i)))))
(if (<= b 6.2e+273) t_1 (* i (+ y (* b (/ (log c) i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double tmp;
if (b <= -3.6e+257) {
tmp = t_1;
} else if (b <= 2e+249) {
tmp = a + (t + (z + ((x * log(y)) + (y * i))));
} else if (b <= 6.2e+273) {
tmp = t_1;
} else {
tmp = i * (y + (b * (log(c) / 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) :: t_1
real(8) :: tmp
t_1 = b * log(c)
if (b <= (-3.6d+257)) then
tmp = t_1
else if (b <= 2d+249) then
tmp = a + (t + (z + ((x * log(y)) + (y * i))))
else if (b <= 6.2d+273) then
tmp = t_1
else
tmp = i * (y + (b * (log(c) / 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 t_1 = b * Math.log(c);
double tmp;
if (b <= -3.6e+257) {
tmp = t_1;
} else if (b <= 2e+249) {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
} else if (b <= 6.2e+273) {
tmp = t_1;
} else {
tmp = i * (y + (b * (Math.log(c) / i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if b <= -3.6e+257: tmp = t_1 elif b <= 2e+249: tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) elif b <= 6.2e+273: tmp = t_1 else: tmp = i * (y + (b * (math.log(c) / i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (b <= -3.6e+257) tmp = t_1; elseif (b <= 2e+249) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i))))); elseif (b <= 6.2e+273) tmp = t_1; else tmp = Float64(i * Float64(y + Float64(b * Float64(log(c) / i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if (b <= -3.6e+257) tmp = t_1; elseif (b <= 2e+249) tmp = a + (t + (z + ((x * log(y)) + (y * i)))); elseif (b <= 6.2e+273) tmp = t_1; else tmp = i * (y + (b * (log(c) / i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.6e+257], t$95$1, If[LessEqual[b, 2e+249], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e+273], t$95$1, N[(i * N[(y + N[(b * N[(N[Log[c], $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;b \leq -3.6 \cdot 10^{+257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+249}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\right)\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+273}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(y + b \cdot \frac{\log c}{i}\right)\\
\end{array}
\end{array}
if b < -3.59999999999999984e257 or 1.9999999999999998e249 < b < 6.2000000000000002e273Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in i around inf 52.1%
associate-/l*52.0%
associate-/l*52.0%
Simplified52.0%
Taylor expanded in b around inf 95.2%
if -3.59999999999999984e257 < b < 1.9999999999999998e249Initial program 99.9%
Taylor expanded in b around inf 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in b around 0 88.6%
if 6.2000000000000002e273 < b Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in i around inf 100.0%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
associate-/l*100.0%
Simplified100.0%
Final simplification89.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.35e+145) (not (<= x 2.05e+53))) (+ a (+ t (+ z (+ (* x (log y)) (* y i))))) (+ (* y i) (+ (* b (log c)) (+ a (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.35e+145) || !(x <= 2.05e+53)) {
tmp = a + (t + (z + ((x * log(y)) + (y * i))));
} else {
tmp = (y * i) + ((b * log(c)) + (a + (z + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.35d+145)) .or. (.not. (x <= 2.05d+53))) then
tmp = a + (t + (z + ((x * log(y)) + (y * i))))
else
tmp = (y * i) + ((b * log(c)) + (a + (z + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.35e+145) || !(x <= 2.05e+53)) {
tmp = a + (t + (z + ((x * Math.log(y)) + (y * i))));
} else {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.35e+145) or not (x <= 2.05e+53): tmp = a + (t + (z + ((x * math.log(y)) + (y * i)))) else: tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.35e+145) || !(x <= 2.05e+53)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(y * i))))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(z + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.35e+145) || ~((x <= 2.05e+53))) tmp = a + (t + (z + ((x * log(y)) + (y * i)))); else tmp = (y * i) + ((b * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.35e+145], N[Not[LessEqual[x, 2.05e+53]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+145} \lor \neg \left(x \leq 2.05 \cdot 10^{+53}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.35000000000000011e145 or 2.05000000000000009e53 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 90.7%
if -1.35000000000000011e145 < x < 2.05000000000000009e53Initial program 99.9%
Taylor expanded in b around inf 97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in x around 0 96.2%
Final simplification94.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.25e+166) (not (<= x 3.2e+111))) (+ 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 <= -1.25e+166) || !(x <= 3.2e+111)) {
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 <= (-1.25d+166)) .or. (.not. (x <= 3.2d+111))) 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 <= -1.25e+166) || !(x <= 3.2e+111)) {
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 <= -1.25e+166) or not (x <= 3.2e+111): 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 <= -1.25e+166) || !(x <= 3.2e+111)) 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 <= -1.25e+166) || ~((x <= 3.2e+111))) 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, -1.25e+166], N[Not[LessEqual[x, 3.2e+111]], $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 -1.25 \cdot 10^{+166} \lor \neg \left(x \leq 3.2 \cdot 10^{+111}\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 < -1.25e166 or 3.2000000000000001e111 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 89.3%
Taylor expanded in a around 0 81.0%
if -1.25e166 < x < 3.2000000000000001e111Initial program 99.9%
Taylor expanded in b around inf 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in b around 0 80.9%
Taylor expanded in x around 0 78.5%
+-commutative78.5%
*-commutative78.5%
Simplified78.5%
Final simplification79.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.8e+155) (not (<= x 8e+117))) (* x (+ (log y) (/ a x))) (+ 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 <= -4.8e+155) || !(x <= 8e+117)) {
tmp = x * (log(y) + (a / x));
} 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 <= (-4.8d+155)) .or. (.not. (x <= 8d+117))) then
tmp = x * (log(y) + (a / x))
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 <= -4.8e+155) || !(x <= 8e+117)) {
tmp = x * (Math.log(y) + (a / x));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.8e+155) or not (x <= 8e+117): tmp = x * (math.log(y) + (a / x)) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.8e+155) || !(x <= 8e+117)) tmp = Float64(x * Float64(log(y) + Float64(a / x))); 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 <= -4.8e+155) || ~((x <= 8e+117))) tmp = x * (log(y) + (a / x)); 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, -4.8e+155], N[Not[LessEqual[x, 8e+117]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $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 -4.8 \cdot 10^{+155} \lor \neg \left(x \leq 8 \cdot 10^{+117}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -4.80000000000000042e155 or 8.0000000000000004e117 < x Initial program 99.7%
Taylor expanded in x around inf 99.6%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
associate-/l*99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in a around inf 66.8%
if -4.80000000000000042e155 < x < 8.0000000000000004e117Initial program 99.9%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in b around 0 80.8%
Taylor expanded in x around 0 78.8%
+-commutative78.8%
*-commutative78.8%
Simplified78.8%
Final simplification75.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.4e+173) (not (<= x 4e+152))) (* x (+ (log y) (/ z x))) (+ 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 <= -2.4e+173) || !(x <= 4e+152)) {
tmp = x * (log(y) + (z / x));
} 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 <= (-2.4d+173)) .or. (.not. (x <= 4d+152))) then
tmp = x * (log(y) + (z / x))
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 <= -2.4e+173) || !(x <= 4e+152)) {
tmp = x * (Math.log(y) + (z / x));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.4e+173) or not (x <= 4e+152): tmp = x * (math.log(y) + (z / x)) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.4e+173) || !(x <= 4e+152)) tmp = Float64(x * Float64(log(y) + Float64(z / x))); 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 <= -2.4e+173) || ~((x <= 4e+152))) tmp = x * (log(y) + (z / x)); 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, -2.4e+173], N[Not[LessEqual[x, 4e+152]], $MachinePrecision]], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $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 -2.4 \cdot 10^{+173} \lor \neg \left(x \leq 4 \cdot 10^{+152}\right):\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -2.3999999999999999e173 or 4.0000000000000002e152 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in z around inf 67.9%
if -2.3999999999999999e173 < x < 4.0000000000000002e152Initial program 99.9%
Taylor expanded in b around inf 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in b around 0 80.7%
Taylor expanded in x around 0 77.1%
+-commutative77.1%
*-commutative77.1%
Simplified77.1%
Final simplification75.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.1e+214) (not (<= x 5e+157))) (* x (log y)) (+ a (+ t (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.1e+214) || !(x <= 5e+157)) {
tmp = x * log(y);
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2.1d+214)) .or. (.not. (x <= 5d+157))) then
tmp = x * log(y)
else
tmp = a + (t + (z + (y * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.1e+214) || !(x <= 5e+157)) {
tmp = x * Math.log(y);
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.1e+214) or not (x <= 5e+157): tmp = x * math.log(y) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.1e+214) || !(x <= 5e+157)) tmp = Float64(x * log(y)); else tmp = Float64(a + Float64(t + Float64(z + Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.1e+214) || ~((x <= 5e+157))) tmp = x * log(y); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.1e+214], N[Not[LessEqual[x, 5e+157]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+214} \lor \neg \left(x \leq 5 \cdot 10^{+157}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -2.1000000000000001e214 or 4.99999999999999976e157 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 71.7%
if -2.1000000000000001e214 < x < 4.99999999999999976e157Initial program 99.9%
Taylor expanded in b around inf 98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in b around 0 81.3%
Taylor expanded in x around 0 76.3%
+-commutative76.3%
*-commutative76.3%
Simplified76.3%
Final simplification75.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1.65e+106)
z
(if (or (<= z -6.2e-63) (and (not (<= z -6.2e-154)) (<= z -1.52e-195)))
(* y i)
a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.65e+106) {
tmp = z;
} else if ((z <= -6.2e-63) || (!(z <= -6.2e-154) && (z <= -1.52e-195))) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.65d+106)) then
tmp = z
else if ((z <= (-6.2d-63)) .or. (.not. (z <= (-6.2d-154))) .and. (z <= (-1.52d-195))) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.65e+106) {
tmp = z;
} else if ((z <= -6.2e-63) || (!(z <= -6.2e-154) && (z <= -1.52e-195))) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.65e+106: tmp = z elif (z <= -6.2e-63) or (not (z <= -6.2e-154) and (z <= -1.52e-195)): tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.65e+106) tmp = z; elseif ((z <= -6.2e-63) || (!(z <= -6.2e-154) && (z <= -1.52e-195))) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.65e+106) tmp = z; elseif ((z <= -6.2e-63) || (~((z <= -6.2e-154)) && (z <= -1.52e-195))) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.65e+106], z, If[Or[LessEqual[z, -6.2e-63], And[N[Not[LessEqual[z, -6.2e-154]], $MachinePrecision], LessEqual[z, -1.52e-195]]], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+106}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-63} \lor \neg \left(z \leq -6.2 \cdot 10^{-154}\right) \land z \leq -1.52 \cdot 10^{-195}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.65000000000000004e106Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 35.3%
if -1.65000000000000004e106 < z < -6.19999999999999968e-63 or -6.19999999999999963e-154 < z < -1.5200000000000001e-195Initial program 99.8%
Taylor expanded in y around inf 30.1%
*-commutative30.1%
Simplified30.1%
if -6.19999999999999968e-63 < z < -6.19999999999999963e-154 or -1.5200000000000001e-195 < z Initial program 99.9%
Taylor expanded in a around inf 20.8%
Final simplification24.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -2.4e+254)
z
(if (<= z -8.6e+57)
(* i (+ y (/ z i)))
(if (<= z -1.1e-270) (* i (+ y (/ a i))) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.4e+254) {
tmp = z;
} else if (z <= -8.6e+57) {
tmp = i * (y + (z / i));
} else if (z <= -1.1e-270) {
tmp = i * (y + (a / i));
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.4d+254)) then
tmp = z
else if (z <= (-8.6d+57)) then
tmp = i * (y + (z / i))
else if (z <= (-1.1d-270)) then
tmp = i * (y + (a / i))
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.4e+254) {
tmp = z;
} else if (z <= -8.6e+57) {
tmp = i * (y + (z / i));
} else if (z <= -1.1e-270) {
tmp = i * (y + (a / i));
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.4e+254: tmp = z elif z <= -8.6e+57: tmp = i * (y + (z / i)) elif z <= -1.1e-270: tmp = i * (y + (a / i)) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.4e+254) tmp = z; elseif (z <= -8.6e+57) tmp = Float64(i * Float64(y + Float64(z / i))); elseif (z <= -1.1e-270) tmp = Float64(i * Float64(y + Float64(a / i))); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.4e+254) tmp = z; elseif (z <= -8.6e+57) tmp = i * (y + (z / i)); elseif (z <= -1.1e-270) tmp = i * (y + (a / i)); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.4e+254], z, If[LessEqual[z, -8.6e+57], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-270], N[(i * N[(y + N[(a / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+254}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{+57}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-270}:\\
\;\;\;\;i \cdot \left(y + \frac{a}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -2.3999999999999998e254Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 93.0%
if -2.3999999999999998e254 < z < -8.60000000000000066e57Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in i around inf 70.4%
associate-/l*70.4%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in z around inf 37.9%
if -8.60000000000000066e57 < z < -1.0999999999999999e-270Initial program 99.8%
Taylor expanded in b around inf 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in i around inf 82.4%
associate-/l*82.4%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in a around inf 43.5%
if -1.0999999999999999e-270 < z Initial program 99.9%
Taylor expanded in a around inf 22.6%
Final simplification32.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.4e+106) z (if (<= z -1e-270) (* i (+ y (/ a i))) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.4e+106) {
tmp = z;
} else if (z <= -1e-270) {
tmp = i * (y + (a / i));
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.4d+106)) then
tmp = z
else if (z <= (-1d-270)) then
tmp = i * (y + (a / i))
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.4e+106) {
tmp = z;
} else if (z <= -1e-270) {
tmp = i * (y + (a / i));
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.4e+106: tmp = z elif z <= -1e-270: tmp = i * (y + (a / i)) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.4e+106) tmp = z; elseif (z <= -1e-270) tmp = Float64(i * Float64(y + Float64(a / i))); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.4e+106) tmp = z; elseif (z <= -1e-270) tmp = i * (y + (a / i)); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.4e+106], z, If[LessEqual[z, -1e-270], N[(i * N[(y + N[(a / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+106}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-270}:\\
\;\;\;\;i \cdot \left(y + \frac{a}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.39999999999999996e106Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 35.3%
if -1.39999999999999996e106 < z < -1e-270Initial program 99.8%
Taylor expanded in b around inf 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in i around inf 79.9%
associate-/l*79.9%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in a around inf 41.6%
if -1e-270 < z Initial program 99.9%
Taylor expanded in a around inf 22.6%
Final simplification30.2%
(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.8%
Taylor expanded in b around inf 98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in b around 0 83.0%
Taylor expanded in x around 0 66.3%
+-commutative66.3%
*-commutative66.3%
Simplified66.3%
Final simplification66.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.3e+105) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.3e+105) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.3d+105)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.3e+105) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.3e+105: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.3e+105) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.3e+105) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.3e+105], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+105}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.3000000000000001e105Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 35.3%
if -1.3000000000000001e105 < z Initial program 99.8%
Taylor expanded in a around inf 20.9%
Final simplification23.0%
(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%
Taylor expanded in a around inf 19.0%
Final simplification19.0%
herbie shell --seed 2024082
(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)))