Details

Time bar (total: 14.8s)

analyze1.1s (7.2%)

Algorithm
search
Search
TrueOtherFalseIter
0%99.9%0.1%0
0%99.9%0.1%1
0%99.9%0.1%2
0%99.9%0.1%3
0%99.9%0.1%4
0%99.9%0.1%5
25%74.9%0.1%6
25%74.9%0.1%7
25%74.9%0.1%8
25%74.9%0.1%9
25%64%11.1%10
31.2%54.6%14.2%11
39%44.1%16.9%12
39%41.5%19.5%13
42.9%37%20.1%14
Compiler

Compiled 23 to 16 computations (30.4% saved)

sample4.4s (29.8%)

Symmetry

(sort a1 a2)

Results
1.2s1750×body1024valid
1.1s1685×body1024invalid
879.0ms5090×body128valid
429.0ms958×body512valid
340.0ms802×body512invalid
143.0ms455×body256valid
133.0ms424×body256invalid
113.0ms665×body128invalid
3.0msbody2048valid
Compiler

Compiled 68 to 47 computations (30.9% saved)

simplify11.0ms (0.1%)

Algorithm
egg-herbie
Rules
32×fma-def_binary64
23×*-commutative_binary64
20×associate-/l*_binary64
11×associate-/r/_binary64
associate-*r/_binary64
Counts
1 → 2
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01320
12718
25318
37618
410318
511718
613218
713418
813618
913618

prune4.0ms (0%)

Pruning

3 alts after pruning (3 fresh and 0 done)

PrunedKeptTotal
New022
Fresh011
Picked000
Done000
Total033
Error
0.4b
Counts
3 → 2
Alt Table
StatusErrorProgram
0.5b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
0.5b
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 2)) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 2)) (*.f64 a2 a2)))
Compiler

Compiled 108 to 70 computations (35.2% saved)

localize8.0ms (0.1%)

Local error

Found 2 expressions with local error:

NewErrorProgram
0.1b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
0.4b
(/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))

series75.0ms (0.5%)

Counts
2 → 60
Calls

2 calls:

54.0ms
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
21.0ms
(/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))

rewrite52.0ms (0.4%)

Algorithm
rewrite-expression-head
Rules
39×add-sqr-sqrt_binary64
38×times-frac_binary64
31×*-un-lft-identity_binary64
31×add-cube-cbrt_binary64
22×associate-*r*_binary64
Counts
2 → 85
Calls

2 calls:

43.0ms
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
3.0ms
(/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))

simplify105.0ms (0.7%)

Algorithm
egg-herbie
Rules
456×associate-*l*_binary64
410×associate-*r*_binary64
396×fma-neg_binary64
332×associate-/l*_binary64
299×sub-neg_binary64
Counts
145 → 151
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
01703315
13653012
212892968
343592968
450762968

prune150.0ms (1%)

Pruning

9 alts after pruning (8 fresh and 1 done)

PrunedKeptTotal
New1438151
Fresh101
Picked011
Done000
Total1449153
Error
0.0b
Counts
153 → 9
Alt Table
StatusErrorProgram
0.5b
(*.f64 (*.f64 (cos.f64 th) (/.f64 (hypot.f64 a2 a1) (sqrt.f64 (sqrt.f64 2)))) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (sqrt.f64 (sqrt.f64 2))))
0.7b
(*.f64 (cos.f64 th) (*.f64 (/.f64 1 (sqrt.f64 (sqrt.f64 2))) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 (sqrt.f64 2)))))
0.8b
(*.f64 (*.f64 (cbrt.f64 (cos.f64 th)) (cbrt.f64 (cos.f64 th))) (*.f64 (cbrt.f64 (cos.f64 th)) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))))
0.5b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
37.0b
(cbrt.f64 (*.f64 (*.f64 (*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))) (*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))) (*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))))
0.5b
(*.f64 (cos.f64 th) (/.f64 (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 (sqrt.f64 2))) (sqrt.f64 (sqrt.f64 2))))
0.4b
(*.f64 (cos.f64 th) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))))
0.4b
(*.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (sqrt.f64 2)))
0.4b
(/.f64 (*.f64 (cos.f64 th) (fma.f64 a1 a1 (*.f64 a2 a2))) (sqrt.f64 2))
Compiler

Compiled 3808 to 1792 computations (52.9% saved)

localize11.0ms (0.1%)

Local error

Found 4 expressions with local error:

NewErrorProgram
0.1b
(*.f64 (cos.f64 th) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))))
0.2b
(/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
0.5b
(/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))
6.8b
(sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2)))

series339.0ms (2.3%)

Counts
4 → 108
Calls

4 calls:

187.0ms
(*.f64 (cos.f64 th) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))))
108.0ms
(/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
24.0ms
(/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))
19.0ms
(sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2)))

rewrite105.0ms (0.7%)

Algorithm
rewrite-expression-head
Rules
526×times-frac_binary64
306×add-sqr-sqrt_binary64
281×*-un-lft-identity_binary64
281×add-cube-cbrt_binary64
272×sqrt-prod_binary64
Counts
4 → 401
Calls

4 calls:

27.0ms
(*.f64 (cos.f64 th) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))))
9.0ms
(/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
3.0ms
(/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))
1.0ms
(sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2)))

simplify383.0ms (2.6%)

Algorithm
egg-herbie
Rules
609×fma-def_binary64
353×associate-/r/_binary64
280×*-commutative_binary64
274×cancel-sign-sub-inv_binary64
268×associate-/l*_binary64
Counts
509 → 572
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
047616630
1117013399
2392612746
3478212746
4493112746

prune544.0ms (3.7%)

Pruning

7 alts after pruning (6 fresh and 1 done)

PrunedKeptTotal
New5693572
Fresh437
Picked101
Done011
Total5747581
Error
0b
Counts
581 → 7
Alt Table
StatusErrorProgram
0.5b
(*.f64 (*.f64 (cos.f64 th) (/.f64 (hypot.f64 a2 a1) (sqrt.f64 (sqrt.f64 2)))) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (sqrt.f64 (sqrt.f64 2))))
0.7b
(*.f64 (cos.f64 th) (*.f64 (/.f64 1 (sqrt.f64 (sqrt.f64 2))) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 (sqrt.f64 2)))))
0.5b
(*.f64 (*.f64 (cos.f64 th) (sqrt.f64 (hypot.f64 a2 a1))) (/.f64 (sqrt.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2)))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))))
0.4b
(*.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (sqrt.f64 2)))
1.2b
(*.f64 (*.f64 (cos.f64 th) (/.f64 (cbrt.f64 (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 2) (cbrt.f64 (hypot.f64 a2 a1))))) (/.f64 (cbrt.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2)))) (/.f64 1 (hypot.f64 a2 a1))))
0.5b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
0.4b
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
Compiler

Compiled 18102 to 7144 computations (60.5% saved)

localize8.0ms (0.1%)

Local error

Found 3 expressions with local error:

NewErrorProgram
0.1b
(*.f64 (cos.f64 th) (hypot.f64 a2 a1))
0.3b
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
0.5b
(/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))

series142.0ms (1%)

Counts
2 → 72
Calls

2 calls:

108.0ms
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
34.0ms
(*.f64 (cos.f64 th) (hypot.f64 a2 a1))

rewrite17.0ms (0.1%)

Algorithm
rewrite-expression-head
Rules
58×times-frac_binary64
32×add-sqr-sqrt_binary64
30×*-un-lft-identity_binary64
30×add-cube-cbrt_binary64
22×associate-/r*_binary64
Counts
2 → 86
Calls

2 calls:

7.0ms
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
3.0ms
(*.f64 (cos.f64 th) (hypot.f64 a2 a1))

simplify127.0ms (0.9%)

Algorithm
egg-herbie
Rules
777×associate-/r/_binary64
384×fma-neg_binary64
360×fma-def_binary64
264×associate-/l*_binary64
221×cancel-sign-sub-inv_binary64
Counts
158 → 193
Iterations

Useful iterations: 3 (0.0ms)

IterNodesCost
02724223
16993721
225863604
344733597
449703597

prune234.0ms (1.6%)

Pruning

7 alts after pruning (5 fresh and 2 done)

PrunedKeptTotal
New2662268
Fresh235
Picked011
Done011
Total2687275
Error
0b
Counts
275 → 7
Alt Table
StatusErrorProgram
0.5b
(*.f64 (*.f64 (cos.f64 th) (/.f64 (hypot.f64 a2 a1) (sqrt.f64 (sqrt.f64 2)))) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (sqrt.f64 (sqrt.f64 2))))
0.7b
(*.f64 (cos.f64 th) (*.f64 (/.f64 1 (sqrt.f64 (sqrt.f64 2))) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 (sqrt.f64 2)))))
0.4b
(*.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)))
0.4b
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
0.5b
(*.f64 (*.f64 (cos.f64 th) (sqrt.f64 (hypot.f64 a2 a1))) (/.f64 (sqrt.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2)))) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1))))
0.4b
(/.f64 (/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1)))
0.5b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
Compiler

Compiled 6731 to 3370 computations (49.9% saved)

localize12.0ms (0.1%)

Local error

Found 4 expressions with local error:

NewErrorProgram
0.1b
(*.f64 (cos.f64 th) (hypot.f64 a2 a1))
0.2b
(/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1))
0.3b
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1))
0.4b
(/.f64 (/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1)))

series204.0ms (1.4%)

Counts
3 → 96
Calls

3 calls:

111.0ms
(/.f64 (/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1)))
62.0ms
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1))
31.0ms
(/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1))

rewrite446.0ms (3%)

Algorithm
rewrite-expression-head
Rules
4083×times-frac_binary64
1953×sqrt-prod_binary64
1406×*-un-lft-identity_binary64
1406×add-sqr-sqrt_binary64
1406×add-cube-cbrt_binary64
Counts
3 → 1361
Calls

3 calls:

31.0ms
(/.f64 (/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1)))
10.0ms
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1))
4.0ms
(/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1))

simplify1.5s (9.9%)

Algorithm
egg-herbie
Rules
780×associate-/r/_binary64
606×associate-/l*_binary64
417×associate-/r*_binary64
387×times-frac_binary64
380×associate-/l/_binary64
Counts
1457 → 1352
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
085269168
1220165957
2486065838
3508065838

prune1.7s (11.7%)

Pruning

7 alts after pruning (4 fresh and 3 done)

PrunedKeptTotal
New142711428
Fresh134
Picked011
Done022
Total142871435
Error
0b
Counts
1435 → 7
Alt Table
StatusErrorProgram
0.5b
(*.f64 (*.f64 (cos.f64 th) (/.f64 (hypot.f64 a2 a1) (sqrt.f64 (sqrt.f64 2)))) (/.f64 (sqrt.f64 (fma.f64 a1 a1 (*.f64 a2 a2))) (sqrt.f64 (sqrt.f64 2))))
0.7b
(*.f64 (cos.f64 th) (*.f64 (/.f64 1 (sqrt.f64 (sqrt.f64 2))) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 (sqrt.f64 2)))))
0.5b
(*.f64 1 (*.f64 (/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (sqrt.f64 2)) (hypot.f64 a2 a1)))
0.4b
(*.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)))
0.4b
(/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 2) (hypot.f64 a2 a1)))
0.4b
(/.f64 (/.f64 (*.f64 (cos.f64 th) (hypot.f64 a2 a1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) 1)) (/.f64 (sqrt.f64 (sqrt.f64 2)) (hypot.f64 a2 a1)))
0.5b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
Compiler

Compiled 53793 to 35266 computations (34.4% saved)

regimes3.0s (20.4%)

Accuracy

Total 0.4b remaining (95.7%)

Threshold costs 0.4b (95.7%)

Counts
300 → 1
Compiler

Compiled 58656 to 37917 computations (35.4% saved)

simplify2.0ms (0%)

Algorithm
egg-herbie
Rules
*-commutative_binary64
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01633
11733
21733

end126.0ms (0.9%)

Remove

(sort a1 a2)

Compiler

Compiled 231 to 163 computations (29.4% saved)

Profiling

Loading profile data...