
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (* z (- 1.0 (log t))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (z * (1.0 - log(t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(1.0 - log(t))) + fma(Float64(a + -0.5), b, Float64(x + y))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(1 - \log t\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -1e+20) (not (<= t_1 1e+71)))
(+ t_1 (+ x y))
(+ (* z (- 1.0 (log t))) (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+20) || !(t_1 <= 1e+71)) {
tmp = t_1 + (x + y);
} else {
tmp = (z * (1.0 - log(t))) + (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-1d+20)) .or. (.not. (t_1 <= 1d+71))) then
tmp = t_1 + (x + y)
else
tmp = (z * (1.0d0 - log(t))) + (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+20) || !(t_1 <= 1e+71)) {
tmp = t_1 + (x + y);
} else {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -1e+20) or not (t_1 <= 1e+71): tmp = t_1 + (x + y) else: tmp = (z * (1.0 - math.log(t))) + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -1e+20) || !(t_1 <= 1e+71)) tmp = Float64(t_1 + Float64(x + y)); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -1e+20) || ~((t_1 <= 1e+71))) tmp = t_1 + (x + y); else tmp = (z * (1.0 - log(t))) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+20], N[Not[LessEqual[t$95$1, 1e+71]], $MachinePrecision]], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+20} \lor \neg \left(t\_1 \leq 10^{+71}\right):\\
\;\;\;\;t\_1 + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e20 or 1e71 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
add-cbrt-cube99.9%
pow3100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 93.5%
+-commutative93.5%
Simplified93.5%
if -1e20 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1e71Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 95.8%
Final simplification94.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -5e+33) (+ t_1 (+ x y)) (+ t_1 (- (+ z y) (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= -5e+33) {
tmp = t_1 + (x + y);
} else {
tmp = t_1 + ((z + y) - (z * log(t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((x + y) <= (-5d+33)) then
tmp = t_1 + (x + y)
else
tmp = t_1 + ((z + y) - (z * log(t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= -5e+33) {
tmp = t_1 + (x + y);
} else {
tmp = t_1 + ((z + y) - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= -5e+33: tmp = t_1 + (x + y) else: tmp = t_1 + ((z + y) - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -5e+33) tmp = Float64(t_1 + Float64(x + y)); else tmp = Float64(t_1 + Float64(Float64(z + y) - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((x + y) <= -5e+33) tmp = t_1 + (x + y); else tmp = t_1 + ((z + y) - (z * log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -5e+33], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(z + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{+33}:\\
\;\;\;\;t\_1 + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(\left(z + y\right) - z \cdot \log t\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -4.99999999999999973e33Initial program 100.0%
add-cbrt-cube100.0%
pow3100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 92.6%
+-commutative92.6%
Simplified92.6%
if -4.99999999999999973e33 < (+.f64 x y) Initial program 99.8%
Taylor expanded in x around 0 80.6%
+-commutative80.6%
Simplified80.6%
Final simplification83.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -1.45e+151)
(+ t_1 y)
(if (<= z 1.45e+97) (+ (* b (- a 0.5)) (+ x y)) (+ t_1 (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -1.45e+151) {
tmp = t_1 + y;
} else if (z <= 1.45e+97) {
tmp = (b * (a - 0.5)) + (x + y);
} else {
tmp = t_1 + (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 = z * (1.0d0 - log(t))
if (z <= (-1.45d+151)) then
tmp = t_1 + y
else if (z <= 1.45d+97) then
tmp = (b * (a - 0.5d0)) + (x + y)
else
tmp = t_1 + (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 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -1.45e+151) {
tmp = t_1 + y;
} else if (z <= 1.45e+97) {
tmp = (b * (a - 0.5)) + (x + y);
} else {
tmp = t_1 + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -1.45e+151: tmp = t_1 + y elif z <= 1.45e+97: tmp = (b * (a - 0.5)) + (x + y) else: tmp = t_1 + (a * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -1.45e+151) tmp = Float64(t_1 + y); elseif (z <= 1.45e+97) tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y)); else tmp = Float64(t_1 + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -1.45e+151) tmp = t_1 + y; elseif (z <= 1.45e+97) tmp = (b * (a - 0.5)) + (x + y); else tmp = t_1 + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+151], N[(t$95$1 + y), $MachinePrecision], If[LessEqual[z, 1.45e+97], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(a * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+151}:\\
\;\;\;\;t\_1 + y\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+97}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + a \cdot b\\
\end{array}
\end{array}
if z < -1.45000000000000009e151Initial program 99.3%
+-commutative99.3%
associate--l+99.3%
associate-+r+99.3%
+-commutative99.3%
*-lft-identity99.3%
metadata-eval99.3%
*-commutative99.3%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 83.3%
if -1.45000000000000009e151 < z < 1.44999999999999994e97Initial program 100.0%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 93.8%
+-commutative93.8%
Simplified93.8%
if 1.44999999999999994e97 < z Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around inf 70.2%
*-commutative70.2%
Simplified70.2%
Final simplification89.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.22e+175) (not (<= z 1.5e+97))) (+ (* z (- 1.0 (log t))) x) (+ (* b (- a 0.5)) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.22e+175) || !(z <= 1.5e+97)) {
tmp = (z * (1.0 - log(t))) + x;
} else {
tmp = (b * (a - 0.5)) + (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 <= (-1.22d+175)) .or. (.not. (z <= 1.5d+97))) then
tmp = (z * (1.0d0 - log(t))) + x
else
tmp = (b * (a - 0.5d0)) + (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 <= -1.22e+175) || !(z <= 1.5e+97)) {
tmp = (z * (1.0 - Math.log(t))) + x;
} else {
tmp = (b * (a - 0.5)) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.22e+175) or not (z <= 1.5e+97): tmp = (z * (1.0 - math.log(t))) + x else: tmp = (b * (a - 0.5)) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.22e+175) || !(z <= 1.5e+97)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + x); else tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.22e+175) || ~((z <= 1.5e+97))) tmp = (z * (1.0 - log(t))) + x; else tmp = (b * (a - 0.5)) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.22e+175], N[Not[LessEqual[z, 1.5e+97]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+175} \lor \neg \left(z \leq 1.5 \cdot 10^{+97}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\
\end{array}
\end{array}
if z < -1.22e175 or 1.4999999999999999e97 < z Initial program 99.5%
+-commutative99.5%
associate--l+99.5%
associate-+r+99.5%
+-commutative99.5%
*-lft-identity99.5%
metadata-eval99.5%
*-commutative99.5%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 74.9%
if -1.22e175 < z < 1.4999999999999999e97Initial program 100.0%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 93.4%
+-commutative93.4%
Simplified93.4%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -2.9e+149)
(+ t_1 y)
(if (<= z 1.5e+97) (+ (* b (- a 0.5)) (+ x y)) (+ t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -2.9e+149) {
tmp = t_1 + y;
} else if (z <= 1.5e+97) {
tmp = (b * (a - 0.5)) + (x + y);
} else {
tmp = t_1 + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (1.0d0 - log(t))
if (z <= (-2.9d+149)) then
tmp = t_1 + y
else if (z <= 1.5d+97) then
tmp = (b * (a - 0.5d0)) + (x + y)
else
tmp = t_1 + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -2.9e+149) {
tmp = t_1 + y;
} else if (z <= 1.5e+97) {
tmp = (b * (a - 0.5)) + (x + y);
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -2.9e+149: tmp = t_1 + y elif z <= 1.5e+97: tmp = (b * (a - 0.5)) + (x + y) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -2.9e+149) tmp = Float64(t_1 + y); elseif (z <= 1.5e+97) tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y)); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -2.9e+149) tmp = t_1 + y; elseif (z <= 1.5e+97) tmp = (b * (a - 0.5)) + (x + y); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+149], N[(t$95$1 + y), $MachinePrecision], If[LessEqual[z, 1.5e+97], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+149}:\\
\;\;\;\;t\_1 + y\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+97}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if z < -2.9000000000000002e149Initial program 99.3%
+-commutative99.3%
associate--l+99.3%
associate-+r+99.3%
+-commutative99.3%
*-lft-identity99.3%
metadata-eval99.3%
*-commutative99.3%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 83.3%
if -2.9000000000000002e149 < z < 1.4999999999999999e97Initial program 100.0%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 93.8%
+-commutative93.8%
Simplified93.8%
if 1.4999999999999999e97 < z Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 69.6%
Final simplification89.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.75e+177) (not (<= z 5.6e+158))) (- z (* z (log t))) (+ (* b (- a 0.5)) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.75e+177) || !(z <= 5.6e+158)) {
tmp = z - (z * log(t));
} else {
tmp = (b * (a - 0.5)) + (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 <= (-1.75d+177)) .or. (.not. (z <= 5.6d+158))) then
tmp = z - (z * log(t))
else
tmp = (b * (a - 0.5d0)) + (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 <= -1.75e+177) || !(z <= 5.6e+158)) {
tmp = z - (z * Math.log(t));
} else {
tmp = (b * (a - 0.5)) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.75e+177) or not (z <= 5.6e+158): tmp = z - (z * math.log(t)) else: tmp = (b * (a - 0.5)) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.75e+177) || !(z <= 5.6e+158)) tmp = Float64(z - Float64(z * log(t))); else tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.75e+177) || ~((z <= 5.6e+158))) tmp = z - (z * log(t)); else tmp = (b * (a - 0.5)) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.75e+177], N[Not[LessEqual[z, 5.6e+158]], $MachinePrecision]], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+177} \lor \neg \left(z \leq 5.6 \cdot 10^{+158}\right):\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + y\right)\\
\end{array}
\end{array}
if z < -1.74999999999999996e177 or 5.60000000000000003e158 < z Initial program 99.4%
Taylor expanded in z around inf 81.5%
Taylor expanded in b around 0 65.8%
if -1.74999999999999996e177 < z < 5.60000000000000003e158Initial program 100.0%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
Simplified91.9%
Final simplification86.2%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * log(t))) + (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)) - (z * log(t))) + (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)) - (z * Math.log(t))) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -2e+204) (not (<= t_1 4e+82))) (+ x t_1) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+204) || !(t_1 <= 4e+82)) {
tmp = x + t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+204)) .or. (.not. (t_1 <= 4d+82))) then
tmp = x + t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+204) || !(t_1 <= 4e+82)) {
tmp = x + t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+204) or not (t_1 <= 4e+82): tmp = x + t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -2e+204) || !(t_1 <= 4e+82)) tmp = Float64(x + t_1); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -2e+204) || ~((t_1 <= 4e+82))) tmp = x + t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+204], N[Not[LessEqual[t$95$1, 4e+82]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+204} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+82}\right):\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.99999999999999998e204 or 3.9999999999999999e82 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
add-cbrt-cube100.0%
pow3100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 85.4%
if -1.99999999999999998e204 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 3.9999999999999999e82Initial program 99.7%
add-cbrt-cube99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 67.3%
+-commutative67.3%
Simplified67.3%
Taylor expanded in a around inf 64.8%
Taylor expanded in b around 0 59.2%
+-commutative59.2%
Simplified59.2%
Final simplification69.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- a 0.5) -50.0) (not (<= (- a 0.5) -0.5))) (+ (+ x y) (* a b)) (+ (+ 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) <= -50.0) || !((a - 0.5) <= -0.5)) {
tmp = (x + y) + (a * b);
} 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) <= (-50.0d0)) .or. (.not. ((a - 0.5d0) <= (-0.5d0)))) then
tmp = (x + y) + (a * b)
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) <= -50.0) || !((a - 0.5) <= -0.5)) {
tmp = (x + y) + (a * b);
} else {
tmp = (x + y) + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a - 0.5) <= -50.0) or not ((a - 0.5) <= -0.5): tmp = (x + y) + (a * b) else: tmp = (x + y) + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a - 0.5) <= -50.0) || !(Float64(a - 0.5) <= -0.5)) tmp = Float64(Float64(x + y) + Float64(a * b)); 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) <= -50.0) || ~(((a - 0.5) <= -0.5))) tmp = (x + y) + (a * b); else tmp = (x + y) + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -50.0], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.5]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -50 \lor \neg \left(a - 0.5 \leq -0.5\right):\\
\;\;\;\;\left(x + y\right) + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + -0.5 \cdot b\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -50 or -0.5 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 84.5%
+-commutative84.5%
Simplified84.5%
Taylor expanded in a around inf 83.8%
if -50 < (-.f64 a #s(literal 1/2 binary64)) < -0.5Initial program 99.8%
add-cbrt-cube99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 72.8%
+-commutative72.8%
Simplified72.8%
Taylor expanded in a around 0 72.8%
Final simplification78.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4e-11) (not (<= b 7.4e+58))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4e-11) || !(b <= 7.4e+58)) {
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 <= (-4d-11)) .or. (.not. (b <= 7.4d+58))) 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 <= -4e-11) || !(b <= 7.4e+58)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4e-11) or not (b <= 7.4e+58): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4e-11) || !(b <= 7.4e+58)) 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 <= -4e-11) || ~((b <= 7.4e+58))) 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, -4e-11], N[Not[LessEqual[b, 7.4e+58]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{-11} \lor \neg \left(b \leq 7.4 \cdot 10^{+58}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -3.99999999999999976e-11 or 7.4000000000000004e58 < b Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in b around inf 69.9%
if -3.99999999999999976e-11 < b < 7.4000000000000004e58Initial program 99.8%
add-cbrt-cube99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 70.8%
+-commutative70.8%
Simplified70.8%
Taylor expanded in a around inf 70.8%
Taylor expanded in b around 0 58.5%
+-commutative58.5%
Simplified58.5%
Final simplification63.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.3e+118) (not (<= a 3.8e+150))) (* a b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.3e+118) || !(a <= 3.8e+150)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-2.3d+118)) .or. (.not. (a <= 3.8d+150))) then
tmp = a * b
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.3e+118) || !(a <= 3.8e+150)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.3e+118) or not (a <= 3.8e+150): tmp = a * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.3e+118) || !(a <= 3.8e+150)) tmp = Float64(a * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.3e+118) || ~((a <= 3.8e+150))) tmp = a * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.3e+118], N[Not[LessEqual[a, 3.8e+150]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+118} \lor \neg \left(a \leq 3.8 \cdot 10^{+150}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.30000000000000016e118 or 3.79999999999999989e150 < a Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 64.7%
*-commutative64.7%
Simplified64.7%
if -2.30000000000000016e118 < a < 3.79999999999999989e150Initial program 99.8%
add-cbrt-cube99.7%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 75.1%
+-commutative75.1%
Simplified75.1%
Taylor expanded in a around inf 62.9%
Taylor expanded in b around 0 49.5%
+-commutative49.5%
Simplified49.5%
Final simplification53.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.5) (not (<= a 1.4e-43))) (* a b) (* -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.4e-43)) {
tmp = a * b;
} else {
tmp = -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.4d-43))) then
tmp = a * b
else
tmp = (-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.4e-43)) {
tmp = a * b;
} else {
tmp = -0.5 * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.5) or not (a <= 1.4e-43): tmp = a * b else: tmp = -0.5 * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.5) || !(a <= 1.4e-43)) tmp = Float64(a * b); else tmp = 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.4e-43))) tmp = a * b; else tmp = -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.4e-43]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(-0.5 * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.5 \lor \neg \left(a \leq 1.4 \cdot 10^{-43}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot b\\
\end{array}
\end{array}
if a < -0.5 or 1.3999999999999999e-43 < a Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 44.0%
*-commutative44.0%
Simplified44.0%
if -0.5 < a < 1.3999999999999999e-43Initial program 99.8%
add-cbrt-cube99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in b around inf 29.2%
Taylor expanded in a around 0 29.2%
Final simplification37.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= y 3.8e-44) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (y <= 3.8e-44) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (y <= 3.8d-44) then
tmp = x + t_1
else
tmp = y + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (y <= 3.8e-44) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if y <= 3.8e-44: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (y <= 3.8e-44) tmp = Float64(x + t_1); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (y <= 3.8e-44) tmp = x + t_1; else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 3.8e-44], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;y \leq 3.8 \cdot 10^{-44}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if y < 3.8000000000000001e-44Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 66.4%
if 3.8000000000000001e-44 < y Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 68.9%
Final simplification67.1%
(FPCore (x y z t a b) :precision binary64 (+ (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (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 = (b * (a - 0.5d0)) + (x + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (x + y);
}
def code(x, y, z, t, a, b): return (b * (a - 0.5)) + (x + y)
function code(x, y, z, t, a, b) return Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y)) end
function tmp = code(x, y, z, t, a, b) tmp = (b * (a - 0.5)) + (x + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(a - 0.5\right) + \left(x + y\right)
\end{array}
Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 78.7%
+-commutative78.7%
Simplified78.7%
Final simplification78.7%
(FPCore (x y z t a b) :precision binary64 (* -0.5 b))
double code(double x, double y, double z, double t, double a, double b) {
return -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 = (-0.5d0) * b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return -0.5 * b;
}
def code(x, y, z, t, a, b): return -0.5 * b
function code(x, y, z, t, a, b) return Float64(-0.5 * b) end
function tmp = code(x, y, z, t, a, b) tmp = -0.5 * b; end
code[x_, y_, z_, t_, a_, b_] := N[(-0.5 * b), $MachinePrecision]
\begin{array}{l}
\\
-0.5 \cdot b
\end{array}
Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 37.3%
Taylor expanded in a around 0 15.3%
Final simplification15.3%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2024185
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))