
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (* z (- 1.0 (log t))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (z * (1.0 - log(t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(1.0 - log(t))) + fma(Float64(a + -0.5), b, Float64(x + y))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(1 - \log t\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -1e+61) (not (<= t_1 5e+31)))
(+ x (+ y t_1))
(+ (* 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+61) || !(t_1 <= 5e+31)) {
tmp = x + (y + t_1);
} 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+61)) .or. (.not. (t_1 <= 5d+31))) then
tmp = x + (y + t_1)
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+61) || !(t_1 <= 5e+31)) {
tmp = x + (y + t_1);
} 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+61) or not (t_1 <= 5e+31): tmp = x + (y + t_1) 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+61) || !(t_1 <= 5e+31)) tmp = Float64(x + Float64(y + t_1)); 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+61) || ~((t_1 <= 5e+31))) tmp = x + (y + t_1); 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+61], N[Not[LessEqual[t$95$1, 5e+31]], $MachinePrecision]], N[(x + N[(y + t$95$1), $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^{+61} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+31}\right):\\
\;\;\;\;x + \left(y + t\_1\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) < -9.99999999999999949e60 or 5.00000000000000027e31 < (*.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 89.8%
if -9.99999999999999949e60 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.00000000000000027e31Initial program 99.9%
+-commutative99.9%
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 b around 0 95.5%
Final simplification92.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z (+ x y)) (* z (log t)))))
(if (or (<= (- a 0.5) -2e+15) (not (<= (- a 0.5) -0.5)))
(+ t_1 (* a b))
(+ t_1 (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x + y)) - (z * log(t));
double tmp;
if (((a - 0.5) <= -2e+15) || !((a - 0.5) <= -0.5)) {
tmp = t_1 + (a * b);
} else {
tmp = t_1 + (-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) :: t_1
real(8) :: tmp
t_1 = (z + (x + y)) - (z * log(t))
if (((a - 0.5d0) <= (-2d+15)) .or. (.not. ((a - 0.5d0) <= (-0.5d0)))) then
tmp = t_1 + (a * b)
else
tmp = t_1 + ((-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 t_1 = (z + (x + y)) - (z * Math.log(t));
double tmp;
if (((a - 0.5) <= -2e+15) || !((a - 0.5) <= -0.5)) {
tmp = t_1 + (a * b);
} else {
tmp = t_1 + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x + y)) - (z * math.log(t)) tmp = 0 if ((a - 0.5) <= -2e+15) or not ((a - 0.5) <= -0.5): tmp = t_1 + (a * b) else: tmp = t_1 + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) tmp = 0.0 if ((Float64(a - 0.5) <= -2e+15) || !(Float64(a - 0.5) <= -0.5)) tmp = Float64(t_1 + Float64(a * b)); else tmp = Float64(t_1 + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x + y)) - (z * log(t)); tmp = 0.0; if (((a - 0.5) <= -2e+15) || ~(((a - 0.5) <= -0.5))) tmp = t_1 + (a * b); else tmp = t_1 + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -2e+15], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.5]], $MachinePrecision]], N[(t$95$1 + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + \left(x + y\right)\right) - z \cdot \log t\\
\mathbf{if}\;a - 0.5 \leq -2 \cdot 10^{+15} \lor \neg \left(a - 0.5 \leq -0.5\right):\\
\;\;\;\;t\_1 + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1 + -0.5 \cdot b\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -2e15 or -0.5 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-lft-in99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 99.3%
*-commutative99.3%
Simplified99.3%
if -2e15 < (-.f64 a #s(literal 1/2 binary64)) < -0.5Initial program 99.9%
Taylor expanded in a around 0 98.8%
*-commutative98.8%
Simplified98.8%
Final simplification99.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ y (* b (- a 0.5))))) (if (<= (+ x y) -2e+22) (+ x t_1) (+ (* z (- 1.0 (log t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (b * (a - 0.5));
double tmp;
if ((x + y) <= -2e+22) {
tmp = x + t_1;
} else {
tmp = (z * (1.0 - log(t))) + 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 + (b * (a - 0.5d0))
if ((x + y) <= (-2d+22)) then
tmp = x + t_1
else
tmp = (z * (1.0d0 - log(t))) + 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 + (b * (a - 0.5));
double tmp;
if ((x + y) <= -2e+22) {
tmp = x + t_1;
} else {
tmp = (z * (1.0 - Math.log(t))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (b * (a - 0.5)) tmp = 0 if (x + y) <= -2e+22: tmp = x + t_1 else: tmp = (z * (1.0 - math.log(t))) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(b * Float64(a - 0.5))) tmp = 0.0 if (Float64(x + y) <= -2e+22) tmp = Float64(x + t_1); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (b * (a - 0.5)); tmp = 0.0; if ((x + y) <= -2e+22) tmp = x + t_1; else tmp = (z * (1.0 - log(t))) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -2e+22], N[(x + t$95$1), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -2 \cdot 10^{+22}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + t\_1\\
\end{array}
\end{array}
if (+.f64 x y) < -2e22Initial 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 86.3%
if -2e22 < (+.f64 x 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 x around 0 82.6%
Final simplification83.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.85e+221) (not (<= z 2.3e+185))) (+ (* z (- 1.0 (log t))) y) (+ x (+ y (* b (- a 0.5))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.85e+221) || !(z <= 2.3e+185)) {
tmp = (z * (1.0 - log(t))) + y;
} 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 <= (-1.85d+221)) .or. (.not. (z <= 2.3d+185))) then
tmp = (z * (1.0d0 - log(t))) + y
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 <= -1.85e+221) || !(z <= 2.3e+185)) {
tmp = (z * (1.0 - Math.log(t))) + y;
} else {
tmp = x + (y + (b * (a - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.85e+221) or not (z <= 2.3e+185): tmp = (z * (1.0 - math.log(t))) + y else: tmp = x + (y + (b * (a - 0.5))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.85e+221) || !(z <= 2.3e+185)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + y); 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 <= -1.85e+221) || ~((z <= 2.3e+185))) tmp = (z * (1.0 - log(t))) + y; else tmp = x + (y + (b * (a - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.85e+221], N[Not[LessEqual[z, 2.3e+185]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $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 -1.85 \cdot 10^{+221} \lor \neg \left(z \leq 2.3 \cdot 10^{+185}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -1.85000000000000001e221 or 2.3000000000000001e185 < z Initial program 99.8%
+-commutative99.8%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 85.2%
Taylor expanded in b around 0 72.5%
if -1.85000000000000001e221 < z < 2.3000000000000001e185Initial 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 89.8%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8.8e+225)
(- (+ z y) (* z (log t)))
(if (<= z 4.6e+185)
(+ x (+ y (* b (- a 0.5))))
(+ (* z (- 1.0 (log t))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.8e+225) {
tmp = (z + y) - (z * log(t));
} else if (z <= 4.6e+185) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (z * (1.0 - log(t))) + 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 <= (-8.8d+225)) then
tmp = (z + y) - (z * log(t))
else if (z <= 4.6d+185) then
tmp = x + (y + (b * (a - 0.5d0)))
else
tmp = (z * (1.0d0 - log(t))) + 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 <= -8.8e+225) {
tmp = (z + y) - (z * Math.log(t));
} else if (z <= 4.6e+185) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (z * (1.0 - Math.log(t))) + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.8e+225: tmp = (z + y) - (z * math.log(t)) elif z <= 4.6e+185: tmp = x + (y + (b * (a - 0.5))) else: tmp = (z * (1.0 - math.log(t))) + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.8e+225) tmp = Float64(Float64(z + y) - Float64(z * log(t))); elseif (z <= 4.6e+185) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8.8e+225) tmp = (z + y) - (z * log(t)); elseif (z <= 4.6e+185) tmp = x + (y + (b * (a - 0.5))); else tmp = (z * (1.0 - log(t))) + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.8e+225], N[(N[(z + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+185], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+225}:\\
\;\;\;\;\left(z + y\right) - z \cdot \log t\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+185}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\
\end{array}
\end{array}
if z < -8.80000000000000055e225Initial program 99.7%
+-commutative99.7%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 88.3%
Taylor expanded in b around 0 77.3%
distribute-rgt-out--77.2%
*-un-lft-identity77.2%
*-commutative77.2%
Applied egg-rr77.2%
Taylor expanded in y around 0 77.2%
if -8.80000000000000055e225 < z < 4.6000000000000003e185Initial 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 89.8%
if 4.6000000000000003e185 < 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.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 83.0%
Taylor expanded in b around 0 69.0%
Final simplification86.7%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (+ (* a b) (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * log(t))) + ((a * b) + (-0.5 * b));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((z + (x + y)) - (z * log(t))) + ((a * b) + ((-0.5d0) * b))
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))) + ((a * b) + (-0.5 * b));
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + ((a * b) + (-0.5 * b))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(Float64(a * b) + Float64(-0.5 * b))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + ((a * b) + (-0.5 * b)); 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[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + \left(a \cdot b + -0.5 \cdot b\right)
\end{array}
Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-lft-in99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.35e+223) (not (<= z 2.4e+214))) (* 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 <= -1.35e+223) || !(z <= 2.4e+214)) {
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 <= (-1.35d+223)) .or. (.not. (z <= 2.4d+214))) 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 <= -1.35e+223) || !(z <= 2.4e+214)) {
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 <= -1.35e+223) or not (z <= 2.4e+214): 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 <= -1.35e+223) || !(z <= 2.4e+214)) 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 <= -1.35e+223) || ~((z <= 2.4e+214))) 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, -1.35e+223], N[Not[LessEqual[z, 2.4e+214]], $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 -1.35 \cdot 10^{+223} \lor \neg \left(z \leq 2.4 \cdot 10^{+214}\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 < -1.35e223 or 2.4000000000000001e214 < 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.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 85.7%
Taylor expanded in z around inf 69.9%
if -1.35e223 < z < 2.4000000000000001e214Initial 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 88.9%
Final simplification85.9%
(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 (<= x -7e+182)
x
(if (<= x -3.6e+159)
(* a b)
(if (<= x -5.7e+88) x (if (<= x -3.2e-300) (* a b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -7e+182) {
tmp = x;
} else if (x <= -3.6e+159) {
tmp = a * b;
} else if (x <= -5.7e+88) {
tmp = x;
} else if (x <= -3.2e-300) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-7d+182)) then
tmp = x
else if (x <= (-3.6d+159)) then
tmp = a * b
else if (x <= (-5.7d+88)) then
tmp = x
else if (x <= (-3.2d-300)) then
tmp = a * b
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -7e+182) {
tmp = x;
} else if (x <= -3.6e+159) {
tmp = a * b;
} else if (x <= -5.7e+88) {
tmp = x;
} else if (x <= -3.2e-300) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -7e+182: tmp = x elif x <= -3.6e+159: tmp = a * b elif x <= -5.7e+88: tmp = x elif x <= -3.2e-300: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -7e+182) tmp = x; elseif (x <= -3.6e+159) tmp = Float64(a * b); elseif (x <= -5.7e+88) tmp = x; elseif (x <= -3.2e-300) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -7e+182) tmp = x; elseif (x <= -3.6e+159) tmp = a * b; elseif (x <= -5.7e+88) tmp = x; elseif (x <= -3.2e-300) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -7e+182], x, If[LessEqual[x, -3.6e+159], N[(a * b), $MachinePrecision], If[LessEqual[x, -5.7e+88], x, If[LessEqual[x, -3.2e-300], N[(a * b), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+182}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{+159}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -5.7 \cdot 10^{+88}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-300}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -7.00000000000000045e182 or -3.60000000000000037e159 < x < -5.70000000000000021e88Initial 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 63.5%
if -7.00000000000000045e182 < x < -3.60000000000000037e159 or -5.70000000000000021e88 < x < -3.20000000000000021e-300Initial 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 40.1%
*-commutative40.1%
Simplified40.1%
if -3.20000000000000021e-300 < x Initial program 99.9%
+-commutative99.9%
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 y around inf 27.6%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y 2.65e+91) (and (not (<= y 4e+167)) (<= y 2.9e+220))) (+ x (* b (- a 0.5))) y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= 2.65e+91) || (!(y <= 4e+167) && (y <= 2.9e+220))) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= 2.65d+91) .or. (.not. (y <= 4d+167)) .and. (y <= 2.9d+220)) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= 2.65e+91) || (!(y <= 4e+167) && (y <= 2.9e+220))) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= 2.65e+91) or (not (y <= 4e+167) and (y <= 2.9e+220)): tmp = x + (b * (a - 0.5)) else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= 2.65e+91) || (!(y <= 4e+167) && (y <= 2.9e+220))) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= 2.65e+91) || (~((y <= 4e+167)) && (y <= 2.9e+220))) tmp = x + (b * (a - 0.5)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, 2.65e+91], And[N[Not[LessEqual[y, 4e+167]], $MachinePrecision], LessEqual[y, 2.9e+220]]], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.65 \cdot 10^{+91} \lor \neg \left(y \leq 4 \cdot 10^{+167}\right) \land y \leq 2.9 \cdot 10^{+220}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.64999999999999998e91 or 4.0000000000000002e167 < y < 2.89999999999999991e220Initial program 99.9%
Taylor expanded in y around inf 72.7%
associate-+r+72.7%
associate--l+72.8%
div-sub73.5%
*-commutative73.5%
cancel-sign-sub-inv73.5%
*-lft-identity73.5%
distribute-rgt-in73.5%
sub-neg73.5%
*-commutative73.5%
associate-/l*73.5%
Simplified73.5%
Taylor expanded in x around inf 63.7%
if 2.64999999999999998e91 < y < 4.0000000000000002e167 or 2.89999999999999991e220 < y 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 y around inf 66.6%
Final simplification64.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= b -4.6e-95) t_1 (if (<= b -4.2e-286) x (if (<= b 2.7e-20) 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 (b <= -4.6e-95) {
tmp = t_1;
} else if (b <= -4.2e-286) {
tmp = x;
} else if (b <= 2.7e-20) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (b <= (-4.6d-95)) then
tmp = t_1
else if (b <= (-4.2d-286)) then
tmp = x
else if (b <= 2.7d-20) then
tmp = y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (b <= -4.6e-95) {
tmp = t_1;
} else if (b <= -4.2e-286) {
tmp = x;
} else if (b <= 2.7e-20) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if b <= -4.6e-95: tmp = t_1 elif b <= -4.2e-286: tmp = x elif b <= 2.7e-20: tmp = y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (b <= -4.6e-95) tmp = t_1; elseif (b <= -4.2e-286) tmp = x; elseif (b <= 2.7e-20) tmp = y; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (b <= -4.6e-95) tmp = t_1; elseif (b <= -4.2e-286) tmp = x; elseif (b <= 2.7e-20) tmp = y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.6e-95], t$95$1, If[LessEqual[b, -4.2e-286], x, If[LessEqual[b, 2.7e-20], y, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;b \leq -4.6 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-286}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{-20}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.59999999999999998e-95 or 2.7e-20 < 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 b around inf 59.1%
if -4.59999999999999998e-95 < b < -4.19999999999999977e-286Initial program 99.9%
+-commutative99.9%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 33.4%
if -4.19999999999999977e-286 < b < 2.7e-20Initial program 99.9%
+-commutative99.9%
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 y around inf 31.7%
Final simplification48.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 5.1e+79) (+ x (* b (- a 0.5))) (+ x (+ y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 5.1e+79) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 5.1d+79) then
tmp = x + (b * (a - 0.5d0))
else
tmp = x + (y + (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 5.1e+79) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 5.1e+79: tmp = x + (b * (a - 0.5)) else: tmp = x + (y + (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 5.1e+79) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 5.1e+79) tmp = x + (b * (a - 0.5)); else tmp = x + (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 5.1e+79], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.1 \cdot 10^{+79}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if y < 5.1000000000000001e79Initial program 99.9%
Taylor expanded in y around inf 71.1%
associate-+r+71.1%
associate--l+71.1%
div-sub71.9%
*-commutative71.9%
cancel-sign-sub-inv71.9%
*-lft-identity71.9%
distribute-rgt-in71.9%
sub-neg71.9%
*-commutative71.9%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in x around inf 63.9%
if 5.1000000000000001e79 < y Initial program 100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-lft-in100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in z around 0 92.3%
Final simplification68.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= x -3.5e+22) (+ 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 (x <= -3.5e+22) {
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 (x <= (-3.5d+22)) 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 (x <= -3.5e+22) {
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 x <= -3.5e+22: 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 (x <= -3.5e+22) 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 (x <= -3.5e+22) 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[x, -3.5e+22], 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}\;x \leq -3.5 \cdot 10^{+22}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if x < -3.5e22Initial program 100.0%
Taylor expanded in y around inf 64.0%
associate-+r+64.0%
associate--l+64.0%
div-sub65.3%
*-commutative65.3%
cancel-sign-sub-inv65.3%
*-lft-identity65.3%
distribute-rgt-in65.3%
sub-neg65.3%
*-commutative65.3%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in x around inf 79.9%
if -3.5e22 < 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 x around 0 85.3%
Taylor expanded in z around 0 63.2%
Final simplification67.3%
(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 78.7%
Final simplification78.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.4e+22) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.4e+22) {
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 (x <= (-1.4d+22)) 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 (x <= -1.4e+22) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.4e+22: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.4e+22) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.4e+22) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.4e+22], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.4e22Initial 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 48.5%
if -1.4e22 < 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 y around inf 26.2%
Final simplification31.6%
(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 23.3%
Final simplification23.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 2024130
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(+ (+ (+ 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)))