Details

rewrite27.5m (58.0%)

Algorithm
167×rewrite-expression-head
Calls

517 calls:

7.1m
(* (* (* (+ (+ (/ 1.5056327351493116e-07 (+ 8.0 (- z))) (/ 12.507343278686905 (+ (- z) 5.0))) (+ (+ (+ (/ -0.13857109526572012 (+ 6.0 (- z))) (/ -176.6150291621406 (+ 4.0 (- z)))) (+ (/ 771.3234287776531 (+ 3.0 (- z))) (+ 0.9999999999998099 (+ (/ 676.5203681218851 (- 1.0 z)) (/ -1259.1392167224028 (+ 2.0 (- z))))))) (/ 9.984369578019572e-06 (+ 7.0 (- z))))) (/ PI (sin (* PI z)))) (pow (+ (+ 7.0 (- z)) 0.5) (+ (- z) 0.5))) (/ (sqrt (* 2.0 PI)) (exp (+ (+ 7.0 (- z)) 0.5))))
6.2m
(* (* (sqrt (* (/ (sqrt (+ (+ (+ (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 (* (* x x) (* x x)))) (* 0.0072644182 (* (* (* x x) (* x x)) (* x x)))) (* 0.0005064034 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0001789971 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x))))) (* (cbrt (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x))))) (cbrt (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x))))))) (/ (sqrt (+ (+ (+ (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 (* (* x x) (* x x)))) (* 0.0072644182 (* (* (* x x) (* x x)) (* x x)))) (* 0.0005064034 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0001789971 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x))))) (cbrt (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x)))))))) (sqrt (/ (+ (+ (+ (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 (* (* x x) (* x x)))) (* 0.0072644182 (* (* (* x x) (* x x)) (* x x)))) (* 0.0005064034 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0001789971 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x))))))) x)
35.1s
(* (* (sqrt (/ (+ (+ (+ (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 (* (* x x) (* x x)))) (* 0.0072644182 (* (* (* x x) (* x x)) (* x x)))) (* 0.0005064034 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0001789971 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x)))))) (sqrt (/ (+ (+ (+ (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 (* (* x x) (* x x)))) (* 0.0072644182 (* (* (* x x) (* x x)) (* x x)))) (* 0.0005064034 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0001789971 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x))))))) x)
20.9s
(* (- (* (/ 1.5056327351493116e-07 (+ 8.0 (- z))) (/ 1.5056327351493116e-07 (+ 8.0 (- z)))) (* (/ 12.507343278686905 (+ (- z) 5.0)) (/ 12.507343278686905 (+ (- z) 5.0)))) (+ (* (+ (+ (+ (/ -0.13857109526572012 (+ 6.0 (- z))) (/ -176.6150291621406 (+ 4.0 (- z)))) (/ 771.3234287776531 (+ 3.0 (- z)))) (+ 0.9999999999998099 (+ (/ 676.5203681218851 (- 1.0 z)) (/ -1259.1392167224028 (+ 2.0 (- z)))))) (+ (+ (+ (/ -0.13857109526572012 (+ 6.0 (- z))) (/ -176.6150291621406 (+ 4.0 (- z)))) (/ 771.3234287776531 (+ 3.0 (- z)))) (+ 0.9999999999998099 (+ (/ 676.5203681218851 (- 1.0 z)) (/ -1259.1392167224028 (+ 2.0 (- z))))))) (- (* (/ 9.984369578019572e-06 (+ 7.0 (- z))) (/ 9.984369578019572e-06 (+ 7.0 (- z)))) (* (+ (+ (+ (/ -0.13857109526572012 (+ 6.0 (- z))) (/ -176.6150291621406 (+ 4.0 (- z)))) (/ 771.3234287776531 (+ 3.0 (- z)))) (+ 0.9999999999998099 (+ (/ 676.5203681218851 (- 1.0 z)) (/ -1259.1392167224028 (+ 2.0 (- z)))))) (/ 9.984369578019572e-06 (+ 7.0 (- z)))))))
18.2s
(* (/ (+ (+ (+ (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 (* (* x x) (* x x)))) (* 0.0072644182 (* (* (* x x) (* x x)) (* x x)))) (* 0.0005064034 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0001789971 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x))))) x)
Rules
828896×frac-add
511151×frac-times
375461×flip-+ flip3-+
270705×frac-sub
226735×associate-*l/
183450×associate-*r/
15436×flip3-- flip--
11560×times-frac
9359×*-un-lft-identity
7920×add-sqr-sqrt
7862×exp-neg
6945×neg-sub0
6748×exp-diff
6365×add-cube-cbrt
5018×add-exp-log
4981×sqrt-prod
4188×add-cbrt-cube
4032×sub-div
3317×pow1
2529×prod-exp
2050×cbrt-unprod
1451×associate-*r*
1341×distribute-lft-out
1287×associate-*l*
1136×un-div-inv
1111×div-exp
985×cbrt-prod
957×pow-prod-down
827×cbrt-undiv
745×add-log-exp
692×associate-/l*
639×pow-prod-up
573×associate-/r/
489×cbrt-div
407×div-inv
391×sqrt-div
390×difference-of-squares associate-/r*
296×pow-plus
278×unswap-sqr
269×swap-sqr
230×distribute-lft-out--
215×associate-+l-
209×pow-sqr
205×pow-sub
204×log-pow
184×sqrt-pow1
179×*-commutative
126×associate-/l/
125×pow1/2
123×pow2
122×1-exp
115×pow1/3
109×rec-exp
92×log-prod
91×sum-log
89×frac-2neg clear-num rem-sqrt-square
76×pow-exp
70×cube-unmult
69×distribute-rgt-in distribute-lft-in
54×cube-div
52×unpow-prod-down
51×+-commutative
49×pow-to-exp
47×exp-prod
41×sub-neg
39×sqr-pow
37×diff-log
35×pow-flip
33×distribute-rgt-neg-in inv-pow
27×pow3
25×pow-unpow
22×sum-cubes
16×exp-sum
15×pow-pow div-sub
14×log-div
12×rem-cube-cbrt associate-+r+
rem-exp-log distribute-rgt-out
associate-+l+ cube-prod sin-sum distribute-lft-neg-in associate--l+ associate--r+ difference-cubes
rem-cbrt-cube rem-log-exp
neg-log cos-sum distribute-rgt1-in
associate-+r- unpow3 sqrt-unprod rem-square-sqrt cube-mult
sqrt-undiv unsub-neg
unpow-prod-up associate--l- neg-mul-1 distribute-rgt-out-- count-2 distribute-neg-in associate--r-

simplify10.2m (21.5%)

prune5.2m (10.9%)

sample2.2m (4.6%)

Algorithm
98×intervals
Results
46.7s444255×body80valid
27.9s27300×body1280valid
12.7s21028×body640valid
7.8s8311×body10240exit
6.8s69127×body80nan
4.6s10809×body320valid
2.5s9527×body160valid
2.2s49536×pre80true
838.0ms1473×body2560valid
739.0ms108×body1280nan
433.0ms636×body5120valid
87.0ms73×body640nan
42.0ms44×body320nan
14.0ms23×body160nan

series1.9m (3.9%)

Calls

517 calls:

5.0s
(* (+ (sqrt (+ (- (* d1 d2) (* d1 d3)) (* d4 d1))) d1) (- (sqrt (+ (- (* d1 d2) (* d1 d3)) (* d4 d1))) d1))
4.7s
(- (pow 1.0 3) (pow (* (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 0.254829592 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -0.284496736 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 1.421413741 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -1.453152027 (* (/ (/ 1.0 (* (cbrt (+ 1.0 (* 0.3275911 (fabs x)))) (cbrt (+ 1.0 (* 0.3275911 (fabs x)))))) (cbrt (+ 1.0 (* 0.3275911 (fabs x))))) 1.061405429))))))))) (exp (- (* (fabs x) (fabs x))))) 3))
4.4s
(+ (* (* (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 0.254829592 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -0.284496736 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 1.421413741 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -1.453152027 (* (/ (/ 1.0 (* (cbrt (+ 1.0 (* 0.3275911 (fabs x)))) (cbrt (+ 1.0 (* 0.3275911 (fabs x)))))) (cbrt (+ 1.0 (* 0.3275911 (fabs x))))) 1.061405429))))))))) (exp (- (* (fabs x) (fabs x))))) (* (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 0.254829592 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -0.284496736 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 1.421413741 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -1.453152027 (* (/ (/ 1.0 (* (cbrt (+ 1.0 (* 0.3275911 (fabs x)))) (cbrt (+ 1.0 (* 0.3275911 (fabs x)))))) (cbrt (+ 1.0 (* 0.3275911 (fabs x))))) 1.061405429))))))))) (exp (- (* (fabs x) (fabs x)))))) (* 1.0 (* (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 0.254829592 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -0.284496736 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 1.421413741 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -1.453152027 (* (/ (/ 1.0 (* (cbrt (+ 1.0 (* 0.3275911 (fabs x)))) (cbrt (+ 1.0 (* 0.3275911 (fabs x)))))) (cbrt (+ 1.0 (* 0.3275911 (fabs x))))) 1.061405429))))))))) (exp (- (* (fabs x) (fabs x)))))))
3.5s
(- (pow 1.0 3) (* (sqrt (pow (* (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 0.254829592 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -0.284496736 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 1.421413741 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -1.453152027 (* (/ (/ 1.0 (* (cbrt (+ 1.0 (* 0.3275911 (fabs x)))) (cbrt (+ 1.0 (* 0.3275911 (fabs x)))))) (cbrt (+ 1.0 (* 0.3275911 (fabs x))))) 1.061405429))))))))) (exp (- (* (fabs x) (fabs x))))) 3)) (sqrt (pow (* (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 0.254829592 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -0.284496736 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ 1.421413741 (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) (+ -1.453152027 (* (/ (/ 1.0 (* (cbrt (+ 1.0 (* 0.3275911 (fabs x)))) (cbrt (+ 1.0 (* 0.3275911 (fabs x)))))) (cbrt (+ 1.0 (* 0.3275911 (fabs x))))) 1.061405429))))))))) (exp (- (* (fabs x) (fabs x))))) 3))))
3.5s
(* (* (/ (/ (* i (+ (+ alpha beta) i)) (+ (+ alpha beta) (* 2.0 i))) (+ (+ (+ alpha beta) (* 2.0 i)) (sqrt 1.0))) (/ (+ (* beta alpha) (* i (+ (+ alpha beta) i))) (+ (+ alpha beta) (* 2.0 i)))) (/ 1 (- (+ (+ alpha beta) (* 2.0 i)) (sqrt 1.0))))

regimes16.3s (0.6%)

Accuracy

Total 101.5b remaining (37.2%)

Threshold costs 3.7b (1.3%)

19.3b50.9%math.sqrt on complex, imaginary part, im greater than 0 branch
10.4b57.9%math.log/2 on complex, real part
10.2b59.1%math.log10 on complex, real part
10.0b59.9%math.log/1 on complex, real part
9.7b63.1%math.sqrt on complex, real part

localize10.8s (0.4%)

bsearch3.2s (0.1%)

end1.0ms (0.0%)