Details

Time bar (total: 7.5s)

analyze1.0s (13.8%)

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.3s (57.8%)

Symmetry

(sort a1 a2)

Results
1.2s1851×body1024valid
1.1s1588×body1024invalid
839.0ms5017×body128valid
386.0ms919×body512valid
337.0ms778×body512invalid
156.0ms461×body256valid
122.0ms420×body256invalid
114.0ms664×body128invalid
8.0msbody2048valid
Compiler

Compiled 68 to 47 computations (30.9% saved)

simplify9.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
25818
38818
411518
513518
615218
717018
817218
Stop Event
saturated
Counts
1 → 2

prune5.0ms (0.1%)

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

series73.0ms (1%)

Counts
2 → 60
Calls

2 calls:

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

rewrite45.0ms (0.6%)

Algorithm
batch-egg-rewrite
Rules
523×log-prod_binary64
195×expm1-udef_binary64
195×log1p-udef_binary64
182×pow3_binary64
181×log-pow_binary64
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01131
122429
2274429
Stop Event
node limit
Counts
2 → 65
Calls

2 calls:

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

simplify44.0ms (0.6%)

Algorithm
egg-herbie
Rules
488×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
12011259
26041215
327571173
Stop Event
node limit
Counts
125 → 87

prune88.0ms (1.2%)

Pruning

9 alts after pruning (9 fresh and 0 done)

PrunedKeptTotal
New78987
Fresh101
Picked101
Done000
Total80989
Error
0.0b
Counts
89 → 9
Alt Table
StatusErrorProgram
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 (/.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 (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th)) (sqrt.f64 2))
0.5b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (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))))
11.1b
(expm1.f64 (log1p.f64 (/.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 (*.f64 a2 a2) (sqrt.f64 2)) (*.f64 (/.f64 a1 (sqrt.f64 2)) a1)))
0.5b
(*.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (/.f64 (cos.f64 th) (sqrt.f64 2)))
Compiler

Compiled 1862 to 1249 computations (32.9% saved)

localize10.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))

series144.0ms (1.9%)

Counts
3 → 84
Calls

3 calls:

81.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)))
17.0ms
(*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))

rewrite50.0ms (0.7%)

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

Useful iterations: 1 (0.0ms)

IterNodesCost
01247
124738
2287638
Stop Event
node limit
Counts
3 → 54
Calls

3 calls:

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

simplify45.0ms (0.6%)

Algorithm
egg-herbie
Rules
672×fma-def_binary64
605×associate-*l*_binary64
419×cancel-sign-sub-inv_binary64
302×times-frac_binary64
228×associate-/l*_binary64
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
01181983
13891812
214081780
Stop Event
node limit
Counts
138 → 107

prune100.0ms (1.3%)

Pruning

7 alts after pruning (6 fresh and 1 done)

PrunedKeptTotal
New1052107
Fresh448
Picked011
Done000
Total1097116
Error
0.0b
Counts
116 → 7
Alt Table
StatusErrorProgram
0.5b
(*.f64 (+.f64 (pow.f64 a1 2) (pow.f64 a2 2)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
11.1b
(expm1.f64 (log1p.f64 (/.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.8b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
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 (*.f64 a2 a2) (sqrt.f64 2)) (*.f64 (/.f64 a1 (sqrt.f64 2)) a1)))
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))))
Compiler

Compiled 2548 to 1658 computations (34.9% saved)

localize11.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))

series55.0ms (0.7%)

Counts
3 → 28
Calls

3 calls:

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

rewrite56.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
130036
2379336
Stop Event
node limit
Counts
3 → 89
Calls

3 calls:

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

simplify40.0ms (0.5%)

Algorithm
egg-herbie
Rules
541×fma-def_binary64
456×associate-*l*_binary64
440×associate-*r*_binary64
374×cancel-sign-sub-inv_binary64
310×sub-neg_binary64
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
066873
1212626
2770594
34668594
Stop Event
node limit
Counts
117 → 106

prune87.0ms (1.2%)

Pruning

8 alts after pruning (6 fresh and 2 done)

PrunedKeptTotal
New1042106
Fresh145
Picked011
Done011
Total1058113
Error
0.0b
Counts
113 → 8
Alt Table
StatusErrorProgram
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 (sqrt.f64 1/2) (*.f64 (*.f64 a2 a2) (cos.f64 th))))
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.5b
(*.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (*.f64 (sqrt.f64 1/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.8b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
11.1b
(expm1.f64 (log1p.f64 (/.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 (*.f64 a2 a2) (sqrt.f64 2)) (*.f64 (/.f64 a1 (sqrt.f64 2)) a1)))
Compiler

Compiled 2680 to 1517 computations (43.4% saved)

localize10.0ms (0.1%)

Local error

Found 4 expressions with local error:

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

series81.0ms (1.1%)

Counts
4 → 60
Calls

4 calls:

59.0ms
(*.f64 (cos.f64 th) (+.f64 (/.f64 (*.f64 a2 a2) (sqrt.f64 2)) (*.f64 (/.f64 a1 (sqrt.f64 2)) a1)))
8.0ms
(/.f64 a1 (sqrt.f64 2))
7.0ms
(/.f64 (*.f64 a2 a2) (sqrt.f64 2))
7.0ms
(*.f64 (/.f64 a1 (sqrt.f64 2)) a1)

rewrite61.0ms (0.8%)

Algorithm
batch-egg-rewrite
Rules
252×expm1-udef_binary64
252×log1p-udef_binary64
222×fma-neg_binary64
143×add-sqr-sqrt_binary64
136×log1p-expm1-u_binary64
Iterations

Useful iterations: 1 (0.0ms)

IterNodesCost
01349
128647
2412747
Stop Event
node limit
Counts
4 → 115
Calls

4 calls:

59.0ms
(*.f64 (cos.f64 th) (+.f64 (/.f64 (*.f64 a2 a2) (sqrt.f64 2)) (*.f64 (/.f64 a1 (sqrt.f64 2)) a1)))
59.0ms
(*.f64 (/.f64 a1 (sqrt.f64 2)) a1)
59.0ms
(/.f64 (*.f64 a2 a2) (sqrt.f64 2))
59.0ms
(/.f64 a1 (sqrt.f64 2))

simplify40.0ms (0.5%)

Algorithm
egg-herbie
Rules
485×associate-/r/_binary64
338×unswap-sqr_binary64
331×fma-neg_binary64
276×sub-neg_binary64
205×associate-/l/_binary64
Iterations

Useful iterations: 3 (0.0ms)

IterNodesCost
0641250
11961250
25981076
327451046
Stop Event
node limit
Counts
175 → 134

prune112.0ms (1.5%)

Pruning

8 alts after pruning (5 fresh and 3 done)

PrunedKeptTotal
New1340134
Fresh055
Picked011
Done022
Total1348142
Error
0.0b
Counts
142 → 8
Alt Table
StatusErrorProgram
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 (sqrt.f64 1/2) (*.f64 (*.f64 a2 a2) (cos.f64 th))))
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.5b
(*.f64 (fma.f64 a1 a1 (*.f64 a2 a2)) (*.f64 (sqrt.f64 1/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.8b
(/.f64 1 (/.f64 (sqrt.f64 2) (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th))))
11.1b
(expm1.f64 (log1p.f64 (/.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 (*.f64 a2 a2) (sqrt.f64 2)) (*.f64 (/.f64 a1 (sqrt.f64 2)) a1)))
Compiler

Compiled 3061 to 1999 computations (34.7% saved)

regimes823.0ms (11%)

Accuracy

Total 0.3b remaining (95.5%)

Threshold costs 0.3b (95.5%)

Counts
101 → 1
Compiler

Compiled 13931 to 10821 computations (22.3% saved)

simplify2.0ms (0%)

Algorithm
egg-herbie
Rules
*-commutative_binary64
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01323
11623
Stop Event
saturated

end132.0ms (1.8%)

Remove

(sort a1 a2)

Compiler

Compiled 218 to 156 computations (28.4% saved)

Profiling

Loading profile data...