
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ x (fma z (- 1.0 (log t)) (fma (+ a -0.5) b y))))
double code(double x, double y, double z, double t, double a, double b) {
return x + fma(z, (1.0 - log(t)), fma((a + -0.5), b, y));
}
function code(x, y, z, t, a, b) return Float64(x + fma(z, Float64(1.0 - log(t)), fma(Float64(a + -0.5), b, y))) end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(a + -0.5, b, y\right)\right)
\end{array}
Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -2e+75) (fma (+ a -0.5) b (+ x y)) (+ (+ y (* b (- a 0.5))) (* z (- 1.0 (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -2e+75) {
tmp = fma((a + -0.5), b, (x + y));
} else {
tmp = (y + (b * (a - 0.5))) + (z * (1.0 - log(t)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -2e+75) tmp = fma(Float64(a + -0.5), b, Float64(x + y)); else tmp = Float64(Float64(y + Float64(b * Float64(a - 0.5))) + Float64(z * Float64(1.0 - log(t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -2e+75], N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -2 \cdot 10^{+75}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, b, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + b \cdot \left(a - 0.5\right)\right) + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -1.99999999999999985e75Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 87.7%
if -1.99999999999999985e75 < (+.f64 x y) Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 81.1%
Final simplification83.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.58e+121) (not (<= z 6.9e+193))) (+ (* b (- a 0.5)) (* z (- 1.0 (log t)))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.58e+121) || !(z <= 6.9e+193)) {
tmp = (b * (a - 0.5)) + (z * (1.0 - log(t)));
} else {
tmp = fma((a + -0.5), b, (x + y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.58e+121) || !(z <= 6.9e+193)) tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(z * Float64(1.0 - log(t)))); else tmp = fma(Float64(a + -0.5), b, Float64(x + y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.58e+121], N[Not[LessEqual[z, 6.9e+193]], $MachinePrecision]], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.58 \cdot 10^{+121} \lor \neg \left(z \leq 6.9 \cdot 10^{+193}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right) + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, b, x + y\right)\\
\end{array}
\end{array}
if z < -1.57999999999999995e121 or 6.89999999999999999e193 < z Initial program 99.6%
associate--l+99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 96.1%
Taylor expanded in y around 0 91.3%
if -1.57999999999999995e121 < z < 6.89999999999999999e193Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 94.3%
Final simplification93.7%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (- z (* z (log t)))) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (z - (z * log(t)))) + ((a + -0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x + y) + (z - (z * log(t)))) + ((a + (-0.5d0)) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (z - (z * Math.log(t)))) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (z - (z * math.log(t)))) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(z - Float64(z * log(t)))) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (z - (z * log(t)))) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= z -8.5e+203)
(- (+ z y) t_1)
(if (<= z 1.56e+171) (fma (+ a -0.5) b (+ x y)) (- (+ y (+ x z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if (z <= -8.5e+203) {
tmp = (z + y) - t_1;
} else if (z <= 1.56e+171) {
tmp = fma((a + -0.5), b, (x + y));
} else {
tmp = (y + (x + z)) - t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (z <= -8.5e+203) tmp = Float64(Float64(z + y) - t_1); elseif (z <= 1.56e+171) tmp = fma(Float64(a + -0.5), b, Float64(x + y)); else tmp = Float64(Float64(y + Float64(x + z)) - t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+203], N[(N[(z + y), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 1.56e+171], N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+203}:\\
\;\;\;\;\left(z + y\right) - t_1\\
\mathbf{elif}\;z \leq 1.56 \cdot 10^{+171}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, b, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - t_1\\
\end{array}
\end{array}
if z < -8.50000000000000025e203Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 93.5%
Taylor expanded in x around 0 93.5%
if -8.50000000000000025e203 < z < 1.5600000000000001e171Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 92.6%
if 1.5600000000000001e171 < z Initial program 99.7%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 81.6%
Final simplification91.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -3.3e+204)
t_1
(if (<= z 1.56e+171) (+ (+ x y) (* b (- a 0.5))) (+ x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -3.3e+204) {
tmp = t_1;
} else if (z <= 1.56e+171) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = x + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = z * (1.0d0 - log(t))
if (z <= (-3.3d+204)) then
tmp = t_1
else if (z <= 1.56d+171) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = x + 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 t_1 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -3.3e+204) {
tmp = t_1;
} else if (z <= 1.56e+171) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -3.3e+204: tmp = t_1 elif z <= 1.56e+171: tmp = (x + y) + (b * (a - 0.5)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -3.3e+204) tmp = t_1; elseif (z <= 1.56e+171) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -3.3e+204) tmp = t_1; elseif (z <= 1.56e+171) tmp = (x + y) + (b * (a - 0.5)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+204], t$95$1, If[LessEqual[z, 1.56e+171], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+204}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.56 \cdot 10^{+171}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if z < -3.2999999999999998e204Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 93.5%
Taylor expanded in z around inf 90.9%
if -3.2999999999999998e204 < z < 1.5600000000000001e171Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 92.6%
if 1.5600000000000001e171 < z Initial program 99.7%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 70.4%
Final simplification90.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.3e+204)
(- (+ z y) (* z (log t)))
(if (<= z 2.1e+171)
(+ (+ x y) (* b (- a 0.5)))
(+ x (* z (- 1.0 (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e+204) {
tmp = (z + y) - (z * log(t));
} else if (z <= 2.1e+171) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = x + (z * (1.0 - log(t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (z <= (-2.3d+204)) then
tmp = (z + y) - (z * log(t))
else if (z <= 2.1d+171) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = x + (z * (1.0d0 - log(t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e+204) {
tmp = (z + y) - (z * Math.log(t));
} else if (z <= 2.1e+171) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = x + (z * (1.0 - Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.3e+204: tmp = (z + y) - (z * math.log(t)) elif z <= 2.1e+171: tmp = (x + y) + (b * (a - 0.5)) else: tmp = x + (z * (1.0 - math.log(t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.3e+204) tmp = Float64(Float64(z + y) - Float64(z * log(t))); elseif (z <= 2.1e+171) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + Float64(z * Float64(1.0 - log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.3e+204) tmp = (z + y) - (z * log(t)); elseif (z <= 2.1e+171) tmp = (x + y) + (b * (a - 0.5)); else tmp = x + (z * (1.0 - log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.3e+204], N[(N[(z + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+171], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+204}:\\
\;\;\;\;\left(z + y\right) - z \cdot \log t\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+171}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < -2.2999999999999999e204Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 93.5%
Taylor expanded in x around 0 93.5%
if -2.2999999999999999e204 < z < 2.1000000000000001e171Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 92.6%
if 2.1000000000000001e171 < z Initial program 99.7%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 70.4%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.4e+204)
(- (+ z y) (* z (log t)))
(if (<= z 2.15e+171)
(fma (+ a -0.5) b (+ x y))
(+ x (* z (- 1.0 (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+204) {
tmp = (z + y) - (z * log(t));
} else if (z <= 2.15e+171) {
tmp = fma((a + -0.5), b, (x + y));
} else {
tmp = x + (z * (1.0 - log(t)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.4e+204) tmp = Float64(Float64(z + y) - Float64(z * log(t))); elseif (z <= 2.15e+171) tmp = fma(Float64(a + -0.5), b, Float64(x + y)); else tmp = Float64(x + Float64(z * Float64(1.0 - log(t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.4e+204], N[(N[(z + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+171], N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+204}:\\
\;\;\;\;\left(z + y\right) - z \cdot \log t\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+171}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, b, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < -2.4e204Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 93.5%
Taylor expanded in x around 0 93.5%
if -2.4e204 < z < 2.15000000000000004e171Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 92.6%
if 2.15000000000000004e171 < z Initial program 99.7%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 70.4%
Final simplification90.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.25e+204) (not (<= z 3.7e+201))) (* z (- 1.0 (log t))) (+ (+ x y) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.25e+204) || !(z <= 3.7e+201)) {
tmp = z * (1.0 - log(t));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-1.25d+204)) .or. (.not. (z <= 3.7d+201))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (x + y) + (b * (a - 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 tmp;
if ((z <= -1.25e+204) || !(z <= 3.7e+201)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.25e+204) or not (z <= 3.7e+201): tmp = z * (1.0 - math.log(t)) else: tmp = (x + y) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.25e+204) || !(z <= 3.7e+201)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.25e+204) || ~((z <= 3.7e+201))) tmp = z * (1.0 - log(t)); else tmp = (x + y) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.25e+204], N[Not[LessEqual[z, 3.7e+201]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+204} \lor \neg \left(z \leq 3.7 \cdot 10^{+201}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -1.25000000000000002e204 or 3.6999999999999999e201 < z Initial program 99.6%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 86.1%
Taylor expanded in z around inf 79.5%
if -1.25000000000000002e204 < z < 3.6999999999999999e201Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 91.6%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -1e+240)
t_1
(if (<= t_1 -2e+147)
(+ x (* a b))
(if (or (<= t_1 -1e+109) (not (<= t_1 2e+193))) t_1 (+ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -1e+240) {
tmp = t_1;
} else if (t_1 <= -2e+147) {
tmp = x + (a * b);
} else if ((t_1 <= -1e+109) || !(t_1 <= 2e+193)) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (t_1 <= (-1d+240)) then
tmp = t_1
else if (t_1 <= (-2d+147)) then
tmp = x + (a * b)
else if ((t_1 <= (-1d+109)) .or. (.not. (t_1 <= 2d+193))) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -1e+240) {
tmp = t_1;
} else if (t_1 <= -2e+147) {
tmp = x + (a * b);
} else if ((t_1 <= -1e+109) || !(t_1 <= 2e+193)) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if t_1 <= -1e+240: tmp = t_1 elif t_1 <= -2e+147: tmp = x + (a * b) elif (t_1 <= -1e+109) or not (t_1 <= 2e+193): tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -1e+240) tmp = t_1; elseif (t_1 <= -2e+147) tmp = Float64(x + Float64(a * b)); elseif ((t_1 <= -1e+109) || !(t_1 <= 2e+193)) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (t_1 <= -1e+240) tmp = t_1; elseif (t_1 <= -2e+147) tmp = x + (a * b); elseif ((t_1 <= -1e+109) || ~((t_1 <= 2e+193))) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+240], t$95$1, If[LessEqual[t$95$1, -2e+147], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -1e+109], N[Not[LessEqual[t$95$1, 2e+193]], $MachinePrecision]], t$95$1, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+240}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{+147}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{+109} \lor \neg \left(t_1 \leq 2 \cdot 10^{+193}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.00000000000000001e240 or -2e147 < (*.f64 (-.f64 a 1/2) b) < -9.99999999999999982e108 or 2.00000000000000013e193 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
+-commutative100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in z around 0 94.5%
fma-udef94.4%
metadata-eval94.4%
sub-neg94.4%
+-commutative94.4%
sub-neg94.4%
metadata-eval94.4%
Applied egg-rr94.4%
Taylor expanded in b around inf 90.2%
if -1.00000000000000001e240 < (*.f64 (-.f64 a 1/2) b) < -2e147Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 46.6%
if -9.99999999999999982e108 < (*.f64 (-.f64 a 1/2) b) < 2.00000000000000013e193Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.6%
Final simplification71.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -1e+240)
t_1
(if (<= t_1 -5e+143)
(+ x (* a b))
(if (<= t_1 -2e+76)
(+ x (* -0.5 b))
(if (<= t_1 2e+193) (+ x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -1e+240) {
tmp = t_1;
} else if (t_1 <= -5e+143) {
tmp = x + (a * b);
} else if (t_1 <= -2e+76) {
tmp = x + (-0.5 * b);
} else if (t_1 <= 2e+193) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (t_1 <= (-1d+240)) then
tmp = t_1
else if (t_1 <= (-5d+143)) then
tmp = x + (a * b)
else if (t_1 <= (-2d+76)) then
tmp = x + ((-0.5d0) * b)
else if (t_1 <= 2d+193) then
tmp = x + y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -1e+240) {
tmp = t_1;
} else if (t_1 <= -5e+143) {
tmp = x + (a * b);
} else if (t_1 <= -2e+76) {
tmp = x + (-0.5 * b);
} else if (t_1 <= 2e+193) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if t_1 <= -1e+240: tmp = t_1 elif t_1 <= -5e+143: tmp = x + (a * b) elif t_1 <= -2e+76: tmp = x + (-0.5 * b) elif t_1 <= 2e+193: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -1e+240) tmp = t_1; elseif (t_1 <= -5e+143) tmp = Float64(x + Float64(a * b)); elseif (t_1 <= -2e+76) tmp = Float64(x + Float64(-0.5 * b)); elseif (t_1 <= 2e+193) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (t_1 <= -1e+240) tmp = t_1; elseif (t_1 <= -5e+143) tmp = x + (a * b); elseif (t_1 <= -2e+76) tmp = x + (-0.5 * b); elseif (t_1 <= 2e+193) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+240], t$95$1, If[LessEqual[t$95$1, -5e+143], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e+76], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+193], N[(x + y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+240}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{+143}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{+76}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+193}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.00000000000000001e240 or 2.00000000000000013e193 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
+-commutative100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in z around 0 96.6%
fma-udef96.5%
metadata-eval96.5%
sub-neg96.5%
+-commutative96.5%
sub-neg96.5%
metadata-eval96.5%
Applied egg-rr96.5%
Taylor expanded in b around inf 93.2%
if -1.00000000000000001e240 < (*.f64 (-.f64 a 1/2) b) < -5.00000000000000012e143Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 48.6%
if -5.00000000000000012e143 < (*.f64 (-.f64 a 1/2) b) < -2.0000000000000001e76Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 72.2%
Taylor expanded in a around 0 72.6%
if -2.0000000000000001e76 < (*.f64 (-.f64 a 1/2) b) < 2.00000000000000013e193Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.9%
Final simplification71.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -1e+109) (not (<= t_1 5e-14))) (+ x t_1) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+109) || !(t_1 <= 5e-14)) {
tmp = x + t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-1d+109)) .or. (.not. (t_1 <= 5d-14))) then
tmp = x + t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+109) || !(t_1 <= 5e-14)) {
tmp = x + t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -1e+109) or not (t_1 <= 5e-14): tmp = x + t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -1e+109) || !(t_1 <= 5e-14)) tmp = Float64(x + t_1); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -1e+109) || ~((t_1 <= 5e-14))) tmp = x + t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+109], N[Not[LessEqual[t$95$1, 5e-14]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+109} \lor \neg \left(t_1 \leq 5 \cdot 10^{-14}\right):\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -9.99999999999999982e108 or 5.0000000000000002e-14 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 74.5%
if -9.99999999999999982e108 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000002e-14Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 69.3%
Final simplification72.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -1e+135) (not (<= t_1 2e+193)))
(+ x t_1)
(+ (+ x y) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+135) || !(t_1 <= 2e+193)) {
tmp = x + t_1;
} else {
tmp = (x + y) + (-0.5 * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-1d+135)) .or. (.not. (t_1 <= 2d+193))) then
tmp = x + t_1
else
tmp = (x + y) + ((-0.5d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+135) || !(t_1 <= 2e+193)) {
tmp = x + t_1;
} else {
tmp = (x + y) + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -1e+135) or not (t_1 <= 2e+193): tmp = x + t_1 else: tmp = (x + y) + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -1e+135) || !(t_1 <= 2e+193)) tmp = Float64(x + t_1); else tmp = Float64(Float64(x + y) + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -1e+135) || ~((t_1 <= 2e+193))) tmp = x + t_1; else tmp = (x + y) + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+135], N[Not[LessEqual[t$95$1, 2e+193]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+135} \lor \neg \left(t_1 \leq 2 \cdot 10^{+193}\right):\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + -0.5 \cdot b\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -9.99999999999999962e134 or 2.00000000000000013e193 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 83.7%
if -9.99999999999999962e134 < (*.f64 (-.f64 a 1/2) b) < 2.00000000000000013e193Initial program 99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in z around 0 75.4%
Taylor expanded in a around 0 71.7%
Final simplification76.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -1e+109) (not (<= t_1 2e+193))) t_1 (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+109) || !(t_1 <= 2e+193)) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-1d+109)) .or. (.not. (t_1 <= 2d+193))) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+109) || !(t_1 <= 2e+193)) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -1e+109) or not (t_1 <= 2e+193): tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -1e+109) || !(t_1 <= 2e+193)) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -1e+109) || ~((t_1 <= 2e+193))) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+109], N[Not[LessEqual[t$95$1, 2e+193]], $MachinePrecision]], t$95$1, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+109} \lor \neg \left(t_1 \leq 2 \cdot 10^{+193}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -9.99999999999999982e108 or 2.00000000000000013e193 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
+-commutative100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified100.0%
Taylor expanded in z around 0 90.1%
fma-udef90.0%
metadata-eval90.0%
sub-neg90.0%
+-commutative90.0%
sub-neg90.0%
metadata-eval90.0%
Applied egg-rr90.0%
Taylor expanded in b around inf 78.5%
if -9.99999999999999982e108 < (*.f64 (-.f64 a 1/2) b) < 2.00000000000000013e193Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.6%
Final simplification70.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -1.35e+138)
x
(if (<= x -6.2e-97)
(* a b)
(if (<= x -3.1e-167)
y
(if (<= x -5e-201)
(* a b)
(if (<= x -9.3e-287) y (if (<= x 8e-197) (* a b) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.35e+138) {
tmp = x;
} else if (x <= -6.2e-97) {
tmp = a * b;
} else if (x <= -3.1e-167) {
tmp = y;
} else if (x <= -5e-201) {
tmp = a * b;
} else if (x <= -9.3e-287) {
tmp = y;
} else if (x <= 8e-197) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (x <= (-1.35d+138)) then
tmp = x
else if (x <= (-6.2d-97)) then
tmp = a * b
else if (x <= (-3.1d-167)) then
tmp = y
else if (x <= (-5d-201)) then
tmp = a * b
else if (x <= (-9.3d-287)) then
tmp = y
else if (x <= 8d-197) then
tmp = a * b
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.35e+138) {
tmp = x;
} else if (x <= -6.2e-97) {
tmp = a * b;
} else if (x <= -3.1e-167) {
tmp = y;
} else if (x <= -5e-201) {
tmp = a * b;
} else if (x <= -9.3e-287) {
tmp = y;
} else if (x <= 8e-197) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.35e+138: tmp = x elif x <= -6.2e-97: tmp = a * b elif x <= -3.1e-167: tmp = y elif x <= -5e-201: tmp = a * b elif x <= -9.3e-287: tmp = y elif x <= 8e-197: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.35e+138) tmp = x; elseif (x <= -6.2e-97) tmp = Float64(a * b); elseif (x <= -3.1e-167) tmp = y; elseif (x <= -5e-201) tmp = Float64(a * b); elseif (x <= -9.3e-287) tmp = y; elseif (x <= 8e-197) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.35e+138) tmp = x; elseif (x <= -6.2e-97) tmp = a * b; elseif (x <= -3.1e-167) tmp = y; elseif (x <= -5e-201) tmp = a * b; elseif (x <= -9.3e-287) tmp = y; elseif (x <= 8e-197) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.35e+138], x, If[LessEqual[x, -6.2e-97], N[(a * b), $MachinePrecision], If[LessEqual[x, -3.1e-167], y, If[LessEqual[x, -5e-201], N[(a * b), $MachinePrecision], If[LessEqual[x, -9.3e-287], y, If[LessEqual[x, 8e-197], N[(a * b), $MachinePrecision], y]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+138}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-97}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-167}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-201}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -9.3 \cdot 10^{-287}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-197}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.35000000000000004e138Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 58.8%
if -1.35000000000000004e138 < x < -6.20000000000000004e-97 or -3.1e-167 < x < -4.9999999999999999e-201 or -9.30000000000000015e-287 < x < 7.9999999999999999e-197Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 80.2%
fma-udef80.2%
metadata-eval80.2%
sub-neg80.2%
+-commutative80.2%
sub-neg80.2%
metadata-eval80.2%
Applied egg-rr80.2%
Taylor expanded in a around inf 39.4%
if -6.20000000000000004e-97 < x < -3.1e-167 or -4.9999999999999999e-201 < x < -9.30000000000000015e-287 or 7.9999999999999999e-197 < x Initial program 99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in z around 0 80.4%
fma-udef80.4%
metadata-eval80.4%
sub-neg80.4%
+-commutative80.4%
sub-neg80.4%
metadata-eval80.4%
Applied egg-rr80.4%
Taylor expanded in y around inf 26.1%
Final simplification36.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.04e+270)
(* a b)
(if (<= b -1.65e+240)
(* -0.5 b)
(if (<= b -2.3e+69) (* a b) (if (<= b 1.6e+51) (+ x y) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.04e+270) {
tmp = a * b;
} else if (b <= -1.65e+240) {
tmp = -0.5 * b;
} else if (b <= -2.3e+69) {
tmp = a * b;
} else if (b <= 1.6e+51) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (b <= (-1.04d+270)) then
tmp = a * b
else if (b <= (-1.65d+240)) then
tmp = (-0.5d0) * b
else if (b <= (-2.3d+69)) then
tmp = a * b
else if (b <= 1.6d+51) then
tmp = x + y
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.04e+270) {
tmp = a * b;
} else if (b <= -1.65e+240) {
tmp = -0.5 * b;
} else if (b <= -2.3e+69) {
tmp = a * b;
} else if (b <= 1.6e+51) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.04e+270: tmp = a * b elif b <= -1.65e+240: tmp = -0.5 * b elif b <= -2.3e+69: tmp = a * b elif b <= 1.6e+51: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.04e+270) tmp = Float64(a * b); elseif (b <= -1.65e+240) tmp = Float64(-0.5 * b); elseif (b <= -2.3e+69) tmp = Float64(a * b); elseif (b <= 1.6e+51) tmp = Float64(x + y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.04e+270) tmp = a * b; elseif (b <= -1.65e+240) tmp = -0.5 * b; elseif (b <= -2.3e+69) tmp = a * b; elseif (b <= 1.6e+51) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.04e+270], N[(a * b), $MachinePrecision], If[LessEqual[b, -1.65e+240], N[(-0.5 * b), $MachinePrecision], If[LessEqual[b, -2.3e+69], N[(a * b), $MachinePrecision], If[LessEqual[b, 1.6e+51], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.04 \cdot 10^{+270}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq -1.65 \cdot 10^{+240}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;b \leq -2.3 \cdot 10^{+69}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+51}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if b < -1.04e270 or -1.6499999999999999e240 < b < -2.30000000000000017e69 or 1.6000000000000001e51 < b Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 90.4%
fma-udef90.4%
metadata-eval90.4%
sub-neg90.4%
+-commutative90.4%
sub-neg90.4%
metadata-eval90.4%
Applied egg-rr90.4%
Taylor expanded in a around inf 53.1%
if -1.04e270 < b < -1.6499999999999999e240Initial program 100.0%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in a around 0 86.9%
*-commutative86.9%
Simplified86.9%
if -2.30000000000000017e69 < b < 1.6000000000000001e51Initial program 99.8%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 63.9%
Final simplification60.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -4e-149) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= -4e-149) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((x + y) <= (-4d-149)) then
tmp = x + t_1
else
tmp = y + 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 t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= -4e-149) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= -4e-149: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -4e-149) tmp = Float64(x + t_1); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((x + y) <= -4e-149) tmp = x + t_1; else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -4e-149], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -4 \cdot 10^{-149}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < -3.99999999999999992e-149Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 61.5%
if -3.99999999999999992e-149 < (+.f64 x y) Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 78.1%
fma-udef78.1%
metadata-eval78.1%
sub-neg78.1%
+-commutative78.1%
sub-neg78.1%
metadata-eval78.1%
Applied egg-rr78.1%
Taylor expanded in x around 0 55.9%
Final simplification58.8%
(FPCore (x y z t a b) :precision binary64 (+ (+ x y) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * (a - 0.5));
}
real(8) function code(x, y, z, t, a, b)
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
code = (x + y) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (x + y) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + y) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 81.3%
Final simplification81.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -8.6e+49) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.6e+49) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (x <= (-8.6d+49)) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.6e+49) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8.6e+49: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.6e+49) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -8.6e+49) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.6e+49], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -8.5999999999999998e49Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 48.7%
if -8.5999999999999998e49 < x Initial program 99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Taylor expanded in z around 0 80.8%
fma-udef80.8%
metadata-eval80.8%
sub-neg80.8%
+-commutative80.8%
sub-neg80.8%
metadata-eval80.8%
Applied egg-rr80.8%
Taylor expanded in y around inf 26.2%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 25.1%
Final simplification25.1%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2023240
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))