Details

Time bar (total: 7.8s)

analyze1.1s (14.3%)

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

Symmetry

(sort a1 a2)

Results
1.2s1851×body1024valid
1.1s1588×body1024invalid
844.0ms5017×body128valid
400.0ms919×body512valid
340.0ms778×body512invalid
152.0ms461×body256valid
133.0ms420×body256invalid
114.0ms664×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
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01320
12718
25318
37618
410318
511718
613218
713418
813618
913618
Stop Event
saturated
Counts
1 → 2

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 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 2)) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 2)) (*.f64 a2 a2)))
0.5b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
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))

series71.0ms (0.9%)

Counts
2 → 60
Calls

2 calls:

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

rewrite47.0ms (0.6%)

Algorithm
batch-egg-rewrite
Rules
523×log-prod_binary64
198×pow1/3_binary64
195×expm1-udef_binary64
195×log1p-udef_binary64
181×pow3_binary64
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01131
122329
2259529
3500629
Stop Event
node limit
Counts
2 → 68
Calls

2 calls:

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

simplify73.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
Iterations

Useful iterations: 3 (0.0ms)

IterNodesCost
0691313
11651259
25471215
322021173
448571173
550231173
Stop Event
node limit
Counts
128 → 90

prune88.0ms (1.1%)

Pruning

9 alts after pruning (8 fresh and 1 done)

PrunedKeptTotal
New83790
Fresh011
Picked011
Done000
Total83992
Error
0.0b
Counts
92 → 9
Alt Table
StatusErrorProgram
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.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/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)))
0.8b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
10.9b
(expm1.f64 (log1p.f64 (*.f64 (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (sqrt.f64 2)) (cos.f64 th))))
0.5b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 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.5b
(*.f64 (cos.f64 th) (/.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (sqrt.f64 2)))
Compiler

Compiled 1904 to 1273 computations (33.1% saved)

localize8.0ms (0.1%)

Local error

Found 3 expressions with local error:

NewErrorProgram
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))

series136.0ms (1.7%)

Counts
3 → 84
Calls

3 calls:

76.0ms
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
45.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))

rewrite87.0ms (1.1%)

Algorithm
batch-egg-rewrite
Rules
577×log-prod_binary64
213×expm1-udef_binary64
213×log1p-udef_binary64
192×pow3_binary64
191×log-pow_binary64
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01247
124738
2271838
3494538
4497738
5494338
Stop Event
node limit
Counts
3 → 54
Calls

3 calls:

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

simplify73.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
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
01181983
13551812
213011780
349681780
455771780
Stop Event
node limit
Counts
138 → 107

prune96.0ms (1.2%)

Pruning

7 alts after pruning (6 fresh and 1 done)

PrunedKeptTotal
New1052107
Fresh347
Picked011
Done101
Total1097116
Error
0.0b
Counts
116 → 7
Alt Table
StatusErrorProgram
0.4b
(*.f64 (cos.f64 th) (+.f64 (*.f64 (sqrt.f64 1/2) (pow.f64 a1 2)) (*.f64 (sqrt.f64 1/2) (pow.f64 a2 2))))
10.9b
(expm1.f64 (log1p.f64 (*.f64 (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (sqrt.f64 2)) (cos.f64 th))))
0.5b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
0.8b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
0.5b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
Compiler

Compiled 2536 to 1644 computations (35.2% saved)

localize10.0ms (0.1%)

Local error

Found 3 expressions with local error:

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

series51.0ms (0.7%)

Counts
3 → 28
Calls

3 calls:

40.0ms
(*.f64 (cos.f64 th) (+.f64 (*.f64 (sqrt.f64 1/2) (pow.f64 a1 2)) (*.f64 (sqrt.f64 1/2) (pow.f64 a2 2))))
8.0ms
(*.f64 (sqrt.f64 1/2) (pow.f64 a1 2))
4.0ms
(*.f64 (sqrt.f64 1/2) (pow.f64 a2 2))

rewrite58.0ms (0.7%)

Algorithm
batch-egg-rewrite
Rules
456×fma-def_binary64
248×expm1-udef_binary64
248×log1p-udef_binary64
216×fma-neg_binary64
143×add-sqr-sqrt_binary64
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01438
129936
2341236
3489036
Stop Event
node limit
Counts
3 → 93
Calls

3 calls:

56.0ms
(*.f64 (cos.f64 th) (+.f64 (*.f64 (sqrt.f64 1/2) (pow.f64 a1 2)) (*.f64 (sqrt.f64 1/2) (pow.f64 a2 2))))
56.0ms
(*.f64 (sqrt.f64 1/2) (pow.f64 a1 2))
56.0ms
(*.f64 (sqrt.f64 1/2) (pow.f64 a2 2))

simplify50.0ms (0.6%)

Algorithm
egg-herbie
Rules
541×fma-def_binary64
529×distribute-rgt-neg-in_binary64
495×distribute-lft-neg-in_binary64
463×associate-*l*_binary64
444×associate-*r*_binary64
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
066873
1186626
2688594
33349594
45261594
Stop Event
node limit
Counts
121 → 110

prune96.0ms (1.2%)

Pruning

8 alts after pruning (6 fresh and 2 done)

PrunedKeptTotal
New1091110
Fresh055
Picked011
Done011
Total1098117
Error
0.0b
Counts
117 → 8
Alt Table
StatusErrorProgram
0.4b
(*.f64 (cos.f64 th) (+.f64 (*.f64 (sqrt.f64 1/2) (pow.f64 a1 2)) (*.f64 (sqrt.f64 1/2) (pow.f64 a2 2))))
10.9b
(expm1.f64 (log1p.f64 (*.f64 (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (sqrt.f64 2)) (cos.f64 th))))
0.5b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
0.8b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
0.5b
(fma.f64 (*.f64 a1 (pow.f64 1/2 1/4)) (*.f64 (*.f64 a1 (pow.f64 1/2 1/4)) (cos.f64 th)) (*.f64 (*.f64 (sqrt.f64 1/2) (*.f64 a2 a2)) (cos.f64 th)))
0.5b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
Compiler

Compiled 2752 to 1628 computations (40.8% saved)

localize9.0ms (0.1%)

Local error

Found 3 expressions with local error:

NewErrorProgram
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))

series152.0ms (1.9%)

Counts
3 → 84
Calls

3 calls:

83.0ms
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
49.0ms
(*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)))
20.0ms
(/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))

rewrite55.0ms (0.7%)

Algorithm
batch-egg-rewrite
Rules
586×log-prod_binary64
207×expm1-udef_binary64
207×log1p-udef_binary64
188×log-pow_binary64
132×log-div_binary64
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01344
125038
2287638
3512338
Stop Event
node limit
Counts
3 → 107
Calls

3 calls:

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

simplify76.0ms (1%)

Algorithm
egg-herbie
Rules
579×fma-neg_binary64
478×times-frac_binary64
376×associate-/l*_binary64
349×associate-*r*_binary64
297×associate-*l*_binary64
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
01172107
13332029
211331969
347981969
452671969
Stop Event
node limit
Counts
191 → 158

prune125.0ms (1.6%)

Pruning

8 alts after pruning (6 fresh and 2 done)

PrunedKeptTotal
New1553158
Fresh235
Picked101
Done022
Total1588166
Error
0b
Counts
166 → 8
Alt Table
StatusErrorProgram
0.7b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
0.5b
(/.f64 (*.f64 (hypot.f64 a1 a2) (cos.f64 th)) (/.f64 (sqrt.f64 2) (hypot.f64 a1 a2)))
0.5b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
0.5b
(/.f64 (*.f64 (*.f64 (hypot.f64 a1 a2) (cos.f64 th)) (hypot.f64 a1 a2)) (sqrt.f64 2))
0.8b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
0.5b
(*.f64 (cos.f64 th) (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (sqrt.f64 2)))
0.4b
(*.f64 (cos.f64 th) (+.f64 (*.f64 (sqrt.f64 1/2) (pow.f64 a1 2)) (*.f64 (sqrt.f64 1/2) (pow.f64 a2 2))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
Compiler

Compiled 3480 to 2194 computations (37% saved)

regimes811.0ms (10.4%)

Accuracy

Total 0.4b remaining (97.8%)

Threshold costs 0.4b (97.8%)

Counts
100 → 1
Compiler

Compiled 13314 to 10366 computations (22.1% saved)

simplify3.0ms (0%)

Algorithm
egg-herbie
Rules
*-commutative_binary64
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01221
11521
21521
Stop Event
saturated

end128.0ms (1.6%)

Remove

(sort a1 a2)

Compiler

Compiled 195 to 136 computations (30.3% saved)

Profiling

Loading profile data...