
(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))))) (* (+ 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))))) + ((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))))) + ((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))))) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return (x + (y + (z * (1.0 - math.log(t))))) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(y + Float64(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 + (z * (1.0 - log(t))))) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \left(y + z \cdot \left(1 - \log t\right)\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (+ a -0.5) b))) (if (<= (+ x y) -5e+30) (+ t_1 (+ x y)) (+ t_1 (- (+ y z) (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + -0.5) * b;
double tmp;
if ((x + y) <= -5e+30) {
tmp = t_1 + (x + y);
} else {
tmp = t_1 + ((y + 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) :: t_1
real(8) :: tmp
t_1 = (a + (-0.5d0)) * b
if ((x + y) <= (-5d+30)) then
tmp = t_1 + (x + y)
else
tmp = t_1 + ((y + 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 t_1 = (a + -0.5) * b;
double tmp;
if ((x + y) <= -5e+30) {
tmp = t_1 + (x + y);
} else {
tmp = t_1 + ((y + z) - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + -0.5) * b tmp = 0 if (x + y) <= -5e+30: tmp = t_1 + (x + y) else: tmp = t_1 + ((y + z) - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + -0.5) * b) tmp = 0.0 if (Float64(x + y) <= -5e+30) tmp = Float64(t_1 + Float64(x + y)); else tmp = Float64(t_1 + Float64(Float64(y + z) - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + -0.5) * b; tmp = 0.0; if ((x + y) <= -5e+30) tmp = t_1 + (x + y); else tmp = t_1 + ((y + z) - (z * log(t))); 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[N[(x + y), $MachinePrecision], -5e+30], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(y + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{+30}:\\
\;\;\;\;t_1 + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(\left(y + z\right) - z \cdot \log t\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -4.9999999999999998e30Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 90.2%
if -4.9999999999999998e30 < (+.f64 x y) Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 79.1%
Final simplification83.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ a -0.5) b)))
(if (or (<= z -3.1e+184) (not (<= z 9.5e+174)))
(+ (* z (- 1.0 (log t))) t_1)
(+ t_1 (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + -0.5) * b;
double tmp;
if ((z <= -3.1e+184) || !(z <= 9.5e+174)) {
tmp = (z * (1.0 - log(t))) + t_1;
} else {
tmp = t_1 + (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a + (-0.5d0)) * b
if ((z <= (-3.1d+184)) .or. (.not. (z <= 9.5d+174))) then
tmp = (z * (1.0d0 - log(t))) + t_1
else
tmp = t_1 + (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + -0.5) * b;
double tmp;
if ((z <= -3.1e+184) || !(z <= 9.5e+174)) {
tmp = (z * (1.0 - Math.log(t))) + t_1;
} else {
tmp = t_1 + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + -0.5) * b tmp = 0 if (z <= -3.1e+184) or not (z <= 9.5e+174): tmp = (z * (1.0 - math.log(t))) + t_1 else: tmp = t_1 + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + -0.5) * b) tmp = 0.0 if ((z <= -3.1e+184) || !(z <= 9.5e+174)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + t_1); else tmp = Float64(t_1 + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + -0.5) * b; tmp = 0.0; if ((z <= -3.1e+184) || ~((z <= 9.5e+174))) tmp = (z * (1.0 - log(t))) + t_1; else tmp = t_1 + (x + y); 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[Or[LessEqual[z, -3.1e+184], N[Not[LessEqual[z, 9.5e+174]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+184} \lor \neg \left(z \leq 9.5 \cdot 10^{+174}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + y\right)\\
\end{array}
\end{array}
if z < -3.0999999999999998e184 or 9.4999999999999992e174 < z Initial program 99.6%
remove-double-neg99.6%
distribute-rgt-neg-out99.6%
associate--l+99.6%
distribute-rgt-neg-in99.6%
sub-neg99.6%
metadata-eval99.6%
remove-double-neg99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 89.6%
if -3.0999999999999998e184 < z < 9.4999999999999992e174Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 91.9%
Final simplification91.4%
(FPCore (x y z t a b) :precision binary64 (+ y (- (+ x (+ z (* b (- a 0.5)))) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
return y + ((x + (z + (b * (a - 0.5)))) - (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 + ((x + (z + (b * (a - 0.5d0)))) - (z * log(t)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return y + ((x + (z + (b * (a - 0.5)))) - (z * Math.log(t)));
}
def code(x, y, z, t, a, b): return y + ((x + (z + (b * (a - 0.5)))) - (z * math.log(t)))
function code(x, y, z, t, a, b) return Float64(y + Float64(Float64(x + Float64(z + Float64(b * Float64(a - 0.5)))) - Float64(z * log(t)))) end
function tmp = code(x, y, z, t, a, b) tmp = y + ((x + (z + (b * (a - 0.5)))) - (z * log(t))); end
code[x_, y_, z_, t_, a_, b_] := N[(y + N[(N[(x + N[(z + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y + \left(\left(x + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t\right)
\end{array}
Initial program 99.9%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in b around 0 99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.1e+131) (not (<= z 6e+209))) (+ x (+ y (* z (- 1.0 (log t))))) (+ (* (+ a -0.5) b) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.1e+131) || !(z <= 6e+209)) {
tmp = x + (y + (z * (1.0 - log(t))));
} else {
tmp = ((a + -0.5) * b) + (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 ((z <= (-5.1d+131)) .or. (.not. (z <= 6d+209))) then
tmp = x + (y + (z * (1.0d0 - log(t))))
else
tmp = ((a + (-0.5d0)) * b) + (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 ((z <= -5.1e+131) || !(z <= 6e+209)) {
tmp = x + (y + (z * (1.0 - Math.log(t))));
} else {
tmp = ((a + -0.5) * b) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.1e+131) or not (z <= 6e+209): tmp = x + (y + (z * (1.0 - math.log(t)))) else: tmp = ((a + -0.5) * b) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.1e+131) || !(z <= 6e+209)) tmp = Float64(x + Float64(y + Float64(z * Float64(1.0 - log(t))))); else tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.1e+131) || ~((z <= 6e+209))) tmp = x + (y + (z * (1.0 - log(t)))); else tmp = ((a + -0.5) * b) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.1e+131], N[Not[LessEqual[z, 6e+209]], $MachinePrecision]], N[(x + N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+131} \lor \neg \left(z \leq 6 \cdot 10^{+209}\right):\\
\;\;\;\;x + \left(y + z \cdot \left(1 - \log t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(x + y\right)\\
\end{array}
\end{array}
if z < -5.1000000000000004e131 or 5.99999999999999971e209 < z Initial program 99.6%
remove-double-neg99.6%
distribute-rgt-neg-out99.6%
associate--l+99.6%
distribute-rgt-neg-in99.6%
sub-neg99.6%
metadata-eval99.6%
remove-double-neg99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in b around 0 78.0%
if -5.1000000000000004e131 < z < 5.99999999999999971e209Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 92.0%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.8e+131)
(+ x (+ y (* z (- 1.0 (log t)))))
(if (<= z 4.7e+194)
(+ (* (+ a -0.5) b) (+ x y))
(+ z (- (* -0.5 b) (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.8e+131) {
tmp = x + (y + (z * (1.0 - log(t))));
} else if (z <= 4.7e+194) {
tmp = ((a + -0.5) * b) + (x + y);
} else {
tmp = z + ((-0.5 * b) - (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 <= (-5.8d+131)) then
tmp = x + (y + (z * (1.0d0 - log(t))))
else if (z <= 4.7d+194) then
tmp = ((a + (-0.5d0)) * b) + (x + y)
else
tmp = z + (((-0.5d0) * b) - (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 <= -5.8e+131) {
tmp = x + (y + (z * (1.0 - Math.log(t))));
} else if (z <= 4.7e+194) {
tmp = ((a + -0.5) * b) + (x + y);
} else {
tmp = z + ((-0.5 * b) - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.8e+131: tmp = x + (y + (z * (1.0 - math.log(t)))) elif z <= 4.7e+194: tmp = ((a + -0.5) * b) + (x + y) else: tmp = z + ((-0.5 * b) - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.8e+131) tmp = Float64(x + Float64(y + Float64(z * Float64(1.0 - log(t))))); elseif (z <= 4.7e+194) tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(x + y)); else tmp = Float64(z + Float64(Float64(-0.5 * b) - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5.8e+131) tmp = x + (y + (z * (1.0 - log(t)))); elseif (z <= 4.7e+194) tmp = ((a + -0.5) * b) + (x + y); else tmp = z + ((-0.5 * b) - (z * log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.8e+131], N[(x + N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e+194], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(z + N[(N[(-0.5 * b), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+131}:\\
\;\;\;\;x + \left(y + z \cdot \left(1 - \log t\right)\right)\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+194}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;z + \left(-0.5 \cdot b - z \cdot \log t\right)\\
\end{array}
\end{array}
if z < -5.8000000000000002e131Initial program 99.6%
remove-double-neg99.6%
distribute-rgt-neg-out99.6%
associate--l+99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in b around 0 78.4%
if -5.8000000000000002e131 < z < 4.69999999999999972e194Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 92.4%
if 4.69999999999999972e194 < z Initial program 99.5%
remove-double-neg99.5%
distribute-rgt-neg-out99.5%
associate--l+99.5%
distribute-rgt-neg-in99.5%
sub-neg99.5%
metadata-eval99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in x around 0 93.4%
Taylor expanded in y around 0 91.9%
Taylor expanded in a around 0 77.3%
log-pow6.2%
associate--l+6.2%
*-commutative6.2%
log-pow77.3%
Simplified77.3%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.8e+194) (not (<= z 4.9e+210))) (+ y (* z (- 1.0 (log t)))) (+ (* (+ a -0.5) b) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e+194) || !(z <= 4.9e+210)) {
tmp = y + (z * (1.0 - log(t)));
} else {
tmp = ((a + -0.5) * b) + (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 ((z <= (-4.8d+194)) .or. (.not. (z <= 4.9d+210))) then
tmp = y + (z * (1.0d0 - log(t)))
else
tmp = ((a + (-0.5d0)) * b) + (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 ((z <= -4.8e+194) || !(z <= 4.9e+210)) {
tmp = y + (z * (1.0 - Math.log(t)));
} else {
tmp = ((a + -0.5) * b) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e+194) or not (z <= 4.9e+210): tmp = y + (z * (1.0 - math.log(t))) else: tmp = ((a + -0.5) * b) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.8e+194) || !(z <= 4.9e+210)) tmp = Float64(y + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.8e+194) || ~((z <= 4.9e+210))) tmp = y + (z * (1.0 - log(t))); else tmp = ((a + -0.5) * b) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.8e+194], N[Not[LessEqual[z, 4.9e+210]], $MachinePrecision]], N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+194} \lor \neg \left(z \leq 4.9 \cdot 10^{+210}\right):\\
\;\;\;\;y + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(x + y\right)\\
\end{array}
\end{array}
if z < -4.8e194 or 4.90000000000000007e210 < z Initial program 99.6%
associate-+l-99.5%
+-commutative99.5%
associate-+l+99.5%
associate--l+99.5%
fma-neg99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in z around inf 71.2%
if -4.8e194 < z < 4.90000000000000007e210Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 90.3%
Final simplification86.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.7e+241) (not (<= z 1.95e+210))) (+ x (* z (- 1.0 (log t)))) (+ (* (+ a -0.5) b) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.7e+241) || !(z <= 1.95e+210)) {
tmp = x + (z * (1.0 - log(t)));
} else {
tmp = ((a + -0.5) * b) + (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 ((z <= (-4.7d+241)) .or. (.not. (z <= 1.95d+210))) then
tmp = x + (z * (1.0d0 - log(t)))
else
tmp = ((a + (-0.5d0)) * b) + (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 ((z <= -4.7e+241) || !(z <= 1.95e+210)) {
tmp = x + (z * (1.0 - Math.log(t)));
} else {
tmp = ((a + -0.5) * b) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.7e+241) or not (z <= 1.95e+210): tmp = x + (z * (1.0 - math.log(t))) else: tmp = ((a + -0.5) * b) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.7e+241) || !(z <= 1.95e+210)) tmp = Float64(x + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.7e+241) || ~((z <= 1.95e+210))) tmp = x + (z * (1.0 - log(t))); else tmp = ((a + -0.5) * b) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.7e+241], N[Not[LessEqual[z, 1.95e+210]], $MachinePrecision]], N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+241} \lor \neg \left(z \leq 1.95 \cdot 10^{+210}\right):\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(x + y\right)\\
\end{array}
\end{array}
if z < -4.69999999999999982e241 or 1.95e210 < z Initial program 99.5%
remove-double-neg99.5%
distribute-rgt-neg-out99.5%
associate--l+99.5%
distribute-rgt-neg-in99.5%
sub-neg99.5%
metadata-eval99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in z around 0 99.6%
Taylor expanded in b around 0 80.1%
Taylor expanded in y around 0 75.9%
+-commutative75.9%
Simplified75.9%
if -4.69999999999999982e241 < z < 1.95e210Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 89.3%
Final simplification87.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.5e+241) (not (<= z 2.6e+211))) (* z (- 1.0 (log t))) (+ (* (+ a -0.5) b) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e+241) || !(z <= 2.6e+211)) {
tmp = z * (1.0 - log(t));
} else {
tmp = ((a + -0.5) * b) + (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 ((z <= (-4.5d+241)) .or. (.not. (z <= 2.6d+211))) then
tmp = z * (1.0d0 - log(t))
else
tmp = ((a + (-0.5d0)) * b) + (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 ((z <= -4.5e+241) || !(z <= 2.6e+211)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = ((a + -0.5) * b) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.5e+241) or not (z <= 2.6e+211): tmp = z * (1.0 - math.log(t)) else: tmp = ((a + -0.5) * b) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.5e+241) || !(z <= 2.6e+211)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.5e+241) || ~((z <= 2.6e+211))) tmp = z * (1.0 - log(t)); else tmp = ((a + -0.5) * b) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.5e+241], N[Not[LessEqual[z, 2.6e+211]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+241} \lor \neg \left(z \leq 2.6 \cdot 10^{+211}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(x + y\right)\\
\end{array}
\end{array}
if z < -4.49999999999999993e241 or 2.5999999999999998e211 < z Initial program 99.5%
associate-+l-99.4%
+-commutative99.4%
associate-+l+99.4%
associate--l+99.4%
fma-neg99.5%
distribute-lft-neg-in99.5%
*-commutative99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in z around inf 76.9%
Taylor expanded in y around 0 72.7%
if -4.49999999999999993e241 < z < 2.5999999999999998e211Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 89.3%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= b -3.5e+68)
(and (not (<= b 3.4e-58)) (or (<= b 8e-11) (not (<= b 3.4e+92)))))
(* b (- a 0.5))
(+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.5e+68) || (!(b <= 3.4e-58) && ((b <= 8e-11) || !(b <= 3.4e+92)))) {
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 <= (-3.5d+68)) .or. (.not. (b <= 3.4d-58)) .and. (b <= 8d-11) .or. (.not. (b <= 3.4d+92))) 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 <= -3.5e+68) || (!(b <= 3.4e-58) && ((b <= 8e-11) || !(b <= 3.4e+92)))) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.5e+68) or (not (b <= 3.4e-58) and ((b <= 8e-11) or not (b <= 3.4e+92))): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.5e+68) || (!(b <= 3.4e-58) && ((b <= 8e-11) || !(b <= 3.4e+92)))) 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 <= -3.5e+68) || (~((b <= 3.4e-58)) && ((b <= 8e-11) || ~((b <= 3.4e+92))))) 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, -3.5e+68], And[N[Not[LessEqual[b, 3.4e-58]], $MachinePrecision], Or[LessEqual[b, 8e-11], N[Not[LessEqual[b, 3.4e+92]], $MachinePrecision]]]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+68} \lor \neg \left(b \leq 3.4 \cdot 10^{-58}\right) \land \left(b \leq 8 \cdot 10^{-11} \lor \neg \left(b \leq 3.4 \cdot 10^{+92}\right)\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -3.49999999999999977e68 or 3.39999999999999973e-58 < b < 7.99999999999999952e-11 or 3.3999999999999998e92 < b Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
Taylor expanded in b around inf 66.8%
if -3.49999999999999977e68 < b < 3.39999999999999973e-58 or 7.99999999999999952e-11 < b < 3.3999999999999998e92Initial program 99.9%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.9%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 64.3%
Final simplification65.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= b -3.1e+68)
t_1
(if (<= b 5.4e-59)
(+ x y)
(if (<= b 1.12e+144)
(+ y (* a b))
(if (<= b 1.45e+253) (+ x (* -0.5 b)) 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 (b <= -3.1e+68) {
tmp = t_1;
} else if (b <= 5.4e-59) {
tmp = x + y;
} else if (b <= 1.12e+144) {
tmp = y + (a * b);
} else if (b <= 1.45e+253) {
tmp = x + (-0.5 * b);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (b <= (-3.1d+68)) then
tmp = t_1
else if (b <= 5.4d-59) then
tmp = x + y
else if (b <= 1.12d+144) then
tmp = y + (a * b)
else if (b <= 1.45d+253) then
tmp = x + ((-0.5d0) * b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (b <= -3.1e+68) {
tmp = t_1;
} else if (b <= 5.4e-59) {
tmp = x + y;
} else if (b <= 1.12e+144) {
tmp = y + (a * b);
} else if (b <= 1.45e+253) {
tmp = x + (-0.5 * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if b <= -3.1e+68: tmp = t_1 elif b <= 5.4e-59: tmp = x + y elif b <= 1.12e+144: tmp = y + (a * b) elif b <= 1.45e+253: tmp = x + (-0.5 * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (b <= -3.1e+68) tmp = t_1; elseif (b <= 5.4e-59) tmp = Float64(x + y); elseif (b <= 1.12e+144) tmp = Float64(y + Float64(a * b)); elseif (b <= 1.45e+253) tmp = Float64(x + Float64(-0.5 * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (b <= -3.1e+68) tmp = t_1; elseif (b <= 5.4e-59) tmp = x + y; elseif (b <= 1.12e+144) tmp = y + (a * b); elseif (b <= 1.45e+253) tmp = x + (-0.5 * b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+68], t$95$1, If[LessEqual[b, 5.4e-59], N[(x + y), $MachinePrecision], If[LessEqual[b, 1.12e+144], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.45e+253], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5.4 \cdot 10^{-59}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+144}:\\
\;\;\;\;y + a \cdot b\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{+253}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -3.0999999999999998e68 or 1.44999999999999994e253 < b Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in b around inf 71.4%
if -3.0999999999999998e68 < b < 5.3999999999999998e-59Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around inf 63.4%
if 5.3999999999999998e-59 < b < 1.11999999999999999e144Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in a around inf 61.6%
*-commutative61.6%
Simplified61.6%
if 1.11999999999999999e144 < b < 1.44999999999999994e253Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around inf 68.3%
Taylor expanded in a around 0 62.8%
*-commutative62.8%
Simplified62.8%
Final simplification65.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y 7e+23) (+ x (+ (* -0.5 b) (* a b))) (+ y (* (+ a -0.5) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 7e+23) {
tmp = x + ((-0.5 * b) + (a * b));
} else {
tmp = 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 (y <= 7d+23) then
tmp = x + (((-0.5d0) * b) + (a * b))
else
tmp = 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 (y <= 7e+23) {
tmp = x + ((-0.5 * b) + (a * b));
} else {
tmp = y + ((a + -0.5) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 7e+23: tmp = x + ((-0.5 * b) + (a * b)) else: tmp = y + ((a + -0.5) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 7e+23) tmp = Float64(x + Float64(Float64(-0.5 * b) + Float64(a * b))); else tmp = 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 (y <= 7e+23) tmp = x + ((-0.5 * b) + (a * b)); else tmp = y + ((a + -0.5) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 7e+23], N[(x + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7 \cdot 10^{+23}:\\
\;\;\;\;x + \left(-0.5 \cdot b + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y + \left(a + -0.5\right) \cdot b\\
\end{array}
\end{array}
if y < 7.0000000000000004e23Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around inf 62.0%
*-commutative62.0%
distribute-lft-in62.0%
Applied egg-rr62.0%
if 7.0000000000000004e23 < y Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 70.5%
Final simplification64.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 6.5e+37) (+ x (* (+ a -0.5) b)) (+ y (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 6.5e+37) {
tmp = x + ((a + -0.5) * b);
} else {
tmp = 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 <= 6.5d+37) then
tmp = x + ((a + (-0.5d0)) * b)
else
tmp = 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 <= 6.5e+37) {
tmp = x + ((a + -0.5) * b);
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 6.5e+37: tmp = x + ((a + -0.5) * b) else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 6.5e+37) tmp = Float64(x + Float64(Float64(a + -0.5) * b)); else tmp = Float64(y + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 6.5e+37) tmp = x + ((a + -0.5) * b); else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.5e+37], N[(x + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.5 \cdot 10^{+37}:\\
\;\;\;\;x + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if y < 6.4999999999999998e37Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around inf 62.3%
if 6.4999999999999998e37 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in a around inf 66.2%
*-commutative66.2%
Simplified66.2%
Final simplification63.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (+ a -0.5) b))) (if (<= y 1e+24) (+ x t_1) (+ 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 <= 1e+24) {
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 = (a + (-0.5d0)) * b
if (y <= 1d+24) 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 = (a + -0.5) * b;
double tmp;
if (y <= 1e+24) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + -0.5) * b tmp = 0 if y <= 1e+24: tmp = x + t_1 else: tmp = 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 <= 1e+24) 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 = (a + -0.5) * b; tmp = 0.0; if (y <= 1e+24) 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[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[y, 1e+24], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;y \leq 10^{+24}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if y < 9.9999999999999998e23Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around inf 62.0%
if 9.9999999999999998e23 < y Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 70.5%
Final simplification64.0%
(FPCore (x y z t a b) :precision binary64 (+ (* (+ a -0.5) b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((a + -0.5) * b) + (x + y);
}
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 = ((a + (-0.5d0)) * b) + (x + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((a + -0.5) * b) + (x + y);
}
def code(x, y, z, t, a, b): return ((a + -0.5) * b) + (x + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(a + -0.5) * b) + Float64(x + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((a + -0.5) * b) + (x + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.5\right) \cdot b + \left(x + y\right)
\end{array}
Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 79.0%
Final simplification79.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 5.76e-198) x (if (<= y 7.6e+80) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 5.76e-198) {
tmp = x;
} else if (y <= 7.6e+80) {
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 <= 5.76d-198) then
tmp = x
else if (y <= 7.6d+80) 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 <= 5.76e-198) {
tmp = x;
} else if (y <= 7.6e+80) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 5.76e-198: tmp = x elif y <= 7.6e+80: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 5.76e-198) tmp = x; elseif (y <= 7.6e+80) 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 <= 5.76e-198) tmp = x; elseif (y <= 7.6e+80) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 5.76e-198], x, If[LessEqual[y, 7.6e+80], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.76 \cdot 10^{-198}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+80}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 5.7600000000000003e-198Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in b around 0 65.5%
Taylor expanded in x around inf 25.9%
if 5.7600000000000003e-198 < y < 7.59999999999999995e80Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in a around inf 33.0%
*-commutative33.0%
Simplified33.0%
if 7.59999999999999995e80 < y Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 73.8%
Taylor expanded in y around inf 56.6%
Final simplification32.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.05e+141) (* a b) (if (<= b 4.5e+92) (+ x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+141) {
tmp = a * b;
} else if (b <= 4.5e+92) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.05d+141)) then
tmp = a * b
else if (b <= 4.5d+92) then
tmp = x + y
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+141) {
tmp = a * b;
} else if (b <= 4.5e+92) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.05e+141: tmp = a * b elif b <= 4.5e+92: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.05e+141) tmp = Float64(a * b); elseif (b <= 4.5e+92) tmp = Float64(x + y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.05e+141) tmp = a * b; elseif (b <= 4.5e+92) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05e+141], N[(a * b), $MachinePrecision], If[LessEqual[b, 4.5e+92], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+141}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if b < -1.0499999999999999e141 or 4.4999999999999999e92 < b Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in a around inf 41.2%
*-commutative41.2%
Simplified41.2%
if -1.0499999999999999e141 < b < 4.4999999999999999e92Initial program 99.9%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
associate--l+99.8%
fma-neg99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 59.0%
Final simplification53.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.65e+24) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.65e+24) {
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 <= 2.65d+24) 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 <= 2.65e+24) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.65e+24: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.65e+24) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.65e+24) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.65e+24], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.65 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.6499999999999999e24Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in b around 0 63.5%
Taylor expanded in x around inf 26.8%
if 2.6499999999999999e24 < y Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
associate--l+100.0%
fma-neg100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 63.0%
Taylor expanded in y around inf 45.2%
Final simplification31.1%
(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%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in b around 0 66.1%
Taylor expanded in x around inf 23.8%
Final simplification23.8%
(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 2023275
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))