
(FPCore (k n) :precision binary64 (* (/ 1.0 (sqrt k)) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0))))
\begin{array}{l}
\\
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (k n) :precision binary64 (* (/ 1.0 (sqrt k)) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0))))
\begin{array}{l}
\\
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\end{array}
(FPCore (k n) :precision binary64 (/ (pow (* (+ (PI) (PI)) n) (fma -0.5 k 0.5)) (sqrt k)))
\begin{array}{l}
\\
\frac{{\left(\left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}
\end{array}
Initial program 99.2%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
div-invN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-eval99.2
Applied rewrites99.2%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6499.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6499.3
Applied rewrites99.3%
lift-*.f64N/A
count-2-revN/A
lower-+.f6499.3
Applied rewrites99.3%
(FPCore (k n)
:precision binary64
(let* ((t_0 (/ (/ k (PI)) n)))
(if (<=
(* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))
4e+16)
(sqrt (/ (fma (* n (PI)) t_0 k) (* k t_0)))
(* (sqrt 2.0) (* (sqrt n) (/ (sqrt (PI)) (sqrt k)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{k}{\mathsf{PI}\left(\right)}}{n}\\
\mathbf{if}\;{\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \leq 4 \cdot 10^{+16}:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(n \cdot \mathsf{PI}\left(\right), t\_0, k\right)}{k \cdot t\_0}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{n} \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{\sqrt{k}}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) < 4e16Initial program 99.7%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6426.7
Applied rewrites26.7%
Applied rewrites26.7%
Applied rewrites48.1%
if 4e16 < (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) Initial program 98.9%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6437.7
Applied rewrites37.7%
Applied rewrites60.9%
Applied rewrites61.5%
Final simplification56.4%
(FPCore (k n)
:precision binary64
(let* ((t_0 (* n (PI))))
(if (<=
(* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))
0.0)
(sqrt (/ (fma t_0 k (* k t_0)) (* k k)))
(* (sqrt 2.0) (* (sqrt n) (/ (sqrt (PI)) (sqrt k)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := n \cdot \mathsf{PI}\left(\right)\\
\mathbf{if}\;{\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \leq 0:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(t\_0, k, k \cdot t\_0\right)}{k \cdot k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{n} \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{\sqrt{k}}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) < 0.0Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f643.2
Applied rewrites3.2%
Applied rewrites3.2%
Applied rewrites14.8%
if 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) Initial program 98.9%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6445.7
Applied rewrites45.7%
Applied rewrites65.7%
Applied rewrites66.3%
Final simplification51.4%
(FPCore (k n)
:precision binary64
(let* ((t_0 (* n (PI))))
(if (<=
(* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))
0.0)
(sqrt (/ (fma t_0 k (* k t_0)) (* k k)))
(* (sqrt 2.0) (/ (sqrt t_0) (sqrt k))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := n \cdot \mathsf{PI}\left(\right)\\
\mathbf{if}\;{\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \leq 0:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(t\_0, k, k \cdot t\_0\right)}{k \cdot k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{\sqrt{t\_0}}{\sqrt{k}}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) < 0.0Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f643.2
Applied rewrites3.2%
Applied rewrites3.2%
Applied rewrites14.8%
if 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) Initial program 98.9%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6445.7
Applied rewrites45.7%
Applied rewrites66.2%
Final simplification51.4%
(FPCore (k n)
:precision binary64
(let* ((t_0 (* n (PI))))
(if (<=
(* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))
0.0)
(sqrt (/ (fma t_0 k (* k t_0)) (* k k)))
(* (sqrt (* 2.0 (/ (PI) k))) (sqrt n)))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := n \cdot \mathsf{PI}\left(\right)\\
\mathbf{if}\;{\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \leq 0:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(t\_0, k, k \cdot t\_0\right)}{k \cdot k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\mathsf{PI}\left(\right)}{k}} \cdot \sqrt{n}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) < 0.0Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f643.2
Applied rewrites3.2%
Applied rewrites3.2%
Applied rewrites14.8%
if 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) (sqrt.f64 k)) (pow.f64 (*.f64 (*.f64 #s(literal 2 binary64) (PI.f64)) n) (/.f64 (-.f64 #s(literal 1 binary64) k) #s(literal 2 binary64)))) Initial program 98.9%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6445.7
Applied rewrites45.7%
Applied rewrites45.8%
Applied rewrites65.9%
Final simplification51.1%
(FPCore (k n)
:precision binary64
(let* ((t_0 (* (/ (PI) k) n)) (t_1 (* n (PI))) (t_2 (/ (/ k (PI)) n)))
(if (<= k 8e+46)
(* (pow k -0.5) (* (sqrt (* (PI) n)) (sqrt 2.0)))
(if (<= k 1.5e+194)
(sqrt (/ (/ (fma n (PI) (* t_0 k)) (* t_0 t_1)) (* t_2 t_2)))
(sqrt (/ (fma t_1 t_2 k) (* k t_2)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{PI}\left(\right)}{k} \cdot n\\
t_1 := n \cdot \mathsf{PI}\left(\right)\\
t_2 := \frac{\frac{k}{\mathsf{PI}\left(\right)}}{n}\\
\mathbf{if}\;k \leq 8 \cdot 10^{+46}:\\
\;\;\;\;{k}^{-0.5} \cdot \left(\sqrt{\mathsf{PI}\left(\right) \cdot n} \cdot \sqrt{2}\right)\\
\mathbf{elif}\;k \leq 1.5 \cdot 10^{+194}:\\
\;\;\;\;\sqrt{\frac{\frac{\mathsf{fma}\left(n, \mathsf{PI}\left(\right), t\_0 \cdot k\right)}{t\_0 \cdot t\_1}}{t\_2 \cdot t\_2}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(t\_1, t\_2, k\right)}{k \cdot t\_2}}\\
\end{array}
\end{array}
if k < 7.9999999999999999e46Initial program 98.6%
lift-/.f64N/A
inv-powN/A
lift-sqrt.f64N/A
pow1/2N/A
pow-powN/A
lower-pow.f64N/A
metadata-eval98.7
Applied rewrites98.7%
Taylor expanded in k around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-sqrt.f6485.0
Applied rewrites85.0%
if 7.9999999999999999e46 < k < 1.5000000000000002e194Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.7
Applied rewrites2.7%
Applied rewrites2.7%
Applied rewrites2.3%
Applied rewrites20.9%
if 1.5000000000000002e194 < k Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.7
Applied rewrites2.7%
Applied rewrites2.7%
Applied rewrites36.7%
(FPCore (k n)
:precision binary64
(let* ((t_0 (* (/ (PI) k) n)) (t_1 (* n (PI))) (t_2 (/ (/ k (PI)) n)))
(if (<= k 8e+46)
(* (sqrt 2.0) (* (sqrt n) (/ (sqrt (PI)) (sqrt k))))
(if (<= k 1.5e+194)
(sqrt (/ (/ (fma n (PI) (* t_0 k)) (* t_0 t_1)) (* t_2 t_2)))
(sqrt (/ (fma t_1 t_2 k) (* k t_2)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{PI}\left(\right)}{k} \cdot n\\
t_1 := n \cdot \mathsf{PI}\left(\right)\\
t_2 := \frac{\frac{k}{\mathsf{PI}\left(\right)}}{n}\\
\mathbf{if}\;k \leq 8 \cdot 10^{+46}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{n} \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{\sqrt{k}}\right)\\
\mathbf{elif}\;k \leq 1.5 \cdot 10^{+194}:\\
\;\;\;\;\sqrt{\frac{\frac{\mathsf{fma}\left(n, \mathsf{PI}\left(\right), t\_0 \cdot k\right)}{t\_0 \cdot t\_1}}{t\_2 \cdot t\_2}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(t\_1, t\_2, k\right)}{k \cdot t\_2}}\\
\end{array}
\end{array}
if k < 7.9999999999999999e46Initial program 98.6%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6458.5
Applied rewrites58.5%
Applied rewrites84.2%
Applied rewrites85.0%
if 7.9999999999999999e46 < k < 1.5000000000000002e194Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.7
Applied rewrites2.7%
Applied rewrites2.7%
Applied rewrites2.3%
Applied rewrites20.9%
if 1.5000000000000002e194 < k Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.7
Applied rewrites2.7%
Applied rewrites2.7%
Applied rewrites36.7%
(FPCore (k n)
:precision binary64
(let* ((t_0 (* n (PI))) (t_1 (/ (/ k (PI)) n)))
(if (<= k 9.5e+41)
(* (sqrt 2.0) (* (sqrt n) (/ (sqrt (PI)) (sqrt k))))
(if (<= k 2.8e+121)
(sqrt (/ (/ (fma k t_0 (* t_0 k)) (* t_0 t_0)) (* t_1 t_1)))
(sqrt (/ (fma t_0 t_1 k) (* k t_1)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := n \cdot \mathsf{PI}\left(\right)\\
t_1 := \frac{\frac{k}{\mathsf{PI}\left(\right)}}{n}\\
\mathbf{if}\;k \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{n} \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{\sqrt{k}}\right)\\
\mathbf{elif}\;k \leq 2.8 \cdot 10^{+121}:\\
\;\;\;\;\sqrt{\frac{\frac{\mathsf{fma}\left(k, t\_0, t\_0 \cdot k\right)}{t\_0 \cdot t\_0}}{t\_1 \cdot t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(t\_0, t\_1, k\right)}{k \cdot t\_1}}\\
\end{array}
\end{array}
if k < 9.4999999999999996e41Initial program 98.6%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6458.5
Applied rewrites58.5%
Applied rewrites84.2%
Applied rewrites85.0%
if 9.4999999999999996e41 < k < 2.80000000000000006e121Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.6
Applied rewrites2.6%
Applied rewrites2.6%
Applied rewrites2.3%
Applied rewrites22.0%
if 2.80000000000000006e121 < k Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.7
Applied rewrites2.7%
Applied rewrites2.7%
Applied rewrites26.6%
(FPCore (k n)
:precision binary64
(let* ((t_0 (* n (PI))) (t_1 (fma n (PI) (* (- (PI)) n))))
(if (<= k 1.32e+154)
(* (sqrt 2.0) (* (sqrt n) (/ (sqrt (PI)) (sqrt k))))
(if (<= k 7e+246)
(sqrt (/ (fma t_0 k (* k t_0)) (* k k)))
(sqrt (/ (* t_0 t_1) (* t_1 k)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := n \cdot \mathsf{PI}\left(\right)\\
t_1 := \mathsf{fma}\left(n, \mathsf{PI}\left(\right), \left(-\mathsf{PI}\left(\right)\right) \cdot n\right)\\
\mathbf{if}\;k \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{n} \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{\sqrt{k}}\right)\\
\mathbf{elif}\;k \leq 7 \cdot 10^{+246}:\\
\;\;\;\;\sqrt{\frac{\mathsf{fma}\left(t\_0, k, k \cdot t\_0\right)}{k \cdot k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{t\_0 \cdot t\_1}{t\_1 \cdot k}}\\
\end{array}
\end{array}
if k < 1.31999999999999998e154Initial program 98.9%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6445.7
Applied rewrites45.7%
Applied rewrites65.5%
Applied rewrites66.1%
if 1.31999999999999998e154 < k < 6.99999999999999951e246Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.6
Applied rewrites2.6%
Applied rewrites2.6%
Applied rewrites20.3%
if 6.99999999999999951e246 < k Initial program 100.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f642.7
Applied rewrites2.7%
Applied rewrites2.7%
Applied rewrites23.5%
Final simplification53.4%
(FPCore (k n) :precision binary64 (* (sqrt (* 2.0 (/ (PI) k))) (sqrt n)))
\begin{array}{l}
\\
\sqrt{2 \cdot \frac{\mathsf{PI}\left(\right)}{k}} \cdot \sqrt{n}
\end{array}
Initial program 99.2%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6433.4
Applied rewrites33.4%
Applied rewrites33.5%
Applied rewrites47.8%
(FPCore (k n) :precision binary64 (* (sqrt n) (sqrt (* (/ 2.0 k) (PI)))))
\begin{array}{l}
\\
\sqrt{n} \cdot \sqrt{\frac{2}{k} \cdot \mathsf{PI}\left(\right)}
\end{array}
Initial program 99.2%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6433.4
Applied rewrites33.4%
Applied rewrites33.5%
Applied rewrites33.5%
Applied rewrites47.8%
(FPCore (k n) :precision binary64 (sqrt (* (* n (PI)) (/ 2.0 k))))
\begin{array}{l}
\\
\sqrt{\left(n \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{2}{k}}
\end{array}
Initial program 99.2%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6433.4
Applied rewrites33.4%
Applied rewrites33.5%
Applied rewrites33.5%
herbie shell --seed 2024305
(FPCore (k n)
:name "Migdal et al, Equation (51)"
:precision binary64
(* (/ 1.0 (sqrt k)) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0))))