
(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 19 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 (- y (- (- (* z (+ -1.0 (log t))) (* b a)) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y - (((z * (-1.0 + log(t))) - (b * 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 * ((-1.0d0) + log(t))) - (b * 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 * (-1.0 + Math.log(t))) - (b * a)) - (-0.5 * b)));
}
def code(x, y, z, t, a, b): return x + (y - (((z * (-1.0 + math.log(t))) - (b * a)) - (-0.5 * b)))
function code(x, y, z, t, a, b) return Float64(x + Float64(y - Float64(Float64(Float64(z * Float64(-1.0 + log(t))) - Float64(b * a)) - Float64(-0.5 * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y - (((z * (-1.0 + log(t))) - (b * a)) - (-0.5 * b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y - N[(N[(N[(z * N[(-1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * a), $MachinePrecision]), $MachinePrecision] - N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \left(\left(z \cdot \left(-1 + \log t\right) - b \cdot a\right) - -0.5 \cdot b\right)\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y 7.2e+29) (- (+ (* b (+ -0.5 a)) (+ x z)) (* z (log t))) (- y (- (- (* z (+ -1.0 (log t))) (* b a)) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 7.2e+29) {
tmp = ((b * (-0.5 + a)) + (x + z)) - (z * log(t));
} else {
tmp = y - (((z * (-1.0 + log(t))) - (b * a)) - (-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) :: tmp
if (y <= 7.2d+29) then
tmp = ((b * ((-0.5d0) + a)) + (x + z)) - (z * log(t))
else
tmp = y - (((z * ((-1.0d0) + log(t))) - (b * a)) - ((-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 tmp;
if (y <= 7.2e+29) {
tmp = ((b * (-0.5 + a)) + (x + z)) - (z * Math.log(t));
} else {
tmp = y - (((z * (-1.0 + Math.log(t))) - (b * a)) - (-0.5 * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 7.2e+29: tmp = ((b * (-0.5 + a)) + (x + z)) - (z * math.log(t)) else: tmp = y - (((z * (-1.0 + math.log(t))) - (b * a)) - (-0.5 * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 7.2e+29) tmp = Float64(Float64(Float64(b * Float64(-0.5 + a)) + Float64(x + z)) - Float64(z * log(t))); else tmp = Float64(y - Float64(Float64(Float64(z * Float64(-1.0 + log(t))) - Float64(b * a)) - Float64(-0.5 * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 7.2e+29) tmp = ((b * (-0.5 + a)) + (x + z)) - (z * log(t)); else tmp = y - (((z * (-1.0 + log(t))) - (b * a)) - (-0.5 * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 7.2e+29], N[(N[(N[(b * N[(-0.5 + a), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(N[(N[(z * N[(-1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * a), $MachinePrecision]), $MachinePrecision] - N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.2 \cdot 10^{+29}:\\
\;\;\;\;\left(b \cdot \left(-0.5 + a\right) + \left(x + z\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;y - \left(\left(z \cdot \left(-1 + \log t\right) - b \cdot a\right) - -0.5 \cdot b\right)\\
\end{array}
\end{array}
if y < 7.19999999999999952e29Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 87.2%
associate-+r+87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
if 7.19999999999999952e29 < y Initial program 99.9%
+-commutative99.9%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
associate--l+100.0%
associate-+l+100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in x around 0 88.1%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -0.00145)
(fma (+ -0.5 a) b (+ x y))
(if (<= b 2.6e-145)
(+ x (- y (* z (+ -1.0 (log t)))))
(+ x (+ y (+ (* -0.5 b) (* b a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -0.00145) {
tmp = fma((-0.5 + a), b, (x + y));
} else if (b <= 2.6e-145) {
tmp = x + (y - (z * (-1.0 + log(t))));
} else {
tmp = x + (y + ((-0.5 * b) + (b * a)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -0.00145) tmp = fma(Float64(-0.5 + a), b, Float64(x + y)); elseif (b <= 2.6e-145) tmp = Float64(x + Float64(y - Float64(z * Float64(-1.0 + log(t))))); else tmp = Float64(x + Float64(y + Float64(Float64(-0.5 * b) + Float64(b * a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -0.00145], N[(N[(-0.5 + a), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e-145], N[(x + N[(y - N[(z * N[(-1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.00145:\\
\;\;\;\;\mathsf{fma}\left(-0.5 + a, b, x + y\right)\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-145}:\\
\;\;\;\;x + \left(y - z \cdot \left(-1 + \log t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\
\end{array}
\end{array}
if b < -0.00145Initial program 100.0%
associate-+l-100.0%
associate-+l+100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
neg-mul-1100.0%
neg-mul-1100.0%
distribute-rgt-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 93.0%
associate-+r+93.0%
sub-neg93.0%
metadata-eval93.0%
*-commutative93.0%
+-commutative93.0%
fma-define93.0%
+-commutative93.0%
Simplified93.0%
if -0.00145 < b < 2.6e-145Initial program 99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
associate--l+99.8%
associate-+l+99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 95.0%
if 2.6e-145 < b Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 83.1%
sub-neg83.1%
metadata-eval83.1%
+-commutative83.1%
distribute-rgt-in83.1%
*-commutative83.1%
Applied egg-rr83.1%
Final simplification90.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.05e+77) (- (+ (* b (+ -0.5 a)) (+ x z)) (* z (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 (y <= 1.05e+77) {
tmp = ((b * (-0.5 + a)) + (x + z)) - (z * 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 (y <= 1.05d+77) then
tmp = ((b * ((-0.5d0) + a)) + (x + z)) - (z * 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 (y <= 1.05e+77) {
tmp = ((b * (-0.5 + a)) + (x + z)) - (z * Math.log(t));
} else {
tmp = x + (y + (b * (a - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.05e+77: tmp = ((b * (-0.5 + a)) + (x + z)) - (z * 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 (y <= 1.05e+77) tmp = Float64(Float64(Float64(b * Float64(-0.5 + a)) + Float64(x + z)) - Float64(z * log(t))); else tmp = Float64(x + Float64(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 (y <= 1.05e+77) tmp = ((b * (-0.5 + a)) + (x + z)) - (z * log(t)); else tmp = x + (y + (b * (a - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.05e+77], N[(N[(N[(b * N[(-0.5 + a), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.05 \cdot 10^{+77}:\\
\;\;\;\;\left(b \cdot \left(-0.5 + a\right) + \left(x + z\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\end{array}
\end{array}
if y < 1.0499999999999999e77Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 87.8%
associate-+r+87.8%
sub-neg87.8%
metadata-eval87.8%
Simplified87.8%
if 1.0499999999999999e77 < y Initial program 100.0%
associate-+l-100.0%
associate-+l+100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
neg-mul-1100.0%
neg-mul-1100.0%
distribute-rgt-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 91.1%
Final simplification88.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5e+230) (not (<= z 5e+139))) (- x (* z (+ -1.0 (log t)))) (+ x (+ y (+ (* -0.5 b) (* b a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5e+230) || !(z <= 5e+139)) {
tmp = x - (z * (-1.0 + log(t)));
} else {
tmp = x + (y + ((-0.5 * b) + (b * a)));
}
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 <= (-5d+230)) .or. (.not. (z <= 5d+139))) then
tmp = x - (z * ((-1.0d0) + log(t)))
else
tmp = x + (y + (((-0.5d0) * b) + (b * a)))
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 <= -5e+230) || !(z <= 5e+139)) {
tmp = x - (z * (-1.0 + Math.log(t)));
} else {
tmp = x + (y + ((-0.5 * b) + (b * a)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5e+230) or not (z <= 5e+139): tmp = x - (z * (-1.0 + math.log(t))) else: tmp = x + (y + ((-0.5 * b) + (b * a))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5e+230) || !(z <= 5e+139)) tmp = Float64(x - Float64(z * Float64(-1.0 + log(t)))); else tmp = Float64(x + Float64(y + Float64(Float64(-0.5 * b) + Float64(b * a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5e+230) || ~((z <= 5e+139))) tmp = x - (z * (-1.0 + log(t))); else tmp = x + (y + ((-0.5 * b) + (b * a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5e+230], N[Not[LessEqual[z, 5e+139]], $MachinePrecision]], N[(x - N[(z * N[(-1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+230} \lor \neg \left(z \leq 5 \cdot 10^{+139}\right):\\
\;\;\;\;x - z \cdot \left(-1 + \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\
\end{array}
\end{array}
if z < -5.0000000000000003e230 or 5.0000000000000003e139 < z Initial program 99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
associate--l+99.7%
associate-+l+99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 81.4%
Taylor expanded in y around 0 71.8%
if -5.0000000000000003e230 < z < 5.0000000000000003e139Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 92.9%
sub-neg92.9%
metadata-eval92.9%
+-commutative92.9%
distribute-rgt-in92.9%
*-commutative92.9%
Applied egg-rr92.9%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.2e+229)
(- x (* z (+ -1.0 (log t))))
(if (<= z 5e+139)
(+ x (+ y (+ (* -0.5 b) (* b a))))
(- (+ x z) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+229) {
tmp = x - (z * (-1.0 + log(t)));
} else if (z <= 5e+139) {
tmp = x + (y + ((-0.5 * b) + (b * a)));
} else {
tmp = (x + z) - (z * 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 <= (-3.2d+229)) then
tmp = x - (z * ((-1.0d0) + log(t)))
else if (z <= 5d+139) then
tmp = x + (y + (((-0.5d0) * b) + (b * a)))
else
tmp = (x + z) - (z * 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 <= -3.2e+229) {
tmp = x - (z * (-1.0 + Math.log(t)));
} else if (z <= 5e+139) {
tmp = x + (y + ((-0.5 * b) + (b * a)));
} else {
tmp = (x + z) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.2e+229: tmp = x - (z * (-1.0 + math.log(t))) elif z <= 5e+139: tmp = x + (y + ((-0.5 * b) + (b * a))) else: tmp = (x + z) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e+229) tmp = Float64(x - Float64(z * Float64(-1.0 + log(t)))); elseif (z <= 5e+139) tmp = Float64(x + Float64(y + Float64(Float64(-0.5 * b) + Float64(b * a)))); else tmp = Float64(Float64(x + z) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.2e+229) tmp = x - (z * (-1.0 + log(t))); elseif (z <= 5e+139) tmp = x + (y + ((-0.5 * b) + (b * a))); else tmp = (x + z) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e+229], N[(x - N[(z * N[(-1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+139], N[(x + N[(y + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+229}:\\
\;\;\;\;x - z \cdot \left(-1 + \log t\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+139}:\\
\;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z\right) - z \cdot \log t\\
\end{array}
\end{array}
if z < -3.1999999999999998e229Initial program 99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
associate--l+99.6%
associate-+l+99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 86.0%
Taylor expanded in y around 0 76.9%
if -3.1999999999999998e229 < z < 5.0000000000000003e139Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 92.9%
sub-neg92.9%
metadata-eval92.9%
+-commutative92.9%
distribute-rgt-in92.9%
*-commutative92.9%
Applied egg-rr92.9%
if 5.0000000000000003e139 < z Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 79.1%
+-commutative79.1%
Simplified79.1%
Taylor expanded in y around 0 69.1%
Final simplification87.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.4e+234) (not (<= z 5e+139))) (* z (- 1.0 (log t))) (+ x (+ y (+ (* -0.5 b) (* b a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+234) || !(z <= 5e+139)) {
tmp = z * (1.0 - log(t));
} else {
tmp = x + (y + ((-0.5 * b) + (b * a)));
}
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 <= (-5.4d+234)) .or. (.not. (z <= 5d+139))) then
tmp = z * (1.0d0 - log(t))
else
tmp = x + (y + (((-0.5d0) * b) + (b * a)))
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 <= -5.4e+234) || !(z <= 5e+139)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = x + (y + ((-0.5 * b) + (b * a)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e+234) or not (z <= 5e+139): tmp = z * (1.0 - math.log(t)) else: tmp = x + (y + ((-0.5 * b) + (b * a))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e+234) || !(z <= 5e+139)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(x + Float64(y + Float64(Float64(-0.5 * b) + Float64(b * a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e+234) || ~((z <= 5e+139))) tmp = z * (1.0 - log(t)); else tmp = x + (y + ((-0.5 * b) + (b * a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e+234], N[Not[LessEqual[z, 5e+139]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+234} \lor \neg \left(z \leq 5 \cdot 10^{+139}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\
\end{array}
\end{array}
if z < -5.4000000000000003e234 or 5.0000000000000003e139 < z Initial program 99.7%
associate-+l-99.7%
associate-+l+99.7%
remove-double-neg99.7%
distribute-rgt-neg-out99.7%
neg-mul-199.7%
neg-mul-199.7%
distribute-rgt-neg-out99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 63.1%
if -5.4000000000000003e234 < z < 5.0000000000000003e139Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 92.5%
sub-neg92.5%
metadata-eval92.5%
+-commutative92.5%
distribute-rgt-in92.5%
*-commutative92.5%
Applied egg-rr92.5%
Final simplification85.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.85e+235)
(* z (- 1.0 (log t)))
(if (<= z 1.55e+139)
(+ x (+ y (+ (* -0.5 b) (* b a))))
(- z (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.85e+235) {
tmp = z * (1.0 - log(t));
} else if (z <= 1.55e+139) {
tmp = x + (y + ((-0.5 * b) + (b * a)));
} else {
tmp = z - (z * 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 <= (-1.85d+235)) then
tmp = z * (1.0d0 - log(t))
else if (z <= 1.55d+139) then
tmp = x + (y + (((-0.5d0) * b) + (b * a)))
else
tmp = z - (z * 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 <= -1.85e+235) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 1.55e+139) {
tmp = x + (y + ((-0.5 * b) + (b * a)));
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.85e+235: tmp = z * (1.0 - math.log(t)) elif z <= 1.55e+139: tmp = x + (y + ((-0.5 * b) + (b * a))) else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.85e+235) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 1.55e+139) tmp = Float64(x + Float64(y + Float64(Float64(-0.5 * b) + Float64(b * a)))); else tmp = Float64(z - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.85e+235) tmp = z * (1.0 - log(t)); elseif (z <= 1.55e+139) tmp = x + (y + ((-0.5 * b) + (b * a))); else tmp = z - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.85e+235], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+139], N[(x + N[(y + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+235}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+139}:\\
\;\;\;\;x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -1.8499999999999999e235Initial program 99.5%
associate-+l-99.5%
associate-+l+99.5%
remove-double-neg99.5%
distribute-rgt-neg-out99.5%
neg-mul-199.5%
neg-mul-199.5%
distribute-rgt-neg-out99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 70.6%
if -1.8499999999999999e235 < z < 1.55e139Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 92.5%
sub-neg92.5%
metadata-eval92.5%
+-commutative92.5%
distribute-rgt-in92.5%
*-commutative92.5%
Applied egg-rr92.5%
if 1.55e139 < z Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 79.1%
+-commutative79.1%
Simplified79.1%
Taylor expanded in z around inf 59.6%
Final simplification85.7%
(FPCore (x y z t a b) :precision binary64 (+ (+ y z) (+ x (- (* b (+ -0.5 a)) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
return (y + z) + (x + ((b * (-0.5 + a)) - (z * log(t))));
}
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 = (y + z) + (x + ((b * ((-0.5d0) + a)) - (z * log(t))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (y + z) + (x + ((b * (-0.5 + a)) - (z * Math.log(t))));
}
def code(x, y, z, t, a, b): return (y + z) + (x + ((b * (-0.5 + a)) - (z * math.log(t))))
function code(x, y, z, t, a, b) return Float64(Float64(y + z) + Float64(x + Float64(Float64(b * Float64(-0.5 + a)) - Float64(z * log(t))))) end
function tmp = code(x, y, z, t, a, b) tmp = (y + z) + (x + ((b * (-0.5 + a)) - (z * log(t)))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + z), $MachinePrecision] + N[(x + N[(N[(b * N[(-0.5 + a), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + z\right) + \left(x + \left(b \cdot \left(-0.5 + a\right) - z \cdot \log t\right)\right)
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
+-commutative99.9%
associate--l+99.9%
+-commutative99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -8.5e-144)
x
(if (<= y 2.75e-137)
(* b a)
(if (<= y 1.15e-17) x (if (<= y 7.5e+93) (* b a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.5e-144) {
tmp = x;
} else if (y <= 2.75e-137) {
tmp = b * a;
} else if (y <= 1.15e-17) {
tmp = x;
} else if (y <= 7.5e+93) {
tmp = b * a;
} 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 (y <= (-8.5d-144)) then
tmp = x
else if (y <= 2.75d-137) then
tmp = b * a
else if (y <= 1.15d-17) then
tmp = x
else if (y <= 7.5d+93) then
tmp = b * a
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 (y <= -8.5e-144) {
tmp = x;
} else if (y <= 2.75e-137) {
tmp = b * a;
} else if (y <= 1.15e-17) {
tmp = x;
} else if (y <= 7.5e+93) {
tmp = b * a;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.5e-144: tmp = x elif y <= 2.75e-137: tmp = b * a elif y <= 1.15e-17: tmp = x elif y <= 7.5e+93: tmp = b * a else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.5e-144) tmp = x; elseif (y <= 2.75e-137) tmp = Float64(b * a); elseif (y <= 1.15e-17) tmp = x; elseif (y <= 7.5e+93) tmp = Float64(b * a); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.5e-144) tmp = x; elseif (y <= 2.75e-137) tmp = b * a; elseif (y <= 1.15e-17) tmp = x; elseif (y <= 7.5e+93) tmp = b * a; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.5e-144], x, If[LessEqual[y, 2.75e-137], N[(b * a), $MachinePrecision], If[LessEqual[y, 1.15e-17], x, If[LessEqual[y, 7.5e+93], N[(b * a), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-144}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-137}:\\
\;\;\;\;b \cdot a\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+93}:\\
\;\;\;\;b \cdot a\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -8.49999999999999958e-144 or 2.7500000000000001e-137 < y < 1.15000000000000004e-17Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 27.4%
if -8.49999999999999958e-144 < y < 2.7500000000000001e-137 or 1.15000000000000004e-17 < y < 7.5000000000000002e93Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 38.6%
*-commutative38.6%
Simplified38.6%
if 7.5000000000000002e93 < y Initial program 100.0%
associate-+l-100.0%
associate-+l+100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
neg-mul-1100.0%
neg-mul-1100.0%
distribute-rgt-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 63.8%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -24000000.0) (not (<= b 5.4e-48))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -24000000.0) || !(b <= 5.4e-48)) {
tmp = b * (a - 0.5);
} 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) :: tmp
if ((b <= (-24000000.0d0)) .or. (.not. (b <= 5.4d-48))) then
tmp = b * (a - 0.5d0)
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 tmp;
if ((b <= -24000000.0) || !(b <= 5.4e-48)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -24000000.0) or not (b <= 5.4e-48): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -24000000.0) || !(b <= 5.4e-48)) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -24000000.0) || ~((b <= 5.4e-48))) tmp = b * (a - 0.5); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -24000000.0], N[Not[LessEqual[b, 5.4e-48]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -24000000 \lor \neg \left(b \leq 5.4 \cdot 10^{-48}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -2.4e7 or 5.40000000000000023e-48 < b Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 65.3%
if -2.4e7 < b < 5.40000000000000023e-48Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 70.4%
Taylor expanded in b around 0 61.6%
+-commutative61.6%
Simplified61.6%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -38000000.0) (not (<= b 5.4e-48))) (* b a) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -38000000.0) || !(b <= 5.4e-48)) {
tmp = b * a;
} 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) :: tmp
if ((b <= (-38000000.0d0)) .or. (.not. (b <= 5.4d-48))) then
tmp = b * a
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 tmp;
if ((b <= -38000000.0) || !(b <= 5.4e-48)) {
tmp = b * a;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -38000000.0) or not (b <= 5.4e-48): tmp = b * a else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -38000000.0) || !(b <= 5.4e-48)) tmp = Float64(b * a); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -38000000.0) || ~((b <= 5.4e-48))) tmp = b * a; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -38000000.0], N[Not[LessEqual[b, 5.4e-48]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -38000000 \lor \neg \left(b \leq 5.4 \cdot 10^{-48}\right):\\
\;\;\;\;b \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -3.8e7 or 5.40000000000000023e-48 < b Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 45.8%
*-commutative45.8%
Simplified45.8%
if -3.8e7 < b < 5.40000000000000023e-48Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 70.4%
Taylor expanded in b around 0 61.6%
+-commutative61.6%
Simplified61.6%
Final simplification53.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 9.8e+119) (+ x (* b (- a 0.5))) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 9.8e+119) {
tmp = x + (b * (a - 0.5));
} 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) :: tmp
if (y <= 9.8d+119) then
tmp = x + (b * (a - 0.5d0))
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 tmp;
if (y <= 9.8e+119) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 9.8e+119: tmp = x + (b * (a - 0.5)) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 9.8e+119) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 9.8e+119) tmp = x + (b * (a - 0.5)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 9.8e+119], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.8 \cdot 10^{+119}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < 9.79999999999999992e119Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 77.5%
Taylor expanded in y around 0 65.5%
if 9.79999999999999992e119 < y Initial program 100.0%
associate-+l-100.0%
associate-+l+100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
neg-mul-1100.0%
neg-mul-1100.0%
distribute-rgt-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 90.0%
Taylor expanded in b around 0 71.7%
+-commutative71.7%
Simplified71.7%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.75e+100) (+ x (* b (- a 0.5))) (+ x (+ y (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.75e+100) {
tmp = x + (b * (a - 0.5));
} 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) :: tmp
if (y <= 1.75d+100) then
tmp = x + (b * (a - 0.5d0))
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 tmp;
if (y <= 1.75e+100) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (-0.5 * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.75e+100: tmp = x + (b * (a - 0.5)) else: tmp = x + (y + (-0.5 * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.75e+100) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + Float64(y + Float64(-0.5 * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.75e+100) tmp = x + (b * (a - 0.5)); else tmp = x + (y + (-0.5 * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.75e+100], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.75 \cdot 10^{+100}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + -0.5 \cdot b\right)\\
\end{array}
\end{array}
if y < 1.74999999999999988e100Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 77.4%
Taylor expanded in y around 0 65.3%
if 1.74999999999999988e100 < y Initial program 100.0%
associate-+l-100.0%
associate-+l+100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
neg-mul-1100.0%
neg-mul-1100.0%
distribute-rgt-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 90.3%
Taylor expanded in a around 0 75.9%
*-commutative75.9%
Simplified75.9%
Final simplification67.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= y 8.2e+29) (+ 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 (y <= 8.2e+29) {
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 (y <= 8.2d+29) 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 (y <= 8.2e+29) {
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 y <= 8.2e+29: 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 (y <= 8.2e+29) 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 (y <= 8.2e+29) 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[y, 8.2e+29], 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}\;y \leq 8.2 \cdot 10^{+29}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if y < 8.2000000000000007e29Initial program 99.8%
associate-+l-99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
neg-mul-199.8%
neg-mul-199.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 76.8%
Taylor expanded in y around 0 64.5%
if 8.2000000000000007e29 < y Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 89.4%
Taylor expanded in x around 0 77.4%
Final simplification67.1%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (+ (* -0.5 b) (* b a)))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((-0.5 * b) + (b * a)));
}
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 + (((-0.5d0) * b) + (b * a)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((-0.5 * b) + (b * a)));
}
def code(x, y, z, t, a, b): return x + (y + ((-0.5 * b) + (b * a)))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(Float64(-0.5 * b) + Float64(b * a)))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + ((-0.5 * b) + (b * a))); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + \left(-0.5 \cdot b + b \cdot a\right)\right)
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.4%
sub-neg79.4%
metadata-eval79.4%
+-commutative79.4%
distribute-rgt-in79.4%
*-commutative79.4%
Applied egg-rr79.4%
Final simplification79.4%
(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(x + Float64(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[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + b \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.4%
Final simplification79.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.66e+18) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.66e+18) {
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 (y <= 1.66d+18) 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 (y <= 1.66e+18) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.66e+18: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.66e+18) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.66e+18) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.66e+18], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.66 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.66e18Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 25.4%
if 1.66e18 < y Initial program 99.9%
associate-+l-99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 47.8%
Final simplification30.5%
(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%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
neg-mul-199.9%
neg-mul-199.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 22.9%
Final simplification22.9%
(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 2024046
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(+ (+ (+ 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)))