Details

Time bar (total: 8.2s)

analyze1.1s (13%)

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 (53.4%)

Symmetry

(sort a1 a2)

Results
1.2s1896×body1024valid
1.1s1594×body1024invalid
842.0ms4942×body128valid
481.0ms935×body512valid
338.0ms761×body512invalid
147.0ms476×body256valid
122.0ms386×body256invalid
114.0ms671×body128invalid
8.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.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.4b
(+.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))

series67.0ms (0.8%)

Counts
2 → 60
Calls

2 calls:

48.0ms
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
18.0ms
(/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2))

rewrite57.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 → 68
Calls

2 calls:

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

Useful iterations: 1 (0.0ms)

IterNodesCost
01131
122329
2259529
3500629

simplify74.0ms (0.9%)

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
128 → 90
Iterations

Useful iterations: 3 (0.0ms)

IterNodesCost
0691313
11651259
25471215
322021173
448571173
550231173

prune84.0ms (1%)

Pruning

6 alts after pruning (6 fresh and 0 done)

PrunedKeptTotal
New85590
Fresh011
Picked101
Done000
Total86692
Error
0b
Counts
92 → 6
Alt Table
StatusErrorProgram
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.6b
(*.f64 (cos.f64 th) (*.f64 (/.f64 1 (pow.f64 2 1/4)) (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 1/4))))
0.4b
(/.f64 (*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (cos.f64 th)) (sqrt.f64 2))
0.4b
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 2)) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 2)) (*.f64 a2 a2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
Compiler

Compiled 1819 to 1205 computations (33.8% saved)

localize11.0ms (0.1%)

Local error

Found 4 expressions with local error:

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

series160.0ms (2%)

Counts
4 → 108
Calls

4 calls:

87.0ms
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
47.0ms
(*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)))
15.0ms
(/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))
11.0ms
(hypot.f64 a1 a2)

rewrite66.0ms (0.8%)

Algorithm
batch-egg-rewrite
Rules
586×log-prod_binary64
207×expm1-udef_binary64
207×log1p-udef_binary64
188×log-pow_binary64
139×egg-rr
Counts
4 → 139
Calls

4 calls:

64.0ms
(hypot.f64 a1 a2)
64.0ms
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
64.0ms
(*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)))
64.0ms
(/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01348
125042
2287642
3512342

simplify88.0ms (1.1%)

Algorithm
egg-herbie
Rules
660×fma-neg_binary64
569×times-frac_binary64
464×associate-/l*_binary64
347×fma-def_binary64
341×associate-/r*_binary64
Counts
247 → 220
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
01452595
14272499
214432423
347412423
452092423

prune209.0ms (2.5%)

Pruning

6 alts after pruning (5 fresh and 1 done)

PrunedKeptTotal
New2811282
Fresh145
Picked011
Done000
Total2826288
Error
0b
Counts
288 → 6
Alt Table
StatusErrorProgram
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.6b
(*.f64 (cos.f64 th) (*.f64 (/.f64 1 (pow.f64 2 1/4)) (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 1/4))))
0.4b
(*.f64 (cos.f64 th) (/.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)) (/.f64 1 (hypot.f64 a1 a2))))
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 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
Compiler

Compiled 6411 to 3855 computations (39.9% saved)

localize10.0ms (0.1%)

Local error

Found 4 expressions with local error:

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

series140.0ms (1.7%)

Counts
3 → 84
Calls

3 calls:

75.0ms
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
50.0ms
(*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2)))
14.0ms
(*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))

rewrite109.0ms (1.3%)

Algorithm
batch-egg-rewrite
Rules
577×log-prod_binary64
213×expm1-udef_binary64
213×log1p-udef_binary64
192×pow3_binary64
191×log-pow_binary64
Counts
3 → 54
Calls

3 calls:

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

Useful iterations: 1 (0.0ms)

IterNodesCost
01247
124738
2271838
3494538
4497738
5494338

simplify75.0ms (0.9%)

Algorithm
egg-herbie
Rules
819×fma-neg_binary64
676×fma-def_binary64
608×associate-*l*_binary64
419×cancel-sign-sub-inv_binary64
302×times-frac_binary64
Counts
138 → 107
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
01181983
13551812
213011780
349681780
455771780

prune167.0ms (2%)

Pruning

6 alts after pruning (4 fresh and 2 done)

PrunedKeptTotal
New2301231
Fresh134
Picked011
Done011
Total2316237
Error
0b
Counts
237 → 6
Alt Table
StatusErrorProgram
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.4b
(*.f64 (cos.f64 th) (/.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)) (/.f64 1 (hypot.f64 a1 a2))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (sqrt.f64 1/2) (fma.f64 a2 a2 (*.f64 a1 a1))))
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 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
Compiler

Compiled 5228 to 3087 computations (41% saved)

localize9.0ms (0.1%)

Local error

Found 4 expressions with local error:

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

series133.0ms (1.6%)

Counts
2 → 60
Calls

2 calls:

84.0ms
(*.f64 (cos.f64 th) (/.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)) (/.f64 1 (hypot.f64 a1 a2))))
48.0ms
(/.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)) (/.f64 1 (hypot.f64 a1 a2)))

rewrite98.0ms (1.2%)

Algorithm
batch-egg-rewrite
Rules
583×prod-diff_binary64
229×expm1-udef_binary64
229×log1p-udef_binary64
212×log-pow_binary64
174×log-div_binary64
Counts
2 → 67
Calls

2 calls:

97.0ms
(*.f64 (cos.f64 th) (/.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)) (/.f64 1 (hypot.f64 a1 a2))))
97.0ms
(/.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)) (/.f64 1 (hypot.f64 a1 a2)))
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01341
127329
2327229
3493629
4590829

simplify78.0ms (0.9%)

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
127 → 88
Iterations

Useful iterations: 3 (0.0ms)

IterNodesCost
0671313
11631259
25461215
322011173
448561173
550221173

prune200.0ms (2.4%)

Pruning

6 alts after pruning (3 fresh and 3 done)

PrunedKeptTotal
New2800280
Fresh033
Picked011
Done022
Total2806286
Error
0b
Counts
286 → 6
Alt Table
StatusErrorProgram
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.4b
(*.f64 (cos.f64 th) (/.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)) (/.f64 1 (hypot.f64 a1 a2))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (sqrt.f64 1/2) (fma.f64 a2 a2 (*.f64 a1 a1))))
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 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
Compiler

Compiled 6361 to 3748 computations (41.1% saved)

regimes795.0ms (9.7%)

Accuracy

Total 0.4b remaining (88%)

Threshold costs 0.4b (88%)

Counts
104 → 1
Compiler

Compiled 13678 to 10479 computations (23.4% saved)

simplify2.0ms (0%)

Algorithm
egg-herbie
Rules
*-commutative_binary64
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01120
11320
21320

end99.0ms (1.2%)

Remove

(sort a1 a2)

Compiler

Compiled 162 to 109 computations (32.7% saved)

Profiling

Loading profile data...