
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)) (t_2 (+ t_1 0.5)))
(*
(/ (PI) (sin (* (PI) z)))
(*
(* (* (sqrt (* (PI) 2.0)) (pow t_2 (+ t_0 0.5))) (exp (- t_2)))
(+
(+
(+
(+
(+
(+
(+
(+ 0.9999999999998099 (/ 676.5203681218851 (+ t_0 1.0)))
(/ -1259.1392167224028 (+ t_0 2.0)))
(/ 771.3234287776531 (+ t_0 3.0)))
(/ -176.6150291621406 (+ t_0 4.0)))
(/ 12.507343278686905 (+ t_0 5.0)))
(/ -0.13857109526572012 (+ t_0 6.0)))
(/ 9.984369578019572e-6 t_1))
(/ 1.5056327351493116e-7 (+ t_0 8.0)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := t\_1 + 0.5\\
\frac{\mathsf{PI}\left(\right)}{\sin \left(\mathsf{PI}\left(\right) \cdot z\right)} \cdot \left(\left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot 2} \cdot {t\_2}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{-t\_2}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_0 + 1}\right) + \frac{-1259.1392167224028}{t\_0 + 2}\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)) (t_2 (+ t_1 0.5)))
(*
(/ (PI) (sin (* (PI) z)))
(*
(* (* (sqrt (* (PI) 2.0)) (pow t_2 (+ t_0 0.5))) (exp (- t_2)))
(+
(+
(+
(+
(+
(+
(+
(+ 0.9999999999998099 (/ 676.5203681218851 (+ t_0 1.0)))
(/ -1259.1392167224028 (+ t_0 2.0)))
(/ 771.3234287776531 (+ t_0 3.0)))
(/ -176.6150291621406 (+ t_0 4.0)))
(/ 12.507343278686905 (+ t_0 5.0)))
(/ -0.13857109526572012 (+ t_0 6.0)))
(/ 9.984369578019572e-6 t_1))
(/ 1.5056327351493116e-7 (+ t_0 8.0)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := t\_1 + 0.5\\
\frac{\mathsf{PI}\left(\right)}{\sin \left(\mathsf{PI}\left(\right) \cdot z\right)} \cdot \left(\left(\left(\sqrt{\mathsf{PI}\left(\right) \cdot 2} \cdot {t\_2}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{-t\_2}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_0 + 1}\right) + \frac{-1259.1392167224028}{t\_0 + 2}\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)) (t_2 (cbrt (pow (PI) 1.5))))
(*
(/ (PI) (sin (* (PI) z)))
(*
(*
(* (hypot t_2 t_2) (pow (+ t_1 0.5) (+ t_0 0.5)))
(exp (- (- (- (+ -1.0 z) -1.0) 7.0) 0.5)))
(+
(+
(+
(+
(+
(+
(+
(+ 0.9999999999998099 (/ 676.5203681218851 (+ t_0 1.0)))
(/ -1259.1392167224028 (+ t_0 2.0)))
(/ 771.3234287776531 (+ t_0 3.0)))
(/ -176.6150291621406 (+ t_0 4.0)))
(/ 12.507343278686905 (+ t_0 5.0)))
(/ -0.13857109526572012 (+ t_0 6.0)))
(/ 9.984369578019572e-6 t_1))
(/ 1.5056327351493116e-7 (+ t_0 8.0)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := \sqrt[3]{{\mathsf{PI}\left(\right)}^{1.5}}\\
\frac{\mathsf{PI}\left(\right)}{\sin \left(\mathsf{PI}\left(\right) \cdot z\right)} \cdot \left(\left(\left(\mathsf{hypot}\left(t\_2, t\_2\right) \cdot {\left(t\_1 + 0.5\right)}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{\left(\left(\left(-1 + z\right) - -1\right) - 7\right) - 0.5}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_0 + 1}\right) + \frac{-1259.1392167224028}{t\_0 + 2}\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}
Initial program 96.6%
lift-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
count-2-revN/A
lift-PI.f64N/A
add-cbrt-cubeN/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
rem-square-sqrtN/A
unswap-sqrN/A
cbrt-prodN/A
lift-PI.f64N/A
add-cbrt-cubeN/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
rem-square-sqrtN/A
unswap-sqrN/A
cbrt-prodN/A
Applied rewrites98.4%
Final simplification98.4%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)))
(*
(/ (PI) (sin (* (PI) z)))
(*
(*
(* (* (sqrt (PI)) (sqrt 2.0)) (pow (+ t_1 0.5) (- 1.5 (+ z 1.0))))
(exp (- (- (- (+ -1.0 z) -1.0) 7.0) 0.5)))
(+
(+
(+
(+
(+
(+
(fma
(fma
(fma 597.824167076735 z 519.1279660315847)
z
361.7355639412844)
z
47.95075976068351)
(/ 771.3234287776531 (+ t_0 3.0)))
(/ -176.6150291621406 (+ t_0 4.0)))
(/ 12.507343278686905 (+ t_0 5.0)))
(/ -0.13857109526572012 (+ t_0 6.0)))
(/ 9.984369578019572e-6 t_1))
(/ 1.5056327351493116e-7 (+ t_0 8.0)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
\frac{\mathsf{PI}\left(\right)}{\sin \left(\mathsf{PI}\left(\right) \cdot z\right)} \cdot \left(\left(\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{2}\right) \cdot {\left(t\_1 + 0.5\right)}^{\left(1.5 - \left(z + 1\right)\right)}\right) \cdot e^{\left(\left(\left(-1 + z\right) - -1\right) - 7\right) - 0.5}\right) \cdot \left(\left(\left(\left(\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(597.824167076735, z, 519.1279660315847\right), z, 361.7355639412844\right), z, 47.95075976068351\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
lift-sqrt.f64N/A
lift-*.f64N/A
sqrt-prodN/A
pow1/2N/A
metadata-evalN/A
pow-powN/A
lift-pow.f64N/A
pow1/3N/A
lift-cbrt.f64N/A
lift-sqrt.f64N/A
lower-*.f6496.5
lift-cbrt.f64N/A
pow1/3N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6498.0
Applied rewrites98.0%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
associate-+r-N/A
metadata-evalN/A
metadata-evalN/A
lower--.f64N/A
metadata-evalN/A
lower-+.f6498.0
Applied rewrites98.0%
Final simplification98.0%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)))
(*
(pow z -1.0)
(*
(*
(* (* (sqrt (PI)) (sqrt 2.0)) (pow (+ t_1 0.5) (- 1.5 (+ z 1.0))))
(exp (- (- (- (+ -1.0 z) -1.0) 7.0) 0.5)))
(+
(+
(+
(+
(+
(+
(fma
(fma
(fma 597.824167076735 z 519.1279660315847)
z
361.7355639412844)
z
47.95075976068351)
(/ 771.3234287776531 (+ t_0 3.0)))
(/ -176.6150291621406 (+ t_0 4.0)))
(/ 12.507343278686905 (+ t_0 5.0)))
(/ -0.13857109526572012 (+ t_0 6.0)))
(/ 9.984369578019572e-6 t_1))
(/ 1.5056327351493116e-7 (+ t_0 8.0)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
{z}^{-1} \cdot \left(\left(\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{2}\right) \cdot {\left(t\_1 + 0.5\right)}^{\left(1.5 - \left(z + 1\right)\right)}\right) \cdot e^{\left(\left(\left(-1 + z\right) - -1\right) - 7\right) - 0.5}\right) \cdot \left(\left(\left(\left(\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(597.824167076735, z, 519.1279660315847\right), z, 361.7355639412844\right), z, 47.95075976068351\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
lift-sqrt.f64N/A
lift-*.f64N/A
sqrt-prodN/A
pow1/2N/A
metadata-evalN/A
pow-powN/A
lift-pow.f64N/A
pow1/3N/A
lift-cbrt.f64N/A
lift-sqrt.f64N/A
lower-*.f6496.5
lift-cbrt.f64N/A
pow1/3N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6498.0
Applied rewrites98.0%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
associate-+r-N/A
metadata-evalN/A
metadata-evalN/A
lower--.f64N/A
metadata-evalN/A
lower-+.f6498.0
Applied rewrites98.0%
Taylor expanded in z around 0
lower-/.f6497.9
Applied rewrites97.9%
Final simplification97.9%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)))
(*
(/ (PI) (sin (* (PI) z)))
(*
(*
(* (* (pow (- 7.5 z) (- 0.5 z)) (sqrt (PI))) (sqrt 2.0))
(exp (- z 7.5)))
(+
(+
(+
(+
(+
(+
(fma
(fma
(fma 597.824167076735 z 519.1279660315847)
z
361.7355639412844)
z
47.95075976068351)
(/ 771.3234287776531 (+ t_0 3.0)))
(/ -176.6150291621406 (+ t_0 4.0)))
(/ 12.507343278686905 (+ t_0 5.0)))
(/ -0.13857109526572012 (+ t_0 6.0)))
(/ 9.984369578019572e-6 (+ t_0 7.0)))
(/ 1.5056327351493116e-7 (+ t_0 8.0)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
\frac{\mathsf{PI}\left(\right)}{\sin \left(\mathsf{PI}\left(\right) \cdot z\right)} \cdot \left(\left(\left(\left({\left(7.5 - z\right)}^{\left(0.5 - z\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{2}\right) \cdot e^{z - 7.5}\right) \cdot \left(\left(\left(\left(\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(597.824167076735, z, 519.1279660315847\right), z, 361.7355639412844\right), z, 47.95075976068351\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_0 + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
lift-sqrt.f64N/A
lift-*.f64N/A
sqrt-prodN/A
pow1/2N/A
metadata-evalN/A
pow-powN/A
lift-pow.f64N/A
pow1/3N/A
lift-cbrt.f64N/A
lift-sqrt.f64N/A
lower-*.f6496.5
lift-cbrt.f64N/A
pow1/3N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6498.0
Applied rewrites98.0%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites98.0%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)))
(*
(pow z -1.0)
(*
(*
(* (* (sqrt (PI)) (sqrt 2.0)) (pow (+ t_1 0.5) (+ t_0 0.5)))
(exp (- (- (- (+ -1.0 z) -1.0) 7.0) 0.5)))
(+
(+
(+
(+
(fma 436.3997278161676 z 260.9048120626994)
(/ 12.507343278686905 (+ t_0 5.0)))
(/ -0.13857109526572012 (+ t_0 6.0)))
(/ 9.984369578019572e-6 t_1))
(/ 1.5056327351493116e-7 (+ t_0 8.0)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
{z}^{-1} \cdot \left(\left(\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{2}\right) \cdot {\left(t\_1 + 0.5\right)}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{\left(\left(\left(-1 + z\right) - -1\right) - 7\right) - 0.5}\right) \cdot \left(\left(\left(\left(\mathsf{fma}\left(436.3997278161676, z, 260.9048120626994\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
lift-sqrt.f64N/A
lift-*.f64N/A
sqrt-prodN/A
pow1/2N/A
metadata-evalN/A
pow-powN/A
lift-pow.f64N/A
pow1/3N/A
lift-cbrt.f64N/A
lift-sqrt.f64N/A
lower-*.f6496.5
lift-cbrt.f64N/A
pow1/3N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6498.0
Applied rewrites98.0%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Taylor expanded in z around 0
lower-/.f6497.8
Applied rewrites97.8%
Final simplification97.8%
(FPCore (z)
:precision binary64
(*
(/ (PI) (sin (* (PI) z)))
(*
(sqrt (* 2.0 (PI)))
(*
(exp (fma (log (- (- 1.0 z) -6.5)) (- 0.5 z) (+ (+ -1.0 z) -6.5)))
(+
(/ 1.5056327351493116e-7 (- (- 1.0 z) -7.0))
(+
(/ 9.984369578019572e-6 (- (- 1.0 z) -6.0))
(+
(/ -0.13857109526572012 (- (- 1.0 z) -5.0))
(+
(/ 12.507343278686905 (- (- 1.0 z) -4.0))
(fma
(fma (fma 606.656776085461 z 544.9358906000987) z 436.3997278161676)
z
260.9048120626994)))))))))\begin{array}{l}
\\
\frac{\mathsf{PI}\left(\right)}{\sin \left(\mathsf{PI}\left(\right) \cdot z\right)} \cdot \left(\sqrt{2 \cdot \mathsf{PI}\left(\right)} \cdot \left(e^{\mathsf{fma}\left(\log \left(\left(1 - z\right) - -6.5\right), 0.5 - z, \left(-1 + z\right) + -6.5\right)} \cdot \left(\frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) - -7} + \left(\frac{9.984369578019572 \cdot 10^{-6}}{\left(1 - z\right) - -6} + \left(\frac{-0.13857109526572012}{\left(1 - z\right) - -5} + \left(\frac{12.507343278686905}{\left(1 - z\right) - -4} + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(606.656776085461, z, 544.9358906000987\right), z, 436.3997278161676\right), z, 260.9048120626994\right)\right)\right)\right)\right)\right)\right)
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Applied rewrites97.2%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
pow-to-expN/A
lift-exp.f64N/A
prod-expN/A
lower-exp.f64N/A
Applied rewrites97.9%
Final simplification97.9%
(FPCore (z)
:precision binary64
(*
(pow z -1.0)
(*
(sqrt (* 2.0 (PI)))
(*
(* (exp (+ (+ -1.0 z) -6.5)) (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)))
(+
(/ 1.5056327351493116e-7 (- (- 1.0 z) -7.0))
(+
(/ 9.984369578019572e-6 (- (- 1.0 z) -6.0))
(+
(/ -0.13857109526572012 (- (- 1.0 z) -5.0))
(+
(/ 12.507343278686905 (- (- 1.0 z) -4.0))
(fma
(fma (fma 606.656776085461 z 544.9358906000987) z 436.3997278161676)
z
260.9048120626994)))))))))\begin{array}{l}
\\
{z}^{-1} \cdot \left(\sqrt{2 \cdot \mathsf{PI}\left(\right)} \cdot \left(\left(e^{\left(-1 + z\right) + -6.5} \cdot {\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)}\right) \cdot \left(\frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) - -7} + \left(\frac{9.984369578019572 \cdot 10^{-6}}{\left(1 - z\right) - -6} + \left(\frac{-0.13857109526572012}{\left(1 - z\right) - -5} + \left(\frac{12.507343278686905}{\left(1 - z\right) - -4} + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(606.656776085461, z, 544.9358906000987\right), z, 436.3997278161676\right), z, 260.9048120626994\right)\right)\right)\right)\right)\right)\right)
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Applied rewrites97.2%
Taylor expanded in z around 0
lower-/.f6496.9
Applied rewrites96.9%
Final simplification96.9%
(FPCore (z)
:precision binary64
(*
(/ (fma (* (* 0.16666666666666666 (* z z)) (PI)) (PI) 1.0) z)
(*
(sqrt (* 2.0 (PI)))
(*
(* (exp (+ (+ -1.0 z) -6.5)) (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)))
(+
(/ 1.5056327351493116e-7 (- (- 1.0 z) -7.0))
(+
(/ 9.984369578019572e-6 (- (- 1.0 z) -6.0))
(+
(/ -0.13857109526572012 (- (- 1.0 z) -5.0))
(+
(/ 12.507343278686905 (- (- 1.0 z) -4.0))
(fma
(fma (fma 606.656776085461 z 544.9358906000987) z 436.3997278161676)
z
260.9048120626994)))))))))\begin{array}{l}
\\
\frac{\mathsf{fma}\left(\left(0.16666666666666666 \cdot \left(z \cdot z\right)\right) \cdot \mathsf{PI}\left(\right), \mathsf{PI}\left(\right), 1\right)}{z} \cdot \left(\sqrt{2 \cdot \mathsf{PI}\left(\right)} \cdot \left(\left(e^{\left(-1 + z\right) + -6.5} \cdot {\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)}\right) \cdot \left(\frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) - -7} + \left(\frac{9.984369578019572 \cdot 10^{-6}}{\left(1 - z\right) - -6} + \left(\frac{-0.13857109526572012}{\left(1 - z\right) - -5} + \left(\frac{12.507343278686905}{\left(1 - z\right) - -4} + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(606.656776085461, z, 544.9358906000987\right), z, 436.3997278161676\right), z, 260.9048120626994\right)\right)\right)\right)\right)\right)\right)
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Applied rewrites97.2%
Taylor expanded in z around 0
lower-/.f64N/A
+-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6497.3
Applied rewrites97.3%
Final simplification97.3%
(FPCore (z)
:precision binary64
(*
(/ (PI) (* (PI) z))
(*
(sqrt (* 2.0 (PI)))
(*
(* (exp (+ (+ -1.0 z) -6.5)) (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)))
(+
(/ 1.5056327351493116e-7 (- (- 1.0 z) -7.0))
(+
(/ 9.984369578019572e-6 (- (- 1.0 z) -6.0))
(+
(/ -0.13857109526572012 (- (- 1.0 z) -5.0))
(+
(/ 12.507343278686905 (- (- 1.0 z) -4.0))
(fma
(fma (fma 606.656776085461 z 544.9358906000987) z 436.3997278161676)
z
260.9048120626994)))))))))\begin{array}{l}
\\
\frac{\mathsf{PI}\left(\right)}{\mathsf{PI}\left(\right) \cdot z} \cdot \left(\sqrt{2 \cdot \mathsf{PI}\left(\right)} \cdot \left(\left(e^{\left(-1 + z\right) + -6.5} \cdot {\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)}\right) \cdot \left(\frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) - -7} + \left(\frac{9.984369578019572 \cdot 10^{-6}}{\left(1 - z\right) - -6} + \left(\frac{-0.13857109526572012}{\left(1 - z\right) - -5} + \left(\frac{12.507343278686905}{\left(1 - z\right) - -4} + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(606.656776085461, z, 544.9358906000987\right), z, 436.3997278161676\right), z, 260.9048120626994\right)\right)\right)\right)\right)\right)\right)
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Applied rewrites97.2%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6497.0
Applied rewrites97.0%
Final simplification97.0%
(FPCore (z)
:precision binary64
(let* ((t_0 (sqrt (PI))))
(*
(/ (PI) (sin (* (* t_0 t_0) z)))
(* (* 263.3831869810514 t_0) (* (* (sqrt 7.5) (sqrt 2.0)) (exp -7.5))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
\frac{\mathsf{PI}\left(\right)}{\sin \left(\left(t\_0 \cdot t\_0\right) \cdot z\right)} \cdot \left(\left(263.3831869810514 \cdot t\_0\right) \cdot \left(\left(\sqrt{7.5} \cdot \sqrt{2}\right) \cdot e^{-7.5}\right)\right)
\end{array}
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-exp.f6495.7
Applied rewrites95.7%
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lower-*.f6496.7
Applied rewrites96.7%
(FPCore (z) :precision binary64 (* (* 263.3831869810514 (sqrt (PI))) (/ (* (* (sqrt 7.5) (sqrt 2.0)) (exp -7.5)) z)))
\begin{array}{l}
\\
\left(263.3831869810514 \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \frac{\left(\sqrt{7.5} \cdot \sqrt{2}\right) \cdot e^{-7.5}}{z}
\end{array}
Initial program 96.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6497.2
Applied rewrites97.2%
Taylor expanded in z around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-exp.f6495.7
Applied rewrites95.7%
Taylor expanded in z around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-PI.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-exp.f6496.2
Applied rewrites96.2%
herbie shell --seed 2024343
(FPCore (z)
:name "Jmat.Real.gamma, branch z less than 0.5"
:precision binary64
:pre (<= z 0.5)
(* (/ (PI) (sin (* (PI) z))) (* (* (* (sqrt (* (PI) 2.0)) (pow (+ (+ (- (- 1.0 z) 1.0) 7.0) 0.5) (+ (- (- 1.0 z) 1.0) 0.5))) (exp (- (+ (+ (- (- 1.0 z) 1.0) 7.0) 0.5)))) (+ (+ (+ (+ (+ (+ (+ (+ 0.9999999999998099 (/ 676.5203681218851 (+ (- (- 1.0 z) 1.0) 1.0))) (/ -1259.1392167224028 (+ (- (- 1.0 z) 1.0) 2.0))) (/ 771.3234287776531 (+ (- (- 1.0 z) 1.0) 3.0))) (/ -176.6150291621406 (+ (- (- 1.0 z) 1.0) 4.0))) (/ 12.507343278686905 (+ (- (- 1.0 z) 1.0) 5.0))) (/ -0.13857109526572012 (+ (- (- 1.0 z) 1.0) 6.0))) (/ 9.984369578019572e-6 (+ (- (- 1.0 z) 1.0) 7.0))) (/ 1.5056327351493116e-7 (+ (- (- 1.0 z) 1.0) 8.0))))))