
(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 (fma (+ a -0.5) b (+ x (+ y (- z (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((a + -0.5), b, (x + (y + (z - (z * log(t))))));
}
function code(x, y, z, t, a, b) return fma(Float64(a + -0.5), b, Float64(x + Float64(y + Float64(z - Float64(z * log(t)))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + N[(y + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a + -0.5, b, x + \left(y + \left(z - z \cdot \log t\right)\right)\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
associate--l+99.9%
associate-+l+99.9%
Simplified99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))) (t_2 (* b (- a 0.5))))
(if (or (<= t_2 -2e+224) (not (<= t_2 2e+111)))
(- (+ x (+ z t_2)) t_1)
(- (+ x (+ y (+ z (* -0.5 b)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double t_2 = b * (a - 0.5);
double tmp;
if ((t_2 <= -2e+224) || !(t_2 <= 2e+111)) {
tmp = (x + (z + t_2)) - t_1;
} else {
tmp = (x + (y + (z + (-0.5 * b)))) - 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) :: t_2
real(8) :: tmp
t_1 = z * log(t)
t_2 = b * (a - 0.5d0)
if ((t_2 <= (-2d+224)) .or. (.not. (t_2 <= 2d+111))) then
tmp = (x + (z + t_2)) - t_1
else
tmp = (x + (y + (z + ((-0.5d0) * b)))) - 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 t_2 = b * (a - 0.5);
double tmp;
if ((t_2 <= -2e+224) || !(t_2 <= 2e+111)) {
tmp = (x + (z + t_2)) - t_1;
} else {
tmp = (x + (y + (z + (-0.5 * b)))) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) t_2 = b * (a - 0.5) tmp = 0 if (t_2 <= -2e+224) or not (t_2 <= 2e+111): tmp = (x + (z + t_2)) - t_1 else: tmp = (x + (y + (z + (-0.5 * b)))) - t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) t_2 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_2 <= -2e+224) || !(t_2 <= 2e+111)) tmp = Float64(Float64(x + Float64(z + t_2)) - t_1); else tmp = Float64(Float64(x + Float64(y + Float64(z + Float64(-0.5 * b)))) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); t_2 = b * (a - 0.5); tmp = 0.0; if ((t_2 <= -2e+224) || ~((t_2 <= 2e+111))) tmp = (x + (z + t_2)) - t_1; else tmp = (x + (y + (z + (-0.5 * b)))) - 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]}, Block[{t$95$2 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -2e+224], N[Not[LessEqual[t$95$2, 2e+111]], $MachinePrecision]], N[(N[(x + N[(z + t$95$2), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(x + N[(y + N[(z + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
t_2 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+224} \lor \neg \left(t\_2 \leq 2 \cdot 10^{+111}\right):\\
\;\;\;\;\left(x + \left(z + t\_2\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.99999999999999994e224 or 1.99999999999999991e111 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in y around 0 93.9%
if -1.99999999999999994e224 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999991e111Initial program 99.9%
add-cube-cbrt99.4%
pow399.4%
Applied egg-rr99.4%
Taylor expanded in a around 0 95.9%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -2e+224) (not (<= t_1 1e+170)))
(+ x (+ y t_1))
(- (+ x (+ y (+ z (* -0.5 b)))) (* 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 ((t_1 <= -2e+224) || !(t_1 <= 1e+170)) {
tmp = x + (y + t_1);
} else {
tmp = (x + (y + (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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+224)) .or. (.not. (t_1 <= 1d+170))) then
tmp = x + (y + t_1)
else
tmp = (x + (y + (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 t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+224) || !(t_1 <= 1e+170)) {
tmp = x + (y + t_1);
} else {
tmp = (x + (y + (z + (-0.5 * b)))) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+224) or not (t_1 <= 1e+170): tmp = x + (y + t_1) else: tmp = (x + (y + (z + (-0.5 * b)))) - (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 ((t_1 <= -2e+224) || !(t_1 <= 1e+170)) tmp = Float64(x + Float64(y + t_1)); else tmp = Float64(Float64(x + Float64(y + Float64(z + Float64(-0.5 * b)))) - 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 ((t_1 <= -2e+224) || ~((t_1 <= 1e+170))) tmp = x + (y + t_1); else tmp = (x + (y + (z + (-0.5 * b)))) - (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[Or[LessEqual[t$95$1, -2e+224], N[Not[LessEqual[t$95$1, 1e+170]], $MachinePrecision]], N[(x + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y + N[(z + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+224} \lor \neg \left(t\_1 \leq 10^{+170}\right):\\
\;\;\;\;x + \left(y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.99999999999999994e224 or 1.00000000000000003e170 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 97.4%
if -1.99999999999999994e224 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.00000000000000003e170Initial program 99.8%
add-cube-cbrt99.4%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in a around 0 94.5%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -2e+120) (not (<= t_1 2e+113)))
(+ x (+ y t_1))
(+ (+ x y) (* z (- 1.0 (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 ((t_1 <= -2e+120) || !(t_1 <= 2e+113)) {
tmp = x + (y + t_1);
} else {
tmp = (x + y) + (z * (1.0 - log(t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+120)) .or. (.not. (t_1 <= 2d+113))) then
tmp = x + (y + t_1)
else
tmp = (x + y) + (z * (1.0d0 - log(t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+120) || !(t_1 <= 2e+113)) {
tmp = x + (y + t_1);
} else {
tmp = (x + y) + (z * (1.0 - Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+120) or not (t_1 <= 2e+113): tmp = x + (y + t_1) else: tmp = (x + y) + (z * (1.0 - 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 ((t_1 <= -2e+120) || !(t_1 <= 2e+113)) tmp = Float64(x + Float64(y + t_1)); else tmp = Float64(Float64(x + y) + Float64(z * Float64(1.0 - 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 ((t_1 <= -2e+120) || ~((t_1 <= 2e+113))) tmp = x + (y + t_1); else tmp = (x + y) + (z * (1.0 - 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[Or[LessEqual[t$95$1, -2e+120], N[Not[LessEqual[t$95$1, 2e+113]], $MachinePrecision]], N[(x + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+120} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+113}\right):\\
\;\;\;\;x + \left(y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2e120 or 2e113 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 91.5%
if -2e120 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2e113Initial program 99.8%
+-commutative99.8%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 91.8%
Final simplification91.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* z (log t))) (t_2 (+ z (* b (- a 0.5))))) (if (<= (+ x y) -1e-95) (- (+ x t_2) t_1) (- (+ y t_2) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double t_2 = z + (b * (a - 0.5));
double tmp;
if ((x + y) <= -1e-95) {
tmp = (x + t_2) - t_1;
} else {
tmp = (y + t_2) - 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) :: t_2
real(8) :: tmp
t_1 = z * log(t)
t_2 = z + (b * (a - 0.5d0))
if ((x + y) <= (-1d-95)) then
tmp = (x + t_2) - t_1
else
tmp = (y + t_2) - 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 t_2 = z + (b * (a - 0.5));
double tmp;
if ((x + y) <= -1e-95) {
tmp = (x + t_2) - t_1;
} else {
tmp = (y + t_2) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) t_2 = z + (b * (a - 0.5)) tmp = 0 if (x + y) <= -1e-95: tmp = (x + t_2) - t_1 else: tmp = (y + t_2) - t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) t_2 = Float64(z + Float64(b * Float64(a - 0.5))) tmp = 0.0 if (Float64(x + y) <= -1e-95) tmp = Float64(Float64(x + t_2) - t_1); else tmp = Float64(Float64(y + t_2) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); t_2 = z + (b * (a - 0.5)); tmp = 0.0; if ((x + y) <= -1e-95) tmp = (x + t_2) - t_1; else tmp = (y + t_2) - 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]}, Block[{t$95$2 = N[(z + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -1e-95], N[(N[(x + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(y + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
t_2 := z + b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -1 \cdot 10^{-95}:\\
\;\;\;\;\left(x + t\_2\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y + t\_2\right) - t\_1\\
\end{array}
\end{array}
if (+.f64 x y) < -9.99999999999999989e-96Initial program 100.0%
Taylor expanded in y around 0 76.1%
if -9.99999999999999989e-96 < (+.f64 x y) Initial program 99.9%
Taylor expanded in x around 0 82.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.9e+211) (not (<= z 1.65e+185))) (* z (- 1.0 (log t))) (+ x (+ y (* b (- a 0.5))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e+211) || !(z <= 1.65e+185)) {
tmp = z * (1.0 - log(t));
} else {
tmp = x + (y + (b * (a - 0.5)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.9d+211)) .or. (.not. (z <= 1.65d+185))) then
tmp = z * (1.0d0 - log(t))
else
tmp = x + (y + (b * (a - 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e+211) || !(z <= 1.65e+185)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = x + (y + (b * (a - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.9e+211) or not (z <= 1.65e+185): tmp = z * (1.0 - math.log(t)) else: tmp = x + (y + (b * (a - 0.5))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.9e+211) || !(z <= 1.65e+185)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.9e+211) || ~((z <= 1.65e+185))) tmp = z * (1.0 - log(t)); else tmp = x + (y + (b * (a - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.9e+211], N[Not[LessEqual[z, 1.65e+185]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+211} \lor \neg \left(z \leq 1.65 \cdot 10^{+185}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -2.9e211 or 1.65000000000000006e185 < z 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.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around inf 58.5%
associate--l+58.5%
associate-/l*58.6%
Simplified58.6%
Taylor expanded in z around inf 36.4%
div-sub36.5%
associate-*r*66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in z around 0 65.5%
if -2.9e211 < z < 1.65000000000000006e185Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 86.3%
Final simplification82.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.75e+211) (* (* b z) (/ (- 1.0 (log t)) b)) (if (<= z 2e+185) (+ x (+ y (* b (- a 0.5)))) (- z (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+211) {
tmp = (b * z) * ((1.0 - log(t)) / b);
} else if (z <= 2e+185) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = z - (z * log(t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.75d+211)) then
tmp = (b * z) * ((1.0d0 - log(t)) / b)
else if (z <= 2d+185) then
tmp = x + (y + (b * (a - 0.5d0)))
else
tmp = z - (z * log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+211) {
tmp = (b * z) * ((1.0 - Math.log(t)) / b);
} else if (z <= 2e+185) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.75e+211: tmp = (b * z) * ((1.0 - math.log(t)) / b) elif z <= 2e+185: tmp = x + (y + (b * (a - 0.5))) else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+211) tmp = Float64(Float64(b * z) * Float64(Float64(1.0 - log(t)) / b)); elseif (z <= 2e+185) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); else tmp = Float64(z - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.75e+211) tmp = (b * z) * ((1.0 - log(t)) / b); elseif (z <= 2e+185) tmp = x + (y + (b * (a - 0.5))); else tmp = z - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+211], N[(N[(b * z), $MachinePrecision] * N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+185], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+211}:\\
\;\;\;\;\left(b \cdot z\right) \cdot \frac{1 - \log t}{b}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+185}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -1.74999999999999998e211Initial 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 inf 52.9%
associate--l+52.9%
associate-/l*52.9%
Simplified52.9%
Taylor expanded in z around inf 32.9%
div-sub32.9%
associate-*r*61.9%
*-commutative61.9%
Simplified61.9%
if -1.74999999999999998e211 < z < 2e185Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 86.3%
if 2e185 < z Initial program 99.9%
Taylor expanded in z around inf 87.8%
Taylor expanded in b around 0 71.5%
Final simplification83.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.4e+211) (* z (- 1.0 (log t))) (if (<= z 1.2e+184) (+ x (+ y (* b (- a 0.5)))) (- z (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+211) {
tmp = z * (1.0 - log(t));
} else if (z <= 1.2e+184) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = z - (z * log(t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.4d+211)) then
tmp = z * (1.0d0 - log(t))
else if (z <= 1.2d+184) then
tmp = x + (y + (b * (a - 0.5d0)))
else
tmp = z - (z * log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+211) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 1.2e+184) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.4e+211: tmp = z * (1.0 - math.log(t)) elif z <= 1.2e+184: tmp = x + (y + (b * (a - 0.5))) else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.4e+211) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 1.2e+184) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); else tmp = Float64(z - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.4e+211) tmp = z * (1.0 - log(t)); elseif (z <= 1.2e+184) tmp = x + (y + (b * (a - 0.5))); else tmp = z - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.4e+211], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+184], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+211}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+184}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -2.40000000000000018e211Initial 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 inf 52.9%
associate--l+52.9%
associate-/l*52.9%
Simplified52.9%
Taylor expanded in z around inf 32.9%
div-sub32.9%
associate-*r*61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in z around 0 58.8%
if -2.40000000000000018e211 < z < 1.19999999999999998e184Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 86.3%
if 1.19999999999999998e184 < z Initial program 99.9%
Taylor expanded in z around inf 87.8%
Taylor expanded in b around 0 71.5%
(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.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.32e+51)
(* a b)
(if (<= a -1.52e-53)
x
(if (<= a 6.2e-36) (* -0.5 b) (if (<= a 2e+75) x (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.32e+51) {
tmp = a * b;
} else if (a <= -1.52e-53) {
tmp = x;
} else if (a <= 6.2e-36) {
tmp = -0.5 * b;
} else if (a <= 2e+75) {
tmp = x;
} 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 (a <= (-1.32d+51)) then
tmp = a * b
else if (a <= (-1.52d-53)) then
tmp = x
else if (a <= 6.2d-36) then
tmp = (-0.5d0) * b
else if (a <= 2d+75) then
tmp = x
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 (a <= -1.32e+51) {
tmp = a * b;
} else if (a <= -1.52e-53) {
tmp = x;
} else if (a <= 6.2e-36) {
tmp = -0.5 * b;
} else if (a <= 2e+75) {
tmp = x;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.32e+51: tmp = a * b elif a <= -1.52e-53: tmp = x elif a <= 6.2e-36: tmp = -0.5 * b elif a <= 2e+75: tmp = x else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.32e+51) tmp = Float64(a * b); elseif (a <= -1.52e-53) tmp = x; elseif (a <= 6.2e-36) tmp = Float64(-0.5 * b); elseif (a <= 2e+75) tmp = x; else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.32e+51) tmp = a * b; elseif (a <= -1.52e-53) tmp = x; elseif (a <= 6.2e-36) tmp = -0.5 * b; elseif (a <= 2e+75) tmp = x; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.32e+51], N[(a * b), $MachinePrecision], If[LessEqual[a, -1.52e-53], x, If[LessEqual[a, 6.2e-36], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, 2e+75], x, N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.32 \cdot 10^{+51}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq -1.52 \cdot 10^{-53}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-36}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+75}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -1.32e51 or 1.99999999999999985e75 < a Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 57.1%
*-commutative57.1%
Simplified57.1%
if -1.32e51 < a < -1.5200000000000001e-53 or 6.1999999999999997e-36 < a < 1.99999999999999985e75Initial 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%
Taylor expanded in x around inf 25.8%
if -1.5200000000000001e-53 < a < 6.1999999999999997e-36Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 35.1%
Taylor expanded in a around 0 35.1%
Final simplification42.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* a b))))
(if (<= a -1.85e-22)
t_1
(if (<= a 1.7e-35) (+ y (* -0.5 b)) (if (<= a 2e+75) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (a * b);
double tmp;
if (a <= -1.85e-22) {
tmp = t_1;
} else if (a <= 1.7e-35) {
tmp = y + (-0.5 * b);
} else if (a <= 2e+75) {
tmp = x;
} 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 = y + (a * b)
if (a <= (-1.85d-22)) then
tmp = t_1
else if (a <= 1.7d-35) then
tmp = y + ((-0.5d0) * b)
else if (a <= 2d+75) then
tmp = x
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 = y + (a * b);
double tmp;
if (a <= -1.85e-22) {
tmp = t_1;
} else if (a <= 1.7e-35) {
tmp = y + (-0.5 * b);
} else if (a <= 2e+75) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (a * b) tmp = 0 if a <= -1.85e-22: tmp = t_1 elif a <= 1.7e-35: tmp = y + (-0.5 * b) elif a <= 2e+75: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(a * b)) tmp = 0.0 if (a <= -1.85e-22) tmp = t_1; elseif (a <= 1.7e-35) tmp = Float64(y + Float64(-0.5 * b)); elseif (a <= 2e+75) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (a * b); tmp = 0.0; if (a <= -1.85e-22) tmp = t_1; elseif (a <= 1.7e-35) tmp = y + (-0.5 * b); elseif (a <= 2e+75) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.85e-22], t$95$1, If[LessEqual[a, 1.7e-35], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e+75], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + a \cdot b\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-35}:\\
\;\;\;\;y + -0.5 \cdot b\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+75}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.85e-22 or 1.99999999999999985e75 < a Initial program 99.9%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 66.0%
Taylor expanded in a around inf 66.0%
if -1.85e-22 < a < 1.7000000000000001e-35Initial program 99.9%
add-cube-cbrt99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 50.7%
Taylor expanded in a around 0 50.7%
*-commutative50.7%
Simplified50.7%
if 1.7000000000000001e-35 < a < 1.99999999999999985e75Initial 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%
Taylor expanded in x around inf 18.4%
Final simplification55.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.6e+124) (not (<= b 1.25e+110))) (* b (- a 0.5)) (+ y (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.6e+124) || !(b <= 1.25e+110)) {
tmp = b * (a - 0.5);
} 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 ((b <= (-7.6d+124)) .or. (.not. (b <= 1.25d+110))) then
tmp = b * (a - 0.5d0)
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 ((b <= -7.6e+124) || !(b <= 1.25e+110)) {
tmp = b * (a - 0.5);
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.6e+124) or not (b <= 1.25e+110): tmp = b * (a - 0.5) else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.6e+124) || !(b <= 1.25e+110)) tmp = Float64(b * Float64(a - 0.5)); 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 ((b <= -7.6e+124) || ~((b <= 1.25e+110))) tmp = b * (a - 0.5); else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.6e+124], N[Not[LessEqual[b, 1.25e+110]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{+124} \lor \neg \left(b \leq 1.25 \cdot 10^{+110}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if b < -7.5999999999999997e124 or 1.24999999999999995e110 < b Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 81.7%
if -7.5999999999999997e124 < b < 1.24999999999999995e110Initial program 99.9%
add-cube-cbrt99.5%
pow399.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 41.4%
Taylor expanded in a around inf 38.7%
Final simplification53.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.5e-283) x (if (<= y 7.8e+18) (* -0.5 b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.5e-283) {
tmp = x;
} else if (y <= 7.8e+18) {
tmp = -0.5 * 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 <= (-3.5d-283)) then
tmp = x
else if (y <= 7.8d+18) then
tmp = (-0.5d0) * 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 <= -3.5e-283) {
tmp = x;
} else if (y <= 7.8e+18) {
tmp = -0.5 * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.5e-283: tmp = x elif y <= 7.8e+18: tmp = -0.5 * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.5e-283) tmp = x; elseif (y <= 7.8e+18) tmp = Float64(-0.5 * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.5e-283) tmp = x; elseif (y <= 7.8e+18) tmp = -0.5 * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.5e-283], x, If[LessEqual[y, 7.8e+18], N[(-0.5 * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-283}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+18}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -3.4999999999999999e-283Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 22.6%
if -3.4999999999999999e-283 < y < 7.8e18Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 54.9%
Taylor expanded in a around 0 29.9%
if 7.8e18 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 33.1%
Final simplification27.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= y 1.55e+30) (+ 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 <= 1.55e+30) {
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 <= 1.55d+30) 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 <= 1.55e+30) {
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 <= 1.55e+30: 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 <= 1.55e+30) 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 <= 1.55e+30) 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, 1.55e+30], 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 1.55 \cdot 10^{+30}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if y < 1.5499999999999999e30Initial program 99.9%
add-cube-cbrt99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 63.3%
if 1.5499999999999999e30 < y Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 74.2%
Final simplification66.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.2e+120) (+ x (* b (- a 0.5))) (+ y (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.2e+120) {
tmp = x + (b * (a - 0.5));
} 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 <= 1.2d+120) then
tmp = x + (b * (a - 0.5d0))
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 <= 1.2e+120) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.2e+120: tmp = x + (b * (a - 0.5)) else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.2e+120) tmp = Float64(x + Float64(b * Float64(a - 0.5))); 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 <= 1.2e+120) tmp = x + (b * (a - 0.5)); else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.2e+120], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{+120}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if y < 1.2e120Initial program 99.9%
add-cube-cbrt99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 61.6%
if 1.2e120 < y Initial program 99.9%
add-cube-cbrt99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 82.4%
Taylor expanded in a around inf 75.5%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.7e+194) x (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.7e+194) {
tmp = x;
} else {
tmp = 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 (x <= (-1.7d+194)) then
tmp = x
else
tmp = 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 (x <= -1.7e+194) {
tmp = x;
} else {
tmp = b * (a - 0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.7e+194: tmp = x else: tmp = b * (a - 0.5) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.7e+194) tmp = x; else tmp = Float64(b * Float64(a - 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.7e+194) tmp = x; else tmp = b * (a - 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.7e+194], x, N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+194}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if x < -1.7000000000000001e194Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 69.9%
if -1.7000000000000001e194 < x Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 41.5%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + (b * (a - 0.5)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + (y + (b * (a - 0.5d0)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y + (b * (a - 0.5)));
}
def code(x, y, z, t, a, b): return x + (y + (b * (a - 0.5)))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + (b * (a - 0.5))); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + b \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 77.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.85e+31) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.85e+31) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 1.85d+31) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.85e+31) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.85e+31: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.85e+31) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.85e+31) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.85e+31], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.85 \cdot 10^{+31}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.8499999999999999e31Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 25.5%
if 1.8499999999999999e31 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 34.5%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 21.1%
(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 2024116
(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)))