
(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 15 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 (* z (log t))) (+ x y)) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((z - (z * log(t))) + (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 = ((z - (z * log(t))) + (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 ((z - (z * Math.log(t))) + (x + y)) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return ((z - (z * math.log(t))) + (x + y)) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z - Float64(z * log(t))) + Float64(x + y)) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((z - (z * log(t))) + (x + y)) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z - z \cdot \log t\right) + \left(x + y\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%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.3e+59) (not (<= b 1.05e+86))) (+ (+ z (+ x y)) (* b (- a 0.5))) (+ (+ (- z (* z (log t))) (+ x y)) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+59) || !(b <= 1.05e+86)) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = ((z - (z * log(t))) + (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 ((b <= (-1.3d+59)) .or. (.not. (b <= 1.05d+86))) then
tmp = (z + (x + y)) + (b * (a - 0.5d0))
else
tmp = ((z - (z * log(t))) + (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 ((b <= -1.3e+59) || !(b <= 1.05e+86)) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = ((z - (z * Math.log(t))) + (x + y)) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.3e+59) or not (b <= 1.05e+86): tmp = (z + (x + y)) + (b * (a - 0.5)) else: tmp = ((z - (z * math.log(t))) + (x + y)) + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.3e+59) || !(b <= 1.05e+86)) tmp = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))); else tmp = Float64(Float64(Float64(z - Float64(z * log(t))) + Float64(x + y)) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.3e+59) || ~((b <= 1.05e+86))) tmp = (z + (x + y)) + (b * (a - 0.5)); else tmp = ((z - (z * log(t))) + (x + y)) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.3e+59], N[Not[LessEqual[b, 1.05e+86]], $MachinePrecision]], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+59} \lor \neg \left(b \leq 1.05 \cdot 10^{+86}\right):\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(z - z \cdot \log t\right) + \left(x + y\right)\right) + a \cdot b\\
\end{array}
\end{array}
if b < -1.3e59 or 1.0499999999999999e86 < b Initial program 100.0%
add-sqr-sqrt37.7%
pow237.7%
Applied egg-rr57.8%
Taylor expanded in z around 0 93.6%
associate-+r+93.6%
+-commutative93.6%
+-commutative93.6%
Simplified93.6%
if -1.3e59 < b < 1.0499999999999999e86Initial 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 a around inf 97.5%
*-commutative36.4%
Simplified97.5%
Final simplification96.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= (+ x y) -5e-40)
(+ (+ (- z t_1) (+ x y)) (* a b))
(+ (* (+ a -0.5) b) (- (+ y z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if ((x + y) <= -5e-40) {
tmp = ((z - t_1) + (x + y)) + (a * b);
} else {
tmp = ((a + -0.5) * b) + ((y + z) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * log(t)
if ((x + y) <= (-5d-40)) then
tmp = ((z - t_1) + (x + y)) + (a * b)
else
tmp = ((a + (-0.5d0)) * b) + ((y + z) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * Math.log(t);
double tmp;
if ((x + y) <= -5e-40) {
tmp = ((z - t_1) + (x + y)) + (a * b);
} else {
tmp = ((a + -0.5) * b) + ((y + z) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if (x + y) <= -5e-40: tmp = ((z - t_1) + (x + y)) + (a * b) else: tmp = ((a + -0.5) * b) + ((y + z) - t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (Float64(x + y) <= -5e-40) tmp = Float64(Float64(Float64(z - t_1) + Float64(x + y)) + Float64(a * b)); else tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(Float64(y + z) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if ((x + y) <= -5e-40) tmp = ((z - t_1) + (x + y)) + (a * b); else tmp = ((a + -0.5) * b) + ((y + z) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -5e-40], N[(N[(N[(z - t$95$1), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(N[(y + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{-40}:\\
\;\;\;\;\left(\left(z - t_1\right) + \left(x + y\right)\right) + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(\left(y + z\right) - t_1\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -4.99999999999999965e-40Initial 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 a around inf 91.5%
*-commutative49.1%
Simplified91.5%
if -4.99999999999999965e-40 < (+.f64 x y) 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 x around 0 87.0%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.9e+132) (not (<= z 7.8e+25))) (+ (* (+ a -0.5) b) (* z (- 1.0 (log t)))) (+ (+ z (+ x y)) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.9e+132) || !(z <= 7.8e+25)) {
tmp = ((a + -0.5) * b) + (z * (1.0 - log(t)));
} else {
tmp = (z + (x + y)) + (b * (a - 0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.9d+132)) .or. (.not. (z <= 7.8d+25))) then
tmp = ((a + (-0.5d0)) * b) + (z * (1.0d0 - log(t)))
else
tmp = (z + (x + y)) + (b * (a - 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.9e+132) || !(z <= 7.8e+25)) {
tmp = ((a + -0.5) * b) + (z * (1.0 - Math.log(t)));
} else {
tmp = (z + (x + y)) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.9e+132) or not (z <= 7.8e+25): tmp = ((a + -0.5) * b) + (z * (1.0 - math.log(t))) else: tmp = (z + (x + y)) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.9e+132) || !(z <= 7.8e+25)) tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.9e+132) || ~((z <= 7.8e+25))) tmp = ((a + -0.5) * b) + (z * (1.0 - log(t))); else tmp = (z + (x + y)) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.9e+132], N[Not[LessEqual[z, 7.8e+25]], $MachinePrecision]], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+132} \lor \neg \left(z \leq 7.8 \cdot 10^{+25}\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot b + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -4.9000000000000002e132 or 7.8000000000000004e25 < z 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.7%
Taylor expanded in z around inf 80.9%
if -4.9000000000000002e132 < z < 7.8000000000000004e25Initial program 100.0%
add-sqr-sqrt35.9%
pow235.9%
Applied egg-rr54.6%
Taylor expanded in z around 0 94.2%
associate-+r+94.2%
+-commutative94.2%
+-commutative94.2%
Simplified94.2%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.5e+130) (not (<= z 7.5e+83))) (+ (* a b) (+ y (- z (* z (log t))))) (+ (+ z (+ x y)) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e+130) || !(z <= 7.5e+83)) {
tmp = (a * b) + (y + (z - (z * log(t))));
} else {
tmp = (z + (x + y)) + (b * (a - 0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9.5d+130)) .or. (.not. (z <= 7.5d+83))) then
tmp = (a * b) + (y + (z - (z * log(t))))
else
tmp = (z + (x + y)) + (b * (a - 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e+130) || !(z <= 7.5e+83)) {
tmp = (a * b) + (y + (z - (z * Math.log(t))));
} else {
tmp = (z + (x + y)) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.5e+130) or not (z <= 7.5e+83): tmp = (a * b) + (y + (z - (z * math.log(t)))) else: tmp = (z + (x + y)) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.5e+130) || !(z <= 7.5e+83)) tmp = Float64(Float64(a * b) + Float64(y + Float64(z - Float64(z * log(t))))); else tmp = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.5e+130) || ~((z <= 7.5e+83))) tmp = (a * b) + (y + (z - (z * log(t)))); else tmp = (z + (x + y)) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.5e+130], N[Not[LessEqual[z, 7.5e+83]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(y + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+130} \lor \neg \left(z \leq 7.5 \cdot 10^{+83}\right):\\
\;\;\;\;a \cdot b + \left(y + \left(z - z \cdot \log t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -9.5000000000000009e130 or 7.49999999999999989e83 < z 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 x around 0 89.6%
Taylor expanded in a around inf 82.8%
*-commutative29.3%
Simplified82.8%
sub-neg82.8%
associate-+l+82.8%
sub-neg82.8%
*-commutative82.8%
*-un-lft-identity82.8%
distribute-rgt-out--82.8%
+-commutative82.8%
distribute-rgt-out--82.8%
*-un-lft-identity82.8%
*-commutative82.8%
Applied egg-rr82.8%
if -9.5000000000000009e130 < z < 7.49999999999999989e83Initial program 100.0%
add-sqr-sqrt35.7%
pow235.7%
Applied egg-rr54.6%
Taylor expanded in z around 0 93.3%
associate-+r+93.3%
+-commutative93.3%
+-commutative93.3%
Simplified93.3%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= z -3.5e+132)
(+ (* a b) (+ y (- z t_1)))
(if (<= z 2.1e+87)
(+ (+ z (+ x y)) (* b (- a 0.5)))
(+ (* a b) (- (+ y z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if (z <= -3.5e+132) {
tmp = (a * b) + (y + (z - t_1));
} else if (z <= 2.1e+87) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = (a * b) + ((y + z) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * log(t)
if (z <= (-3.5d+132)) then
tmp = (a * b) + (y + (z - t_1))
else if (z <= 2.1d+87) then
tmp = (z + (x + y)) + (b * (a - 0.5d0))
else
tmp = (a * b) + ((y + z) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * Math.log(t);
double tmp;
if (z <= -3.5e+132) {
tmp = (a * b) + (y + (z - t_1));
} else if (z <= 2.1e+87) {
tmp = (z + (x + y)) + (b * (a - 0.5));
} else {
tmp = (a * b) + ((y + z) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if z <= -3.5e+132: tmp = (a * b) + (y + (z - t_1)) elif z <= 2.1e+87: tmp = (z + (x + y)) + (b * (a - 0.5)) else: tmp = (a * b) + ((y + z) - t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (z <= -3.5e+132) tmp = Float64(Float64(a * b) + Float64(y + Float64(z - t_1))); elseif (z <= 2.1e+87) tmp = Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))); else tmp = Float64(Float64(a * b) + Float64(Float64(y + z) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if (z <= -3.5e+132) tmp = (a * b) + (y + (z - t_1)); elseif (z <= 2.1e+87) tmp = (z + (x + y)) + (b * (a - 0.5)); else tmp = (a * b) + ((y + z) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+132], N[(N[(a * b), $MachinePrecision] + N[(y + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+87], N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(y + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+132}:\\
\;\;\;\;a \cdot b + \left(y + \left(z - t_1\right)\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+87}:\\
\;\;\;\;\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(\left(y + z\right) - t_1\right)\\
\end{array}
\end{array}
if z < -3.5000000000000002e132Initial program 99.7%
remove-double-neg99.7%
distribute-rgt-neg-out99.7%
associate--l+99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in x around 0 87.4%
Taylor expanded in a around inf 82.5%
*-commutative27.5%
Simplified82.5%
sub-neg82.5%
associate-+l+82.5%
sub-neg82.5%
*-commutative82.5%
*-un-lft-identity82.5%
distribute-rgt-out--82.4%
+-commutative82.4%
distribute-rgt-out--82.5%
*-un-lft-identity82.5%
*-commutative82.5%
Applied egg-rr82.5%
if -3.5000000000000002e132 < z < 2.1e87Initial program 100.0%
add-sqr-sqrt35.7%
pow235.7%
Applied egg-rr54.6%
Taylor expanded in z around 0 93.3%
associate-+r+93.3%
+-commutative93.3%
+-commutative93.3%
Simplified93.3%
if 2.1e87 < z 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 x around 0 91.6%
Taylor expanded in a around inf 83.0%
*-commutative30.8%
Simplified83.0%
Final simplification89.8%
(FPCore (x y z t a b) :precision binary64 (+ (* (+ a -0.5) b) (+ (* z (- 1.0 (log t))) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return ((a + -0.5) * b) + ((z * (1.0 - log(t))) + (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) + ((z * (1.0d0 - log(t))) + (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) + ((z * (1.0 - Math.log(t))) + (x + y));
}
def code(x, y, z, t, a, b): return ((a + -0.5) * b) + ((z * (1.0 - math.log(t))) + (x + y))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(a + -0.5) * b) + Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y))) end
function tmp = code(x, y, z, t, a, b) tmp = ((a + -0.5) * b) + ((z * (1.0 - log(t))) + (x + y)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.5\right) \cdot b + \left(z \cdot \left(1 - \log t\right) + \left(x + y\right)\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 99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a b))))
(if (<= y 2.8e-221)
t_1
(if (<= y 2.05e-113)
(+ x (* -0.5 b))
(if (<= y 8e-7) t_1 (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * b);
double tmp;
if (y <= 2.8e-221) {
tmp = t_1;
} else if (y <= 2.05e-113) {
tmp = x + (-0.5 * b);
} else if (y <= 8e-7) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x + (a * b)
if (y <= 2.8d-221) then
tmp = t_1
else if (y <= 2.05d-113) then
tmp = x + ((-0.5d0) * b)
else if (y <= 8d-7) then
tmp = t_1
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 t_1 = x + (a * b);
double tmp;
if (y <= 2.8e-221) {
tmp = t_1;
} else if (y <= 2.05e-113) {
tmp = x + (-0.5 * b);
} else if (y <= 8e-7) {
tmp = t_1;
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * b) tmp = 0 if y <= 2.8e-221: tmp = t_1 elif y <= 2.05e-113: tmp = x + (-0.5 * b) elif y <= 8e-7: tmp = t_1 else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * b)) tmp = 0.0 if (y <= 2.8e-221) tmp = t_1; elseif (y <= 2.05e-113) tmp = Float64(x + Float64(-0.5 * b)); elseif (y <= 8e-7) tmp = t_1; else tmp = Float64(y + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * b); tmp = 0.0; if (y <= 2.8e-221) tmp = t_1; elseif (y <= 2.05e-113) tmp = x + (-0.5 * b); elseif (y <= 8e-7) tmp = t_1; else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.8e-221], t$95$1, If[LessEqual[y, 2.05e-113], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-7], t$95$1, N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot b\\
\mathbf{if}\;y \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-113}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if y < 2.80000000000000019e-221 or 2.05e-113 < y < 7.9999999999999996e-7Initial 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 x around inf 58.3%
Taylor expanded in a around inf 47.5%
*-commutative47.5%
Simplified47.5%
if 2.80000000000000019e-221 < y < 2.05e-113Initial 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 x around inf 77.4%
Taylor expanded in a around 0 50.0%
if 7.9999999999999996e-7 < y Initial program 100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
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 89.6%
Taylor expanded in a around inf 81.1%
*-commutative30.4%
Simplified81.1%
add-sqr-sqrt33.7%
pow233.7%
Applied egg-rr33.7%
Taylor expanded in y around inf 65.5%
Final simplification52.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.5) (not (<= a 1.2e-22))) (+ (* a b) (+ x y)) (+ (+ x y) (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.5) || !(a <= 1.2e-22)) {
tmp = (a * b) + (x + y);
} else {
tmp = (x + y) + (-0.5 * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-0.5d0)) .or. (.not. (a <= 1.2d-22))) then
tmp = (a * b) + (x + y)
else
tmp = (x + y) + ((-0.5d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.5) || !(a <= 1.2e-22)) {
tmp = (a * b) + (x + y);
} else {
tmp = (x + y) + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.5) or not (a <= 1.2e-22): tmp = (a * b) + (x + y) else: tmp = (x + y) + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.5) || !(a <= 1.2e-22)) tmp = Float64(Float64(a * b) + Float64(x + y)); else tmp = Float64(Float64(x + y) + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -0.5) || ~((a <= 1.2e-22))) tmp = (a * b) + (x + y); else tmp = (x + y) + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -0.5], N[Not[LessEqual[a, 1.2e-22]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.5 \lor \neg \left(a \leq 1.2 \cdot 10^{-22}\right):\\
\;\;\;\;a \cdot b + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + -0.5 \cdot b\\
\end{array}
\end{array}
if a < -0.5 or 1.20000000000000001e-22 < a 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 81.6%
+-commutative81.6%
Simplified81.6%
Taylor expanded in a around inf 81.0%
*-commutative60.1%
Simplified81.0%
if -0.5 < a < 1.20000000000000001e-22Initial 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 72.2%
+-commutative72.2%
Simplified72.2%
Taylor expanded in a around 0 72.2%
Final simplification76.8%
(FPCore (x y z t a b) :precision binary64 (+ (+ z (+ x y)) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (z + (x + y)) + (b * (a - 0.5));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (z + (x + y)) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (z + (x + y)) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (z + (x + y)) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(z + Float64(x + y)) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (z + (x + y)) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + \left(x + y\right)\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
add-sqr-sqrt37.7%
pow237.7%
Applied egg-rr52.6%
Taylor expanded in z around 0 78.0%
associate-+r+78.0%
+-commutative78.0%
+-commutative78.0%
Simplified78.0%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.5) (not (<= a 0.5))) (+ x (* a b)) (+ x (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.5) || !(a <= 0.5)) {
tmp = x + (a * b);
} else {
tmp = x + (-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)) .or. (.not. (a <= 0.5d0))) then
tmp = x + (a * b)
else
tmp = x + ((-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) || !(a <= 0.5)) {
tmp = x + (a * b);
} else {
tmp = x + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.5) or not (a <= 0.5): tmp = x + (a * b) else: tmp = x + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.5) || !(a <= 0.5)) tmp = Float64(x + Float64(a * b)); else tmp = Float64(x + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -0.5) || ~((a <= 0.5))) tmp = x + (a * b); else tmp = x + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -0.5], N[Not[LessEqual[a, 0.5]], $MachinePrecision]], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.5 \lor \neg \left(a \leq 0.5\right):\\
\;\;\;\;x + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + -0.5 \cdot b\\
\end{array}
\end{array}
if a < -0.5 or 0.5 < a 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 x around inf 62.1%
Taylor expanded in a around inf 61.5%
*-commutative61.5%
Simplified61.5%
if -0.5 < a < 0.5Initial 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 x around inf 47.4%
Taylor expanded in a around 0 47.4%
Final simplification54.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.2e+88) (+ 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 <= 2.2e+88) {
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 <= 2.2d+88) 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 <= 2.2e+88) {
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 <= 2.2e+88: 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 <= 2.2e+88) 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 <= 2.2e+88) 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, 2.2e+88], 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 2.2 \cdot 10^{+88}:\\
\;\;\;\;x + \left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if y < 2.20000000000000009e88Initial 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 x around inf 61.0%
if 2.20000000000000009e88 < y 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 x around 0 91.5%
Taylor expanded in a around inf 87.5%
*-commutative25.3%
Simplified87.5%
add-sqr-sqrt42.2%
pow242.2%
Applied egg-rr42.2%
Taylor expanded in y around inf 74.0%
Final simplification63.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (+ a -0.5) b))) (if (<= y 1.5e+15) (+ 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 <= 1.5e+15) {
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 <= 1.5d+15) 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 <= 1.5e+15) {
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 <= 1.5e+15: 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 <= 1.5e+15) 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 <= 1.5e+15) 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, 1.5e+15], 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 1.5 \cdot 10^{+15}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if y < 1.5e15Initial 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 x around inf 60.4%
if 1.5e15 < y Initial program 100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in y around inf 74.1%
Final simplification63.9%
(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 77.2%
+-commutative77.2%
Simplified77.2%
Final simplification77.2%
(FPCore (x y z t a b) :precision binary64 (+ x (* -0.5 b)))
double code(double x, double y, double z, double t, double a, double b) {
return x + (-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 + ((-0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (-0.5 * b);
}
def code(x, y, z, t, a, b): return x + (-0.5 * b)
function code(x, y, z, t, a, b) return Float64(x + Float64(-0.5 * b)) end
function tmp = code(x, y, z, t, a, b) tmp = x + (-0.5 * b); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.5 \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 x around inf 54.8%
Taylor expanded in a around 0 30.4%
Final simplification30.4%
(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 2023290
(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)))