
(FPCore (a b) :precision binary64 (* (* (/ PI 2.0) (/ 1.0 (- (* b b) (* a a)))) (- (/ 1.0 a) (/ 1.0 b))))
double code(double a, double b) {
return ((((double) M_PI) / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b));
}
public static double code(double a, double b) {
return ((Math.PI / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b));
}
def code(a, b): return ((math.pi / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b))
function code(a, b) return Float64(Float64(Float64(pi / 2.0) * Float64(1.0 / Float64(Float64(b * b) - Float64(a * a)))) * Float64(Float64(1.0 / a) - Float64(1.0 / b))) end
function tmp = code(a, b) tmp = ((pi / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b)); end
code[a_, b_] := N[(N[(N[(Pi / 2.0), $MachinePrecision] * N[(1.0 / N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / a), $MachinePrecision] - N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{\pi}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b) :precision binary64 (* (* (/ PI 2.0) (/ 1.0 (- (* b b) (* a a)))) (- (/ 1.0 a) (/ 1.0 b))))
double code(double a, double b) {
return ((((double) M_PI) / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b));
}
public static double code(double a, double b) {
return ((Math.PI / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b));
}
def code(a, b): return ((math.pi / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b))
function code(a, b) return Float64(Float64(Float64(pi / 2.0) * Float64(1.0 / Float64(Float64(b * b) - Float64(a * a)))) * Float64(Float64(1.0 / a) - Float64(1.0 / b))) end
function tmp = code(a, b) tmp = ((pi / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b)); end
code[a_, b_] := N[(N[(N[(Pi / 2.0), $MachinePrecision] * N[(1.0 / N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / a), $MachinePrecision] - N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{\pi}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)
\end{array}
NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (a b) :precision binary64 (/ (/ (/ PI b) a) (* (+ b a) 2.0)))
assert(a < b);
double code(double a, double b) {
return ((((double) M_PI) / b) / a) / ((b + a) * 2.0);
}
assert a < b;
public static double code(double a, double b) {
return ((Math.PI / b) / a) / ((b + a) * 2.0);
}
[a, b] = sort([a, b]) def code(a, b): return ((math.pi / b) / a) / ((b + a) * 2.0)
a, b = sort([a, b]) function code(a, b) return Float64(Float64(Float64(pi / b) / a) / Float64(Float64(b + a) * 2.0)) end
a, b = num2cell(sort([a, b])){:}
function tmp = code(a, b)
tmp = ((pi / b) / a) / ((b + a) * 2.0);
end
NOTE: a and b should be sorted in increasing order before calling this function. code[a_, b_] := N[(N[(N[(Pi / b), $MachinePrecision] / a), $MachinePrecision] / N[(N[(b + a), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[a, b] = \mathsf{sort}([a, b])\\
\\
\frac{\frac{\frac{\pi}{b}}{a}}{\left(b + a\right) \cdot 2}
\end{array}
Initial program 82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-*l/82.9%
difference-of-squares91.9%
times-frac99.6%
associate-/l/99.6%
sub-neg99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
associate-*l/99.6%
associate-/r*99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 99.7%
associate-/l/99.6%
Simplified99.6%
Final simplification99.6%
NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (a b) :precision binary64 (let* ((t_0 (/ (/ PI b) a))) (if (<= a -4.35e-69) (* t_0 (/ 0.5 a)) (* t_0 (/ 0.5 b)))))
assert(a < b);
double code(double a, double b) {
double t_0 = (((double) M_PI) / b) / a;
double tmp;
if (a <= -4.35e-69) {
tmp = t_0 * (0.5 / a);
} else {
tmp = t_0 * (0.5 / b);
}
return tmp;
}
assert a < b;
public static double code(double a, double b) {
double t_0 = (Math.PI / b) / a;
double tmp;
if (a <= -4.35e-69) {
tmp = t_0 * (0.5 / a);
} else {
tmp = t_0 * (0.5 / b);
}
return tmp;
}
[a, b] = sort([a, b]) def code(a, b): t_0 = (math.pi / b) / a tmp = 0 if a <= -4.35e-69: tmp = t_0 * (0.5 / a) else: tmp = t_0 * (0.5 / b) return tmp
a, b = sort([a, b]) function code(a, b) t_0 = Float64(Float64(pi / b) / a) tmp = 0.0 if (a <= -4.35e-69) tmp = Float64(t_0 * Float64(0.5 / a)); else tmp = Float64(t_0 * Float64(0.5 / b)); end return tmp end
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(a, b)
t_0 = (pi / b) / a;
tmp = 0.0;
if (a <= -4.35e-69)
tmp = t_0 * (0.5 / a);
else
tmp = t_0 * (0.5 / b);
end
tmp_2 = tmp;
end
NOTE: a and b should be sorted in increasing order before calling this function.
code[a_, b_] := Block[{t$95$0 = N[(N[(Pi / b), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -4.35e-69], N[(t$95$0 * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(0.5 / b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_0 := \frac{\frac{\pi}{b}}{a}\\
\mathbf{if}\;a \leq -4.35 \cdot 10^{-69}:\\
\;\;\;\;t_0 \cdot \frac{0.5}{a}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{0.5}{b}\\
\end{array}
\end{array}
if a < -4.34999999999999976e-69Initial program 88.0%
associate-*r/88.1%
*-rgt-identity88.1%
associate-*l/87.9%
difference-of-squares92.6%
times-frac99.5%
associate-/l/99.5%
sub-neg99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in a around 0 99.6%
expm1-log1p-u84.3%
expm1-udef59.8%
un-div-inv59.8%
+-commutative59.8%
Applied egg-rr59.8%
expm1-def84.4%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Applied egg-rr59.8%
expm1-def84.0%
expm1-log1p99.3%
associate-/l/99.7%
*-rgt-identity99.7%
associate-*r/99.6%
*-commutative99.6%
associate-/r/99.2%
*-commutative99.2%
associate-*r/99.2%
associate-/r*99.2%
metadata-eval99.2%
associate-/r/99.6%
+-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in a around inf 77.2%
if -4.34999999999999976e-69 < a Initial program 80.3%
associate-*r/80.4%
*-rgt-identity80.4%
associate-*l/80.4%
difference-of-squares91.5%
times-frac99.6%
associate-/l/99.6%
sub-neg99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
expm1-log1p-u71.2%
expm1-udef47.5%
un-div-inv47.5%
+-commutative47.5%
Applied egg-rr47.5%
expm1-def71.2%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Applied egg-rr47.5%
expm1-def70.7%
expm1-log1p99.2%
associate-/l/99.7%
*-rgt-identity99.7%
associate-*r/99.6%
*-commutative99.6%
associate-/r/99.2%
*-commutative99.2%
associate-*r/99.2%
associate-/r*99.2%
metadata-eval99.2%
associate-/r/99.6%
+-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in a around 0 70.0%
Final simplification72.4%
NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (a b) :precision binary64 (if (<= a -4e-69) (/ (/ (/ PI a) 2.0) (* b a)) (* (/ (/ PI b) a) (/ 0.5 b))))
assert(a < b);
double code(double a, double b) {
double tmp;
if (a <= -4e-69) {
tmp = ((((double) M_PI) / a) / 2.0) / (b * a);
} else {
tmp = ((((double) M_PI) / b) / a) * (0.5 / b);
}
return tmp;
}
assert a < b;
public static double code(double a, double b) {
double tmp;
if (a <= -4e-69) {
tmp = ((Math.PI / a) / 2.0) / (b * a);
} else {
tmp = ((Math.PI / b) / a) * (0.5 / b);
}
return tmp;
}
[a, b] = sort([a, b]) def code(a, b): tmp = 0 if a <= -4e-69: tmp = ((math.pi / a) / 2.0) / (b * a) else: tmp = ((math.pi / b) / a) * (0.5 / b) return tmp
a, b = sort([a, b]) function code(a, b) tmp = 0.0 if (a <= -4e-69) tmp = Float64(Float64(Float64(pi / a) / 2.0) / Float64(b * a)); else tmp = Float64(Float64(Float64(pi / b) / a) * Float64(0.5 / b)); end return tmp end
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(a, b)
tmp = 0.0;
if (a <= -4e-69)
tmp = ((pi / a) / 2.0) / (b * a);
else
tmp = ((pi / b) / a) * (0.5 / b);
end
tmp_2 = tmp;
end
NOTE: a and b should be sorted in increasing order before calling this function. code[a_, b_] := If[LessEqual[a, -4e-69], N[(N[(N[(Pi / a), $MachinePrecision] / 2.0), $MachinePrecision] / N[(b * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi / b), $MachinePrecision] / a), $MachinePrecision] * N[(0.5 / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{\frac{\pi}{a}}{2}}{b \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\pi}{b}}{a} \cdot \frac{0.5}{b}\\
\end{array}
\end{array}
if a < -3.9999999999999999e-69Initial program 88.0%
associate-*r/88.1%
*-rgt-identity88.1%
associate-*l/87.9%
difference-of-squares92.6%
times-frac99.5%
associate-/l/99.5%
sub-neg99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in a around 0 99.6%
expm1-log1p-u84.3%
expm1-udef59.8%
un-div-inv59.8%
+-commutative59.8%
Applied egg-rr59.8%
expm1-def84.4%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 77.3%
if -3.9999999999999999e-69 < a Initial program 80.3%
associate-*r/80.4%
*-rgt-identity80.4%
associate-*l/80.4%
difference-of-squares91.5%
times-frac99.6%
associate-/l/99.6%
sub-neg99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
expm1-log1p-u71.2%
expm1-udef47.5%
un-div-inv47.5%
+-commutative47.5%
Applied egg-rr47.5%
expm1-def71.2%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Applied egg-rr47.5%
expm1-def70.7%
expm1-log1p99.2%
associate-/l/99.7%
*-rgt-identity99.7%
associate-*r/99.6%
*-commutative99.6%
associate-/r/99.2%
*-commutative99.2%
associate-*r/99.2%
associate-/r*99.2%
metadata-eval99.2%
associate-/r/99.6%
+-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in a around 0 70.0%
Final simplification72.4%
NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (a b) :precision binary64 (if (<= a -3.3e-69) (/ (/ (/ PI a) 2.0) (* b a)) (/ (/ (/ PI b) 2.0) (* b a))))
assert(a < b);
double code(double a, double b) {
double tmp;
if (a <= -3.3e-69) {
tmp = ((((double) M_PI) / a) / 2.0) / (b * a);
} else {
tmp = ((((double) M_PI) / b) / 2.0) / (b * a);
}
return tmp;
}
assert a < b;
public static double code(double a, double b) {
double tmp;
if (a <= -3.3e-69) {
tmp = ((Math.PI / a) / 2.0) / (b * a);
} else {
tmp = ((Math.PI / b) / 2.0) / (b * a);
}
return tmp;
}
[a, b] = sort([a, b]) def code(a, b): tmp = 0 if a <= -3.3e-69: tmp = ((math.pi / a) / 2.0) / (b * a) else: tmp = ((math.pi / b) / 2.0) / (b * a) return tmp
a, b = sort([a, b]) function code(a, b) tmp = 0.0 if (a <= -3.3e-69) tmp = Float64(Float64(Float64(pi / a) / 2.0) / Float64(b * a)); else tmp = Float64(Float64(Float64(pi / b) / 2.0) / Float64(b * a)); end return tmp end
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(a, b)
tmp = 0.0;
if (a <= -3.3e-69)
tmp = ((pi / a) / 2.0) / (b * a);
else
tmp = ((pi / b) / 2.0) / (b * a);
end
tmp_2 = tmp;
end
NOTE: a and b should be sorted in increasing order before calling this function. code[a_, b_] := If[LessEqual[a, -3.3e-69], N[(N[(N[(Pi / a), $MachinePrecision] / 2.0), $MachinePrecision] / N[(b * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi / b), $MachinePrecision] / 2.0), $MachinePrecision] / N[(b * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{\frac{\pi}{a}}{2}}{b \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\pi}{b}}{2}}{b \cdot a}\\
\end{array}
\end{array}
if a < -3.3e-69Initial program 88.0%
associate-*r/88.1%
*-rgt-identity88.1%
associate-*l/87.9%
difference-of-squares92.6%
times-frac99.5%
associate-/l/99.5%
sub-neg99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in a around 0 99.6%
expm1-log1p-u84.3%
expm1-udef59.8%
un-div-inv59.8%
+-commutative59.8%
Applied egg-rr59.8%
expm1-def84.4%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 77.3%
if -3.3e-69 < a Initial program 80.3%
associate-*r/80.4%
*-rgt-identity80.4%
associate-*l/80.4%
difference-of-squares91.5%
times-frac99.6%
associate-/l/99.6%
sub-neg99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
expm1-log1p-u71.2%
expm1-udef47.5%
un-div-inv47.5%
+-commutative47.5%
Applied egg-rr47.5%
expm1-def71.2%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around inf 70.1%
Final simplification72.5%
NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (a b) :precision binary64 (* (/ (/ PI b) a) (/ 0.5 (+ b a))))
assert(a < b);
double code(double a, double b) {
return ((((double) M_PI) / b) / a) * (0.5 / (b + a));
}
assert a < b;
public static double code(double a, double b) {
return ((Math.PI / b) / a) * (0.5 / (b + a));
}
[a, b] = sort([a, b]) def code(a, b): return ((math.pi / b) / a) * (0.5 / (b + a))
a, b = sort([a, b]) function code(a, b) return Float64(Float64(Float64(pi / b) / a) * Float64(0.5 / Float64(b + a))) end
a, b = num2cell(sort([a, b])){:}
function tmp = code(a, b)
tmp = ((pi / b) / a) * (0.5 / (b + a));
end
NOTE: a and b should be sorted in increasing order before calling this function. code[a_, b_] := N[(N[(N[(Pi / b), $MachinePrecision] / a), $MachinePrecision] * N[(0.5 / N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[a, b] = \mathsf{sort}([a, b])\\
\\
\frac{\frac{\pi}{b}}{a} \cdot \frac{0.5}{b + a}
\end{array}
Initial program 82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-*l/82.9%
difference-of-squares91.9%
times-frac99.6%
associate-/l/99.6%
sub-neg99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
expm1-log1p-u75.6%
expm1-udef51.6%
un-div-inv51.6%
+-commutative51.6%
Applied egg-rr51.6%
expm1-def75.6%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Applied egg-rr51.6%
expm1-def75.1%
expm1-log1p99.2%
associate-/l/99.7%
*-rgt-identity99.7%
associate-*r/99.6%
*-commutative99.6%
associate-/r/99.2%
*-commutative99.2%
associate-*r/99.2%
associate-/r*99.2%
metadata-eval99.2%
associate-/r/99.6%
+-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Final simplification99.6%
NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (a b) :precision binary64 (/ (* PI (/ 0.5 (+ b a))) (* b a)))
assert(a < b);
double code(double a, double b) {
return (((double) M_PI) * (0.5 / (b + a))) / (b * a);
}
assert a < b;
public static double code(double a, double b) {
return (Math.PI * (0.5 / (b + a))) / (b * a);
}
[a, b] = sort([a, b]) def code(a, b): return (math.pi * (0.5 / (b + a))) / (b * a)
a, b = sort([a, b]) function code(a, b) return Float64(Float64(pi * Float64(0.5 / Float64(b + a))) / Float64(b * a)) end
a, b = num2cell(sort([a, b])){:}
function tmp = code(a, b)
tmp = (pi * (0.5 / (b + a))) / (b * a);
end
NOTE: a and b should be sorted in increasing order before calling this function. code[a_, b_] := N[(N[(Pi * N[(0.5 / N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[a, b] = \mathsf{sort}([a, b])\\
\\
\frac{\pi \cdot \frac{0.5}{b + a}}{b \cdot a}
\end{array}
Initial program 82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-*l/82.9%
difference-of-squares91.9%
times-frac99.6%
associate-/l/99.6%
sub-neg99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
expm1-log1p-u75.6%
expm1-udef51.6%
un-div-inv51.6%
+-commutative51.6%
Applied egg-rr51.6%
expm1-def75.6%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Applied egg-rr51.6%
expm1-def75.1%
expm1-log1p99.2%
associate-/l/99.7%
*-rgt-identity99.7%
associate-*r/99.6%
*-commutative99.6%
associate-/r/99.2%
*-commutative99.2%
associate-*r/99.2%
associate-/r*99.2%
metadata-eval99.2%
associate-/r/99.6%
+-commutative99.6%
associate-/r*99.6%
Simplified99.6%
associate-/r*99.6%
associate-*r/99.6%
+-commutative99.6%
Applied egg-rr99.6%
Final simplification99.6%
NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (a b) :precision binary64 (* (/ (/ PI b) a) (/ 0.5 a)))
assert(a < b);
double code(double a, double b) {
return ((((double) M_PI) / b) / a) * (0.5 / a);
}
assert a < b;
public static double code(double a, double b) {
return ((Math.PI / b) / a) * (0.5 / a);
}
[a, b] = sort([a, b]) def code(a, b): return ((math.pi / b) / a) * (0.5 / a)
a, b = sort([a, b]) function code(a, b) return Float64(Float64(Float64(pi / b) / a) * Float64(0.5 / a)) end
a, b = num2cell(sort([a, b])){:}
function tmp = code(a, b)
tmp = ((pi / b) / a) * (0.5 / a);
end
NOTE: a and b should be sorted in increasing order before calling this function. code[a_, b_] := N[(N[(N[(Pi / b), $MachinePrecision] / a), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[a, b] = \mathsf{sort}([a, b])\\
\\
\frac{\frac{\pi}{b}}{a} \cdot \frac{0.5}{a}
\end{array}
Initial program 82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-*l/82.9%
difference-of-squares91.9%
times-frac99.6%
associate-/l/99.6%
sub-neg99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
expm1-log1p-u75.6%
expm1-udef51.6%
un-div-inv51.6%
+-commutative51.6%
Applied egg-rr51.6%
expm1-def75.6%
expm1-log1p99.7%
associate-/r*99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Applied egg-rr51.6%
expm1-def75.1%
expm1-log1p99.2%
associate-/l/99.7%
*-rgt-identity99.7%
associate-*r/99.6%
*-commutative99.6%
associate-/r/99.2%
*-commutative99.2%
associate-*r/99.2%
associate-/r*99.2%
metadata-eval99.2%
associate-/r/99.6%
+-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in a around inf 62.3%
Final simplification62.3%
herbie shell --seed 2023320
(FPCore (a b)
:name "NMSE Section 6.1 mentioned, B"
:precision binary64
(* (* (/ PI 2.0) (/ 1.0 (- (* b b) (* a a)))) (- (/ 1.0 a) (/ 1.0 b))))