(FPCore (p T) :precision binary64 (* (* (* (* (/ (* 4.0 (pow 10.0 8.0)) (* p (* T 287.058))) (PI)) (pow (* 75.0 (pow 10.0 (- 9.0))) 5.0)) (exp (/ 0.0 2.0))) (pow (log 1.5) 2.0)))
\begin{array}{l} \\ \left(\left(\left(\frac{4 \cdot {10}^{8}}{p \cdot \left(T \cdot 287.058\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(75 \cdot {10}^{\left(-9\right)}\right)}^{5}\right) \cdot e^{\frac{0}{2}}\right) \cdot {\log 1.5}^{2} \end{array}
Sampling outcomes in binary64 precision:
Herbie found 5 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore (p T) :precision binary64 (* (* (* (* (/ (* 4.0 (pow 10.0 8.0)) (* p (* T 287.058))) (PI)) (pow (* 75.0 (pow 10.0 (- 9.0))) 5.0)) (exp (/ 0.0 2.0))) (pow (log 1.5) 2.0)))
\begin{array}{l} \\ \left(\left(\left(\frac{4 \cdot {10}^{8}}{p \cdot \left(T \cdot 287.058\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot {\left(75 \cdot {10}^{\left(-9\right)}\right)}^{5}\right) \cdot e^{\frac{0}{2}}\right) \cdot {\log 1.5}^{2} \end{array}
NOTE: p and T should be sorted in increasing order before calling this function. (FPCore (p T) :precision binary64 (/ (* (/ (PI) p) (* 3.306714148360262e-30 (pow (log 1.5) 2.0))) T))
\begin{array}{l} [p, T] = \mathsf{sort}([p, T])\\ \\ \frac{\frac{\mathsf{PI}\left(\right)}{p} \cdot \left(3.306714148360262 \cdot 10^{-30} \cdot {\log 1.5}^{2}\right)}{T} \end{array}
Initial program 89.9%
lift-*.f64
N/A
lift-/.f64
N/A
metadata-eval
N/A
lift-exp.f64
N/A
exp-0
N/A
*-rgt-identity
89.9
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
*-commutative
N/A
lift-/.f64
N/A
clear-num
N/A
div-inv
N/A
Applied rewrites99.4%
lift-*.f64
N/A
lift-/.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
associate-/l*
N/A
lift-*.f64
N/A
*-commutative
N/A
times-frac
N/A
metadata-eval
N/A
associate-/l/
N/A
lift-*.f64
N/A
lift-/.f64
N/A
*-commutative
N/A
associate-*l*
N/A
lift-/.f64
N/A
lift-*.f64
N/A
associate-/l/
N/A
associate-*l/
N/A
lower-/.f64
N/A
Applied rewrites99.6%
NOTE: p and T should be sorted in increasing order before calling this function. (FPCore (p T) :precision binary64 (/ (* (pow (log 1.5) 2.0) (* 9.4921875e-28 (PI))) (* (* 287.058 T) p)))
\begin{array}{l} [p, T] = \mathsf{sort}([p, T])\\ \\ \frac{{\log 1.5}^{2} \cdot \left(9.4921875 \cdot 10^{-28} \cdot \mathsf{PI}\left(\right)\right)}{\left(287.058 \cdot T\right) \cdot p} \end{array}
Initial program 89.9%
Applied rewrites95.0%
NOTE: p and T should be sorted in increasing order before calling this function. (FPCore (p T) :precision binary64 (* (/ (* 9.4921875e-28 (PI)) (* (* 287.058 T) p)) (pow (log 1.5) 2.0)))
\begin{array}{l} [p, T] = \mathsf{sort}([p, T])\\ \\ \frac{9.4921875 \cdot 10^{-28} \cdot \mathsf{PI}\left(\right)}{\left(287.058 \cdot T\right) \cdot p} \cdot {\log 1.5}^{2} \end{array}
Initial program 89.9%
lift-*.f64
N/A
lift-/.f64
N/A
metadata-eval
N/A
lift-exp.f64
N/A
exp-0
N/A
*-rgt-identity
89.9
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
lift-/.f64
N/A
associate-*l/
N/A
lower-/.f64
N/A
Applied rewrites94.8%
NOTE: p and T should be sorted in increasing order before calling this function. (FPCore (p T) :precision binary64 (* (/ 3.306714148360262e-30 (* T p)) (* (pow (log 1.5) 2.0) (PI))))
\begin{array}{l} [p, T] = \mathsf{sort}([p, T])\\ \\ \frac{3.306714148360262 \cdot 10^{-30}}{T \cdot p} \cdot \left({\log 1.5}^{2} \cdot \mathsf{PI}\left(\right)\right) \end{array}
Initial program 89.9%
lift-*.f64
N/A
lift-/.f64
N/A
metadata-eval
N/A
lift-exp.f64
N/A
exp-0
N/A
*-rgt-identity
89.9
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
*-commutative
N/A
lift-/.f64
N/A
clear-num
N/A
div-inv
N/A
Applied rewrites99.4%
lift-*.f64
N/A
lift-/.f64
N/A
clear-num
N/A
associate-/r/
N/A
lift-*.f64
N/A
*-commutative
N/A
associate-/r*
N/A
metadata-eval
N/A
lift-/.f64
N/A
frac-times
N/A
lift-*.f64
N/A
associate-*l/
N/A
lift-/.f64
N/A
associate-*r*
N/A
lift-*.f64
N/A
associate-*l*
N/A
associate-*r*
N/A
Applied rewrites94.5%
NOTE: p and T should be sorted in increasing order before calling this function. (FPCore (p T) :precision binary64 (* (* (/ (PI) (* T p)) (pow (log 1.5) 2.0)) 3.306714148360262e-30))
\begin{array}{l} [p, T] = \mathsf{sort}([p, T])\\ \\ \left(\frac{\mathsf{PI}\left(\right)}{T \cdot p} \cdot {\log 1.5}^{2}\right) \cdot 3.306714148360262 \cdot 10^{-30} \end{array}
Initial program 89.9%
lift-*.f64
N/A
lift-/.f64
N/A
metadata-eval
N/A
lift-exp.f64
N/A
exp-0
N/A
*-rgt-identity
89.9
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
*-commutative
N/A
lift-/.f64
N/A
clear-num
N/A
div-inv
N/A
Applied rewrites99.4%
lift-*.f64
N/A
lift-/.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
associate-/l*
N/A
lift-*.f64
N/A
*-commutative
N/A
times-frac
N/A
metadata-eval
N/A
associate-/l/
N/A
lift-*.f64
N/A
lift-/.f64
N/A
associate-*l*
N/A
*-commutative
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
92.3
Applied rewrites92.3%
herbie shell --seed 1
(FPCore (p T)
:name "4*pow(10,8) / (p * (T * 287.058)) * PI * pow(75*pow(10,-9) ,5) * exp(0/2)*pow(log(1.5),2)"
:precision binary64
:pre (and (and (<= 0.0 p) (<= p 1000000000.0)) (and (<= 0.0 T) (<= T 1000.0)))
(* (* (* (* (/ (* 4.0 (pow 10.0 8.0)) (* p (* T 287.058))) (PI)) (pow (* 75.0 (pow 10.0 (- 9.0))) 5.0)) (exp (/ 0.0 2.0))) (pow (log 1.5) 2.0)))