
(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 18 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%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.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 -3.2e+110) (not (<= x 1.9e+141))) (+ a (+ t (+ z (+ (* x (log y)) (* (log c) (- b 0.5)))))) (fma y i (+ (+ z a) (* (+ b -0.5) (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.2e+110) || !(x <= 1.9e+141)) {
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (b - 0.5)))));
} else {
tmp = fma(y, i, ((z + a) + ((b + -0.5) * log(c))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.2e+110) || !(x <= 1.9e+141)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = fma(y, i, Float64(Float64(z + a) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.2e+110], N[Not[LessEqual[x, 1.9e+141]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+110} \lor \neg \left(x \leq 1.9 \cdot 10^{+141}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(z + a\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if x < -3.19999999999999994e110 or 1.89999999999999988e141 < x Initial program 99.8%
Taylor expanded in y around 0 80.5%
if -3.19999999999999994e110 < x < 1.89999999999999988e141Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 98.8%
fma-udef98.8%
*-commutative98.8%
associate-+r+98.8%
Applied egg-rr98.8%
Taylor expanded in t around 0 85.3%
associate-+r+85.3%
sub-neg85.3%
metadata-eval85.3%
Simplified85.3%
Final simplification83.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.7e+208) (not (<= x 8e+161))) (+ (* x (log y)) (* y i)) (fma y i (+ (+ z a) (* (+ b -0.5) (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.7e+208) || !(x <= 8e+161)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = fma(y, i, ((z + a) + ((b + -0.5) * log(c))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.7e+208) || !(x <= 8e+161)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = fma(y, i, Float64(Float64(z + a) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.7e+208], N[Not[LessEqual[x, 8e+161]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+208} \lor \neg \left(x \leq 8 \cdot 10^{+161}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(z + a\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if x < -2.7e208 or 8.0000000000000003e161 < x Initial program 99.7%
add-cube-cbrt98.6%
Applied egg-rr98.6%
Taylor expanded in x around inf 81.5%
if -2.7e208 < x < 8.0000000000000003e161Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 95.9%
fma-udef95.8%
*-commutative95.8%
associate-+r+95.8%
Applied egg-rr95.8%
Taylor expanded in t around 0 81.5%
associate-+r+81.5%
sub-neg81.5%
metadata-eval81.5%
Simplified81.5%
Final simplification81.5%
(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 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Final simplification97.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1.3e+192)
(fma y i z)
(if (or (<= z -4.2e+80)
(not
(or (<= z -8.5e-48)
(and (not (<= z -1.12e-187)) (<= z -3.6e-278)))))
(+ a (* 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 <= -1.3e+192) {
tmp = fma(y, i, z);
} else if ((z <= -4.2e+80) || !((z <= -8.5e-48) || (!(z <= -1.12e-187) && (z <= -3.6e-278)))) {
tmp = a + (y * i);
} else {
tmp = a + (log(c) * (b - 0.5));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.3e+192) tmp = fma(y, i, z); elseif ((z <= -4.2e+80) || !((z <= -8.5e-48) || (!(z <= -1.12e-187) && (z <= -3.6e-278)))) tmp = Float64(a + Float64(y * i)); else tmp = Float64(a + Float64(log(c) * Float64(b - 0.5))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.3e+192], N[(y * i + z), $MachinePrecision], If[Or[LessEqual[z, -4.2e+80], N[Not[Or[LessEqual[z, -8.5e-48], And[N[Not[LessEqual[z, -1.12e-187]], $MachinePrecision], LessEqual[z, -3.6e-278]]]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+192}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{+80} \lor \neg \left(z \leq -8.5 \cdot 10^{-48} \lor \neg \left(z \leq -1.12 \cdot 10^{-187}\right) \land z \leq -3.6 \cdot 10^{-278}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \log c \cdot \left(b - 0.5\right)\\
\end{array}
\end{array}
if z < -1.30000000000000002e192Initial program 99.8%
Taylor expanded in x around 0 95.3%
+-commutative95.3%
+-commutative95.3%
associate-+l+95.3%
sub-neg95.3%
metadata-eval95.3%
associate-+r+95.3%
fma-def95.3%
+-commutative95.3%
+-commutative95.3%
Simplified95.3%
Taylor expanded in t around inf 87.1%
Taylor expanded in t around 0 81.5%
+-commutative81.5%
*-commutative81.5%
fma-def81.6%
Simplified81.6%
if -1.30000000000000002e192 < z < -4.20000000000000003e80 or -8.5000000000000004e-48 < z < -1.12e-187 or -3.59999999999999996e-278 < z Initial program 99.9%
add-cube-cbrt98.7%
Applied egg-rr98.7%
Taylor expanded in a around inf 45.8%
if -4.20000000000000003e80 < z < -8.5000000000000004e-48 or -1.12e-187 < z < -3.59999999999999996e-278Initial program 99.9%
Taylor expanded in x around 0 80.9%
Taylor expanded in t around 0 62.4%
Taylor expanded in z around 0 61.4%
+-commutative61.4%
fma-def61.4%
sub-neg61.4%
metadata-eval61.4%
+-commutative61.4%
Simplified61.4%
Taylor expanded in i around 0 46.4%
Final simplification48.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= i -6.6e+227)
(+ t_1 (* y i))
(if (<= i -3.8e+150)
(+ a (+ t (+ z t_1)))
(if (or (<= i -750000000.0) (not (<= i 3.1e+44)))
(+ a (* y i))
(+ a (+ 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 t_1 = x * log(y);
double tmp;
if (i <= -6.6e+227) {
tmp = t_1 + (y * i);
} else if (i <= -3.8e+150) {
tmp = a + (t + (z + t_1));
} else if ((i <= -750000000.0) || !(i <= 3.1e+44)) {
tmp = a + (y * i);
} else {
tmp = a + (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) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (i <= (-6.6d+227)) then
tmp = t_1 + (y * i)
else if (i <= (-3.8d+150)) then
tmp = a + (t + (z + t_1))
else if ((i <= (-750000000.0d0)) .or. (.not. (i <= 3.1d+44))) then
tmp = a + (y * i)
else
tmp = a + (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 t_1 = x * Math.log(y);
double tmp;
if (i <= -6.6e+227) {
tmp = t_1 + (y * i);
} else if (i <= -3.8e+150) {
tmp = a + (t + (z + t_1));
} else if ((i <= -750000000.0) || !(i <= 3.1e+44)) {
tmp = a + (y * i);
} else {
tmp = a + (z + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if i <= -6.6e+227: tmp = t_1 + (y * i) elif i <= -3.8e+150: tmp = a + (t + (z + t_1)) elif (i <= -750000000.0) or not (i <= 3.1e+44): tmp = a + (y * i) else: tmp = a + (z + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (i <= -6.6e+227) tmp = Float64(t_1 + Float64(y * i)); elseif (i <= -3.8e+150) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif ((i <= -750000000.0) || !(i <= 3.1e+44)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(a + 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) t_1 = x * log(y); tmp = 0.0; if (i <= -6.6e+227) tmp = t_1 + (y * i); elseif (i <= -3.8e+150) tmp = a + (t + (z + t_1)); elseif ((i <= -750000000.0) || ~((i <= 3.1e+44))) tmp = a + (y * i); else tmp = a + (z + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -6.6e+227], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -3.8e+150], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[i, -750000000.0], N[Not[LessEqual[i, 3.1e+44]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;i \leq -6.6 \cdot 10^{+227}:\\
\;\;\;\;t\_1 + y \cdot i\\
\mathbf{elif}\;i \leq -3.8 \cdot 10^{+150}:\\
\;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\
\mathbf{elif}\;i \leq -750000000 \lor \neg \left(i \leq 3.1 \cdot 10^{+44}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if i < -6.5999999999999998e227Initial program 99.9%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 73.2%
if -6.5999999999999998e227 < i < -3.79999999999999989e150Initial program 99.9%
Taylor expanded in y around 0 83.6%
Taylor expanded in x around inf 72.1%
if -3.79999999999999989e150 < i < -7.5e8 or 3.09999999999999996e44 < i Initial program 99.9%
add-cube-cbrt99.1%
Applied egg-rr99.1%
Taylor expanded in a around inf 66.3%
if -7.5e8 < i < 3.09999999999999996e44Initial program 99.8%
Taylor expanded in x around 0 82.1%
Taylor expanded in t around 0 68.3%
Taylor expanded in y around 0 66.1%
Final simplification67.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= i -1.65e+227)
(+ (* x (log y)) (* y i))
(if (or (<= i -7.2e+196) (and (not (<= i -52000000.0)) (<= i 7.6e+42)))
(+ a (+ z (* b (log c))))
(+ a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -1.65e+227) {
tmp = (x * log(y)) + (y * i);
} else if ((i <= -7.2e+196) || (!(i <= -52000000.0) && (i <= 7.6e+42))) {
tmp = a + (z + (b * log(c)));
} 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 (i <= (-1.65d+227)) then
tmp = (x * log(y)) + (y * i)
else if ((i <= (-7.2d+196)) .or. (.not. (i <= (-52000000.0d0))) .and. (i <= 7.6d+42)) then
tmp = a + (z + (b * log(c)))
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 (i <= -1.65e+227) {
tmp = (x * Math.log(y)) + (y * i);
} else if ((i <= -7.2e+196) || (!(i <= -52000000.0) && (i <= 7.6e+42))) {
tmp = a + (z + (b * Math.log(c)));
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if i <= -1.65e+227: tmp = (x * math.log(y)) + (y * i) elif (i <= -7.2e+196) or (not (i <= -52000000.0) and (i <= 7.6e+42)): tmp = a + (z + (b * math.log(c))) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -1.65e+227) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif ((i <= -7.2e+196) || (!(i <= -52000000.0) && (i <= 7.6e+42))) tmp = Float64(a + Float64(z + Float64(b * log(c)))); 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 (i <= -1.65e+227) tmp = (x * log(y)) + (y * i); elseif ((i <= -7.2e+196) || (~((i <= -52000000.0)) && (i <= 7.6e+42))) tmp = a + (z + (b * log(c))); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -1.65e+227], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[i, -7.2e+196], And[N[Not[LessEqual[i, -52000000.0]], $MachinePrecision], LessEqual[i, 7.6e+42]]], N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.65 \cdot 10^{+227}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;i \leq -7.2 \cdot 10^{+196} \lor \neg \left(i \leq -52000000\right) \land i \leq 7.6 \cdot 10^{+42}:\\
\;\;\;\;a + \left(z + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if i < -1.6499999999999999e227Initial program 99.9%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 73.2%
if -1.6499999999999999e227 < i < -7.20000000000000015e196 or -5.2e7 < i < 7.5999999999999997e42Initial program 99.8%
Taylor expanded in x around 0 83.2%
Taylor expanded in t around 0 68.2%
Taylor expanded in y around 0 65.4%
Taylor expanded in b around inf 62.3%
*-commutative62.3%
Simplified62.3%
if -7.20000000000000015e196 < i < -5.2e7 or 7.5999999999999997e42 < i Initial program 99.9%
add-cube-cbrt99.0%
Applied egg-rr99.0%
Taylor expanded in a around inf 63.9%
Final simplification63.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= i -1.65e+227)
(+ t_1 (* y i))
(if (<= i -5.5e+150)
(+ a (+ t (+ z t_1)))
(if (or (<= i -400000000.0) (not (<= i 1.32e+41)))
(+ a (* y i))
(+ a (+ z (* b (log c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (i <= -1.65e+227) {
tmp = t_1 + (y * i);
} else if (i <= -5.5e+150) {
tmp = a + (t + (z + t_1));
} else if ((i <= -400000000.0) || !(i <= 1.32e+41)) {
tmp = a + (y * i);
} else {
tmp = a + (z + (b * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (i <= (-1.65d+227)) then
tmp = t_1 + (y * i)
else if (i <= (-5.5d+150)) then
tmp = a + (t + (z + t_1))
else if ((i <= (-400000000.0d0)) .or. (.not. (i <= 1.32d+41))) then
tmp = a + (y * i)
else
tmp = a + (z + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (i <= -1.65e+227) {
tmp = t_1 + (y * i);
} else if (i <= -5.5e+150) {
tmp = a + (t + (z + t_1));
} else if ((i <= -400000000.0) || !(i <= 1.32e+41)) {
tmp = a + (y * i);
} else {
tmp = a + (z + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if i <= -1.65e+227: tmp = t_1 + (y * i) elif i <= -5.5e+150: tmp = a + (t + (z + t_1)) elif (i <= -400000000.0) or not (i <= 1.32e+41): tmp = a + (y * i) else: tmp = a + (z + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (i <= -1.65e+227) tmp = Float64(t_1 + Float64(y * i)); elseif (i <= -5.5e+150) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif ((i <= -400000000.0) || !(i <= 1.32e+41)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(a + Float64(z + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (i <= -1.65e+227) tmp = t_1 + (y * i); elseif (i <= -5.5e+150) tmp = a + (t + (z + t_1)); elseif ((i <= -400000000.0) || ~((i <= 1.32e+41))) tmp = a + (y * i); else tmp = a + (z + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.65e+227], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -5.5e+150], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[i, -400000000.0], N[Not[LessEqual[i, 1.32e+41]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;i \leq -1.65 \cdot 10^{+227}:\\
\;\;\;\;t\_1 + y \cdot i\\
\mathbf{elif}\;i \leq -5.5 \cdot 10^{+150}:\\
\;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\
\mathbf{elif}\;i \leq -400000000 \lor \neg \left(i \leq 1.32 \cdot 10^{+41}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + b \cdot \log c\right)\\
\end{array}
\end{array}
if i < -1.6499999999999999e227Initial program 99.9%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 73.2%
if -1.6499999999999999e227 < i < -5.50000000000000017e150Initial program 99.9%
Taylor expanded in y around 0 83.6%
Taylor expanded in x around inf 72.1%
if -5.50000000000000017e150 < i < -4e8 or 1.3199999999999999e41 < i Initial program 99.9%
add-cube-cbrt99.1%
Applied egg-rr99.1%
Taylor expanded in a around inf 66.3%
if -4e8 < i < 1.3199999999999999e41Initial program 99.8%
Taylor expanded in x around 0 82.1%
Taylor expanded in t around 0 68.3%
Taylor expanded in y around 0 66.1%
Taylor expanded in b around inf 62.8%
*-commutative62.8%
Simplified62.8%
Final simplification65.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.5e+208) (not (<= x 5.2e+151))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ a (+ 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 <= -1.5e+208) || !(x <= 5.2e+151)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (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 <= (-1.5d+208)) .or. (.not. (x <= 5.2d+151))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (a + (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 <= -1.5e+208) || !(x <= 5.2e+151)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (z + (Math.log(c) * (b - 0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.5e+208) or not (x <= 5.2e+151): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (a + (z + (math.log(c) * (b - 0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.5e+208) || !(x <= 5.2e+151)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + 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 <= -1.5e+208) || ~((x <= 5.2e+151))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (a + (z + (log(c) * (b - 0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.5e+208], N[Not[LessEqual[x, 5.2e+151]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+208} \lor \neg \left(x \leq 5.2 \cdot 10^{+151}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.49999999999999997e208 or 5.20000000000000026e151 < x Initial program 99.7%
add-cube-cbrt98.6%
Applied egg-rr98.6%
Taylor expanded in x around inf 81.5%
if -1.49999999999999997e208 < x < 5.20000000000000026e151Initial program 99.9%
Taylor expanded in x around 0 95.8%
Taylor expanded in t around 0 81.5%
Final simplification81.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.75e+208) (not (<= x 8e+161))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ a (+ z (* b (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.75e+208) || !(x <= 8e+161)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (z + (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 ((x <= (-1.75d+208)) .or. (.not. (x <= 8d+161))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (a + (z + (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 ((x <= -1.75e+208) || !(x <= 8e+161)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (z + (b * Math.log(c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.75e+208) or not (x <= 8e+161): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (a + (z + (b * math.log(c)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.75e+208) || !(x <= 8e+161)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(b * log(c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.75e+208) || ~((x <= 8e+161))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (a + (z + (b * log(c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.75e+208], N[Not[LessEqual[x, 8e+161]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+208} \lor \neg \left(x \leq 8 \cdot 10^{+161}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + b \cdot \log c\right)\right)\\
\end{array}
\end{array}
if x < -1.75000000000000008e208 or 8.0000000000000003e161 < x Initial program 99.7%
add-cube-cbrt98.6%
Applied egg-rr98.6%
Taylor expanded in x around inf 81.5%
if -1.75000000000000008e208 < x < 8.0000000000000003e161Initial program 99.9%
Taylor expanded in x around 0 95.8%
Taylor expanded in t around 0 81.5%
Taylor expanded in b around inf 78.9%
*-commutative53.5%
Simplified78.9%
Final simplification79.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -30000000.0) (not (<= i 1.4e+44))) (+ a (* y i)) (+ a (+ z (* 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 <= -30000000.0) || !(i <= 1.4e+44)) {
tmp = a + (y * i);
} else {
tmp = a + (z + (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 <= (-30000000.0d0)) .or. (.not. (i <= 1.4d+44))) then
tmp = a + (y * i)
else
tmp = a + (z + (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 <= -30000000.0) || !(i <= 1.4e+44)) {
tmp = a + (y * i);
} else {
tmp = a + (z + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -30000000.0) or not (i <= 1.4e+44): tmp = a + (y * i) else: tmp = a + (z + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -30000000.0) || !(i <= 1.4e+44)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(a + Float64(z + 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 <= -30000000.0) || ~((i <= 1.4e+44))) tmp = a + (y * i); else tmp = a + (z + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -30000000.0], N[Not[LessEqual[i, 1.4e+44]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -30000000 \lor \neg \left(i \leq 1.4 \cdot 10^{+44}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + b \cdot \log c\right)\\
\end{array}
\end{array}
if i < -3e7 or 1.4e44 < i Initial program 99.9%
add-cube-cbrt99.0%
Applied egg-rr99.0%
Taylor expanded in a around inf 63.1%
if -3e7 < i < 1.4e44Initial program 99.8%
Taylor expanded in x around 0 82.1%
Taylor expanded in t around 0 68.3%
Taylor expanded in y around 0 66.1%
Taylor expanded in b around inf 62.8%
*-commutative62.8%
Simplified62.8%
Final simplification62.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.8e+192) (fma y i 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 <= -1.8e+192) {
tmp = fma(y, i, z);
} else {
tmp = a + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.8e+192) tmp = fma(y, i, z); else tmp = Float64(a + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.8e+192], N[(y * i + z), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+192}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.8000000000000001e192Initial program 99.8%
Taylor expanded in x around 0 95.3%
+-commutative95.3%
+-commutative95.3%
associate-+l+95.3%
sub-neg95.3%
metadata-eval95.3%
associate-+r+95.3%
fma-def95.3%
+-commutative95.3%
+-commutative95.3%
Simplified95.3%
Taylor expanded in t around inf 87.1%
Taylor expanded in t around 0 81.5%
+-commutative81.5%
*-commutative81.5%
fma-def81.6%
Simplified81.6%
if -1.8000000000000001e192 < z Initial program 99.9%
add-cube-cbrt98.6%
Applied egg-rr98.6%
Taylor expanded in a around inf 43.4%
Final simplification46.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 3.4e-212)
z
(if (or (<= a 4e+145) (and (not (<= a 9.6e+160)) (<= a 1.2e+182)))
(* y i)
a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.4e-212) {
tmp = z;
} else if ((a <= 4e+145) || (!(a <= 9.6e+160) && (a <= 1.2e+182))) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 3.4d-212) then
tmp = z
else if ((a <= 4d+145) .or. (.not. (a <= 9.6d+160)) .and. (a <= 1.2d+182)) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.4e-212) {
tmp = z;
} else if ((a <= 4e+145) || (!(a <= 9.6e+160) && (a <= 1.2e+182))) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.4e-212: tmp = z elif (a <= 4e+145) or (not (a <= 9.6e+160) and (a <= 1.2e+182)): tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.4e-212) tmp = z; elseif ((a <= 4e+145) || (!(a <= 9.6e+160) && (a <= 1.2e+182))) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 3.4e-212) tmp = z; elseif ((a <= 4e+145) || (~((a <= 9.6e+160)) && (a <= 1.2e+182))) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.4e-212], z, If[Or[LessEqual[a, 4e+145], And[N[Not[LessEqual[a, 9.6e+160]], $MachinePrecision], LessEqual[a, 1.2e+182]]], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.4 \cdot 10^{-212}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 4 \cdot 10^{+145} \lor \neg \left(a \leq 9.6 \cdot 10^{+160}\right) \land a \leq 1.2 \cdot 10^{+182}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 3.39999999999999998e-212Initial program 99.9%
Taylor expanded in z around inf 18.2%
if 3.39999999999999998e-212 < a < 4e145 or 9.6000000000000006e160 < a < 1.20000000000000005e182Initial program 99.9%
Taylor expanded in y around inf 28.6%
*-commutative28.6%
Simplified28.6%
if 4e145 < a < 9.6000000000000006e160 or 1.20000000000000005e182 < a Initial program 99.9%
Taylor expanded in a around inf 58.3%
Final simplification26.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -8e+224) 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 <= -8e+224) {
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 <= (-8d+224)) 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 <= -8e+224) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -8e+224: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -8e+224) 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 <= -8e+224) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -8e+224], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+224}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -7.99999999999999976e224Initial program 99.9%
Taylor expanded in z around inf 81.8%
if -7.99999999999999976e224 < z Initial program 99.9%
add-cube-cbrt98.6%
Applied egg-rr98.6%
Taylor expanded in a around inf 43.2%
Final simplification44.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.55e+192) (+ 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 (z <= -1.55e+192) {
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 (z <= (-1.55d+192)) 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 (z <= -1.55e+192) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.55e+192: 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 (z <= -1.55e+192) 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 (z <= -1.55e+192) 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[z, -1.55e+192], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+192}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.5499999999999999e192Initial program 99.8%
add-cube-cbrt98.3%
Applied egg-rr98.3%
Taylor expanded in z around inf 81.5%
if -1.5499999999999999e192 < z Initial program 99.9%
add-cube-cbrt98.6%
Applied egg-rr98.6%
Taylor expanded in a around inf 43.4%
Final simplification46.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.05e+188) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.05e+188) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.05d+188)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.05e+188) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.05e+188: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.05e+188) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.05e+188) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.05e+188], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+188}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.04999999999999993e188Initial program 99.8%
Taylor expanded in z around inf 63.2%
if -1.04999999999999993e188 < z Initial program 99.9%
Taylor expanded in a around inf 18.2%
Final simplification21.9%
(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 17.0%
Final simplification17.0%
herbie shell --seed 2024036
(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)))