Migdal et al, Equation (51)

Percentage Accurate: 99.5% → 99.5%
Time: 10.0s
Alternatives: 9
Speedup: 1.1×

Specification

?
\[\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
 (* (/ 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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 9 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.5% accurate, 1.0× speedup?

\[\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
 (* (/ 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}

Alternative 1: 99.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ {k}^{-0.5} \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 k -0.5) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0))))
\begin{array}{l}

\\
{k}^{-0.5} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{1}{\sqrt{k}}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    2. inv-powN/A

      \[\leadsto \color{blue}{{\left(\sqrt{k}\right)}^{-1}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    3. lift-sqrt.f64N/A

      \[\leadsto {\color{blue}{\left(\sqrt{k}\right)}}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    4. pow1/2N/A

      \[\leadsto {\color{blue}{\left({k}^{\frac{1}{2}}\right)}}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    5. pow-powN/A

      \[\leadsto \color{blue}{{k}^{\left(\frac{1}{2} \cdot -1\right)}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    6. lower-pow.f64N/A

      \[\leadsto \color{blue}{{k}^{\left(\frac{1}{2} \cdot -1\right)}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    7. metadata-eval99.6

      \[\leadsto {k}^{\color{blue}{-0.5}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  4. Applied rewrites99.6%

    \[\leadsto \color{blue}{{k}^{-0.5}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  5. Add Preprocessing

Alternative 2: 97.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\\ \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+284}:\\ \;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{0}^{\left(-k\right)}}{\sqrt{k}}\\ \end{array} \end{array} \]
(FPCore (k n)
 :precision binary64
 (let* ((t_0
         (* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))))
   (if (<= t_0 5e-227)
     0.0
     (if (<= t_0 5e+284)
       (/ (sqrt (* (* n 2.0) (PI))) (sqrt k))
       (/ (pow 0.0 (- k)) (sqrt k))))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-227}:\\
\;\;\;\;0\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+284}:\\
\;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\

\mathbf{else}:\\
\;\;\;\;\frac{{0}^{\left(-k\right)}}{\sqrt{k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. 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)))) < 4.99999999999999961e-227

    1. Initial program 100.0%

      \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    2. Add Preprocessing
    3. Applied rewrites1.6%

      \[\leadsto \color{blue}{\frac{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}}} \]
    4. Step-by-step derivation
      1. lift-pow.f64N/A

        \[\leadsto \frac{\color{blue}{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}}{\sqrt{k}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{{\color{blue}{\left(0 \cdot n\right)}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
      3. mul0-lftN/A

        \[\leadsto \frac{{\color{blue}{0}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
      4. pow-base-098.0

        \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
    5. Applied rewrites98.0%

      \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
    6. Taylor expanded in k around 0

      \[\leadsto \color{blue}{0} \]
    7. Step-by-step derivation
      1. Applied rewrites98.0%

        \[\leadsto \color{blue}{0} \]

      if 4.99999999999999961e-227 < (*.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)))) < 4.9999999999999999e284

      1. Initial program 99.3%

        \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in k around 0

        \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \cdot \sqrt{2}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
        2. lower-*.f64N/A

          \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
        3. lower-sqrt.f64N/A

          \[\leadsto \color{blue}{\sqrt{2}} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \]
        4. lower-sqrt.f64N/A

          \[\leadsto \sqrt{2} \cdot \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
        5. lower-/.f64N/A

          \[\leadsto \sqrt{2} \cdot \sqrt{\color{blue}{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
        6. *-commutativeN/A

          \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
        7. lower-*.f64N/A

          \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
        8. lower-PI.f6471.1

          \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right)} \cdot n}{k}} \]
      5. Applied rewrites71.1%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{\mathsf{PI}\left(\right) \cdot n}{k}}} \]
      6. Step-by-step derivation
        1. Applied rewrites98.6%

          \[\leadsto \frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\color{blue}{\sqrt{k}}} \]

        if 4.9999999999999999e284 < (*.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))))

        1. Initial program 100.0%

          \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
        2. Add Preprocessing
        3. Applied rewrites100.0%

          \[\leadsto \color{blue}{\frac{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}}} \]
        4. Taylor expanded in k around inf

          \[\leadsto \frac{\color{blue}{e^{\frac{1}{8} \cdot \left(\log 0 \cdot \left(1 - k\right)\right)}}}{\sqrt{k}} \]
        5. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \frac{e^{\color{blue}{\left(\frac{1}{8} \cdot \log 0\right) \cdot \left(1 - k\right)}}}{\sqrt{k}} \]
          2. exp-prodN/A

            \[\leadsto \frac{\color{blue}{{\left(e^{\frac{1}{8} \cdot \log 0}\right)}^{\left(1 - k\right)}}}{\sqrt{k}} \]
          3. *-commutativeN/A

            \[\leadsto \frac{{\left(e^{\color{blue}{\log 0 \cdot \frac{1}{8}}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          4. metadata-evalN/A

            \[\leadsto \frac{{\left(e^{\log \color{blue}{\left(\frac{1}{16} \cdot 0\right)} \cdot \frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          5. mul0-lftN/A

            \[\leadsto \frac{{\left(e^{\log \left(\frac{1}{16} \cdot \color{blue}{\left(0 \cdot \mathsf{NAN}\left(\right)\right)}\right) \cdot \frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          6. metadata-evalN/A

            \[\leadsto \frac{{\left(e^{\log \left(\frac{1}{16} \cdot \left(\color{blue}{\left(-1 + 1\right)} \cdot \mathsf{NAN}\left(\right)\right)\right) \cdot \frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          7. distribute-rgt1-inN/A

            \[\leadsto \frac{{\left(e^{\log \left(\frac{1}{16} \cdot \color{blue}{\left(\mathsf{NAN}\left(\right) + -1 \cdot \mathsf{NAN}\left(\right)\right)}\right) \cdot \frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          8. exp-to-powN/A

            \[\leadsto \frac{{\color{blue}{\left({\left(\frac{1}{16} \cdot \left(\mathsf{NAN}\left(\right) + -1 \cdot \mathsf{NAN}\left(\right)\right)\right)}^{\frac{1}{8}}\right)}}^{\left(1 - k\right)}}{\sqrt{k}} \]
          9. distribute-rgt1-inN/A

            \[\leadsto \frac{{\left({\left(\frac{1}{16} \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \mathsf{NAN}\left(\right)\right)}\right)}^{\frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          10. metadata-evalN/A

            \[\leadsto \frac{{\left({\left(\frac{1}{16} \cdot \left(\color{blue}{0} \cdot \mathsf{NAN}\left(\right)\right)\right)}^{\frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          11. mul0-lftN/A

            \[\leadsto \frac{{\left({\left(\frac{1}{16} \cdot \color{blue}{0}\right)}^{\frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          12. metadata-evalN/A

            \[\leadsto \frac{{\left({\color{blue}{0}}^{\frac{1}{8}}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          13. metadata-evalN/A

            \[\leadsto \frac{{\color{blue}{0}}^{\left(1 - k\right)}}{\sqrt{k}} \]
          14. metadata-evalN/A

            \[\leadsto \frac{{\color{blue}{\left(\frac{1}{16} \cdot 0\right)}}^{\left(1 - k\right)}}{\sqrt{k}} \]
          15. mul0-lftN/A

            \[\leadsto \frac{{\left(\frac{1}{16} \cdot \color{blue}{\left(0 \cdot \mathsf{NAN}\left(\right)\right)}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          16. metadata-evalN/A

            \[\leadsto \frac{{\left(\frac{1}{16} \cdot \left(\color{blue}{\left(-1 + 1\right)} \cdot \mathsf{NAN}\left(\right)\right)\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          17. distribute-rgt1-inN/A

            \[\leadsto \frac{{\left(\frac{1}{16} \cdot \color{blue}{\left(\mathsf{NAN}\left(\right) + -1 \cdot \mathsf{NAN}\left(\right)\right)}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
          18. lower-pow.f64N/A

            \[\leadsto \frac{\color{blue}{{\left(\frac{1}{16} \cdot \left(\mathsf{NAN}\left(\right) + -1 \cdot \mathsf{NAN}\left(\right)\right)\right)}^{\left(1 - k\right)}}}{\sqrt{k}} \]
        6. Applied rewrites100.0%

          \[\leadsto \frac{\color{blue}{{0}^{\left(1 - k\right)}}}{\sqrt{k}} \]
        7. Taylor expanded in k around inf

          \[\leadsto \frac{{0}^{\left(-1 \cdot \color{blue}{k}\right)}}{\sqrt{k}} \]
        8. Step-by-step derivation
          1. Applied rewrites100.0%

            \[\leadsto \frac{{0}^{\left(-k\right)}}{\sqrt{k}} \]
        9. Recombined 3 regimes into one program.
        10. Final simplification98.8%

          \[\leadsto \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{elif}\;{\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 5 \cdot 10^{+284}:\\ \;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{0}^{\left(-k\right)}}{\sqrt{k}}\\ \end{array} \]
        11. Add Preprocessing

        Alternative 3: 63.9% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\\ \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+153}:\\ \;\;\;\;\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{n + n}}{\sqrt{k}}\\ \end{array} \end{array} \]
        (FPCore (k n)
         :precision binary64
         (let* ((t_0
                 (* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))))
           (if (<= t_0 5e-227)
             0.0
             (if (<= t_0 2e+153)
               (sqrt (* (/ (* n (PI)) k) 2.0))
               (/ (sqrt (+ n n)) (sqrt k))))))
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := {\left(\sqrt{k}\right)}^{-1} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\\
        \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-227}:\\
        \;\;\;\;0\\
        
        \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+153}:\\
        \;\;\;\;\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{n + n}}{\sqrt{k}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. 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)))) < 4.99999999999999961e-227

          1. Initial program 100.0%

            \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
          2. Add Preprocessing
          3. Applied rewrites1.6%

            \[\leadsto \color{blue}{\frac{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}}} \]
          4. Step-by-step derivation
            1. lift-pow.f64N/A

              \[\leadsto \frac{\color{blue}{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}}{\sqrt{k}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{{\color{blue}{\left(0 \cdot n\right)}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
            3. mul0-lftN/A

              \[\leadsto \frac{{\color{blue}{0}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
            4. pow-base-098.0

              \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
          5. Applied rewrites98.0%

            \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \color{blue}{0} \]
          7. Step-by-step derivation
            1. Applied rewrites98.0%

              \[\leadsto \color{blue}{0} \]

            if 4.99999999999999961e-227 < (*.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)))) < 2e153

            1. Initial program 99.2%

              \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
            2. Add Preprocessing
            3. Taylor expanded in k around 0

              \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \cdot \sqrt{2}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
              3. lower-sqrt.f64N/A

                \[\leadsto \color{blue}{\sqrt{2}} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \]
              4. lower-sqrt.f64N/A

                \[\leadsto \sqrt{2} \cdot \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
              5. lower-/.f64N/A

                \[\leadsto \sqrt{2} \cdot \sqrt{\color{blue}{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
              6. *-commutativeN/A

                \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
              7. lower-*.f64N/A

                \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
              8. lower-PI.f6498.2

                \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right)} \cdot n}{k}} \]
            5. Applied rewrites98.2%

              \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{\mathsf{PI}\left(\right) \cdot n}{k}}} \]
            6. Step-by-step derivation
              1. Applied rewrites98.6%

                \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}} \]

              if 2e153 < (*.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))))

              1. Initial program 99.8%

                \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \cdot \sqrt{2}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \color{blue}{\sqrt{2}} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \]
                4. lower-sqrt.f64N/A

                  \[\leadsto \sqrt{2} \cdot \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                5. lower-/.f64N/A

                  \[\leadsto \sqrt{2} \cdot \sqrt{\color{blue}{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                6. *-commutativeN/A

                  \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                7. lower-*.f64N/A

                  \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                8. lower-PI.f643.4

                  \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right)} \cdot n}{k}} \]
              5. Applied rewrites3.4%

                \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{\mathsf{PI}\left(\right) \cdot n}{k}}} \]
              6. Step-by-step derivation
                1. Applied rewrites38.2%

                  \[\leadsto \frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\color{blue}{\sqrt{k}}} \]
                2. Step-by-step derivation
                  1. Applied rewrites8.5%

                    \[\leadsto \frac{\sqrt{n + n}}{\sqrt{k}} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification59.4%

                  \[\leadsto \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{elif}\;{\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 2 \cdot 10^{+153}:\\ \;\;\;\;\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{n + n}}{\sqrt{k}}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 4: 73.7% accurate, 0.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\ \end{array} \end{array} \]
                (FPCore (k n)
                 :precision binary64
                 (if (<=
                      (* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))
                      5e-227)
                   0.0
                   (/ (sqrt (* (* n 2.0) (PI))) (sqrt k))))
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \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 5 \cdot 10^{-227}:\\
                \;\;\;\;0\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. 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)))) < 4.99999999999999961e-227

                  1. Initial program 100.0%

                    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                  2. Add Preprocessing
                  3. Applied rewrites1.6%

                    \[\leadsto \color{blue}{\frac{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}}} \]
                  4. Step-by-step derivation
                    1. lift-pow.f64N/A

                      \[\leadsto \frac{\color{blue}{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}}{\sqrt{k}} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{{\color{blue}{\left(0 \cdot n\right)}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                    3. mul0-lftN/A

                      \[\leadsto \frac{{\color{blue}{0}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                    4. pow-base-098.0

                      \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                  5. Applied rewrites98.0%

                    \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                  6. Taylor expanded in k around 0

                    \[\leadsto \color{blue}{0} \]
                  7. Step-by-step derivation
                    1. Applied rewrites98.0%

                      \[\leadsto \color{blue}{0} \]

                    if 4.99999999999999961e-227 < (*.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))))

                    1. Initial program 99.5%

                      \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in k around 0

                      \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \cdot \sqrt{2}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \color{blue}{\sqrt{2}} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \]
                      4. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{2} \cdot \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                      5. lower-/.f64N/A

                        \[\leadsto \sqrt{2} \cdot \sqrt{\color{blue}{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                      6. *-commutativeN/A

                        \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                      7. lower-*.f64N/A

                        \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                      8. lower-PI.f6448.1

                        \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right)} \cdot n}{k}} \]
                    5. Applied rewrites48.1%

                      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{\mathsf{PI}\left(\right) \cdot n}{k}}} \]
                    6. Step-by-step derivation
                      1. Applied rewrites66.4%

                        \[\leadsto \frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\color{blue}{\sqrt{k}}} \]
                    7. Recombined 2 regimes into one program.
                    8. Final simplification72.1%

                      \[\leadsto \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 5: 62.4% accurate, 0.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}\\ \end{array} \end{array} \]
                    (FPCore (k n)
                     :precision binary64
                     (if (<=
                          (* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))
                          5e-227)
                       0.0
                       (sqrt (* (/ (* n (PI)) k) 2.0))))
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \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 5 \cdot 10^{-227}:\\
                    \;\;\;\;0\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. 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)))) < 4.99999999999999961e-227

                      1. Initial program 100.0%

                        \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                      2. Add Preprocessing
                      3. Applied rewrites1.6%

                        \[\leadsto \color{blue}{\frac{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}}} \]
                      4. Step-by-step derivation
                        1. lift-pow.f64N/A

                          \[\leadsto \frac{\color{blue}{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}}{\sqrt{k}} \]
                        2. lift-*.f64N/A

                          \[\leadsto \frac{{\color{blue}{\left(0 \cdot n\right)}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                        3. mul0-lftN/A

                          \[\leadsto \frac{{\color{blue}{0}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                        4. pow-base-098.0

                          \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                      5. Applied rewrites98.0%

                        \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                      6. Taylor expanded in k around 0

                        \[\leadsto \color{blue}{0} \]
                      7. Step-by-step derivation
                        1. Applied rewrites98.0%

                          \[\leadsto \color{blue}{0} \]

                        if 4.99999999999999961e-227 < (*.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))))

                        1. Initial program 99.5%

                          \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                        2. Add Preprocessing
                        3. Taylor expanded in k around 0

                          \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \cdot \sqrt{2}} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                          2. lower-*.f64N/A

                            \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                          3. lower-sqrt.f64N/A

                            \[\leadsto \color{blue}{\sqrt{2}} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \]
                          4. lower-sqrt.f64N/A

                            \[\leadsto \sqrt{2} \cdot \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                          5. lower-/.f64N/A

                            \[\leadsto \sqrt{2} \cdot \sqrt{\color{blue}{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                          6. *-commutativeN/A

                            \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                          7. lower-*.f64N/A

                            \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                          8. lower-PI.f6448.1

                            \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right)} \cdot n}{k}} \]
                        5. Applied rewrites48.1%

                          \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{\mathsf{PI}\left(\right) \cdot n}{k}}} \]
                        6. Step-by-step derivation
                          1. Applied rewrites48.2%

                            \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}} \]
                        7. Recombined 2 regimes into one program.
                        8. Final simplification57.2%

                          \[\leadsto \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k} \cdot 2}\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 6: 34.1% accurate, 0.6× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{n}{k} \cdot 2}\\ \end{array} \end{array} \]
                        (FPCore (k n)
                         :precision binary64
                         (if (<=
                              (* (pow (sqrt k) -1.0) (pow (* (* 2.0 (PI)) n) (/ (- 1.0 k) 2.0)))
                              5e-227)
                           0.0
                           (sqrt (* (/ n k) 2.0))))
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \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 5 \cdot 10^{-227}:\\
                        \;\;\;\;0\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\sqrt{\frac{n}{k} \cdot 2}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. 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)))) < 4.99999999999999961e-227

                          1. Initial program 100.0%

                            \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                          2. Add Preprocessing
                          3. Applied rewrites1.6%

                            \[\leadsto \color{blue}{\frac{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}}} \]
                          4. Step-by-step derivation
                            1. lift-pow.f64N/A

                              \[\leadsto \frac{\color{blue}{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}}{\sqrt{k}} \]
                            2. lift-*.f64N/A

                              \[\leadsto \frac{{\color{blue}{\left(0 \cdot n\right)}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                            3. mul0-lftN/A

                              \[\leadsto \frac{{\color{blue}{0}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                            4. pow-base-098.0

                              \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                          5. Applied rewrites98.0%

                            \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                          6. Taylor expanded in k around 0

                            \[\leadsto \color{blue}{0} \]
                          7. Step-by-step derivation
                            1. Applied rewrites98.0%

                              \[\leadsto \color{blue}{0} \]

                            if 4.99999999999999961e-227 < (*.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))))

                            1. Initial program 99.5%

                              \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in k around 0

                              \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \cdot \sqrt{2}} \]
                            4. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                              2. lower-*.f64N/A

                                \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                              3. lower-sqrt.f64N/A

                                \[\leadsto \color{blue}{\sqrt{2}} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \]
                              4. lower-sqrt.f64N/A

                                \[\leadsto \sqrt{2} \cdot \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                              5. lower-/.f64N/A

                                \[\leadsto \sqrt{2} \cdot \sqrt{\color{blue}{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                              6. *-commutativeN/A

                                \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                              7. lower-*.f64N/A

                                \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                              8. lower-PI.f6448.1

                                \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right)} \cdot n}{k}} \]
                            5. Applied rewrites48.1%

                              \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{\mathsf{PI}\left(\right) \cdot n}{k}}} \]
                            6. Step-by-step derivation
                              1. Applied rewrites66.4%

                                \[\leadsto \frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\color{blue}{\sqrt{k}}} \]
                              2. Step-by-step derivation
                                1. Applied rewrites10.8%

                                  \[\leadsto \color{blue}{\sqrt{\frac{n}{k} \cdot 2}} \]
                              3. Recombined 2 regimes into one program.
                              4. Final simplification26.4%

                                \[\leadsto \begin{array}{l} \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 5 \cdot 10^{-227}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{n}{k} \cdot 2}\\ \end{array} \]
                              5. Add Preprocessing

                              Alternative 7: 99.5% accurate, 1.1× speedup?

                              \[\begin{array}{l} \\ \frac{{\left(\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}} \end{array} \]
                              (FPCore (k n)
                               :precision binary64
                               (/ (pow (* (* n 2.0) (PI)) (fma -0.5 k 0.5)) (sqrt k)))
                              \begin{array}{l}
                              
                              \\
                              \frac{{\left(\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}
                              \end{array}
                              
                              Derivation
                              1. Initial program 99.6%

                                \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in k around inf

                                \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{e^{\frac{1}{2} \cdot \left(\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(1 - k\right)\right)}} \]
                              4. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot e^{\frac{1}{2} \cdot \color{blue}{\left(\left(1 - k\right) \cdot \log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)\right)}} \]
                                2. associate-*r*N/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot e^{\color{blue}{\left(\frac{1}{2} \cdot \left(1 - k\right)\right) \cdot \log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot e^{\color{blue}{\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(1 - k\right)\right)}} \]
                                4. exp-prodN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{{\left(e^{\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)}} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{{\left(e^{\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)}} \]
                                6. rem-exp-logN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\color{blue}{\left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                7. associate-*r*N/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\color{blue}{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                8. lower-*.f64N/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\color{blue}{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                9. lower-*.f64N/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\color{blue}{\left(2 \cdot n\right)} \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                10. lower-PI.f64N/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                11. *-lft-identityN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \left(1 - \color{blue}{1 \cdot k}\right)\right)} \]
                                12. metadata-evalN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \left(1 - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot k\right)\right)} \]
                                13. fp-cancel-sign-sub-invN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \color{blue}{\left(1 + -1 \cdot k\right)}\right)} \]
                                14. +-commutativeN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \color{blue}{\left(-1 \cdot k + 1\right)}\right)} \]
                                15. distribute-lft-inN/A

                                  \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\color{blue}{\left(\frac{1}{2} \cdot \left(-1 \cdot k\right) + \frac{1}{2} \cdot 1\right)}} \]
                              5. Applied rewrites99.6%

                                \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}} \]
                              6. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \color{blue}{\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)}} \]
                                2. lift-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1}{\sqrt{k}}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)} \]
                                3. associate-*l/N/A

                                  \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)}}{\sqrt{k}}} \]
                                4. *-lft-identityN/A

                                  \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)}}}{\sqrt{k}} \]
                                5. lower-/.f6499.6

                                  \[\leadsto \color{blue}{\frac{{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}} \]
                              7. Applied rewrites99.6%

                                \[\leadsto \color{blue}{\frac{{\left(\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}} \]
                              8. Add Preprocessing

                              Alternative 8: 98.2% accurate, 1.1× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 0.0055:\\ \;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(n + n\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}\\ \end{array} \end{array} \]
                              (FPCore (k n)
                               :precision binary64
                               (if (<= k 0.0055)
                                 (/ (sqrt (* (* n 2.0) (PI))) (sqrt k))
                                 (/ (pow (+ n n) (fma -0.5 k 0.5)) (sqrt k))))
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;k \leq 0.0055:\\
                              \;\;\;\;\frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\sqrt{k}}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{{\left(n + n\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if k < 0.0054999999999999997

                                1. Initial program 99.3%

                                  \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                                2. Add Preprocessing
                                3. Taylor expanded in k around 0

                                  \[\leadsto \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \cdot \sqrt{2}} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                                  3. lower-sqrt.f64N/A

                                    \[\leadsto \color{blue}{\sqrt{2}} \cdot \sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}} \]
                                  4. lower-sqrt.f64N/A

                                    \[\leadsto \sqrt{2} \cdot \color{blue}{\sqrt{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                                  5. lower-/.f64N/A

                                    \[\leadsto \sqrt{2} \cdot \sqrt{\color{blue}{\frac{n \cdot \mathsf{PI}\left(\right)}{k}}} \]
                                  6. *-commutativeN/A

                                    \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                                  7. lower-*.f64N/A

                                    \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot n}}{k}} \]
                                  8. lower-PI.f6471.6

                                    \[\leadsto \sqrt{2} \cdot \sqrt{\frac{\color{blue}{\mathsf{PI}\left(\right)} \cdot n}{k}} \]
                                5. Applied rewrites71.6%

                                  \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\frac{\mathsf{PI}\left(\right) \cdot n}{k}}} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites99.2%

                                    \[\leadsto \frac{\sqrt{\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)}}{\color{blue}{\sqrt{k}}} \]

                                  if 0.0054999999999999997 < k

                                  1. Initial program 100.0%

                                    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in k around inf

                                    \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{e^{\frac{1}{2} \cdot \left(\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(1 - k\right)\right)}} \]
                                  4. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot e^{\frac{1}{2} \cdot \color{blue}{\left(\left(1 - k\right) \cdot \log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)\right)}} \]
                                    2. associate-*r*N/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot e^{\color{blue}{\left(\frac{1}{2} \cdot \left(1 - k\right)\right) \cdot \log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}} \]
                                    3. *-commutativeN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot e^{\color{blue}{\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(1 - k\right)\right)}} \]
                                    4. exp-prodN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{{\left(e^{\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)}} \]
                                    5. lower-pow.f64N/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{{\left(e^{\log \left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)}} \]
                                    6. rem-exp-logN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\color{blue}{\left(2 \cdot \left(n \cdot \mathsf{PI}\left(\right)\right)\right)}}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                    7. associate-*r*N/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\color{blue}{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                    8. lower-*.f64N/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\color{blue}{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                    9. lower-*.f64N/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\color{blue}{\left(2 \cdot n\right)} \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                    10. lower-PI.f64N/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}^{\left(\frac{1}{2} \cdot \left(1 - k\right)\right)} \]
                                    11. *-lft-identityN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \left(1 - \color{blue}{1 \cdot k}\right)\right)} \]
                                    12. metadata-evalN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \left(1 - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot k\right)\right)} \]
                                    13. fp-cancel-sign-sub-invN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \color{blue}{\left(1 + -1 \cdot k\right)}\right)} \]
                                    14. +-commutativeN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\frac{1}{2} \cdot \color{blue}{\left(-1 \cdot k + 1\right)}\right)} \]
                                    15. distribute-lft-inN/A

                                      \[\leadsto \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\color{blue}{\left(\frac{1}{2} \cdot \left(-1 \cdot k\right) + \frac{1}{2} \cdot 1\right)}} \]
                                  5. Applied rewrites100.0%

                                    \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}} \]
                                  6. Step-by-step derivation
                                    1. lift-*.f64N/A

                                      \[\leadsto \color{blue}{\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)}} \]
                                    2. lift-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{1}{\sqrt{k}}} \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)} \]
                                    3. associate-*l/N/A

                                      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)}}{\sqrt{k}}} \]
                                    4. *-lft-identityN/A

                                      \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(\frac{-1}{2}, k, \frac{1}{2}\right)\right)}}}{\sqrt{k}} \]
                                    5. lower-/.f64100.0

                                      \[\leadsto \color{blue}{\frac{{\left(\left(2 \cdot n\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}} \]
                                  7. Applied rewrites100.0%

                                    \[\leadsto \color{blue}{\frac{{\left(\left(n \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)}^{\left(\mathsf{fma}\left(-0.5, k, 0.5\right)\right)}}{\sqrt{k}}} \]
                                  8. Step-by-step derivation
                                    1. Applied rewrites98.6%

                                      \[\leadsto \frac{{\left(n + n\right)}^{\left(\mathsf{fma}\left(\color{blue}{-0.5}, k, 0.5\right)\right)}}{\sqrt{k}} \]
                                  9. Recombined 2 regimes into one program.
                                  10. Add Preprocessing

                                  Alternative 9: 27.5% accurate, 152.0× speedup?

                                  \[\begin{array}{l} \\ 0 \end{array} \]
                                  (FPCore (k n) :precision binary64 0.0)
                                  double code(double k, double n) {
                                  	return 0.0;
                                  }
                                  
                                  real(8) function code(k, n)
                                      real(8), intent (in) :: k
                                      real(8), intent (in) :: n
                                      code = 0.0d0
                                  end function
                                  
                                  public static double code(double k, double n) {
                                  	return 0.0;
                                  }
                                  
                                  def code(k, n):
                                  	return 0.0
                                  
                                  function code(k, n)
                                  	return 0.0
                                  end
                                  
                                  function tmp = code(k, n)
                                  	tmp = 0.0;
                                  end
                                  
                                  code[k_, n_] := 0.0
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  0
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 99.6%

                                    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
                                  2. Add Preprocessing
                                  3. Applied rewrites29.1%

                                    \[\leadsto \color{blue}{\frac{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}}} \]
                                  4. Step-by-step derivation
                                    1. lift-pow.f64N/A

                                      \[\leadsto \frac{\color{blue}{{\left(0 \cdot n\right)}^{\left(\frac{1 - k}{8}\right)}}}{\sqrt{k}} \]
                                    2. lift-*.f64N/A

                                      \[\leadsto \frac{{\color{blue}{\left(0 \cdot n\right)}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                                    3. mul0-lftN/A

                                      \[\leadsto \frac{{\color{blue}{0}}^{\left(\frac{1 - k}{8}\right)}}{\sqrt{k}} \]
                                    4. pow-base-019.5

                                      \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                                  5. Applied rewrites19.5%

                                    \[\leadsto \frac{\color{blue}{0}}{\sqrt{k}} \]
                                  6. Taylor expanded in k around 0

                                    \[\leadsto \color{blue}{0} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites19.5%

                                      \[\leadsto \color{blue}{0} \]
                                    2. Add Preprocessing

                                    Reproduce

                                    ?
                                    herbie shell --seed 2024337 
                                    (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))))