Details

Time bar (total: 7.6s)

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

Symmetry

(sort a1 a2)

Results
1.2s1887×body1024valid
1.1s1574×body1024invalid
807.0ms4966×body128valid
430.0ms916×body512valid
344.0ms827×body512invalid
139.0ms479×body256valid
120.0ms399×body256invalid
111.0ms668×body128invalid
8.0msbody2048valid
1.0msbody2048invalid
Compiler

Compiled 68 to 47 computations (30.9% saved)

simplify8.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

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

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

rewrite82.0ms (1.1%)

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:

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

simplify71.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

prune135.0ms (1.8%)

Pruning

7 alts after pruning (7 fresh and 0 done)

PrunedKeptTotal
New84690
Fresh011
Picked101
Done000
Total85792
Error
0b
Counts
92 → 7
Alt Table
StatusErrorProgram
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.6b
(+.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 (*.f64 (neg.f64 (pow.f64 (hypot.f64 a1 a2) 2)) (cos.f64 th)) (neg.f64 (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 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
0.7b
(*.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.6b
(/.f64 (cos.f64 th) (/.f64 (sqrt.f64 2) (pow.f64 (hypot.f64 a1 a2) 2)))
Compiler

Compiled 1857 to 1237 computations (33.4% saved)

localize9.0ms (0.1%)

Local error

Found 3 expressions with local error:

NewErrorProgram
0.2b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.3b
(*.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))

series160.0ms (2.1%)

Counts
3 → 84
Calls

3 calls:

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

rewrite110.0ms (1.4%)

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:

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

Useful iterations: 0 (0.0ms)

IterNodesCost
01247
124738
2271838
3494538
4497738
5494338
000
100

simplify78.0ms (1%)

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

prune79.0ms (1%)

Pruning

6 alts after pruning (5 fresh and 1 done)

PrunedKeptTotal
New1052107
Fresh336
Picked011
Done000
Total1086114
Error
0b
Counts
114 → 6
Alt Table
StatusErrorProgram
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 (sqrt.f64 1/2) (fma.f64 a2 a2 (*.f64 a1 a1))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.6b
(+.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 (*.f64 (neg.f64 (pow.f64 (hypot.f64 a1 a2) 2)) (cos.f64 th)) (neg.f64 (sqrt.f64 2)))
0.4b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
Compiler

Compiled 2512 to 1614 computations (35.7% saved)

localize8.0ms (0.1%)

Local error

Found 3 expressions with local error:

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

series61.0ms (0.8%)

Counts
3 → 84
Calls

3 calls:

40.0ms
(*.f64 (cos.f64 th) (*.f64 (sqrt.f64 1/2) (fma.f64 a2 a2 (*.f64 a1 a1))))
14.0ms
(*.f64 (sqrt.f64 1/2) (fma.f64 a2 a2 (*.f64 a1 a1)))
7.0ms
(fma.f64 a2 a2 (*.f64 a1 a1))

rewrite53.0ms (0.7%)

Algorithm
batch-egg-rewrite
Rules
906×log1p-expm1-u_binary64
906×expm1-log1p-u_binary64
106×add-sqr-sqrt_binary64
102×prod-diff_binary64
99×add-log-exp_binary64
Counts
3 → 57
Calls

3 calls:

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

Useful iterations: 0 (0.0ms)

IterNodesCost
01139
121736
2238036
3572536
000
100

simplify58.0ms (0.8%)

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
141 → 86
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
0711417
11871226
26951194
333501194
452621194

prune92.0ms (1.2%)

Pruning

6 alts after pruning (4 fresh and 2 done)

PrunedKeptTotal
New86086
Fresh044
Picked011
Done011
Total86692
Error
0b
Counts
92 → 6
Alt Table
StatusErrorProgram
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 (sqrt.f64 1/2) (fma.f64 a2 a2 (*.f64 a1 a1))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.6b
(+.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 (*.f64 (neg.f64 (pow.f64 (hypot.f64 a1 a2) 2)) (cos.f64 th)) (neg.f64 (sqrt.f64 2)))
0.4b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
Compiler

Compiled 1609 to 1010 computations (37.2% saved)

localize8.0ms (0.1%)

Local error

Found 3 expressions with local error:

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

series95.0ms (1.3%)

Counts
2 → 44
Calls

2 calls:

90.0ms
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
5.0ms
(*.f64 (sqrt.f64 1/2) (cos.f64 th))

rewrite50.0ms (0.7%)

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 → 32
Calls

2 calls:

49.0ms
(*.f64 (sqrt.f64 1/2) (cos.f64 th))
49.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

simplify55.0ms (0.7%)

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
76 → 58
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
0831145
1223892
2798852
33699852
45161852

prune60.0ms (0.8%)

Pruning

6 alts after pruning (3 fresh and 3 done)

PrunedKeptTotal
New87087
Fresh033
Picked011
Done022
Total87693
Error
0b
Counts
93 → 6
Alt Table
StatusErrorProgram
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 (sqrt.f64 1/2) (fma.f64 a2 a2 (*.f64 a1 a1))))
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
0.6b
(+.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 (*.f64 (neg.f64 (pow.f64 (hypot.f64 a1 a2) 2)) (cos.f64 th)) (neg.f64 (sqrt.f64 2)))
0.4b
(*.f64 (fma.f64 a2 a2 (*.f64 a1 a1)) (*.f64 (sqrt.f64 1/2) (cos.f64 th)))
Compiler

Compiled 1643 to 993 computations (39.6% saved)

regimes767.0ms (10.1%)

Accuracy

Total 0.4b remaining (94.5%)

Threshold costs 0.4b (94.5%)

Counts
85 → 1
Compiler

Compiled 11222 to 8847 computations (21.2% saved)

simplify2.0ms (0%)

Algorithm
egg-herbie
Rules
*-commutative_binary64
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01221
11521
21521

end96.0ms (1.3%)

Remove

(sort a1 a2)

Compiler

Compiled 171 to 115 computations (32.7% saved)

Profiling

Loading profile data...