
(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 22 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 (<= (+ x y) -2e+97)
(+ x (+ y t_1))
(+ y (+ (* z (- 1.0 (log t))) 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 + y) <= -2e+97) {
tmp = x + (y + t_1);
} else {
tmp = y + ((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 = b * (a - 0.5d0)
if ((x + y) <= (-2d+97)) then
tmp = x + (y + t_1)
else
tmp = y + ((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 = b * (a - 0.5);
double tmp;
if ((x + y) <= -2e+97) {
tmp = x + (y + t_1);
} else {
tmp = y + ((z * (1.0 - Math.log(t))) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= -2e+97: tmp = x + (y + t_1) else: tmp = y + ((z * (1.0 - math.log(t))) + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -2e+97) tmp = Float64(x + Float64(y + t_1)); else tmp = Float64(y + 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 = b * (a - 0.5); tmp = 0.0; if ((x + y) <= -2e+97) tmp = x + (y + t_1); else tmp = y + ((z * (1.0 - log(t))) + 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[N[(x + y), $MachinePrecision], -2e+97], N[(x + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -2 \cdot 10^{+97}:\\
\;\;\;\;x + \left(y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y + \left(z \cdot \left(1 - \log t\right) + t\_1\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -2.0000000000000001e97Initial 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 89.5%
if -2.0000000000000001e97 < (+.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 84.5%
Final simplification85.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= (+ x y) -2e-52)
(- (+ x (+ z t_1)) (* z (log t)))
(+ y (+ (* z (- 1.0 (log t))) 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 + y) <= -2e-52) {
tmp = (x + (z + t_1)) - (z * log(t));
} else {
tmp = y + ((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 = b * (a - 0.5d0)
if ((x + y) <= (-2d-52)) then
tmp = (x + (z + t_1)) - (z * log(t))
else
tmp = y + ((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 = b * (a - 0.5);
double tmp;
if ((x + y) <= -2e-52) {
tmp = (x + (z + t_1)) - (z * Math.log(t));
} else {
tmp = y + ((z * (1.0 - Math.log(t))) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= -2e-52: tmp = (x + (z + t_1)) - (z * math.log(t)) else: tmp = y + ((z * (1.0 - math.log(t))) + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -2e-52) tmp = Float64(Float64(x + Float64(z + t_1)) - Float64(z * log(t))); else tmp = Float64(y + 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 = b * (a - 0.5); tmp = 0.0; if ((x + y) <= -2e-52) tmp = (x + (z + t_1)) - (z * log(t)); else tmp = y + ((z * (1.0 - log(t))) + 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[N[(x + y), $MachinePrecision], -2e-52], N[(N[(x + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -2 \cdot 10^{-52}:\\
\;\;\;\;\left(x + \left(z + t\_1\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;y + \left(z \cdot \left(1 - \log t\right) + t\_1\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -2e-52Initial program 99.9%
Taylor expanded in y around 0 82.0%
if -2e-52 < (+.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.9%
Final simplification82.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.6e+214) (not (<= z 6.2e+44))) (+ (* z (- 1.0 (log t))) (+ x 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.6e+214) || !(z <= 6.2e+44)) {
tmp = (z * (1.0 - log(t))) + (x + 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.6d+214)) .or. (.not. (z <= 6.2d+44))) then
tmp = (z * (1.0d0 - log(t))) + (x + 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.6e+214) || !(z <= 6.2e+44)) {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
} else {
tmp = x + (y + (b * (a - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.6e+214) or not (z <= 6.2e+44): tmp = (z * (1.0 - math.log(t))) + (x + 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.6e+214) || !(z <= 6.2e+44)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + 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.6e+214) || ~((z <= 6.2e+44))) tmp = (z * (1.0 - log(t))) + (x + 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.6e+214], N[Not[LessEqual[z, 6.2e+44]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $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.6 \cdot 10^{+214} \lor \neg \left(z \leq 6.2 \cdot 10^{+44}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -1.59999999999999997e214 or 6.19999999999999991e44 < 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.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around 0 82.1%
if -1.59999999999999997e214 < z < 6.19999999999999991e44Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
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 92.6%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.5e+214)
(+ (* z (- 1.0 (log t))) (+ x y))
(if (<= z 2.05e+64)
(+ x (+ y (* b (- a 0.5))))
(- (+ x (+ z y)) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.5e+214) {
tmp = (z * (1.0 - log(t))) + (x + y);
} else if (z <= 2.05e+64) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (x + (z + y)) - (z * log(t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.5d+214)) then
tmp = (z * (1.0d0 - log(t))) + (x + y)
else if (z <= 2.05d+64) then
tmp = x + (y + (b * (a - 0.5d0)))
else
tmp = (x + (z + y)) - (z * log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.5e+214) {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
} else if (z <= 2.05e+64) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (x + (z + y)) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.5e+214: tmp = (z * (1.0 - math.log(t))) + (x + y) elif z <= 2.05e+64: tmp = x + (y + (b * (a - 0.5))) else: tmp = (x + (z + y)) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.5e+214) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); elseif (z <= 2.05e+64) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); else tmp = Float64(Float64(x + Float64(z + y)) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.5e+214) tmp = (z * (1.0 - log(t))) + (x + y); elseif (z <= 2.05e+64) tmp = x + (y + (b * (a - 0.5))); else tmp = (x + (z + y)) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.5e+214], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+64], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+214}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+64}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + y\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if z < -1.5000000000000001e214Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 81.1%
if -1.5000000000000001e214 < z < 2.04999999999999989e64Initial 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 92.2%
if 2.04999999999999989e64 < z Initial program 99.8%
Taylor expanded in a around 0 86.2%
Taylor expanded in b around 0 83.7%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= z -2.9e+145)
(- (+ x (+ z (* -0.5 b))) t_1)
(if (<= z 4.5e+63) (+ x (+ y (* b (- a 0.5)))) (- (+ x (+ z y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if (z <= -2.9e+145) {
tmp = (x + (z + (-0.5 * b))) - t_1;
} else if (z <= 4.5e+63) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (x + (z + 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 = z * log(t)
if (z <= (-2.9d+145)) then
tmp = (x + (z + ((-0.5d0) * b))) - t_1
else if (z <= 4.5d+63) then
tmp = x + (y + (b * (a - 0.5d0)))
else
tmp = (x + (z + 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 = z * Math.log(t);
double tmp;
if (z <= -2.9e+145) {
tmp = (x + (z + (-0.5 * b))) - t_1;
} else if (z <= 4.5e+63) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (x + (z + y)) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if z <= -2.9e+145: tmp = (x + (z + (-0.5 * b))) - t_1 elif z <= 4.5e+63: tmp = x + (y + (b * (a - 0.5))) else: tmp = (x + (z + y)) - t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (z <= -2.9e+145) tmp = Float64(Float64(x + Float64(z + Float64(-0.5 * b))) - t_1); elseif (z <= 4.5e+63) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); else tmp = Float64(Float64(x + Float64(z + y)) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if (z <= -2.9e+145) tmp = (x + (z + (-0.5 * b))) - t_1; elseif (z <= 4.5e+63) tmp = x + (y + (b * (a - 0.5))); else tmp = (x + (z + y)) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+145], N[(N[(x + N[(z + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 4.5e+63], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+145}:\\
\;\;\;\;\left(x + \left(z + -0.5 \cdot b\right)\right) - t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+63}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + y\right)\right) - t\_1\\
\end{array}
\end{array}
if z < -2.9000000000000001e145Initial program 99.6%
Taylor expanded in y around 0 92.0%
Taylor expanded in a around 0 73.1%
Simplified73.1%
if -2.9000000000000001e145 < z < 4.50000000000000017e63Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
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 95.2%
if 4.50000000000000017e63 < z Initial program 99.8%
Taylor expanded in a around 0 86.2%
Taylor expanded in b around 0 83.7%
Final simplification89.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))) (t_2 (* b (- a 0.5))))
(if (<= z -1.46e+147)
(- (+ z t_2) t_1)
(if (<= z 6.4e+64) (+ x (+ y t_2)) (- (+ x (+ z y)) 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 (z <= -1.46e+147) {
tmp = (z + t_2) - t_1;
} else if (z <= 6.4e+64) {
tmp = x + (y + t_2);
} else {
tmp = (x + (z + 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) :: t_2
real(8) :: tmp
t_1 = z * log(t)
t_2 = b * (a - 0.5d0)
if (z <= (-1.46d+147)) then
tmp = (z + t_2) - t_1
else if (z <= 6.4d+64) then
tmp = x + (y + t_2)
else
tmp = (x + (z + 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 = z * Math.log(t);
double t_2 = b * (a - 0.5);
double tmp;
if (z <= -1.46e+147) {
tmp = (z + t_2) - t_1;
} else if (z <= 6.4e+64) {
tmp = x + (y + t_2);
} else {
tmp = (x + (z + y)) - 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 z <= -1.46e+147: tmp = (z + t_2) - t_1 elif z <= 6.4e+64: tmp = x + (y + t_2) else: tmp = (x + (z + y)) - 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 (z <= -1.46e+147) tmp = Float64(Float64(z + t_2) - t_1); elseif (z <= 6.4e+64) tmp = Float64(x + Float64(y + t_2)); else tmp = Float64(Float64(x + Float64(z + y)) - 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 (z <= -1.46e+147) tmp = (z + t_2) - t_1; elseif (z <= 6.4e+64) tmp = x + (y + t_2); else tmp = (x + (z + y)) - 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[LessEqual[z, -1.46e+147], N[(N[(z + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 6.4e+64], N[(x + N[(y + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + y), $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}\;z \leq -1.46 \cdot 10^{+147}:\\
\;\;\;\;\left(z + t\_2\right) - t\_1\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+64}:\\
\;\;\;\;x + \left(y + t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + y\right)\right) - t\_1\\
\end{array}
\end{array}
if z < -1.46000000000000007e147Initial program 99.6%
Taylor expanded in y around 0 92.0%
Taylor expanded in x around 0 86.9%
if -1.46000000000000007e147 < z < 6.40000000000000037e64Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
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 95.2%
if 6.40000000000000037e64 < z Initial program 99.8%
Taylor expanded in a around 0 86.2%
Taylor expanded in b around 0 83.7%
Final simplification91.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.5e+214) (not (<= z 1.3e+137))) (+ (* z (- 1.0 (log t))) x) (+ 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.5e+214) || !(z <= 1.3e+137)) {
tmp = (z * (1.0 - log(t))) + x;
} 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.5d+214)) .or. (.not. (z <= 1.3d+137))) then
tmp = (z * (1.0d0 - log(t))) + x
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.5e+214) || !(z <= 1.3e+137)) {
tmp = (z * (1.0 - Math.log(t))) + x;
} else {
tmp = x + (y + (b * (a - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.5e+214) or not (z <= 1.3e+137): tmp = (z * (1.0 - math.log(t))) + x else: tmp = x + (y + (b * (a - 0.5))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.5e+214) || !(z <= 1.3e+137)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + x); 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.5e+214) || ~((z <= 1.3e+137))) tmp = (z * (1.0 - log(t))) + x; 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.5e+214], N[Not[LessEqual[z, 1.3e+137]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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.5 \cdot 10^{+214} \lor \neg \left(z \leq 1.3 \cdot 10^{+137}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + x\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -1.5000000000000001e214 or 1.3e137 < z Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 84.3%
Taylor expanded in y around 0 79.4%
+-commutative79.4%
Simplified79.4%
if -1.5000000000000001e214 < z < 1.3e137Initial 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 simplification87.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.7e+214) (+ (* z (- 1.0 (log t))) x) (if (<= z 2e+136) (+ x (+ y (* b (- a 0.5)))) (- (+ z x) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.7e+214) {
tmp = (z * (1.0 - log(t))) + x;
} else if (z <= 2e+136) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (z + x) - (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.7d+214)) then
tmp = (z * (1.0d0 - log(t))) + x
else if (z <= 2d+136) then
tmp = x + (y + (b * (a - 0.5d0)))
else
tmp = (z + x) - (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.7e+214) {
tmp = (z * (1.0 - Math.log(t))) + x;
} else if (z <= 2e+136) {
tmp = x + (y + (b * (a - 0.5)));
} else {
tmp = (z + x) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.7e+214: tmp = (z * (1.0 - math.log(t))) + x elif z <= 2e+136: tmp = x + (y + (b * (a - 0.5))) else: tmp = (z + x) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.7e+214) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + x); elseif (z <= 2e+136) tmp = Float64(x + Float64(y + Float64(b * Float64(a - 0.5)))); else tmp = Float64(Float64(z + x) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.7e+214) tmp = (z * (1.0 - log(t))) + x; elseif (z <= 2e+136) tmp = x + (y + (b * (a - 0.5))); else tmp = (z + x) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.7e+214], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2e+136], N[(x + N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + x), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+214}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+136}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + x\right) - z \cdot \log t\\
\end{array}
\end{array}
if z < -2.70000000000000009e214Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 81.1%
Taylor expanded in y around 0 73.9%
+-commutative73.9%
Simplified73.9%
if -2.70000000000000009e214 < z < 2.00000000000000012e136Initial 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 2.00000000000000012e136 < z Initial program 99.7%
Taylor expanded in y around 0 96.6%
Taylor expanded in b around 0 84.0%
Final simplification87.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.3e+214) (not (<= z 8.6e+135))) (* 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 <= -4.3e+214) || !(z <= 8.6e+135)) {
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 <= (-4.3d+214)) .or. (.not. (z <= 8.6d+135))) 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 <= -4.3e+214) || !(z <= 8.6e+135)) {
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 <= -4.3e+214) or not (z <= 8.6e+135): 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 <= -4.3e+214) || !(z <= 8.6e+135)) 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 <= -4.3e+214) || ~((z <= 8.6e+135))) 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, -4.3e+214], N[Not[LessEqual[z, 8.6e+135]], $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 -4.3 \cdot 10^{+214} \lor \neg \left(z \leq 8.6 \cdot 10^{+135}\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 < -4.29999999999999983e214 or 8.59999999999999945e135 < z Initial program 99.7%
Taylor expanded in y around 0 94.7%
Taylor expanded in z around inf 69.6%
if -4.29999999999999983e214 < z < 8.59999999999999945e135Initial 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 simplification85.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.35e+214) (* z (- 1.0 (log t))) (if (<= z 1.3e+137) (+ 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 <= -3.35e+214) {
tmp = z * (1.0 - log(t));
} else if (z <= 1.3e+137) {
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 <= (-3.35d+214)) then
tmp = z * (1.0d0 - log(t))
else if (z <= 1.3d+137) 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 <= -3.35e+214) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 1.3e+137) {
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 <= -3.35e+214: tmp = z * (1.0 - math.log(t)) elif z <= 1.3e+137: 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 <= -3.35e+214) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 1.3e+137) 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 <= -3.35e+214) tmp = z * (1.0 - log(t)); elseif (z <= 1.3e+137) 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, -3.35e+214], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+137], 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 -3.35 \cdot 10^{+214}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+137}:\\
\;\;\;\;x + \left(y + b \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -3.3500000000000002e214Initial program 99.6%
Taylor expanded in y around 0 92.3%
Taylor expanded in z around inf 72.3%
if -3.3500000000000002e214 < z < 1.3e137Initial 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 1.3e137 < z Initial program 99.7%
Taylor expanded in a around 0 90.5%
Taylor expanded in b around 0 87.1%
Taylor expanded in z around inf 67.2%
Final simplification85.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 (<= b -8.2e+248)
(* a b)
(if (<= b -2.2e+164)
(* -0.5 b)
(if (or (<= b -3.5e+124) (not (<= b 1.8e+128))) (* a b) (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.2e+248) {
tmp = a * b;
} else if (b <= -2.2e+164) {
tmp = -0.5 * b;
} else if ((b <= -3.5e+124) || !(b <= 1.8e+128)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-8.2d+248)) then
tmp = a * b
else if (b <= (-2.2d+164)) then
tmp = (-0.5d0) * b
else if ((b <= (-3.5d+124)) .or. (.not. (b <= 1.8d+128))) then
tmp = a * b
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.2e+248) {
tmp = a * b;
} else if (b <= -2.2e+164) {
tmp = -0.5 * b;
} else if ((b <= -3.5e+124) || !(b <= 1.8e+128)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.2e+248: tmp = a * b elif b <= -2.2e+164: tmp = -0.5 * b elif (b <= -3.5e+124) or not (b <= 1.8e+128): tmp = a * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.2e+248) tmp = Float64(a * b); elseif (b <= -2.2e+164) tmp = Float64(-0.5 * b); elseif ((b <= -3.5e+124) || !(b <= 1.8e+128)) tmp = Float64(a * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.2e+248) tmp = a * b; elseif (b <= -2.2e+164) tmp = -0.5 * b; elseif ((b <= -3.5e+124) || ~((b <= 1.8e+128))) tmp = a * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.2e+248], N[(a * b), $MachinePrecision], If[LessEqual[b, -2.2e+164], N[(-0.5 * b), $MachinePrecision], If[Or[LessEqual[b, -3.5e+124], N[Not[LessEqual[b, 1.8e+128]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+248}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq -2.2 \cdot 10^{+164}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{+124} \lor \neg \left(b \leq 1.8 \cdot 10^{+128}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -8.19999999999999995e248 or -2.20000000000000006e164 < b < -3.5000000000000001e124 or 1.80000000000000014e128 < 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--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 61.5%
*-commutative61.5%
Simplified61.5%
if -8.19999999999999995e248 < b < -2.20000000000000006e164Initial program 99.8%
Taylor expanded in a around 0 72.8%
Taylor expanded in b around inf 57.9%
*-commutative57.9%
Simplified57.9%
if -3.5000000000000001e124 < b < 1.80000000000000014e128Initial 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 0 81.1%
Taylor expanded in z around 0 54.2%
Final simplification56.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.7e+26) (not (<= a 0.5))) (+ x (+ y (* a b))) (+ x (+ y (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.7e+26) || !(a <= 0.5)) {
tmp = x + (y + (a * b));
} else {
tmp = x + (y + (-0.5 * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-3.7d+26)) .or. (.not. (a <= 0.5d0))) then
tmp = x + (y + (a * b))
else
tmp = x + (y + ((-0.5d0) * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.7e+26) || !(a <= 0.5)) {
tmp = x + (y + (a * b));
} else {
tmp = x + (y + (-0.5 * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.7e+26) or not (a <= 0.5): tmp = x + (y + (a * b)) else: tmp = x + (y + (-0.5 * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.7e+26) || !(a <= 0.5)) tmp = Float64(x + Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(y + Float64(-0.5 * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -3.7e+26) || ~((a <= 0.5))) tmp = x + (y + (a * b)); else tmp = x + (y + (-0.5 * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.7e+26], N[Not[LessEqual[a, 0.5]], $MachinePrecision]], N[(x + N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+26} \lor \neg \left(a \leq 0.5\right):\\
\;\;\;\;x + \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + -0.5 \cdot b\right)\\
\end{array}
\end{array}
if a < -3.69999999999999988e26 or 0.5 < 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%
distribute-rgt-out--99.9%
*-commutative99.9%
prod-diff99.9%
*-commutative99.9%
fma-neg99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
*-commutative99.9%
Applied egg-rr99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in a around inf 84.3%
*-commutative84.3%
Simplified84.3%
if -3.69999999999999988e26 < a < 0.5Initial 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 69.9%
Taylor expanded in a around 0 69.4%
Simplified69.4%
Final simplification76.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9.2e+46) (not (<= b 4.7e+52))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.2e+46) || !(b <= 4.7e+52)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-9.2d+46)) .or. (.not. (b <= 4.7d+52))) then
tmp = b * (a - 0.5d0)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.2e+46) || !(b <= 4.7e+52)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -9.2e+46) or not (b <= 4.7e+52): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9.2e+46) || !(b <= 4.7e+52)) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -9.2e+46) || ~((b <= 4.7e+52))) tmp = b * (a - 0.5); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.2e+46], N[Not[LessEqual[b, 4.7e+52]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.2 \cdot 10^{+46} \lor \neg \left(b \leq 4.7 \cdot 10^{+52}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -9.2000000000000002e46 or 4.7e52 < 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--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 71.3%
if -9.2000000000000002e46 < b < 4.7e52Initial 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 b around 0 86.6%
Taylor expanded in z around 0 56.5%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 1e+60) (+ x (* b (- a 0.5))) y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 1e+60) {
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 ((x + y) <= 1d+60) 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 ((x + y) <= 1e+60) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= 1e+60: tmp = x + (b * (a - 0.5)) else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 1e+60) 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 ((x + y) <= 1e+60) tmp = x + (b * (a - 0.5)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 1e+60], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 10^{+60}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if (+.f64 x y) < 9.9999999999999995e59Initial program 99.9%
Taylor expanded in y around 0 87.7%
Taylor expanded in z around 0 62.0%
if 9.9999999999999995e59 < (+.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 y around inf 32.7%
Final simplification53.0%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 1e+60) (+ x (* b (- a 0.5))) (+ x (+ y (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 1e+60) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (-0.5 * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x + y) <= 1d+60) then
tmp = x + (b * (a - 0.5d0))
else
tmp = x + (y + ((-0.5d0) * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 1e+60) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + (y + (-0.5 * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= 1e+60: tmp = x + (b * (a - 0.5)) else: tmp = x + (y + (-0.5 * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 1e+60) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + Float64(y + Float64(-0.5 * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= 1e+60) tmp = x + (b * (a - 0.5)); else tmp = x + (y + (-0.5 * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 1e+60], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 10^{+60}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + -0.5 \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 x y) < 9.9999999999999995e59Initial program 99.9%
Taylor expanded in y around 0 87.7%
Taylor expanded in z around 0 62.0%
if 9.9999999999999995e59 < (+.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 z around 0 83.6%
Taylor expanded in a around 0 68.0%
Simplified68.0%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.2e-221) x (if (<= y 1.4e+61) (* -0.5 b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e-221) {
tmp = x;
} else if (y <= 1.4e+61) {
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 <= (-6.2d-221)) then
tmp = x
else if (y <= 1.4d+61) 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 <= -6.2e-221) {
tmp = x;
} else if (y <= 1.4e+61) {
tmp = -0.5 * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.2e-221: tmp = x elif y <= 1.4e+61: tmp = -0.5 * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.2e-221) tmp = x; elseif (y <= 1.4e+61) 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 <= -6.2e-221) tmp = x; elseif (y <= 1.4e+61) tmp = -0.5 * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.2e-221], x, If[LessEqual[y, 1.4e+61], N[(-0.5 * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-221}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+61}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -6.1999999999999998e-221Initial 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 28.4%
if -6.1999999999999998e-221 < y < 1.4000000000000001e61Initial program 99.8%
Taylor expanded in a around 0 65.8%
Taylor expanded in b around inf 17.2%
*-commutative17.2%
Simplified17.2%
if 1.4000000000000001e61 < 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 47.4%
Final simplification28.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.6e-143) x (if (<= y 7.7e+62) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.6e-143) {
tmp = x;
} else if (y <= 7.7e+62) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8.6d-143)) then
tmp = x
else if (y <= 7.7d+62) then
tmp = a * b
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.6e-143) {
tmp = x;
} else if (y <= 7.7e+62) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.6e-143: tmp = x elif y <= 7.7e+62: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.6e-143) tmp = x; elseif (y <= 7.7e+62) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.6e-143) tmp = x; elseif (y <= 7.7e+62) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.6e-143], x, If[LessEqual[y, 7.7e+62], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-143}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.7 \cdot 10^{+62}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -8.59999999999999912e-143Initial 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 29.5%
if -8.59999999999999912e-143 < y < 7.7000000000000003e62Initial 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 a around inf 36.6%
*-commutative36.6%
Simplified36.6%
if 7.7000000000000003e62 < 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 47.4%
Final simplification36.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 76.9%
Final simplification76.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.8e+18) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.8e+18) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= 2.8d+18) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.8e+18) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.8e+18: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.8e+18) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.8e+18) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.8e+18], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.8 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.8e18Initial 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.2%
if 2.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 43.9%
Final simplification28.0%
(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 22.5%
Final simplification22.5%
(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 2024039
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))