
(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 16 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.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -8.9e+133) (not (<= x 3.5e-26))) (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))) (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -8.9e+133) || !(x <= 3.5e-26)) {
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
} else {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-8.9d+133)) .or. (.not. (x <= 3.5d-26))) then
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
else
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -8.9e+133) || !(x <= 3.5e-26)) {
tmp = (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -8.9e+133) or not (x <= 3.5e-26): tmp = (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c))) else: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -8.9e+133) || !(x <= 3.5e-26)) tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -8.9e+133) || ~((x <= 3.5e-26))) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); else tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -8.9e+133], N[Not[LessEqual[x, 3.5e-26]], $MachinePrecision]], 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], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.9 \cdot 10^{+133} \lor \neg \left(x \leq 3.5 \cdot 10^{-26}\right):\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -8.90000000000000025e133 or 3.49999999999999985e-26 < x Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
if -8.90000000000000025e133 < x < 3.49999999999999985e-26Initial program 99.9%
Taylor expanded in x around 0 99.9%
Final simplification99.9%
(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.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -4e+216) (not (<= (- b 0.5) 2e+233))) (+ (* y i) (* b (log c))) (+ (+ a (+ t (+ z (* x (log y))))) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -4e+216) || !((b - 0.5) <= 2e+233)) {
tmp = (y * i) + (b * log(c));
} else {
tmp = (a + (t + (z + (x * log(y))))) + (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 (((b - 0.5d0) <= (-4d+216)) .or. (.not. ((b - 0.5d0) <= 2d+233))) then
tmp = (y * i) + (b * log(c))
else
tmp = (a + (t + (z + (x * log(y))))) + (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 (((b - 0.5) <= -4e+216) || !((b - 0.5) <= 2e+233)) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = (a + (t + (z + (x * Math.log(y))))) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -4e+216) or not ((b - 0.5) <= 2e+233): tmp = (y * i) + (b * math.log(c)) else: tmp = (a + (t + (z + (x * math.log(y))))) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -4e+216) || !(Float64(b - 0.5) <= 2e+233)) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -4e+216) || ~(((b - 0.5) <= 2e+233))) tmp = (y * i) + (b * log(c)); else tmp = (a + (t + (z + (x * log(y))))) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -4e+216], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+233]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+216} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+233}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + y \cdot i\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -4.0000000000000001e216 or 1.99999999999999995e233 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in x around inf 57.9%
associate-+r+57.9%
associate-+r+57.9%
sub-neg57.9%
metadata-eval57.9%
associate-/l*57.7%
+-commutative57.7%
Simplified57.7%
Taylor expanded in b around inf 51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in x around 0 85.4%
if -4.0000000000000001e216 < (-.f64 b #s(literal 1/2 binary64)) < 1.99999999999999995e233Initial program 99.9%
Taylor expanded in b around inf 95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in b around 0 88.7%
Final simplification88.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.05e+134) (not (<= x 3.3e+59))) (+ (+ a (+ t (+ z (* x (log y))))) (* y i)) (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.05e+134) || !(x <= 3.3e+59)) {
tmp = (a + (t + (z + (x * log(y))))) + (y * i);
} else {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-3.05d+134)) .or. (.not. (x <= 3.3d+59))) then
tmp = (a + (t + (z + (x * log(y))))) + (y * i)
else
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.05e+134) || !(x <= 3.3e+59)) {
tmp = (a + (t + (z + (x * Math.log(y))))) + (y * i);
} else {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.05e+134) or not (x <= 3.3e+59): tmp = (a + (t + (z + (x * math.log(y))))) + (y * i) else: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.05e+134) || !(x <= 3.3e+59)) tmp = Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3.05e+134) || ~((x <= 3.3e+59))) tmp = (a + (t + (z + (x * log(y))))) + (y * i); else tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.05e+134], N[Not[LessEqual[x, 3.3e+59]], $MachinePrecision]], N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.05 \cdot 10^{+134} \lor \neg \left(x \leq 3.3 \cdot 10^{+59}\right):\\
\;\;\;\;\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.04999999999999989e134 or 3.2999999999999999e59 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 93.2%
if -3.04999999999999989e134 < x < 3.2999999999999999e59Initial program 99.9%
Taylor expanded in x around 0 99.4%
Final simplification97.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ z (* (log c) (- b 0.5)))))
(if (<= y 28000000.0)
(+ a (+ t t_1))
(if (<= y 3.55e+22)
(+ (* x (log y)) (* y i))
(if (<= y 5.6e+54) (+ a t_1) (+ a (+ t (+ z (* y i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (log(c) * (b - 0.5));
double tmp;
if (y <= 28000000.0) {
tmp = a + (t + t_1);
} else if (y <= 3.55e+22) {
tmp = (x * log(y)) + (y * i);
} else if (y <= 5.6e+54) {
tmp = a + t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z + (log(c) * (b - 0.5d0))
if (y <= 28000000.0d0) then
tmp = a + (t + t_1)
else if (y <= 3.55d+22) then
tmp = (x * log(y)) + (y * i)
else if (y <= 5.6d+54) then
tmp = a + t_1
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 t_1 = z + (Math.log(c) * (b - 0.5));
double tmp;
if (y <= 28000000.0) {
tmp = a + (t + t_1);
} else if (y <= 3.55e+22) {
tmp = (x * Math.log(y)) + (y * i);
} else if (y <= 5.6e+54) {
tmp = a + t_1;
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = z + (math.log(c) * (b - 0.5)) tmp = 0 if y <= 28000000.0: tmp = a + (t + t_1) elif y <= 3.55e+22: tmp = (x * math.log(y)) + (y * i) elif y <= 5.6e+54: tmp = a + t_1 else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(z + Float64(log(c) * Float64(b - 0.5))) tmp = 0.0 if (y <= 28000000.0) tmp = Float64(a + Float64(t + t_1)); elseif (y <= 3.55e+22) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (y <= 5.6e+54) tmp = Float64(a + t_1); 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) t_1 = z + (log(c) * (b - 0.5)); tmp = 0.0; if (y <= 28000000.0) tmp = a + (t + t_1); elseif (y <= 3.55e+22) tmp = (x * log(y)) + (y * i); elseif (y <= 5.6e+54) tmp = a + t_1; else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 28000000.0], N[(a + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.55e+22], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e+54], N[(a + t$95$1), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;y \leq 28000000:\\
\;\;\;\;a + \left(t + t\_1\right)\\
\mathbf{elif}\;y \leq 3.55 \cdot 10^{+22}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+54}:\\
\;\;\;\;a + t\_1\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if y < 2.8e7Initial program 99.9%
Taylor expanded in x around 0 79.2%
Taylor expanded in y around 0 76.3%
if 2.8e7 < y < 3.5500000000000001e22Initial program 99.7%
Taylor expanded in x around inf 99.7%
associate-+r+99.7%
associate-+r+99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 85.2%
if 3.5500000000000001e22 < y < 5.6000000000000003e54Initial program 99.7%
Taylor expanded in x around 0 77.7%
Taylor expanded in y around 0 78.1%
Taylor expanded in t around 0 67.0%
if 5.6000000000000003e54 < y Initial program 100.0%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in b around 0 87.0%
Taylor expanded in x around 0 79.4%
Final simplification77.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z (* (log c) (- b 0.5))))))
(if (<= y 25000000.0)
t_1
(if (<= y 4.5e+22)
(+ (* x (log y)) (* y i))
(if (<= y 5.2e+54) t_1 (+ a (+ t (+ z (* y i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (z + (log(c) * (b - 0.5)));
double tmp;
if (y <= 25000000.0) {
tmp = t_1;
} else if (y <= 4.5e+22) {
tmp = (x * log(y)) + (y * i);
} else if (y <= 5.2e+54) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = a + (z + (log(c) * (b - 0.5d0)))
if (y <= 25000000.0d0) then
tmp = t_1
else if (y <= 4.5d+22) then
tmp = (x * log(y)) + (y * i)
else if (y <= 5.2d+54) then
tmp = t_1
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 t_1 = a + (z + (Math.log(c) * (b - 0.5)));
double tmp;
if (y <= 25000000.0) {
tmp = t_1;
} else if (y <= 4.5e+22) {
tmp = (x * Math.log(y)) + (y * i);
} else if (y <= 5.2e+54) {
tmp = t_1;
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (z + (math.log(c) * (b - 0.5))) tmp = 0 if y <= 25000000.0: tmp = t_1 elif y <= 4.5e+22: tmp = (x * math.log(y)) + (y * i) elif y <= 5.2e+54: tmp = t_1 else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))) tmp = 0.0 if (y <= 25000000.0) tmp = t_1; elseif (y <= 4.5e+22) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (y <= 5.2e+54) tmp = t_1; 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) t_1 = a + (z + (log(c) * (b - 0.5))); tmp = 0.0; if (y <= 25000000.0) tmp = t_1; elseif (y <= 4.5e+22) tmp = (x * log(y)) + (y * i); elseif (y <= 5.2e+54) tmp = t_1; else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 25000000.0], t$95$1, If[LessEqual[y, 4.5e+22], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+54], t$95$1, N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{if}\;y \leq 25000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+22}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if y < 2.5e7 or 4.4999999999999998e22 < y < 5.20000000000000013e54Initial program 99.9%
Taylor expanded in x around 0 79.1%
Taylor expanded in y around 0 76.4%
Taylor expanded in t around 0 60.7%
if 2.5e7 < y < 4.4999999999999998e22Initial program 99.7%
Taylor expanded in x around inf 99.7%
associate-+r+99.7%
associate-+r+99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 85.2%
if 5.20000000000000013e54 < y Initial program 100.0%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in b around 0 87.0%
Taylor expanded in x around 0 79.4%
Final simplification69.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -3.1e+212) (not (<= b 2.45e+213))) (+ (* y i) (* b (log c))) (+ 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 ((b <= -3.1e+212) || !(b <= 2.45e+213)) {
tmp = (y * i) + (b * log(c));
} 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 ((b <= (-3.1d+212)) .or. (.not. (b <= 2.45d+213))) then
tmp = (y * i) + (b * log(c))
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 ((b <= -3.1e+212) || !(b <= 2.45e+213)) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = a + (t + (z + (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -3.1e+212) or not (b <= 2.45e+213): tmp = (y * i) + (b * math.log(c)) else: tmp = a + (t + (z + (y * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -3.1e+212) || !(b <= 2.45e+213)) tmp = Float64(Float64(y * i) + Float64(b * log(c))); 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 ((b <= -3.1e+212) || ~((b <= 2.45e+213))) tmp = (y * i) + (b * log(c)); else tmp = a + (t + (z + (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -3.1e+212], N[Not[LessEqual[b, 2.45e+213]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+212} \lor \neg \left(b \leq 2.45 \cdot 10^{+213}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if b < -3.09999999999999998e212 or 2.44999999999999998e213 < b Initial program 99.8%
Taylor expanded in x around inf 57.5%
associate-+r+57.5%
associate-+r+57.5%
sub-neg57.5%
metadata-eval57.5%
associate-/l*57.4%
+-commutative57.4%
Simplified57.4%
Taylor expanded in b around inf 49.7%
*-commutative49.7%
Simplified49.7%
Taylor expanded in x around 0 82.8%
if -3.09999999999999998e212 < b < 2.44999999999999998e213Initial program 99.9%
Taylor expanded in b around inf 95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in b around 0 89.0%
Taylor expanded in x around 0 71.2%
Final simplification73.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 5.1e+54) (+ a (+ t (+ z (* 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 (y <= 5.1e+54) {
tmp = a + (t + (z + (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 (y <= 5.1d+54) then
tmp = a + (t + (z + (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 (y <= 5.1e+54) {
tmp = a + (t + (z + (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 y <= 5.1e+54: tmp = a + (t + (z + (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 (y <= 5.1e+54) tmp = Float64(a + Float64(t + Float64(z + 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 (y <= 5.1e+54) tmp = a + (t + (z + (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[LessEqual[y, 5.1e+54], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $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}\;y \leq 5.1 \cdot 10^{+54}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if y < 5.10000000000000009e54Initial program 99.8%
Taylor expanded in b around inf 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in b around 0 71.6%
Taylor expanded in y around 0 68.4%
if 5.10000000000000009e54 < y Initial program 100.0%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in b around 0 87.0%
Taylor expanded in x around 0 79.4%
Final simplification73.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.8e+220) (not (<= x 1.2e+199))) (* 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 <= -5.8e+220) || !(x <= 1.2e+199)) {
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 <= (-5.8d+220)) .or. (.not. (x <= 1.2d+199))) 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 <= -5.8e+220) || !(x <= 1.2e+199)) {
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 <= -5.8e+220) or not (x <= 1.2e+199): 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 <= -5.8e+220) || !(x <= 1.2e+199)) 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 <= -5.8e+220) || ~((x <= 1.2e+199))) 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, -5.8e+220], N[Not[LessEqual[x, 1.2e+199]], $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 -5.8 \cdot 10^{+220} \lor \neg \left(x \leq 1.2 \cdot 10^{+199}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -5.79999999999999983e220 or 1.20000000000000007e199 < x Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 95.1%
Taylor expanded in x around inf 67.2%
if -5.79999999999999983e220 < x < 1.20000000000000007e199Initial program 99.9%
Taylor expanded in b around inf 95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in b around 0 75.9%
Taylor expanded in x around 0 68.6%
Final simplification68.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 7e+153) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7e+153) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 7d+153) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7e+153) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7e+153: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7e+153) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 7e+153) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7e+153], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7 \cdot 10^{+153}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 6.9999999999999998e153Initial program 99.9%
Taylor expanded in z around inf 43.9%
if 6.9999999999999998e153 < a Initial program 100.0%
Taylor expanded in a around inf 49.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.5e+200) z (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.5e+200) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.5d+200)) then
tmp = z
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.5e+200) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.5e+200: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.5e+200) tmp = z; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.5e+200) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.5e+200], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+200}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2.50000000000000009e200Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 87.2%
Taylor expanded in z around inf 65.3%
if -2.50000000000000009e200 < z Initial program 99.9%
Taylor expanded in a around inf 37.9%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ t (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a + (t + (z + (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + (z + (y * i)));
}
def code(x, y, z, t, a, b, c, i): return a + (t + (z + (y * i)))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + Float64(z + Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (t + (z + (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \left(z + y \cdot i\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in b around 0 78.4%
Taylor expanded in x around 0 63.4%
Final simplification63.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 2.45e+63) z (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.45e+63) {
tmp = z;
} else {
tmp = y * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= 2.45d+63) then
tmp = z
else
tmp = y * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.45e+63) {
tmp = z;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 2.45e+63: tmp = z else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 2.45e+63) tmp = z; else tmp = Float64(y * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 2.45e+63) tmp = z; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.45e+63], z, N[(y * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.45 \cdot 10^{+63}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if y < 2.4499999999999998e63Initial program 99.9%
Taylor expanded in b around inf 95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in b around 0 72.0%
Taylor expanded in z around inf 22.6%
if 2.4499999999999998e63 < y Initial program 100.0%
Taylor expanded in a around inf 58.7%
Taylor expanded in a around 0 51.6%
Final simplification34.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.2e+150) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.2e+150) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 2.2d+150) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.2e+150) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.2e+150: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.2e+150) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.2e+150) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.2e+150], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.2 \cdot 10^{+150}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.19999999999999999e150Initial program 99.9%
Taylor expanded in b around inf 95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in b around 0 76.9%
Taylor expanded in z around inf 18.3%
if 2.19999999999999999e150 < a Initial program 100.0%
Taylor expanded in a around inf 49.8%
Taylor expanded in a around inf 39.6%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 34.9%
Taylor expanded in a around inf 11.7%
herbie shell --seed 2024100
(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)))