Details

simplify10.7m

Calls

5937 calls:

Slowest
3.3s
(/ (* (* (* 4 (* c a)) (* 4 (* c a))) (* 4 (* c a))) (* (* (* (* 2 a) (- (- b) (sqrt (- (* b b) (* (* 4 a) c))))) (* (* 2 a) (- (- b) (sqrt (- (* b b) (* (* 4 a) c)))))) (* (* 2 a) (- (- b) (sqrt (- (* b b) (* (* 4 a) c)))))))
2.4s
(/ (/ (* (* (* 4 (* c a)) (* 4 (* c a))) (* 4 (* c a))) (* (* (* 2 a) (* 2 a)) (* 2 a))) (* (* (- (- b) (sqrt (fma c (* -4 a) (* b b)))) (- (- b) (sqrt (fma c (* -4 a) (* b b))))) (- (- b) (sqrt (fma c (* -4 a) (* b b))))))
2.0s
(/ (* (* (fma -9/2 (* (* b c) a) (* 27/8 (/ (* (* a c) (* a c)) b))) (fma -9/2 (* (* b c) a) (* 27/8 (/ (* (* a c) (* a c)) b)))) (fma -9/2 (* (* b c) a) (* 27/8 (/ (* (* a c) (* a c)) b)))) (* (* (* (* 3 a) (+ (* (sqrt (fma -3 (* c a) (* b b))) (sqrt (fma -3 (* c a) (* b b)))) (+ (* b b) (* (sqrt (fma -3 (* c a) (* b b))) b)))) (* (* 3 a) (+ (* (sqrt (fma -3 (* c a) (* b b))) (sqrt (fma -3 (* c a) (* b b)))) (+ (* b b) (* (sqrt (fma -3 (* c a) (* b b))) b))))) (* (* 3 a) (+ (* (sqrt (fma -3 (* c a) (* b b))) (sqrt (fma -3 (* c a) (* b b)))) (+ (* b b) (* (sqrt (fma -3 (* c a) (* b b))) b))))))
1.5s
(/ (* (* (/ (* 4 (* c a)) (* 2 a)) (/ (* 4 (* c a)) (* 2 a))) (/ (* 4 (* c a)) (* 2 a))) (* (* (- (- b) (sqrt (fma c (* -4 a) (* b b)))) (- (- b) (sqrt (fma c (* -4 a) (* b b))))) (- (- b) (sqrt (fma c (* -4 a) (* b b))))))
1.3s
(/ (* (* (- (* (sqrt (fma b b (* (* a c) -3))) (fma b b (* (* a c) -3))) (* b (* b b))) (- (* (sqrt (fma b b (* (* a c) -3))) (fma b b (* (* a c) -3))) (* b (* b b)))) (- (* (sqrt (fma b b (* (* a c) -3))) (fma b b (* (* a c) -3))) (* b (* b b)))) (* (* (* (* 3 a) (+ (* (sqrt (fma -3 (* c a) (* b b))) (sqrt (fma -3 (* c a) (* b b)))) (+ (* b b) (* (sqrt (fma -3 (* c a) (* b b))) b)))) (* (* 3 a) (+ (* (sqrt (fma -3 (* c a) (* b b))) (sqrt (fma -3 (* c a) (* b b)))) (+ (* b b) (* (sqrt (fma -3 (* c a) (* b b))) b))))) (* (* 3 a) (+ (* (sqrt (fma -3 (* c a) (* b b))) (sqrt (fma -3 (* c a) (* b b)))) (+ (* b b) (* (sqrt (fma -3 (* c a) (* b b))) b))))))

sample10.5m

Algorithm
72×intervals
Results
7.6m79291×body10240exit
54.2s33327×body1280valid
26.2s197651×body80valid
21.9s24490×body640valid
20.9s152095×body80nan
13.2s24979×body320valid
11.6s34866×body160valid
9.2s152859×pre80true
3.3s3032×body2560valid
1.9s7999×body160nan
1.1s4071×pre10240exit
693.0ms210×body5120valid

prune2.1m

series35.0s

Calls

448 calls:

Slowest
751.0ms
(* (sqrt (hypot (* (- lambda1 lambda2) (cos (/ (+ phi2 phi1) 2))) (- phi1 phi2))) R)
498.0ms
(* (sqrt (hypot (* (- lambda1 lambda2) (cos (/ (+ phi2 phi1) 2))) (- phi1 phi2))) (* (sqrt (hypot (* (- lambda1 lambda2) (cos (/ (+ phi2 phi1) 2))) (- phi1 phi2))) R))
497.0ms
(* (hypot (* (- lambda1 lambda2) (cos (/ (+ phi2 phi1) 2))) (- phi1 phi2)) R)
488.0ms
(/ (fma (sqrt (sqrt (fma -3 (* c a) (* b b)))) (sqrt (sqrt (fma -3 (* c a) (* b b)))) (- b)) (* 3 a))
476.0ms
(/ (/ (fma (sqrt (sqrt (fma c (* -4 a) (* b b)))) (sqrt (sqrt (fma c (* -4 a) (* b b)))) (- b)) 2) a)

regimes13.3s

Accuracy

Total 36.6b remaining (14%)

6.8b22.3%Cubic critical, narrow range
5.1b53.1%Quotient of products
4.5b83.5%Cubic critical
3.9b81.5%Quadratic roots, full range
2.9b0%Quadratic roots, narrow range

rewrite3.4s

Algorithm
132×rewrite-expression-head
Calls

448 calls:

Slowest
83.0ms
(* (* (* (tan x) (tan x)) (tan x)) (* (* (tan x) (tan x)) (tan x)))
76.0ms
(/ (- (pow (log (+ 1 (exp x))) 3) (pow (* x y) 3)) (+ (* (log (+ 1 (exp x))) (log (+ 1 (exp x)))) (+ (* (* x y) (* x y)) (* (log (+ 1 (exp x))) (* x y)))))
72.0ms
(cbrt (* (* (* (tan x) (tan x)) (tan x)) (* (* (tan x) (tan x)) (tan x))))
70.0ms
(* (sqrt (fma 2/3 (* x x) 2)) (* (cbrt (* (* (sqrt (fma 2/3 (* x x) 2)) (sqrt (fma 2/3 (* x x) 2))) (sqrt (fma 2/3 (* x x) 2)))) x))
55.0ms
(- (+ (log (sqrt (+ 1 (exp x)))) (log (sqrt (+ 1 (exp x))))) (* x y))
Rules
1356×*-un-lft-identity
1344×add-sqr-sqrt
1308×add-exp-log
1191×pow1
1179×add-cube-cbrt
785×add-cbrt-cube
548×add-log-exp
469×prod-exp
456×tan-quot
454×expm1-log1p-u
450×log1p-expm1-u
448×insert-posit16
430×prod-diff
371×frac-times
366×times-frac
279×associate-*l* associate-*l/
273×pow-exp
272×pow-prod-up
266×sqrt-prod
258×div-inv
252×associate-*r* associate-*r/
249×associate-/r/
223×div-exp
214×fma-neg
203×associate-/r*
202×pow-plus
190×pow-prod-down
187×pow-to-exp
180×flip--
179×flip3--
155×flip-+
154×flip3-+
149×cbrt-unprod
144×associate-/l*
140×cbrt-div
128×cbrt-prod
97×pow2
95×*-commutative
93×rec-exp
88×frac-2neg clear-num
84×fma-udef
82×log-prod
74×sub-neg
68×difference-of-squares
65×fma-def
61×distribute-lft-out associate-/l/
58×pow1/3 distribute-rgt-in distribute-lft-in
57×cbrt-undiv pow1/2
53×log-pow
49×frac-sub
42×log-div
41×diff-log
40×distribute-lft-out--
39×pow3
38×sqrt-div neg-mul-1
36×pow-pow
35×rem-sqrt-square
26×div-sub
22×+-commutative
20×log1p-udef
19×unpow-prod-down
18×distribute-rgt-out
17×sum-log
16×rem-log-exp
14×difference-of-sqr-1
12×pow-flip inv-pow cos-sum
11×associate--l+ rem-cbrt-cube
10×neg-sub0
associate--l- exp-prod associate-+l- acos-asin frac-add expm1-def
log1p-expm1
difference-cubes un-div-inv
sin-sum distribute-rgt1-in cube-unmult associate--r+
cos-mult distribute-rgt-out--
distribute-lft1-in cube-prod log1p-def sin-mult cos-diff
exp-diff associate-+r- associate-+r+ distribute-frac-neg sqrt-unprod acos-neg unpow1/3 rem-square-sqrt
expm1-log1p expm1-udef hypot-udef sub-div associate--r-
associate-+l+ tanh-undef tanh-def asin-acos rem-exp-log sqr-cos sin-diff

localize3.2s

bsearch1.3s

end1.0ms