Details

Time bar (total: 7.3s)

analyze1.1s (15.4%)

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.5s (61.4%)

Symmetry

(sort a1 a2)

Results
1.2s1860×body1024valid
1.1s1660×body1024invalid
842.0ms4980×body128valid
438.0ms946×body512valid
364.0ms797×body512invalid
151.0ms467×body256valid
124.0ms404×body256invalid
118.0ms663×body128invalid
3.0msbody2048valid
Compiler

Compiled 68 to 47 computations (30.9% saved)

simplify10.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.3b
Counts
3 → 2
Alt Table
StatusErrorProgram
0.4b
(*.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))

series68.0ms (0.9%)

Counts
2 → 60
Calls

2 calls:

50.0ms
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
17.0ms
(/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))

rewrite52.0ms (0.7%)

Algorithm
batch-egg-rewrite
Rules
523×log-prod_binary64
198×pow1/3_binary64
195×expm1-udef_binary64
195×log1p-udef_binary64
181×pow3_binary64
Counts
2 → 70
Calls

2 calls:

50.0ms
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
50.0ms
(/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01131
122329
2259529
3500629
000
100

simplify74.0ms (1%)

Algorithm
egg-herbie
Rules
492×associate-/r/_binary64
338×unswap-sqr_binary64
331×fma-neg_binary64
276×sub-neg_binary64
206×associate-/l/_binary64
Counts
130 → 92
Iterations

Useful iterations: 3 (0.0ms)

IterNodesCost
0691313
11651259
25471215
322021173
448571173
550231173

prune85.0ms (1.2%)

Pruning

6 alts after pruning (5 fresh and 1 done)

PrunedKeptTotal
New87592
Fresh101
Picked011
Done000
Total88694
Error
0.0b
Counts
94 → 6
Alt Table
StatusErrorProgram
0.4b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
0.5b
(/.f64 (/.f64 (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th)) (pow.f64 2 1/4)) (pow.f64 2 1/4))
0.5b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.4b
(/.f64 (*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th)) (sqrt.f64 2))
0.4b
(*.f64 (cos.f64 th) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
0.5b
(*.f64 (cos.f64 th) (pow.f64 (/.f64 (hypot.f64 a1 a2) (pow.f64 2 1/4)) 2))
Compiler

Compiled 1802 to 1199 computations (33.5% saved)

localize9.0ms (0.1%)

Local error

Found 3 expressions with local error:

NewErrorProgram
0.0b
(pow.f64 (hypot.f64 a1 a2) 2)
0.1b
(*.f64 (cos.f64 th) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
0.4b
(*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2))

series160.0ms (2.2%)

Counts
3 → 84
Calls

3 calls:

79.0ms
(*.f64 (cos.f64 th) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
44.0ms
(*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2))
37.0ms
(pow.f64 (hypot.f64 a1 a2) 2)

rewrite58.0ms (0.8%)

Algorithm
batch-egg-rewrite
Rules
534×log-prod_binary64
298×pow2_binary64
208×pow1/3_binary64
207×expm1-udef_binary64
207×log1p-udef_binary64
Counts
3 → 84
Calls

3 calls:

57.0ms
(pow.f64 (hypot.f64 a1 a2) 2)
57.0ms
(*.f64 (cos.f64 th) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
57.0ms
(*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2))
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01238
124836
2260536
3505436
000
100

simplify62.0ms (0.9%)

Algorithm
egg-herbie
Rules
535×fma-def_binary64
529×distribute-rgt-neg-in_binary64
495×distribute-lft-neg-in_binary64
460×associate-*l*_binary64
446×associate-*r*_binary64
Counts
168 → 112
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
0711417
11871226
26951194
333501194
452621194

prune84.0ms (1.2%)

Pruning

6 alts after pruning (4 fresh and 2 done)

PrunedKeptTotal
New1111112
Fresh134
Picked011
Done011
Total1126118
Error
0b
Counts
118 → 6
Alt Table
StatusErrorProgram
0.5b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.4b
(/.f64 (*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th)) (sqrt.f64 2))
0.4b
(*.f64 (cos.f64 th) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
0.4b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
0.5b
(*.f64 (cos.f64 th) (pow.f64 (/.f64 (hypot.f64 a1 a2) (pow.f64 2 1/4)) 2))
0.4b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
Compiler

Compiled 2118 to 1316 computations (37.9% saved)

localize8.0ms (0.1%)

Local error

Found 2 expressions with local error:

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

series41.0ms (0.6%)

Counts
2 → 44
Calls

2 calls:

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

rewrite46.0ms (0.6%)

Algorithm
batch-egg-rewrite
Rules
902×log1p-expm1-u_binary64
902×expm1-log1p-u_binary64
106×add-sqr-sqrt_binary64
102×prod-diff_binary64
99×add-log-exp_binary64
Counts
2 → 34
Calls

2 calls:

45.0ms
(*.f64 (sqrt.f64 1/2) (cos.f64 th))
45.0ms
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01126
121725
2237425
3570325
000
100

simplify56.0ms (0.8%)

Algorithm
egg-herbie
Rules
585×fma-def_binary64
580×distribute-rgt-neg-in_binary64
512×associate-*l*_binary64
460×associate-*r*_binary64
432×cancel-sign-sub-inv_binary64
Counts
78 → 60
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
0831145
1223892
2798852
33699852
45161852

prune49.0ms (0.7%)

Pruning

6 alts after pruning (3 fresh and 3 done)

PrunedKeptTotal
New60060
Fresh033
Picked011
Done022
Total60666
Error
0b
Counts
66 → 6
Alt Table
StatusErrorProgram
0.5b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.4b
(/.f64 (*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th)) (sqrt.f64 2))
0.4b
(*.f64 (cos.f64 th) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
0.4b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
0.5b
(*.f64 (cos.f64 th) (pow.f64 (/.f64 (hypot.f64 a1 a2) (pow.f64 2 1/4)) 2))
0.4b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
Compiler

Compiled 1279 to 805 computations (37.1% saved)

localize11.0ms (0.1%)

Local error

Found 2 expressions with local error:

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

series74.0ms (1%)

Counts
2 → 64
Calls

2 calls:

49.0ms
(/.f64 (*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th)) (sqrt.f64 2))
25.0ms
(*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th))

rewrite59.0ms (0.8%)

Algorithm
batch-egg-rewrite
Rules
634×prod-diff_binary64
220×expm1-udef_binary64
220×log1p-udef_binary64
125×add-sqr-sqrt_binary64
122×log1p-expm1-u_binary64
Counts
2 → 68
Calls

2 calls:

57.0ms
(*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th))
57.0ms
(/.f64 (*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th)) (sqrt.f64 2))
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01235
125829
2312829
3492429
000
100

simplify81.0ms (1.1%)

Algorithm
egg-herbie
Rules
585×sub-neg_binary64
376×fma-def_binary64
338×unswap-sqr_binary64
293×cancel-sign-sub-inv_binary64
280×associate--l+_binary64
Counts
132 → 98
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
0831622
12301538
28521205
338691205
448891205
549791205

prune68.0ms (0.9%)

Pruning

5 alts after pruning (2 fresh and 3 done)

PrunedKeptTotal
New97198
Fresh112
Picked101
Done033
Total995104
Error
0b
Counts
104 → 5
Alt Table
StatusErrorProgram
0.4b
(*.f64 (cos.f64 th) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
0.4b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
0.4b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
0.5b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.4b
(/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (/.f64 (sqrt.f64 2) (cos.f64 th)))
Compiler

Compiled 1962 to 1229 computations (37.4% saved)

regimes429.0ms (5.9%)

Accuracy

Total 0.4b remaining (83.9%)

Threshold costs 0.4b (83.9%)

Counts
53 → 1
Compiler

Compiled 6835 to 5247 computations (23.2% saved)

simplify2.0ms (0%)

Algorithm
egg-herbie
Rules
*-commutative_binary64
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01217
11417
21417

end93.0ms (1.3%)

Remove

(sort a1 a2)

Compiler

Compiled 131 to 100 computations (23.7% saved)

Profiling

Loading profile data...