
(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.8%
+-commutative99.8%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.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 -2e+128) (not (<= t_1 4e+154)))
(+ t_1 (+ z (+ x y)))
(+ z (- (+ x y) (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+128) || !(t_1 <= 4e+154)) {
tmp = t_1 + (z + (x + y));
} else {
tmp = z + ((x + y) - (z * log(t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+128)) .or. (.not. (t_1 <= 4d+154))) then
tmp = t_1 + (z + (x + y))
else
tmp = z + ((x + y) - (z * log(t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+128) || !(t_1 <= 4e+154)) {
tmp = t_1 + (z + (x + y));
} else {
tmp = z + ((x + y) - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+128) or not (t_1 <= 4e+154): tmp = t_1 + (z + (x + y)) else: tmp = z + ((x + y) - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -2e+128) || !(t_1 <= 4e+154)) tmp = Float64(t_1 + Float64(z + Float64(x + y))); else tmp = Float64(z + Float64(Float64(x + y) - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -2e+128) || ~((t_1 <= 4e+154))) tmp = t_1 + (z + (x + y)); else tmp = z + ((x + y) - (z * log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+128], N[Not[LessEqual[t$95$1, 4e+154]], $MachinePrecision]], N[(t$95$1 + N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + N[(N[(x + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+128} \lor \neg \left(t_1 \leq 4 \cdot 10^{+154}\right):\\
\;\;\;\;t_1 + \left(z + \left(x + y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z + \left(\left(x + y\right) - z \cdot \log t\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -2.0000000000000002e128 or 4.00000000000000015e154 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 91.8%
associate-+r+91.8%
+-commutative91.8%
+-commutative91.8%
Simplified91.8%
if -2.0000000000000002e128 < (*.f64 (-.f64 a 1/2) b) < 4.00000000000000015e154Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around 0 95.3%
associate-+r+95.3%
+-commutative95.3%
associate--l+95.3%
+-commutative95.3%
Simplified95.3%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -2e+128) (not (<= t_1 4e+154)))
(+ t_1 (+ z (+ x y)))
(+ (* z (- 1.0 (log t))) (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+128) || !(t_1 <= 4e+154)) {
tmp = t_1 + (z + (x + y));
} else {
tmp = (z * (1.0 - log(t))) + (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+128)) .or. (.not. (t_1 <= 4d+154))) then
tmp = t_1 + (z + (x + y))
else
tmp = (z * (1.0d0 - log(t))) + (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+128) || !(t_1 <= 4e+154)) {
tmp = t_1 + (z + (x + y));
} else {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+128) or not (t_1 <= 4e+154): tmp = t_1 + (z + (x + y)) else: tmp = (z * (1.0 - math.log(t))) + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -2e+128) || !(t_1 <= 4e+154)) tmp = Float64(t_1 + Float64(z + Float64(x + y))); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -2e+128) || ~((t_1 <= 4e+154))) tmp = t_1 + (z + (x + y)); else tmp = (z * (1.0 - log(t))) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+128], N[Not[LessEqual[t$95$1, 4e+154]], $MachinePrecision]], N[(t$95$1 + N[(z + N[(x + y), $MachinePrecision]), $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 -2 \cdot 10^{+128} \lor \neg \left(t_1 \leq 4 \cdot 10^{+154}\right):\\
\;\;\;\;t_1 + \left(z + \left(x + y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -2.0000000000000002e128 or 4.00000000000000015e154 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 91.8%
associate-+r+91.8%
+-commutative91.8%
+-commutative91.8%
Simplified91.8%
if -2.0000000000000002e128 < (*.f64 (-.f64 a 1/2) b) < 4.00000000000000015e154Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 95.4%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= (+ x y) 5e+70)
(- (+ x (+ z t_1)) (* z (log t)))
(+ t_1 (+ z (+ 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 ((x + y) <= 5e+70) {
tmp = (x + (z + t_1)) - (z * log(t));
} else {
tmp = t_1 + (z + (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 ((x + y) <= 5d+70) then
tmp = (x + (z + t_1)) - (z * log(t))
else
tmp = t_1 + (z + (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 ((x + y) <= 5e+70) {
tmp = (x + (z + t_1)) - (z * Math.log(t));
} else {
tmp = t_1 + (z + (x + y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= 5e+70: tmp = (x + (z + t_1)) - (z * math.log(t)) else: tmp = t_1 + (z + (x + y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= 5e+70) tmp = Float64(Float64(x + Float64(z + t_1)) - Float64(z * log(t))); else tmp = Float64(t_1 + Float64(z + 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 ((x + y) <= 5e+70) tmp = (x + (z + t_1)) - (z * log(t)); else tmp = t_1 + (z + (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[LessEqual[N[(x + y), $MachinePrecision], 5e+70], N[(N[(x + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq 5 \cdot 10^{+70}:\\
\;\;\;\;\left(x + \left(z + t_1\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(z + \left(x + y\right)\right)\\
\end{array}
\end{array}
if (+.f64 x y) < 5.0000000000000002e70Initial program 99.8%
Taylor expanded in y around 0 84.3%
if 5.0000000000000002e70 < (+.f64 x y) Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 92.1%
associate-+r+92.1%
+-commutative92.1%
+-commutative92.1%
Simplified92.1%
Final simplification86.8%
(FPCore (x y z t a b) :precision binary64 (- (+ x (+ y (+ z (+ (* -0.5 b) (* a b))))) (* z (log t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + (y + (z + ((-0.5 * b) + (a * b))))) - (z * log(t));
}
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 + (((-0.5d0) * b) + (a * b))))) - (z * log(t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + (y + (z + ((-0.5 * b) + (a * b))))) - (z * Math.log(t));
}
def code(x, y, z, t, a, b): return (x + (y + (z + ((-0.5 * b) + (a * b))))) - (z * math.log(t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(y + Float64(z + Float64(Float64(-0.5 * b) + Float64(a * b))))) - Float64(z * log(t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + (y + (z + ((-0.5 * b) + (a * b))))) - (z * log(t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(y + N[(z + N[(N[(-0.5 * b), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \left(y + \left(z + \left(-0.5 \cdot b + a \cdot b\right)\right)\right)\right) - z \cdot \log t
\end{array}
Initial program 99.8%
Taylor expanded in a around 0 99.8%
Final simplification99.8%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * Math.log(t))) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -4e+262)
(and (not (<= z -2.8e+198))
(or (<= z -1.6e+160) (not (<= z 1.2e+196)))))
(* z (- 1.0 (log t)))
(+ (* b (- a 0.5)) (+ z (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4e+262) || (!(z <= -2.8e+198) && ((z <= -1.6e+160) || !(z <= 1.2e+196)))) {
tmp = z * (1.0 - log(t));
} else {
tmp = (b * (a - 0.5)) + (z + (x + y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4d+262)) .or. (.not. (z <= (-2.8d+198))) .and. (z <= (-1.6d+160)) .or. (.not. (z <= 1.2d+196))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (b * (a - 0.5d0)) + (z + (x + y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4e+262) || (!(z <= -2.8e+198) && ((z <= -1.6e+160) || !(z <= 1.2e+196)))) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (b * (a - 0.5)) + (z + (x + y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4e+262) or (not (z <= -2.8e+198) and ((z <= -1.6e+160) or not (z <= 1.2e+196))): tmp = z * (1.0 - math.log(t)) else: tmp = (b * (a - 0.5)) + (z + (x + y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4e+262) || (!(z <= -2.8e+198) && ((z <= -1.6e+160) || !(z <= 1.2e+196)))) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(z + Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4e+262) || (~((z <= -2.8e+198)) && ((z <= -1.6e+160) || ~((z <= 1.2e+196))))) tmp = z * (1.0 - log(t)); else tmp = (b * (a - 0.5)) + (z + (x + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4e+262], And[N[Not[LessEqual[z, -2.8e+198]], $MachinePrecision], Or[LessEqual[z, -1.6e+160], N[Not[LessEqual[z, 1.2e+196]], $MachinePrecision]]]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+262} \lor \neg \left(z \leq -2.8 \cdot 10^{+198}\right) \land \left(z \leq -1.6 \cdot 10^{+160} \lor \neg \left(z \leq 1.2 \cdot 10^{+196}\right)\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(z + \left(x + y\right)\right)\\
\end{array}
\end{array}
if z < -4.0000000000000001e262 or -2.8e198 < z < -1.5999999999999999e160 or 1.2e196 < z Initial program 99.5%
Taylor expanded in a around 0 99.5%
Taylor expanded in z around inf 73.5%
if -4.0000000000000001e262 < z < -2.8e198 or -1.5999999999999999e160 < z < 1.2e196Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 88.6%
associate-+r+88.6%
+-commutative88.6%
+-commutative88.6%
Simplified88.6%
Final simplification85.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -6e+158) (not (<= t_1 5e+111))) (+ x t_1) (+ z (+ 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 <= -6e+158) || !(t_1 <= 5e+111)) {
tmp = x + t_1;
} else {
tmp = z + (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 <= (-6d+158)) .or. (.not. (t_1 <= 5d+111))) then
tmp = x + t_1
else
tmp = z + (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 <= -6e+158) || !(t_1 <= 5e+111)) {
tmp = x + t_1;
} else {
tmp = z + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -6e+158) or not (t_1 <= 5e+111): tmp = x + t_1 else: tmp = z + (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 <= -6e+158) || !(t_1 <= 5e+111)) tmp = Float64(x + t_1); else tmp = Float64(z + 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 <= -6e+158) || ~((t_1 <= 5e+111))) tmp = x + t_1; else tmp = z + (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, -6e+158], N[Not[LessEqual[t$95$1, 5e+111]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(z + 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 -6 \cdot 10^{+158} \lor \neg \left(t_1 \leq 5 \cdot 10^{+111}\right):\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -6e158 or 4.9999999999999997e111 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
add-cbrt-cube40.3%
pow340.3%
associate--l+40.3%
associate-+r+40.3%
*-commutative40.3%
*-un-lft-identity40.3%
distribute-rgt-out--40.3%
Applied egg-rr40.3%
Taylor expanded in x around inf 78.0%
if -6e158 < (*.f64 (-.f64 a 1/2) b) < 4.9999999999999997e111Initial program 99.8%
add-cube-cbrt99.3%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in z around 0 67.9%
associate-+r+67.9%
+-commutative67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in b around 0 63.2%
associate-+r+63.2%
+-commutative63.2%
Simplified63.2%
Final simplification69.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* -0.5 b))))
(if (<= y 2.4e-245)
t_1
(if (<= y 7.5e+96)
(* b (- a 0.5))
(if (<= y 6.5e+136) y (if (<= y 3.2e+160) t_1 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (-0.5 * b);
double tmp;
if (y <= 2.4e-245) {
tmp = t_1;
} else if (y <= 7.5e+96) {
tmp = b * (a - 0.5);
} else if (y <= 6.5e+136) {
tmp = y;
} else if (y <= 3.2e+160) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x + ((-0.5d0) * b)
if (y <= 2.4d-245) then
tmp = t_1
else if (y <= 7.5d+96) then
tmp = b * (a - 0.5d0)
else if (y <= 6.5d+136) then
tmp = y
else if (y <= 3.2d+160) then
tmp = t_1
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 t_1 = x + (-0.5 * b);
double tmp;
if (y <= 2.4e-245) {
tmp = t_1;
} else if (y <= 7.5e+96) {
tmp = b * (a - 0.5);
} else if (y <= 6.5e+136) {
tmp = y;
} else if (y <= 3.2e+160) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (-0.5 * b) tmp = 0 if y <= 2.4e-245: tmp = t_1 elif y <= 7.5e+96: tmp = b * (a - 0.5) elif y <= 6.5e+136: tmp = y elif y <= 3.2e+160: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(-0.5 * b)) tmp = 0.0 if (y <= 2.4e-245) tmp = t_1; elseif (y <= 7.5e+96) tmp = Float64(b * Float64(a - 0.5)); elseif (y <= 6.5e+136) tmp = y; elseif (y <= 3.2e+160) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (-0.5 * b); tmp = 0.0; if (y <= 2.4e-245) tmp = t_1; elseif (y <= 7.5e+96) tmp = b * (a - 0.5); elseif (y <= 6.5e+136) tmp = y; elseif (y <= 3.2e+160) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.4e-245], t$95$1, If[LessEqual[y, 7.5e+96], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+136], y, If[LessEqual[y, 3.2e+160], t$95$1, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + -0.5 \cdot b\\
\mathbf{if}\;y \leq 2.4 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+96}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+136}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+160}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.4e-245 or 6.4999999999999998e136 < y < 3.1999999999999998e160Initial program 99.8%
add-cbrt-cube33.1%
pow333.1%
associate--l+33.1%
associate-+r+33.1%
*-commutative33.1%
*-un-lft-identity33.1%
distribute-rgt-out--33.1%
Applied egg-rr33.1%
Taylor expanded in x around inf 61.3%
Taylor expanded in a around 0 39.0%
*-commutative39.0%
Simplified39.0%
if 2.4e-245 < y < 7.4999999999999996e96Initial program 99.8%
+-commutative99.8%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 39.1%
if 7.4999999999999996e96 < y < 6.4999999999999998e136 or 3.1999999999999998e160 < y Initial program 99.9%
+-commutative99.9%
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-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 69.6%
Final simplification43.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= b -5.8e+158)
t_1
(if (<= b -1.06e-175) x (if (<= b 8.8e+83) 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 <= -5.8e+158) {
tmp = t_1;
} else if (b <= -1.06e-175) {
tmp = x;
} else if (b <= 8.8e+83) {
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 <= (-5.8d+158)) then
tmp = t_1
else if (b <= (-1.06d-175)) then
tmp = x
else if (b <= 8.8d+83) 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 <= -5.8e+158) {
tmp = t_1;
} else if (b <= -1.06e-175) {
tmp = x;
} else if (b <= 8.8e+83) {
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 <= -5.8e+158: tmp = t_1 elif b <= -1.06e-175: tmp = x elif b <= 8.8e+83: 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 <= -5.8e+158) tmp = t_1; elseif (b <= -1.06e-175) tmp = x; elseif (b <= 8.8e+83) 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 <= -5.8e+158) tmp = t_1; elseif (b <= -1.06e-175) tmp = x; elseif (b <= 8.8e+83) 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, -5.8e+158], t$95$1, If[LessEqual[b, -1.06e-175], x, If[LessEqual[b, 8.8e+83], y, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.06 \cdot 10^{-175}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+83}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -5.80000000000000048e158 or 8.79999999999999995e83 < 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-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 73.6%
if -5.80000000000000048e158 < b < -1.06000000000000002e-175Initial 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-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 22.1%
if -1.06000000000000002e-175 < b < 8.79999999999999995e83Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 27.7%
Final simplification43.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -5e-23) (+ 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 + y) <= -5e-23) {
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 + y) <= (-5d-23)) 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 + y) <= -5e-23) {
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 + y) <= -5e-23: 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 (Float64(x + y) <= -5e-23) 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 + y) <= -5e-23) 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[N[(x + y), $MachinePrecision], -5e-23], 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 + y \leq -5 \cdot 10^{-23}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < -5.0000000000000002e-23Initial program 99.9%
add-cbrt-cube26.8%
pow326.8%
associate--l+26.8%
associate-+r+26.8%
*-commutative26.8%
*-un-lft-identity26.8%
distribute-rgt-out--26.8%
Applied egg-rr26.8%
Taylor expanded in x around inf 64.8%
if -5.0000000000000002e-23 < (+.f64 x y) Initial program 99.8%
add-cbrt-cube39.7%
pow339.7%
associate--l+39.7%
associate-+r+39.7%
*-commutative39.7%
*-un-lft-identity39.7%
distribute-rgt-out--39.7%
Applied egg-rr39.7%
Taylor expanded in y around inf 52.3%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (+ (* b (- a 0.5)) (+ z (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (z + (x + y));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (b * (a - 0.5d0)) + (z + (x + y))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (z + (x + y));
}
def code(x, y, z, t, a, b): return (b * (a - 0.5)) + (z + (x + y))
function code(x, y, z, t, a, b) return Float64(Float64(b * Float64(a - 0.5)) + Float64(z + Float64(x + y))) end
function tmp = code(x, y, z, t, a, b) tmp = (b * (a - 0.5)) + (z + (x + y)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(a - 0.5\right) + \left(z + \left(x + y\right)\right)
\end{array}
Initial program 99.8%
add-cube-cbrt99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 77.3%
associate-+r+77.3%
+-commutative77.3%
+-commutative77.3%
Simplified77.3%
Final simplification77.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.5e+158) (not (<= b 2.3e+117))) (* b (- a 0.5)) (+ z (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.5e+158) || !(b <= 2.3e+117)) {
tmp = b * (a - 0.5);
} else {
tmp = z + (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 <= (-6.5d+158)) .or. (.not. (b <= 2.3d+117))) then
tmp = b * (a - 0.5d0)
else
tmp = z + (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 <= -6.5e+158) || !(b <= 2.3e+117)) {
tmp = b * (a - 0.5);
} else {
tmp = z + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.5e+158) or not (b <= 2.3e+117): tmp = b * (a - 0.5) else: tmp = z + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.5e+158) || !(b <= 2.3e+117)) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(z + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -6.5e+158) || ~((b <= 2.3e+117))) tmp = b * (a - 0.5); else tmp = z + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.5e+158], N[Not[LessEqual[b, 2.3e+117]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{+158} \lor \neg \left(b \leq 2.3 \cdot 10^{+117}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\
\end{array}
\end{array}
if b < -6.5000000000000001e158 or 2.29999999999999988e117 < 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-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 75.3%
if -6.5000000000000001e158 < b < 2.29999999999999988e117Initial program 99.8%
add-cube-cbrt99.4%
pow399.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 70.0%
associate-+r+70.0%
+-commutative70.0%
+-commutative70.0%
Simplified70.0%
Taylor expanded in b around 0 59.9%
associate-+r+59.9%
+-commutative59.9%
Simplified59.9%
Final simplification65.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.8%
+-commutative99.8%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 76.5%
Final simplification76.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.05e-285) x (if (<= y 4.6e+95) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.05e-285) {
tmp = x;
} else if (y <= 4.6e+95) {
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 <= 1.05d-285) then
tmp = x
else if (y <= 4.6d+95) 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 <= 1.05e-285) {
tmp = x;
} else if (y <= 4.6e+95) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.05e-285: tmp = x elif y <= 4.6e+95: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.05e-285) tmp = x; elseif (y <= 4.6e+95) 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 <= 1.05e-285) tmp = x; elseif (y <= 4.6e+95) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.05e-285], x, If[LessEqual[y, 4.6e+95], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.05 \cdot 10^{-285}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+95}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.04999999999999992e-285Initial program 99.8%
+-commutative99.8%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 24.7%
if 1.04999999999999992e-285 < y < 4.59999999999999994e95Initial 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-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 23.7%
*-commutative23.7%
Simplified23.7%
if 4.59999999999999994e95 < y Initial program 99.9%
+-commutative99.9%
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-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 62.3%
Final simplification31.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 9e+77) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 9e+77) {
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 <= 9d+77) 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 <= 9e+77) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 9e+77: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 9e+77) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 9e+77) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 9e+77], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9 \cdot 10^{+77}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 9.00000000000000049e77Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 26.4%
if 9.00000000000000049e77 < y Initial program 99.9%
+-commutative99.9%
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-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 56.3%
Final simplification32.3%
(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.8%
+-commutative99.8%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 23.2%
Final simplification23.2%
(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 2023308
(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)))