
(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 (+ (* 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) {
return (z * (1.0 - log(t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(1.0 - log(t))) + fma(Float64(a + -0.5), b, Float64(x + y))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(1 - \log t\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= (- a 0.5) -1e+42)
(+ x (+ y (* a b)))
(if (<= (- a 0.5) -0.4)
(- (+ x (+ y (+ z (* -0.5 b)))) (* z (log t)))
(+ x (+ y (* (+ a -0.5) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a - 0.5) <= -1e+42) {
tmp = x + (y + (a * b));
} else if ((a - 0.5) <= -0.4) {
tmp = (x + (y + (z + (-0.5 * b)))) - (z * log(t));
} else {
tmp = x + (y + ((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 ((a - 0.5d0) <= (-1d+42)) then
tmp = x + (y + (a * b))
else if ((a - 0.5d0) <= (-0.4d0)) then
tmp = (x + (y + (z + ((-0.5d0) * b)))) - (z * log(t))
else
tmp = x + (y + ((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 ((a - 0.5) <= -1e+42) {
tmp = x + (y + (a * b));
} else if ((a - 0.5) <= -0.4) {
tmp = (x + (y + (z + (-0.5 * b)))) - (z * Math.log(t));
} else {
tmp = x + (y + ((a + -0.5) * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a - 0.5) <= -1e+42: tmp = x + (y + (a * b)) elif (a - 0.5) <= -0.4: tmp = (x + (y + (z + (-0.5 * b)))) - (z * math.log(t)) else: tmp = x + (y + ((a + -0.5) * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a - 0.5) <= -1e+42) tmp = Float64(x + Float64(y + Float64(a * b))); elseif (Float64(a - 0.5) <= -0.4) tmp = Float64(Float64(x + Float64(y + Float64(z + Float64(-0.5 * b)))) - Float64(z * log(t))); else tmp = Float64(x + Float64(y + Float64(Float64(a + -0.5) * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a - 0.5) <= -1e+42) tmp = x + (y + (a * b)); elseif ((a - 0.5) <= -0.4) tmp = (x + (y + (z + (-0.5 * b)))) - (z * log(t)); else tmp = x + (y + ((a + -0.5) * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a - 0.5), $MachinePrecision], -1e+42], N[(x + N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4], N[(N[(x + N[(y + N[(z + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -1 \cdot 10^{+42}:\\
\;\;\;\;x + \left(y + a \cdot b\right)\\
\mathbf{elif}\;a - 0.5 \leq -0.4:\\
\;\;\;\;\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(a + -0.5\right) \cdot b\right)\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -1.00000000000000004e42Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 89.1%
Taylor expanded in a around inf 89.1%
*-commutative89.1%
Simplified89.1%
if -1.00000000000000004e42 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 98.6%
if -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.8%
Taylor expanded in z around 0 84.3%
+-commutative84.3%
distribute-rgt-in84.3%
Simplified84.3%
Final simplification92.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.45e+183) (not (<= z 8e+73))) (+ (* (+ a -0.5) b) (- z (* z (log t)))) (+ x (+ y (+ (* a b) (* -0.5 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.45e+183) || !(z <= 8e+73)) {
tmp = ((a + -0.5) * b) + (z - (z * log(t)));
} else {
tmp = x + (y + ((a * b) + (-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 ((z <= (-1.45d+183)) .or. (.not. (z <= 8d+73))) then
tmp = ((a + (-0.5d0)) * b) + (z - (z * log(t)))
else
tmp = x + (y + ((a * b) + ((-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 ((z <= -1.45e+183) || !(z <= 8e+73)) {
tmp = ((a + -0.5) * b) + (z - (z * Math.log(t)));
} else {
tmp = x + (y + ((a * b) + (-0.5 * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.45e+183) or not (z <= 8e+73): tmp = ((a + -0.5) * b) + (z - (z * math.log(t))) else: tmp = x + (y + ((a * b) + (-0.5 * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.45e+183) || !(z <= 8e+73)) tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(z - Float64(z * log(t)))); else tmp = Float64(x + Float64(y + Float64(Float64(a * b) + Float64(-0.5 * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.45e+183) || ~((z <= 8e+73))) tmp = ((a + -0.5) * b) + (z - (z * log(t))); else tmp = x + (y + ((a * b) + (-0.5 * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.45e+183], N[Not[LessEqual[z, 8e+73]], $MachinePrecision]], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+183} \lor \neg \left(z \leq 8 \cdot 10^{+73}\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(z - z \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(a \cdot b + -0.5 \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -1.45e183 or 7.99999999999999986e73 < z Initial program 99.6%
associate-+l-99.6%
+-commutative99.6%
associate-+l-99.6%
+-commutative99.6%
associate-+l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 85.1%
if -1.45e183 < z < 7.99999999999999986e73Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around 0 94.5%
Final simplification92.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.1e+183) (not (<= z 8e+73))) (+ (* z (- 1.0 (log t))) (* a b)) (+ x (+ y (+ (* a b) (* -0.5 b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.1e+183) || !(z <= 8e+73)) {
tmp = (z * (1.0 - log(t))) + (a * b);
} else {
tmp = x + (y + ((a * b) + (-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 ((z <= (-1.1d+183)) .or. (.not. (z <= 8d+73))) then
tmp = (z * (1.0d0 - log(t))) + (a * b)
else
tmp = x + (y + ((a * b) + ((-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 ((z <= -1.1e+183) || !(z <= 8e+73)) {
tmp = (z * (1.0 - Math.log(t))) + (a * b);
} else {
tmp = x + (y + ((a * b) + (-0.5 * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.1e+183) or not (z <= 8e+73): tmp = (z * (1.0 - math.log(t))) + (a * b) else: tmp = x + (y + ((a * b) + (-0.5 * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.1e+183) || !(z <= 8e+73)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(a * b)); else tmp = Float64(x + Float64(y + Float64(Float64(a * b) + Float64(-0.5 * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.1e+183) || ~((z <= 8e+73))) tmp = (z * (1.0 - log(t))) + (a * b); else tmp = x + (y + ((a * b) + (-0.5 * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.1e+183], N[Not[LessEqual[z, 8e+73]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+183} \lor \neg \left(z \leq 8 \cdot 10^{+73}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(a \cdot b + -0.5 \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -1.09999999999999995e183 or 7.99999999999999986e73 < z Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 78.0%
*-commutative78.0%
Simplified78.0%
if -1.09999999999999995e183 < z < 7.99999999999999986e73Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around 0 94.5%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8.5e+182)
(+ (* z (- 1.0 (log t))) (* a b))
(if (<= z 8.8e+120)
(+ x (+ y (+ (* a b) (* -0.5 b))))
(- (+ x (+ z y)) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+182) {
tmp = (z * (1.0 - log(t))) + (a * b);
} else if (z <= 8.8e+120) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = (x + (z + y)) - (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 <= (-8.5d+182)) then
tmp = (z * (1.0d0 - log(t))) + (a * b)
else if (z <= 8.8d+120) then
tmp = x + (y + ((a * b) + ((-0.5d0) * b)))
else
tmp = (x + (z + y)) - (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 <= -8.5e+182) {
tmp = (z * (1.0 - Math.log(t))) + (a * b);
} else if (z <= 8.8e+120) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = (x + (z + y)) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.5e+182: tmp = (z * (1.0 - math.log(t))) + (a * b) elif z <= 8.8e+120: tmp = x + (y + ((a * b) + (-0.5 * b))) else: tmp = (x + (z + y)) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.5e+182) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(a * b)); elseif (z <= 8.8e+120) tmp = Float64(x + Float64(y + Float64(Float64(a * b) + Float64(-0.5 * b)))); else tmp = Float64(Float64(x + Float64(z + y)) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8.5e+182) tmp = (z * (1.0 - log(t))) + (a * b); elseif (z <= 8.8e+120) tmp = x + (y + ((a * b) + (-0.5 * b))); else tmp = (x + (z + y)) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+182], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+120], N[(x + N[(y + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + a \cdot b\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+120}:\\
\;\;\;\;x + \left(y + \left(a \cdot b + -0.5 \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + y\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if z < -8.5e182Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around inf 75.1%
*-commutative75.1%
Simplified75.1%
if -8.5e182 < z < 8.8000000000000005e120Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 93.3%
if 8.8000000000000005e120 < z Initial program 99.7%
associate-+l-99.7%
+-commutative99.7%
associate-+l-99.7%
+-commutative99.7%
associate-+l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 84.5%
Final simplification90.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (+ a -0.5) b))) (if (<= y 9.5e+55) (- (+ t_1 (+ z x)) (* z (log t))) (+ x (+ y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + -0.5) * b;
double tmp;
if (y <= 9.5e+55) {
tmp = (t_1 + (z + x)) - (z * log(t));
} else {
tmp = x + (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 = (a + (-0.5d0)) * b
if (y <= 9.5d+55) then
tmp = (t_1 + (z + x)) - (z * log(t))
else
tmp = x + (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 = (a + -0.5) * b;
double tmp;
if (y <= 9.5e+55) {
tmp = (t_1 + (z + x)) - (z * Math.log(t));
} else {
tmp = x + (y + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + -0.5) * b tmp = 0 if y <= 9.5e+55: tmp = (t_1 + (z + x)) - (z * math.log(t)) else: tmp = x + (y + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + -0.5) * b) tmp = 0.0 if (y <= 9.5e+55) tmp = Float64(Float64(t_1 + Float64(z + x)) - Float64(z * log(t))); else tmp = Float64(x + Float64(y + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + -0.5) * b; tmp = 0.0; if (y <= 9.5e+55) tmp = (t_1 + (z + x)) - (z * log(t)); else tmp = x + (y + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[y, 9.5e+55], N[(N[(t$95$1 + N[(z + x), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;y \leq 9.5 \cdot 10^{+55}:\\
\;\;\;\;\left(t\_1 + \left(z + x\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + t\_1\right)\\
\end{array}
\end{array}
if y < 9.49999999999999989e55Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 84.4%
associate-+r+84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
if 9.49999999999999989e55 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 94.8%
+-commutative94.8%
distribute-rgt-in94.8%
Simplified94.8%
Final simplification86.6%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ x (+ z y)) (* z (log t))) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (z + y)) - (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 + (z + y)) - (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 + (z + y)) - (z * Math.log(t))) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + (z + y)) - (z * math.log(t))) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(z + y)) - Float64(z * log(t))) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (z + y)) - (z * log(t))) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + \left(z + y\right)\right) - z \cdot \log t\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.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 (if (<= z 8.2e+121) (+ x (+ y (+ (* a b) (* -0.5 b)))) (- (+ z x) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 8.2e+121) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = (z + x) - (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 <= 8.2d+121) then
tmp = x + (y + ((a * b) + ((-0.5d0) * b)))
else
tmp = (z + x) - (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 <= 8.2e+121) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = (z + x) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 8.2e+121: tmp = x + (y + ((a * b) + (-0.5 * b))) else: tmp = (z + x) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 8.2e+121) tmp = Float64(x + Float64(y + Float64(Float64(a * b) + Float64(-0.5 * b)))); else tmp = Float64(Float64(z + x) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 8.2e+121) tmp = x + (y + ((a * b) + (-0.5 * b))); else tmp = (z + x) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 8.2e+121], N[(x + N[(y + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + x), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 8.2 \cdot 10^{+121}:\\
\;\;\;\;x + \left(y + \left(a \cdot b + -0.5 \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + x\right) - z \cdot \log t\\
\end{array}
\end{array}
if z < 8.2e121Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 89.2%
if 8.2e121 < z Initial program 99.7%
associate-+l-99.7%
+-commutative99.7%
associate-+l-99.7%
+-commutative99.7%
associate-+l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 84.5%
Taylor expanded in y around 0 71.6%
+-commutative71.6%
Simplified71.6%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z 7.8e+121) (+ x (+ y (+ (* a b) (* -0.5 b)))) (+ (* z (- 1.0 (log t))) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 7.8e+121) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = (z * (1.0 - log(t))) + x;
}
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 <= 7.8d+121) then
tmp = x + (y + ((a * b) + ((-0.5d0) * b)))
else
tmp = (z * (1.0d0 - log(t))) + x
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 <= 7.8e+121) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = (z * (1.0 - Math.log(t))) + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 7.8e+121: tmp = x + (y + ((a * b) + (-0.5 * b))) else: tmp = (z * (1.0 - math.log(t))) + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 7.8e+121) tmp = Float64(x + Float64(y + Float64(Float64(a * b) + Float64(-0.5 * b)))); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 7.8e+121) tmp = x + (y + ((a * b) + (-0.5 * b))); else tmp = (z * (1.0 - log(t))) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 7.8e+121], N[(x + N[(y + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 7.8 \cdot 10^{+121}:\\
\;\;\;\;x + \left(y + \left(a \cdot b + -0.5 \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + x\\
\end{array}
\end{array}
if z < 7.79999999999999967e121Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 89.2%
if 7.79999999999999967e121 < z Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 71.6%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z 1.35e+167) (+ x (+ y (+ (* a b) (* -0.5 b)))) (* z (- 1.0 (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.35e+167) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = 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 <= 1.35d+167) then
tmp = x + (y + ((a * b) + ((-0.5d0) * b)))
else
tmp = 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 <= 1.35e+167) {
tmp = x + (y + ((a * b) + (-0.5 * b)));
} else {
tmp = z * (1.0 - Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 1.35e+167: tmp = x + (y + ((a * b) + (-0.5 * b))) else: tmp = z * (1.0 - math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.35e+167) tmp = Float64(x + Float64(y + Float64(Float64(a * b) + Float64(-0.5 * b)))); else tmp = 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 <= 1.35e+167) tmp = x + (y + ((a * b) + (-0.5 * b))); else tmp = z * (1.0 - log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.35e+167], N[(x + N[(y + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.35 \cdot 10^{+167}:\\
\;\;\;\;x + \left(y + \left(a \cdot b + -0.5 \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < 1.35000000000000003e167Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 88.0%
if 1.35000000000000003e167 < z Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 81.0%
Taylor expanded in z around inf 81.0%
Final simplification87.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6e-146) (not (<= b 1.75e-29))) (+ x (* b (- a 0.5))) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6e-146) || !(b <= 1.75e-29)) {
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 ((b <= (-6d-146)) .or. (.not. (b <= 1.75d-29))) 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 ((b <= -6e-146) || !(b <= 1.75e-29)) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6e-146) or not (b <= 1.75e-29): tmp = x + (b * (a - 0.5)) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6e-146) || !(b <= 1.75e-29)) 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 ((b <= -6e-146) || ~((b <= 1.75e-29))) tmp = x + (b * (a - 0.5)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6e-146], N[Not[LessEqual[b, 1.75e-29]], $MachinePrecision]], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{-146} \lor \neg \left(b \leq 1.75 \cdot 10^{-29}\right):\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -6.00000000000000038e-146 or 1.7499999999999999e-29 < b Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 85.6%
associate-+r+85.6%
+-commutative85.6%
sub-neg85.6%
metadata-eval85.6%
+-commutative85.6%
Simplified85.6%
Taylor expanded in z around 0 73.4%
if -6.00000000000000038e-146 < b < 1.7499999999999999e-29Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.8%
Taylor expanded in z around 0 74.0%
Taylor expanded in b around 0 67.2%
+-commutative67.2%
Simplified67.2%
Final simplification71.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.35e+42) (not (<= b 3.2e+111))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.35e+42) || !(b <= 3.2e+111)) {
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 <= (-1.35d+42)) .or. (.not. (b <= 3.2d+111))) 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 <= -1.35e+42) || !(b <= 3.2e+111)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.35e+42) or not (b <= 3.2e+111): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.35e+42) || !(b <= 3.2e+111)) 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 <= -1.35e+42) || ~((b <= 3.2e+111))) 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, -1.35e+42], N[Not[LessEqual[b, 3.2e+111]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{+42} \lor \neg \left(b \leq 3.2 \cdot 10^{+111}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -1.35e42 or 3.2000000000000001e111 < b Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around 0 94.0%
Taylor expanded in b around inf 81.5%
if -1.35e42 < b < 3.2000000000000001e111Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in z around 0 75.7%
Taylor expanded in b around 0 59.4%
+-commutative59.4%
Simplified59.4%
Final simplification67.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.7e+85) (not (<= a 1.4e+95))) (* a b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.7e+85) || !(a <= 1.4e+95)) {
tmp = a * b;
} 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 ((a <= (-1.7d+85)) .or. (.not. (a <= 1.4d+95))) then
tmp = a * b
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 ((a <= -1.7e+85) || !(a <= 1.4e+95)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.7e+85) or not (a <= 1.4e+95): tmp = a * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.7e+85) || !(a <= 1.4e+95)) tmp = Float64(a * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.7e+85) || ~((a <= 1.4e+95))) tmp = a * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.7e+85], N[Not[LessEqual[a, 1.4e+95]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+85} \lor \neg \left(a \leq 1.4 \cdot 10^{+95}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.7000000000000002e85 or 1.3999999999999999e95 < a Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 85.0%
Taylor expanded in a around inf 63.5%
*-commutative63.5%
Simplified63.5%
if -1.7000000000000002e85 < a < 1.3999999999999999e95Initial program 99.9%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 80.7%
Taylor expanded in b around 0 55.7%
+-commutative55.7%
Simplified55.7%
Final simplification58.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.3e-280) x (if (<= y 6.5e+127) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.3e-280) {
tmp = x;
} else if (y <= 6.5e+127) {
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 (y <= (-4.3d-280)) then
tmp = x
else if (y <= 6.5d+127) 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 (y <= -4.3e-280) {
tmp = x;
} else if (y <= 6.5e+127) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.3e-280: tmp = x elif y <= 6.5e+127: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.3e-280) tmp = x; elseif (y <= 6.5e+127) 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 (y <= -4.3e-280) tmp = x; elseif (y <= 6.5e+127) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.3e-280], x, If[LessEqual[y, 6.5e+127], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{-280}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+127}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -4.2999999999999999e-280Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 34.6%
Taylor expanded in z around 0 19.1%
if -4.2999999999999999e-280 < y < 6.5e127Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 75.8%
Taylor expanded in a around inf 31.6%
*-commutative31.6%
Simplified31.6%
if 6.5e127 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in y around inf 56.5%
Final simplification28.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 3.1e+100) (+ x (* b (- a 0.5))) (+ x (+ y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 3.1e+100) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (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 (y <= 3.1d+100) then
tmp = x + (b * (a - 0.5d0))
else
tmp = x + (y + (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 (y <= 3.1e+100) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 3.1e+100: tmp = x + (b * (a - 0.5)) else: tmp = x + (y + (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 3.1e+100) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 3.1e+100) tmp = x + (b * (a - 0.5)); else tmp = x + (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 3.1e+100], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.1 \cdot 10^{+100}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if y < 3.10000000000000007e100Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 84.8%
associate-+r+84.8%
+-commutative84.8%
sub-neg84.8%
metadata-eval84.8%
+-commutative84.8%
Simplified84.8%
Taylor expanded in z around 0 64.8%
if 3.10000000000000007e100 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 95.6%
Taylor expanded in a around inf 91.0%
*-commutative91.0%
Simplified91.0%
Final simplification69.1%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (+ (* a b) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((a * b) + (-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 + ((a * b) + ((-0.5d0) * b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((a * b) + (-0.5 * b)));
}
def code(x, y, z, t, a, b): return x + (y + ((a * b) + (-0.5 * b)))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(Float64(a * b) + Float64(-0.5 * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + ((a * b) + (-0.5 * b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + \left(a \cdot b + -0.5 \cdot b\right)\right)
\end{array}
Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 82.4%
Final simplification82.4%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (* (+ a -0.5) b))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((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 + ((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 + ((a + -0.5) * b));
}
def code(x, y, z, t, a, b): return x + (y + ((a + -0.5) * b))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(Float64(a + -0.5) * b))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + ((a + -0.5) * b)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + \left(a + -0.5\right) \cdot b\right)
\end{array}
Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in z around 0 82.4%
+-commutative82.4%
distribute-rgt-in82.4%
Simplified82.4%
Final simplification82.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.55e-5) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.55e-5) {
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.55d-5) 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.55e-5) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.55e-5: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.55e-5) 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.55e-5) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.55e-5], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.55000000000000007e-5Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 41.2%
Taylor expanded in z around 0 22.4%
if 1.55000000000000007e-5 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in y around inf 40.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%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 39.2%
Taylor expanded in z around 0 22.3%
(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 2024145
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))