
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (* z (- 1.0 (log t))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (z * (1.0 - log(t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(1.0 - log(t))) + fma(Float64(a + -0.5), b, Float64(x + y))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(1 - \log t\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right)
\end{array}
Initial program 99.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%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -1e+98) (not (<= t_1 2e+117)))
(+ t_1 (+ x (+ z y)))
(+ (* z (- 1.0 (log t))) (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+98) || !(t_1 <= 2e+117)) {
tmp = t_1 + (x + (z + y));
} else {
tmp = (z * (1.0 - log(t))) + (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-1d+98)) .or. (.not. (t_1 <= 2d+117))) then
tmp = t_1 + (x + (z + y))
else
tmp = (z * (1.0d0 - log(t))) + (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+98) || !(t_1 <= 2e+117)) {
tmp = t_1 + (x + (z + y));
} else {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -1e+98) or not (t_1 <= 2e+117): tmp = t_1 + (x + (z + y)) else: tmp = (z * (1.0 - math.log(t))) + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -1e+98) || !(t_1 <= 2e+117)) tmp = Float64(t_1 + Float64(x + Float64(z + y))); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -1e+98) || ~((t_1 <= 2e+117))) tmp = t_1 + (x + (z + y)); else tmp = (z * (1.0 - log(t))) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+98], N[Not[LessEqual[t$95$1, 2e+117]], $MachinePrecision]], N[(t$95$1 + N[(x + N[(z + 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 -1 \cdot 10^{+98} \lor \neg \left(t_1 \leq 2 \cdot 10^{+117}\right):\\
\;\;\;\;t_1 + \left(x + \left(z + 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) < -9.99999999999999998e97 or 2.0000000000000001e117 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
add-sqr-sqrt48.7%
pow248.7%
Applied egg-rr48.7%
Taylor expanded in z around 0 97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
if -9.99999999999999998e97 < (*.f64 (-.f64 a 1/2) b) < 2.0000000000000001e117Initial 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 94.2%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= z -0.0215) (not (<= z 2.4e+50)))
(+ (* z (- 1.0 (log t))) (+ y t_1))
(+ t_1 (+ x (+ z 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 ((z <= -0.0215) || !(z <= 2.4e+50)) {
tmp = (z * (1.0 - log(t))) + (y + t_1);
} else {
tmp = t_1 + (x + (z + 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 ((z <= (-0.0215d0)) .or. (.not. (z <= 2.4d+50))) then
tmp = (z * (1.0d0 - log(t))) + (y + t_1)
else
tmp = t_1 + (x + (z + 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 ((z <= -0.0215) || !(z <= 2.4e+50)) {
tmp = (z * (1.0 - Math.log(t))) + (y + t_1);
} else {
tmp = t_1 + (x + (z + y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (z <= -0.0215) or not (z <= 2.4e+50): tmp = (z * (1.0 - math.log(t))) + (y + t_1) else: tmp = t_1 + (x + (z + y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((z <= -0.0215) || !(z <= 2.4e+50)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(y + t_1)); else tmp = Float64(t_1 + Float64(x + Float64(z + 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 ((z <= -0.0215) || ~((z <= 2.4e+50))) tmp = (z * (1.0 - log(t))) + (y + t_1); else tmp = t_1 + (x + (z + 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[z, -0.0215], N[Not[LessEqual[z, 2.4e+50]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq -0.0215 \lor \neg \left(z \leq 2.4 \cdot 10^{+50}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x + \left(z + y\right)\right)\\
\end{array}
\end{array}
if z < -0.021499999999999998 or 2.4000000000000002e50 < z Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 85.7%
if -0.021499999999999998 < z < 2.4000000000000002e50Initial program 100.0%
add-sqr-sqrt42.0%
pow242.0%
Applied egg-rr42.0%
Taylor expanded in z around 0 98.3%
+-commutative98.3%
+-commutative98.3%
Simplified98.3%
Final simplification93.1%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (+ (* a b) (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * log(t))) + ((a * b) + (-0.5 * b));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((z + (x + y)) - (z * log(t))) + ((a * b) + ((-0.5d0) * b))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * Math.log(t))) + ((a * b) + (-0.5 * b));
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + ((a * b) + (-0.5 * b))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(Float64(a * b) + Float64(-0.5 * b))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + ((a * b) + (-0.5 * b)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + \left(a \cdot b + -0.5 \cdot b\right)
\end{array}
Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-lft-in99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ 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 (or (<= z -6e+227) (not (<= z 5.2e+216))) (+ (* z (- 1.0 (log t))) y) (+ (* b (- a 0.5)) (+ x (+ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e+227) || !(z <= 5.2e+216)) {
tmp = (z * (1.0 - log(t))) + y;
} else {
tmp = (b * (a - 0.5)) + (x + (z + 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 <= (-6d+227)) .or. (.not. (z <= 5.2d+216))) then
tmp = (z * (1.0d0 - log(t))) + y
else
tmp = (b * (a - 0.5d0)) + (x + (z + 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 <= -6e+227) || !(z <= 5.2e+216)) {
tmp = (z * (1.0 - Math.log(t))) + y;
} else {
tmp = (b * (a - 0.5)) + (x + (z + y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e+227) or not (z <= 5.2e+216): tmp = (z * (1.0 - math.log(t))) + y else: tmp = (b * (a - 0.5)) + (x + (z + y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e+227) || !(z <= 5.2e+216)) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + y); else tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(x + Float64(z + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e+227) || ~((z <= 5.2e+216))) tmp = (z * (1.0 - log(t))) + y; else tmp = (b * (a - 0.5)) + (x + (z + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e+227], N[Not[LessEqual[z, 5.2e+216]], $MachinePrecision]], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+227} \lor \neg \left(z \leq 5.2 \cdot 10^{+216}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right) + y\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + \left(z + y\right)\right)\\
\end{array}
\end{array}
if z < -5.99999999999999972e227 or 5.1999999999999997e216 < z Initial 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.7%
metadata-eval99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 94.1%
Taylor expanded in b around 0 74.0%
if -5.99999999999999972e227 < z < 5.1999999999999997e216Initial program 99.9%
add-sqr-sqrt45.4%
pow245.4%
Applied egg-rr45.4%
Taylor expanded in z around 0 89.4%
+-commutative89.4%
+-commutative89.4%
Simplified89.4%
Final simplification87.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.5e+227) (not (<= z 8.2e+223))) (* z (- 1.0 (log t))) (+ (* b (- a 0.5)) (+ x (+ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e+227) || !(z <= 8.2e+223)) {
tmp = z * (1.0 - log(t));
} else {
tmp = (b * (a - 0.5)) + (x + (z + 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 <= (-5.5d+227)) .or. (.not. (z <= 8.2d+223))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (b * (a - 0.5d0)) + (x + (z + 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 <= -5.5e+227) || !(z <= 8.2e+223)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (b * (a - 0.5)) + (x + (z + y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.5e+227) or not (z <= 8.2e+223): tmp = z * (1.0 - math.log(t)) else: tmp = (b * (a - 0.5)) + (x + (z + y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.5e+227) || !(z <= 8.2e+223)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(b * Float64(a - 0.5)) + Float64(x + Float64(z + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.5e+227) || ~((z <= 8.2e+223))) tmp = z * (1.0 - log(t)); else tmp = (b * (a - 0.5)) + (x + (z + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.5e+227], N[Not[LessEqual[z, 8.2e+223]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+227} \lor \neg \left(z \leq 8.2 \cdot 10^{+223}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a - 0.5\right) + \left(x + \left(z + y\right)\right)\\
\end{array}
\end{array}
if z < -5.5000000000000001e227 or 8.2e223 < z Initial program 99.6%
Taylor expanded in z around inf 92.6%
Taylor expanded in b around 0 71.9%
Taylor expanded in z around 0 71.9%
if -5.5000000000000001e227 < z < 8.2e223Initial program 99.9%
add-sqr-sqrt45.2%
pow245.2%
Applied egg-rr45.2%
Taylor expanded in z around 0 89.4%
+-commutative89.4%
+-commutative89.4%
Simplified89.4%
Final simplification87.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -1e+74) (not (<= t_1 2e+117))) (+ x t_1) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+74) || !(t_1 <= 2e+117)) {
tmp = x + t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-1d+74)) .or. (.not. (t_1 <= 2d+117))) then
tmp = x + t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+74) || !(t_1 <= 2e+117)) {
tmp = x + t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -1e+74) or not (t_1 <= 2e+117): tmp = x + t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -1e+74) || !(t_1 <= 2e+117)) tmp = Float64(x + t_1); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -1e+74) || ~((t_1 <= 2e+117))) tmp = x + t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+74], N[Not[LessEqual[t$95$1, 2e+117]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+74} \lor \neg \left(t_1 \leq 2 \cdot 10^{+117}\right):\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -9.99999999999999952e73 or 2.0000000000000001e117 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
add-sqr-sqrt48.7%
pow248.7%
Applied egg-rr48.7%
Taylor expanded in x around inf 89.9%
if -9.99999999999999952e73 < (*.f64 (-.f64 a 1/2) b) < 2.0000000000000001e117Initial program 99.8%
add-sqr-sqrt42.2%
pow242.2%
Applied egg-rr42.2%
Taylor expanded in z around 0 69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in b around 0 64.6%
Final simplification76.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -9.4e+145)
x
(if (<= x -2.25e+46)
(* a b)
(if (<= x -3.5e-34) x (if (<= x -1.85e-211) (* a b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.4e+145) {
tmp = x;
} else if (x <= -2.25e+46) {
tmp = a * b;
} else if (x <= -3.5e-34) {
tmp = x;
} else if (x <= -1.85e-211) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-9.4d+145)) then
tmp = x
else if (x <= (-2.25d+46)) then
tmp = a * b
else if (x <= (-3.5d-34)) then
tmp = x
else if (x <= (-1.85d-211)) then
tmp = a * b
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.4e+145) {
tmp = x;
} else if (x <= -2.25e+46) {
tmp = a * b;
} else if (x <= -3.5e-34) {
tmp = x;
} else if (x <= -1.85e-211) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9.4e+145: tmp = x elif x <= -2.25e+46: tmp = a * b elif x <= -3.5e-34: tmp = x elif x <= -1.85e-211: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9.4e+145) tmp = x; elseif (x <= -2.25e+46) tmp = Float64(a * b); elseif (x <= -3.5e-34) tmp = x; elseif (x <= -1.85e-211) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -9.4e+145) tmp = x; elseif (x <= -2.25e+46) tmp = a * b; elseif (x <= -3.5e-34) tmp = x; elseif (x <= -1.85e-211) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.4e+145], x, If[LessEqual[x, -2.25e+46], N[(a * b), $MachinePrecision], If[LessEqual[x, -3.5e-34], x, If[LessEqual[x, -1.85e-211], N[(a * b), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.4 \cdot 10^{+145}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.25 \cdot 10^{+46}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-34}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-211}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -9.4000000000000004e145 or -2.25000000000000005e46 < x < -3.5e-34Initial 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 x around inf 53.1%
if -9.4000000000000004e145 < x < -2.25000000000000005e46 or -3.5e-34 < x < -1.8499999999999999e-211Initial 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 a around inf 35.6%
*-commutative35.6%
Simplified35.6%
if -1.8499999999999999e-211 < x Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 24.2%
Final simplification31.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -5e-100) (+ 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-100) {
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-100)) 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-100) {
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-100: 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-100) 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-100) 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-100], 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^{-100}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < -5.0000000000000001e-100Initial program 99.9%
add-sqr-sqrt49.5%
pow249.5%
Applied egg-rr49.5%
Taylor expanded in x around inf 63.4%
if -5.0000000000000001e-100 < (+.f64 x y) Initial program 99.8%
add-sqr-sqrt41.7%
pow241.7%
Applied egg-rr41.7%
Taylor expanded in y around inf 59.2%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (+ (* b (- a 0.5)) (+ x (+ z y))))
double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (x + (z + y));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (b * (a - 0.5d0)) + (x + (z + y))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (x + (z + y));
}
def code(x, y, z, t, a, b): return (b * (a - 0.5)) + (x + (z + y))
function code(x, y, z, t, a, b) return Float64(Float64(b * Float64(a - 0.5)) + Float64(x + Float64(z + y))) end
function tmp = code(x, y, z, t, a, b) tmp = (b * (a - 0.5)) + (x + (z + y)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(a - 0.5\right) + \left(x + \left(z + y\right)\right)
\end{array}
Initial program 99.9%
add-sqr-sqrt45.2%
pow245.2%
Applied egg-rr45.2%
Taylor expanded in z around 0 82.1%
+-commutative82.1%
+-commutative82.1%
Simplified82.1%
Final simplification82.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.6e+30) (not (<= b 5.5e+80))) (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.6e+30) || !(b <= 5.5e+80)) {
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 <= (-4.6d+30)) .or. (.not. (b <= 5.5d+80))) 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 <= -4.6e+30) || !(b <= 5.5e+80)) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.6e+30) or not (b <= 5.5e+80): tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.6e+30) || !(b <= 5.5e+80)) 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 <= -4.6e+30) || ~((b <= 5.5e+80))) 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, -4.6e+30], N[Not[LessEqual[b, 5.5e+80]], $MachinePrecision]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{+30} \lor \neg \left(b \leq 5.5 \cdot 10^{+80}\right):\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -4.6e30 or 5.49999999999999967e80 < 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 77.2%
if -4.6e30 < b < 5.49999999999999967e80Initial program 99.9%
add-sqr-sqrt44.2%
pow244.2%
Applied egg-rr44.2%
Taylor expanded in z around 0 75.5%
+-commutative75.5%
Simplified75.5%
Taylor expanded in b around 0 63.8%
Final simplification69.4%
(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-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 81.4%
Final simplification81.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7e+30) (not (<= b 9e+82))) (* a b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e+30) || !(b <= 9e+82)) {
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 <= (-7d+30)) .or. (.not. (b <= 9d+82))) 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 <= -7e+30) || !(b <= 9e+82)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7e+30) or not (b <= 9e+82): tmp = a * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7e+30) || !(b <= 9e+82)) 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 <= -7e+30) || ~((b <= 9e+82))) tmp = a * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7e+30], N[Not[LessEqual[b, 9e+82]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+30} \lor \neg \left(b \leq 9 \cdot 10^{+82}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -7.00000000000000042e30 or 8.9999999999999993e82 < 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 a around inf 50.0%
*-commutative50.0%
Simplified50.0%
if -7.00000000000000042e30 < b < 8.9999999999999993e82Initial program 99.9%
add-sqr-sqrt44.2%
pow244.2%
Applied egg-rr44.2%
Taylor expanded in z around 0 75.5%
+-commutative75.5%
Simplified75.5%
Taylor expanded in b around 0 63.8%
Final simplification58.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -9.8e-35) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.8e-35) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-9.8d-35)) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.8e-35) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9.8e-35: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9.8e-35) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -9.8e-35) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.8e-35], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.8 \cdot 10^{-35}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -9.800000000000001e-35Initial 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 x around inf 39.4%
if -9.800000000000001e-35 < x Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 23.5%
Final simplification27.7%
(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-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 23.0%
Final simplification23.0%
(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 2023322
(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)))