
(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 23 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%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1e+153) (not (<= x 5e+141))) (+ (* y i) (+ (* x (log y)) (* b (log c)))) (+ (+ z t) (+ a (fma (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) {
double tmp;
if ((x <= -1e+153) || !(x <= 5e+141)) {
tmp = (y * i) + ((x * log(y)) + (b * log(c)));
} else {
tmp = (z + t) + (a + fma(log(c), (b + -0.5), (y * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1e+153) || !(x <= 5e+141)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + Float64(b * log(c)))); else tmp = Float64(Float64(z + t) + Float64(a + fma(log(c), Float64(b + -0.5), Float64(y * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1e+153], N[Not[LessEqual[x, 5e+141]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+153} \lor \neg \left(x \leq 5 \cdot 10^{+141}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -1e153 or 5.00000000000000025e141 < x Initial program 99.8%
Taylor expanded in t around 0 91.6%
Taylor expanded in b around inf 91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in x around inf 80.9%
if -1e153 < x < 5.00000000000000025e141Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 94.7%
+-commutative94.7%
associate-+r+94.7%
*-commutative94.7%
sub-neg94.7%
metadata-eval94.7%
+-commutative94.7%
distribute-rgt-out94.7%
+-commutative94.7%
distribute-rgt-in94.7%
associate-+l+94.7%
+-commutative94.7%
+-commutative94.7%
fma-define94.7%
+-commutative94.7%
Simplified94.7%
Final simplification91.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.1e+152) (not (<= x 5e+141))) (+ (* y i) (+ (* x (log y)) (* b (log c)))) (+ (* 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 <= -4.1e+152) || !(x <= 5e+141)) {
tmp = (y * i) + ((x * log(y)) + (b * log(c)));
} 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 <= (-4.1d+152)) .or. (.not. (x <= 5d+141))) then
tmp = (y * i) + ((x * log(y)) + (b * log(c)))
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 <= -4.1e+152) || !(x <= 5e+141)) {
tmp = (y * i) + ((x * Math.log(y)) + (b * Math.log(c)));
} 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 <= -4.1e+152) or not (x <= 5e+141): tmp = (y * i) + ((x * math.log(y)) + (b * math.log(c))) 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 <= -4.1e+152) || !(x <= 5e+141)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + Float64(b * log(c)))); 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 <= -4.1e+152) || ~((x <= 5e+141))) tmp = (y * i) + ((x * log(y)) + (b * log(c))); 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, -4.1e+152], N[Not[LessEqual[x, 5e+141]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $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 -4.1 \cdot 10^{+152} \lor \neg \left(x \leq 5 \cdot 10^{+141}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + b \cdot \log c\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 < -4.0999999999999998e152 or 5.00000000000000025e141 < x Initial program 99.8%
Taylor expanded in t around 0 91.6%
Taylor expanded in b around inf 91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in x around inf 80.9%
if -4.0999999999999998e152 < x < 5.00000000000000025e141Initial program 99.9%
Taylor expanded in x around 0 94.7%
Final simplification91.8%
(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 (<= a 3e+73) (+ (* y i) (+ (+ z (* x (log y))) (* b (log c)))) (+ (* 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 (a <= 3e+73) {
tmp = (y * i) + ((z + (x * log(y))) + (b * log(c)));
} 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 (a <= 3d+73) then
tmp = (y * i) + ((z + (x * log(y))) + (b * log(c)))
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 (a <= 3e+73) {
tmp = (y * i) + ((z + (x * Math.log(y))) + (b * Math.log(c)));
} 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 a <= 3e+73: tmp = (y * i) + ((z + (x * math.log(y))) + (b * math.log(c))) 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 (a <= 3e+73) tmp = Float64(Float64(y * i) + Float64(Float64(z + Float64(x * log(y))) + Float64(b * log(c)))); 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 (a <= 3e+73) tmp = (y * i) + ((z + (x * log(y))) + (b * log(c))); 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[LessEqual[a, 3e+73], N[(N[(y * i), $MachinePrecision] + N[(N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $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}\;a \leq 3 \cdot 10^{+73}:\\
\;\;\;\;y \cdot i + \left(\left(z + x \cdot \log y\right) + b \cdot \log c\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 a < 3.00000000000000011e73Initial program 99.9%
Taylor expanded in t around 0 84.8%
Taylor expanded in b around inf 83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in a around 0 70.6%
if 3.00000000000000011e73 < a Initial program 99.9%
Taylor expanded in x around 0 94.4%
Final simplification75.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 9e+71) (+ (* y i) (+ (+ z (* x (log y))) (* b (log c)))) (fma 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 (a <= 9e+71) {
tmp = (y * i) + ((z + (x * log(y))) + (b * log(c)));
} else {
tmp = fma(y, i, (a + (t + (z + (log(c) * (b - 0.5))))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 9e+71) tmp = Float64(Float64(y * i) + Float64(Float64(z + Float64(x * log(y))) + Float64(b * log(c)))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 9e+71], N[(N[(y * i), $MachinePrecision] + N[(N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + 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}\;a \leq 9 \cdot 10^{+71}:\\
\;\;\;\;y \cdot i + \left(\left(z + x \cdot \log y\right) + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 9.00000000000000087e71Initial program 99.9%
Taylor expanded in t around 0 84.8%
Taylor expanded in b around inf 83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in a around 0 70.6%
if 9.00000000000000087e71 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 94.5%
Final simplification75.5%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z (* x (log y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((log(c) * (b - 0.5)) + (a + (z + (x * log(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 = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + (x * log(y)))))
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) + ((Math.log(c) * (b - 0.5)) + (a + (z + (x * Math.log(y)))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + (x * math.log(y)))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + Float64(x * log(y)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + (x * log(y))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + x \cdot \log y\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in t around 0 86.4%
Final simplification86.4%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ 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 + (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 + (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 + (z + (x * Math.log(y)))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (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(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 + (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[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(z + x \cdot \log y\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.9%
Taylor expanded in t around 0 86.4%
Taylor expanded in b around inf 85.1%
*-commutative85.1%
Simplified85.1%
Final simplification85.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -4e-24) (not (<= i 1.7e-132))) (+ (+ z t) (+ a (* i (+ y (* b (/ (log c) i)))))) (+ (+ z t) (+ a (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -4e-24) || !(i <= 1.7e-132)) {
tmp = (z + t) + (a + (i * (y + (b * (log(c) / i)))));
} else {
tmp = (z + t) + (a + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-4d-24)) .or. (.not. (i <= 1.7d-132))) then
tmp = (z + t) + (a + (i * (y + (b * (log(c) / i)))))
else
tmp = (z + t) + (a + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -4e-24) || !(i <= 1.7e-132)) {
tmp = (z + t) + (a + (i * (y + (b * (Math.log(c) / i)))));
} else {
tmp = (z + t) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -4e-24) or not (i <= 1.7e-132): tmp = (z + t) + (a + (i * (y + (b * (math.log(c) / i))))) else: tmp = (z + t) + (a + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -4e-24) || !(i <= 1.7e-132)) tmp = Float64(Float64(z + t) + Float64(a + Float64(i * Float64(y + Float64(b * Float64(log(c) / i)))))); else tmp = Float64(Float64(z + t) + Float64(a + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -4e-24) || ~((i <= 1.7e-132))) tmp = (z + t) + (a + (i * (y + (b * (log(c) / i))))); else tmp = (z + t) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -4e-24], N[Not[LessEqual[i, 1.7e-132]], $MachinePrecision]], N[(N[(z + t), $MachinePrecision] + N[(a + N[(i * N[(y + N[(b * N[(N[Log[c], $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4 \cdot 10^{-24} \lor \neg \left(i \leq 1.7 \cdot 10^{-132}\right):\\
\;\;\;\;\left(z + t\right) + \left(a + i \cdot \left(y + b \cdot \frac{\log c}{i}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if i < -3.99999999999999969e-24 or 1.69999999999999991e-132 < i 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%
Taylor expanded in x around 0 87.8%
+-commutative87.8%
associate-+r+87.8%
*-commutative87.8%
sub-neg87.8%
metadata-eval87.8%
+-commutative87.8%
distribute-rgt-out87.8%
+-commutative87.8%
distribute-rgt-in87.8%
associate-+l+87.8%
+-commutative87.8%
+-commutative87.8%
fma-define87.9%
+-commutative87.9%
Simplified87.9%
Taylor expanded in y around inf 78.6%
Taylor expanded in b around inf 78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in i around inf 85.9%
associate-/l*85.9%
Simplified85.9%
if -3.99999999999999969e-24 < i < 1.69999999999999991e-132Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 80.7%
+-commutative80.7%
associate-+r+80.7%
*-commutative80.7%
sub-neg80.7%
metadata-eval80.7%
+-commutative80.7%
distribute-rgt-out80.7%
+-commutative80.7%
distribute-rgt-in80.7%
associate-+l+80.7%
+-commutative80.7%
+-commutative80.7%
fma-define80.7%
+-commutative80.7%
Simplified80.7%
Taylor expanded in b around inf 78.1%
*-commutative78.1%
Simplified78.1%
Final simplification82.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.7e+223) (not (<= x 2.2e+238))) (* x (log y)) (+ (* 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 <= -2.7e+223) || !(x <= 2.2e+238)) {
tmp = x * log(y);
} 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 <= (-2.7d+223)) .or. (.not. (x <= 2.2d+238))) then
tmp = x * log(y)
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 <= -2.7e+223) || !(x <= 2.2e+238)) {
tmp = x * Math.log(y);
} 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 <= -2.7e+223) or not (x <= 2.2e+238): tmp = x * math.log(y) 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 <= -2.7e+223) || !(x <= 2.2e+238)) tmp = Float64(x * log(y)); 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 <= -2.7e+223) || ~((x <= 2.2e+238))) tmp = x * log(y); 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, -2.7e+223], N[Not[LessEqual[x, 2.2e+238]], $MachinePrecision]], N[(x * N[Log[y], $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 -2.7 \cdot 10^{+223} \lor \neg \left(x \leq 2.2 \cdot 10^{+238}\right):\\
\;\;\;\;x \cdot \log y\\
\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 < -2.7000000000000001e223 or 2.2e238 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 99.6%
associate-+r+99.6%
associate-+r+99.6%
associate-+r+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 68.7%
if -2.7000000000000001e223 < x < 2.2e238Initial program 99.9%
Taylor expanded in x around 0 91.5%
Final simplification89.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b (log c)))) (t_2 (+ (+ z t) (+ a (* y i)))))
(if (<= z -7e+99)
t_2
(if (<= z -5.5e+73)
(+ (+ z t) t_1)
(if (<= z -2.5e+21) t_2 (+ (* y i) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * log(c));
double t_2 = (z + t) + (a + (y * i));
double tmp;
if (z <= -7e+99) {
tmp = t_2;
} else if (z <= -5.5e+73) {
tmp = (z + t) + t_1;
} else if (z <= -2.5e+21) {
tmp = t_2;
} else {
tmp = (y * i) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + (b * log(c))
t_2 = (z + t) + (a + (y * i))
if (z <= (-7d+99)) then
tmp = t_2
else if (z <= (-5.5d+73)) then
tmp = (z + t) + t_1
else if (z <= (-2.5d+21)) then
tmp = t_2
else
tmp = (y * i) + 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 = a + (b * Math.log(c));
double t_2 = (z + t) + (a + (y * i));
double tmp;
if (z <= -7e+99) {
tmp = t_2;
} else if (z <= -5.5e+73) {
tmp = (z + t) + t_1;
} else if (z <= -2.5e+21) {
tmp = t_2;
} else {
tmp = (y * i) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * math.log(c)) t_2 = (z + t) + (a + (y * i)) tmp = 0 if z <= -7e+99: tmp = t_2 elif z <= -5.5e+73: tmp = (z + t) + t_1 elif z <= -2.5e+21: tmp = t_2 else: tmp = (y * i) + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * log(c))) t_2 = Float64(Float64(z + t) + Float64(a + Float64(y * i))) tmp = 0.0 if (z <= -7e+99) tmp = t_2; elseif (z <= -5.5e+73) tmp = Float64(Float64(z + t) + t_1); elseif (z <= -2.5e+21) tmp = t_2; else tmp = Float64(Float64(y * i) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * log(c)); t_2 = (z + t) + (a + (y * i)); tmp = 0.0; if (z <= -7e+99) tmp = t_2; elseif (z <= -5.5e+73) tmp = (z + t) + t_1; elseif (z <= -2.5e+21) tmp = t_2; else tmp = (y * i) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+99], t$95$2, If[LessEqual[z, -5.5e+73], N[(N[(z + t), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, -2.5e+21], t$95$2, N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot \log c\\
t_2 := \left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{+73}:\\
\;\;\;\;\left(z + t\right) + t\_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+21}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + t\_1\\
\end{array}
\end{array}
if z < -6.9999999999999995e99 or -5.5000000000000003e73 < z < -2.5e21Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 80.1%
+-commutative80.1%
associate-+r+80.1%
*-commutative80.1%
sub-neg80.1%
metadata-eval80.1%
+-commutative80.1%
distribute-rgt-out80.1%
+-commutative80.1%
distribute-rgt-in80.1%
associate-+l+80.1%
+-commutative80.1%
+-commutative80.1%
fma-define80.1%
+-commutative80.1%
Simplified80.1%
Taylor expanded in y around inf 76.3%
*-commutative76.3%
Simplified76.3%
if -6.9999999999999995e99 < z < -5.5000000000000003e73Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
associate-+r+99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
distribute-rgt-out99.7%
+-commutative99.7%
distribute-rgt-in99.7%
associate-+l+99.7%
+-commutative99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in b around inf 97.3%
*-commutative97.3%
Simplified97.3%
if -2.5e21 < z Initial program 99.9%
Taylor expanded in t around 0 85.1%
Taylor expanded in b around inf 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in a around inf 61.4%
Final simplification65.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -2.2e+145)
(+ (+ z t) (+ a (* y i)))
(if (<= z -2.6e+21)
(+ (* y i) (+ z (* b (log c))))
(+ (* y i) (+ a (* (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.2e+145) {
tmp = (z + t) + (a + (y * i));
} else if (z <= -2.6e+21) {
tmp = (y * i) + (z + (b * log(c)));
} else {
tmp = (y * i) + (a + (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.2d+145)) then
tmp = (z + t) + (a + (y * i))
else if (z <= (-2.6d+21)) then
tmp = (y * i) + (z + (b * log(c)))
else
tmp = (y * i) + (a + (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.2e+145) {
tmp = (z + t) + (a + (y * i));
} else if (z <= -2.6e+21) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.2e+145: tmp = (z + t) + (a + (y * i)) elif z <= -2.6e+21: tmp = (y * i) + (z + (b * math.log(c))) else: tmp = (y * i) + (a + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.2e+145) tmp = Float64(Float64(z + t) + Float64(a + Float64(y * i))); elseif (z <= -2.6e+21) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + 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.2e+145) tmp = (z + t) + (a + (y * i)); elseif (z <= -2.6e+21) tmp = (y * i) + (z + (b * log(c))); else tmp = (y * i) + (a + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.2e+145], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e+21], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+145}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+21}:\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -2.20000000000000009e145Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 90.9%
+-commutative90.9%
associate-+r+90.9%
*-commutative90.9%
sub-neg90.9%
metadata-eval90.9%
+-commutative90.9%
distribute-rgt-out90.9%
+-commutative90.9%
distribute-rgt-in90.9%
associate-+l+90.9%
+-commutative90.9%
+-commutative90.9%
fma-define90.9%
+-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 88.0%
*-commutative88.0%
Simplified88.0%
if -2.20000000000000009e145 < z < -2.6e21Initial program 99.8%
Taylor expanded in t around 0 91.8%
Taylor expanded in b around inf 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in z around inf 65.5%
if -2.6e21 < z Initial program 99.9%
Taylor expanded in a around inf 62.8%
Final simplification66.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.82e-50) (+ (+ z t) (+ a (* b (log c)))) (+ (+ z t) (+ a (* y (+ i (* (log c) (/ b y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.82e-50) {
tmp = (z + t) + (a + (b * log(c)));
} else {
tmp = (z + t) + (a + (y * (i + (log(c) * (b / 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 (y <= 1.82d-50) then
tmp = (z + t) + (a + (b * log(c)))
else
tmp = (z + t) + (a + (y * (i + (log(c) * (b / 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 (y <= 1.82e-50) {
tmp = (z + t) + (a + (b * Math.log(c)));
} else {
tmp = (z + t) + (a + (y * (i + (Math.log(c) * (b / y)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.82e-50: tmp = (z + t) + (a + (b * math.log(c))) else: tmp = (z + t) + (a + (y * (i + (math.log(c) * (b / y))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.82e-50) tmp = Float64(Float64(z + t) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(z + t) + Float64(a + Float64(y * Float64(i + Float64(log(c) * Float64(b / y)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 1.82e-50) tmp = (z + t) + (a + (b * log(c))); else tmp = (z + t) + (a + (y * (i + (log(c) * (b / y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.82e-50], N[(N[(z + t), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * N[(i + N[(N[Log[c], $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.82 \cdot 10^{-50}:\\
\;\;\;\;\left(z + t\right) + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot \left(i + \log c \cdot \frac{b}{y}\right)\right)\\
\end{array}
\end{array}
if y < 1.81999999999999995e-50Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 75.2%
+-commutative75.2%
associate-+r+75.2%
*-commutative75.2%
sub-neg75.2%
metadata-eval75.2%
+-commutative75.2%
distribute-rgt-out75.2%
+-commutative75.2%
distribute-rgt-in75.2%
associate-+l+75.2%
+-commutative75.2%
+-commutative75.2%
fma-define75.2%
+-commutative75.2%
Simplified75.2%
Taylor expanded in b around inf 71.7%
*-commutative71.7%
Simplified71.7%
if 1.81999999999999995e-50 < y 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%
Taylor expanded in x around 0 90.3%
+-commutative90.3%
associate-+r+90.3%
*-commutative90.3%
sub-neg90.3%
metadata-eval90.3%
+-commutative90.3%
distribute-rgt-out90.3%
+-commutative90.3%
distribute-rgt-in90.3%
associate-+l+90.3%
+-commutative90.3%
+-commutative90.3%
fma-define90.3%
+-commutative90.3%
Simplified90.3%
Taylor expanded in y around inf 89.8%
Taylor expanded in b around inf 89.1%
*-commutative89.1%
associate-/l*89.1%
Simplified89.1%
Final simplification82.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (<= z -1.1e+146)
(+ (+ z t) (+ a (* y i)))
(if (<= z -2.6e+21) (+ (* y i) (+ z t_1)) (+ (* y i) (+ a t_1))))))
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 (z <= -1.1e+146) {
tmp = (z + t) + (a + (y * i));
} else if (z <= -2.6e+21) {
tmp = (y * i) + (z + t_1);
} else {
tmp = (y * i) + (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 = b * log(c)
if (z <= (-1.1d+146)) then
tmp = (z + t) + (a + (y * i))
else if (z <= (-2.6d+21)) then
tmp = (y * i) + (z + t_1)
else
tmp = (y * i) + (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 = b * Math.log(c);
double tmp;
if (z <= -1.1e+146) {
tmp = (z + t) + (a + (y * i));
} else if (z <= -2.6e+21) {
tmp = (y * i) + (z + t_1);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if z <= -1.1e+146: tmp = (z + t) + (a + (y * i)) elif z <= -2.6e+21: tmp = (y * i) + (z + t_1) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (z <= -1.1e+146) tmp = Float64(Float64(z + t) + Float64(a + Float64(y * i))); elseif (z <= -2.6e+21) tmp = Float64(Float64(y * i) + Float64(z + t_1)); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); 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 (z <= -1.1e+146) tmp = (z + t) + (a + (y * i)); elseif (z <= -2.6e+21) tmp = (y * i) + (z + t_1); else tmp = (y * i) + (a + t_1); 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[z, -1.1e+146], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e+21], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+146}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+21}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if z < -1.0999999999999999e146Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 90.9%
+-commutative90.9%
associate-+r+90.9%
*-commutative90.9%
sub-neg90.9%
metadata-eval90.9%
+-commutative90.9%
distribute-rgt-out90.9%
+-commutative90.9%
distribute-rgt-in90.9%
associate-+l+90.9%
+-commutative90.9%
+-commutative90.9%
fma-define90.9%
+-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 88.0%
*-commutative88.0%
Simplified88.0%
if -1.0999999999999999e146 < z < -2.6e21Initial program 99.8%
Taylor expanded in t around 0 91.8%
Taylor expanded in b around inf 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in z around inf 65.5%
if -2.6e21 < z Initial program 99.9%
Taylor expanded in t around 0 85.1%
Taylor expanded in b around inf 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in a around inf 61.4%
Final simplification65.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.45e+221) (not (<= x 2e+157))) (* x (log y)) (+ (+ z t) (fma y i a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.45e+221) || !(x <= 2e+157)) {
tmp = x * log(y);
} else {
tmp = (z + t) + fma(y, i, a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.45e+221) || !(x <= 2e+157)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(z + t) + fma(y, i, a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.45e+221], N[Not[LessEqual[x, 2e+157]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(y * i + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.45 \cdot 10^{+221} \lor \neg \left(x \leq 2 \cdot 10^{+157}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if x < -3.45e221 or 1.99999999999999997e157 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 99.6%
associate-+r+99.6%
associate-+r+99.6%
associate-+r+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.5%
Taylor expanded in x around inf 61.7%
if -3.45e221 < x < 1.99999999999999997e157Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 92.8%
+-commutative92.8%
associate-+r+92.8%
*-commutative92.8%
sub-neg92.8%
metadata-eval92.8%
+-commutative92.8%
distribute-rgt-out92.8%
+-commutative92.8%
distribute-rgt-in92.8%
associate-+l+92.8%
+-commutative92.8%
+-commutative92.8%
fma-define92.8%
+-commutative92.8%
Simplified92.8%
Taylor expanded in y around inf 76.5%
*-commutative76.5%
Simplified76.5%
fma-define76.5%
Applied egg-rr76.5%
Final simplification74.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.5e+21) (+ (+ z t) (+ a (* y i))) (+ (* y i) (+ a (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.5e+21) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = (y * i) + (a + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.5d+21)) then
tmp = (z + t) + (a + (y * i))
else
tmp = (y * i) + (a + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.5e+21) {
tmp = (z + t) + (a + (y * i));
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.5e+21: tmp = (z + t) + (a + (y * i)) else: tmp = (y * i) + (a + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.5e+21) tmp = Float64(Float64(z + t) + Float64(a + Float64(y * i))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.5e+21) tmp = (z + t) + (a + (y * i)); else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.5e+21], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+21}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if z < -2.5e21Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 81.8%
+-commutative81.8%
associate-+r+81.8%
*-commutative81.8%
sub-neg81.8%
metadata-eval81.8%
+-commutative81.8%
distribute-rgt-out81.8%
+-commutative81.8%
distribute-rgt-in81.8%
associate-+l+81.8%
+-commutative81.8%
+-commutative81.8%
fma-define81.8%
+-commutative81.8%
Simplified81.8%
Taylor expanded in y around inf 73.3%
*-commutative73.3%
Simplified73.3%
if -2.5e21 < z Initial program 99.9%
Taylor expanded in t around 0 85.1%
Taylor expanded in b around inf 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in a around inf 61.4%
Final simplification64.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.05e+219) (not (<= x 2e+157))) (* x (log y)) (+ (+ z t) (+ a (* 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.05e+219) || !(x <= 2e+157)) {
tmp = x * log(y);
} else {
tmp = (z + t) + (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 ((x <= (-1.05d+219)) .or. (.not. (x <= 2d+157))) then
tmp = x * log(y)
else
tmp = (z + t) + (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 ((x <= -1.05e+219) || !(x <= 2e+157)) {
tmp = x * Math.log(y);
} else {
tmp = (z + t) + (a + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.05e+219) or not (x <= 2e+157): tmp = x * math.log(y) else: tmp = (z + t) + (a + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.05e+219) || !(x <= 2e+157)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(z + t) + 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 ((x <= -1.05e+219) || ~((x <= 2e+157))) tmp = x * log(y); else tmp = (z + t) + (a + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.05e+219], N[Not[LessEqual[x, 2e+157]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+219} \lor \neg \left(x \leq 2 \cdot 10^{+157}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
\end{array}
\end{array}
if x < -1.04999999999999994e219 or 1.99999999999999997e157 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 99.6%
associate-+r+99.6%
associate-+r+99.6%
associate-+r+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.5%
Taylor expanded in x around inf 61.7%
if -1.04999999999999994e219 < x < 1.99999999999999997e157Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 92.8%
+-commutative92.8%
associate-+r+92.8%
*-commutative92.8%
sub-neg92.8%
metadata-eval92.8%
+-commutative92.8%
distribute-rgt-out92.8%
+-commutative92.8%
distribute-rgt-in92.8%
associate-+l+92.8%
+-commutative92.8%
+-commutative92.8%
fma-define92.8%
+-commutative92.8%
Simplified92.8%
Taylor expanded in y around inf 76.5%
*-commutative76.5%
Simplified76.5%
Final simplification74.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -4.2e-13) (not (<= i 0.0096))) (+ (* y i) (+ z t)) (+ a (+ z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -4.2e-13) || !(i <= 0.0096)) {
tmp = (y * i) + (z + t);
} else {
tmp = 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 ((i <= (-4.2d-13)) .or. (.not. (i <= 0.0096d0))) then
tmp = (y * i) + (z + t)
else
tmp = 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 ((i <= -4.2e-13) || !(i <= 0.0096)) {
tmp = (y * i) + (z + t);
} else {
tmp = a + (z + t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -4.2e-13) or not (i <= 0.0096): tmp = (y * i) + (z + t) else: tmp = a + (z + t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -4.2e-13) || !(i <= 0.0096)) tmp = Float64(Float64(y * i) + Float64(z + t)); else tmp = 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 ((i <= -4.2e-13) || ~((i <= 0.0096))) tmp = (y * i) + (z + t); else tmp = a + (z + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -4.2e-13], N[Not[LessEqual[i, 0.0096]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.2 \cdot 10^{-13} \lor \neg \left(i \leq 0.0096\right):\\
\;\;\;\;y \cdot i + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + t\right)\\
\end{array}
\end{array}
if i < -4.19999999999999977e-13 or 0.00959999999999999916 < i 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%
Taylor expanded in x around 0 88.9%
+-commutative88.9%
associate-+r+88.9%
*-commutative88.9%
sub-neg88.9%
metadata-eval88.9%
+-commutative88.9%
distribute-rgt-out88.9%
+-commutative88.9%
distribute-rgt-in88.9%
associate-+l+88.9%
+-commutative88.9%
+-commutative88.9%
fma-define88.9%
+-commutative88.9%
Simplified88.9%
Taylor expanded in y around inf 76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y around inf 66.4%
if -4.19999999999999977e-13 < i < 0.00959999999999999916Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 80.9%
+-commutative80.9%
associate-+r+80.9%
*-commutative80.9%
sub-neg80.9%
metadata-eval80.9%
+-commutative80.9%
distribute-rgt-out80.9%
+-commutative80.9%
distribute-rgt-in80.9%
associate-+l+80.9%
+-commutative80.9%
+-commutative80.9%
fma-define80.9%
+-commutative80.9%
Simplified80.9%
Taylor expanded in y around inf 63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in y around 0 60.7%
Final simplification63.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -1.22e+141) (not (<= i 1.02e+74))) (* y i) (+ a (+ z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -1.22e+141) || !(i <= 1.02e+74)) {
tmp = y * i;
} else {
tmp = 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 ((i <= (-1.22d+141)) .or. (.not. (i <= 1.02d+74))) then
tmp = y * i
else
tmp = 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 ((i <= -1.22e+141) || !(i <= 1.02e+74)) {
tmp = y * i;
} else {
tmp = a + (z + t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -1.22e+141) or not (i <= 1.02e+74): tmp = y * i else: tmp = a + (z + t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -1.22e+141) || !(i <= 1.02e+74)) tmp = Float64(y * i); else tmp = 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 ((i <= -1.22e+141) || ~((i <= 1.02e+74))) tmp = y * i; else tmp = a + (z + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -1.22e+141], N[Not[LessEqual[i, 1.02e+74]], $MachinePrecision]], N[(y * i), $MachinePrecision], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.22 \cdot 10^{+141} \lor \neg \left(i \leq 1.02 \cdot 10^{+74}\right):\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + t\right)\\
\end{array}
\end{array}
if i < -1.2199999999999999e141 or 1.02000000000000005e74 < i 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%
Taylor expanded in y around inf 63.5%
*-commutative63.5%
Simplified63.5%
if -1.2199999999999999e141 < i < 1.02000000000000005e74Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 82.8%
+-commutative82.8%
associate-+r+82.8%
*-commutative82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
distribute-rgt-out82.8%
+-commutative82.8%
distribute-rgt-in82.8%
associate-+l+82.8%
+-commutative82.8%
+-commutative82.8%
fma-define82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in y around inf 65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in y around 0 56.3%
Final simplification58.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -7.4e-32) (not (<= i 2.5e+14))) (* y i) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -7.4e-32) || !(i <= 2.5e+14)) {
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 ((i <= (-7.4d-32)) .or. (.not. (i <= 2.5d+14))) 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 ((i <= -7.4e-32) || !(i <= 2.5e+14)) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -7.4e-32) or not (i <= 2.5e+14): tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -7.4e-32) || !(i <= 2.5e+14)) 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 ((i <= -7.4e-32) || ~((i <= 2.5e+14))) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -7.4e-32], N[Not[LessEqual[i, 2.5e+14]], $MachinePrecision]], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -7.4 \cdot 10^{-32} \lor \neg \left(i \leq 2.5 \cdot 10^{+14}\right):\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if i < -7.4e-32 or 2.5e14 < i 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%
Taylor expanded in y around inf 50.0%
*-commutative50.0%
Simplified50.0%
if -7.4e-32 < i < 2.5e14Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 67.9%
associate-+r+67.9%
associate-+r+67.9%
associate-+r+67.9%
associate-+r+67.9%
+-commutative67.9%
+-commutative67.9%
associate-+l+67.9%
+-commutative67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in a around inf 15.3%
Taylor expanded in x around 0 23.1%
Final simplification36.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.25e-179) (* x (/ z x)) (if (<= y 3.5e+94) a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.25e-179) {
tmp = x * (z / x);
} else if (y <= 3.5e+94) {
tmp = a;
} 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 <= 1.25d-179) then
tmp = x * (z / x)
else if (y <= 3.5d+94) then
tmp = a
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 <= 1.25e-179) {
tmp = x * (z / x);
} else if (y <= 3.5e+94) {
tmp = a;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.25e-179: tmp = x * (z / x) elif y <= 3.5e+94: tmp = a else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.25e-179) tmp = Float64(x * Float64(z / x)); elseif (y <= 3.5e+94) tmp = a; 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 <= 1.25e-179) tmp = x * (z / x); elseif (y <= 3.5e+94) tmp = a; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.25e-179], N[(x * N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+94], a, N[(y * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.25 \cdot 10^{-179}:\\
\;\;\;\;x \cdot \frac{z}{x}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+94}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if y < 1.2499999999999999e-179Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 77.5%
associate-+r+77.5%
associate-+r+77.5%
associate-+r+77.5%
associate-+r+77.5%
+-commutative77.5%
+-commutative77.5%
associate-+l+77.5%
+-commutative77.5%
+-commutative77.5%
Simplified77.5%
Taylor expanded in z around inf 17.0%
if 1.2499999999999999e-179 < y < 3.4999999999999997e94Initial 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.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 74.5%
associate-+r+74.5%
associate-+r+74.5%
associate-+r+74.5%
associate-+r+74.5%
+-commutative74.5%
+-commutative74.5%
associate-+l+74.5%
+-commutative74.5%
+-commutative74.5%
Simplified74.5%
Taylor expanded in a around inf 14.9%
Taylor expanded in x around 0 19.2%
if 3.4999999999999997e94 < y 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%
Taylor expanded in y around inf 56.3%
*-commutative56.3%
Simplified56.3%
Final simplification33.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ z t) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (z + t) + (a + (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 = (z + t) + (a + (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 (z + t) + (a + (y * i));
}
def code(x, y, z, t, a, b, c, i): return (z + t) + (a + (y * i))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(z + t) + Float64(a + Float64(y * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (z + t) + (a + (y * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + t\right) + \left(a + y \cdot i\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%
Taylor expanded in x around 0 84.8%
+-commutative84.8%
associate-+r+84.8%
*-commutative84.8%
sub-neg84.8%
metadata-eval84.8%
+-commutative84.8%
distribute-rgt-out84.8%
+-commutative84.8%
distribute-rgt-in84.8%
associate-+l+84.8%
+-commutative84.8%
+-commutative84.8%
fma-define84.8%
+-commutative84.8%
Simplified84.8%
Taylor expanded in y around inf 69.7%
*-commutative69.7%
Simplified69.7%
Final simplification69.7%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 66.1%
associate-+r+66.1%
associate-+r+66.1%
associate-+r+66.1%
associate-+r+66.1%
+-commutative66.1%
+-commutative66.1%
associate-+l+66.1%
+-commutative66.1%
+-commutative66.1%
Simplified66.1%
Taylor expanded in a around inf 14.5%
Taylor expanded in x around 0 17.8%
Final simplification17.8%
herbie shell --seed 2024096
(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)))