Details

Time bar (total: 8.5s)

analyze1.1s (12.5%)

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.2s (49.7%)

Symmetry

(sort a1 a2)

Results
1.2s1802×body1024valid
1.0s1565×body1024invalid
828.0ms5057×body128valid
384.0ms910×body512valid
331.0ms788×body512invalid
143.0ms384×body256invalid
142.0ms474×body256valid
107.0ms642×body128invalid
14.0ms13×body2048valid
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.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)

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

series120.0ms (1.4%)

Counts
2 → 60
Calls

2 calls:

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

rewrite53.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
Counts
2 → 70
Calls

2 calls:

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

Useful iterations: 1 (0.0ms)

IterNodesCost
01131
122329
2259529
3500629

simplify72.0ms (0.8%)

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

prune98.0ms (1.2%)

Pruning

8 alts after pruning (8 fresh and 0 done)

PrunedKeptTotal
New85792
Fresh011
Picked101
Done000
Total86894
Error
0b
Counts
94 → 8
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 (*.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 (pow.f64 (hypot.f64 a1 a2) 2) (pow.f64 2 -1/2)))
0.6b
(*.f64 (cos.f64 th) (pow.f64 (/.f64 (hypot.f64 a1 a2) (pow.f64 2 1/4)) 2))
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))))
1.1b
(/.f64 (/.f64 (*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (cos.f64 th)) (cbrt.f64 2)) (cbrt.f64 (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 1905 to 1269 computations (33.4% saved)

localize10.0ms (0.1%)

Local error

Found 3 expressions with local error:

NewErrorProgram
0.0b
(+.f64 (pow.f64 a1 2) (pow.f64 a2 2))
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))

series83.0ms (1%)

Counts
3 → 70
Calls

3 calls:

51.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))
7.0ms
(+.f64 (pow.f64 a1 2) (pow.f64 a2 2))

rewrite69.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
3 → 103
Calls

3 calls:

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

Useful iterations: 1 (0.0ms)

IterNodesCost
01245
125836
2312836
3492436

simplify83.0ms (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
173 → 136
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
0831646
12301562
28521229
338691229
448891229
549791229

prune114.0ms (1.3%)

Pruning

6 alts after pruning (6 fresh and 0 done)

PrunedKeptTotal
New1333136
Fresh437
Picked101
Done000
Total1386144
Error
0b
Counts
144 → 6
Alt Table
StatusErrorProgram
0.4b
(*.f64 (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (/.f64 (sqrt.f64 2) (cos.f64 th))) 1)
0.5b
(*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (*.f64 (cos.f64 th) (pow.f64 2 -1/2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 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)))
13.7b
(pow.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 (/.f64 (sqrt.f64 2) (cos.f64 th)))) 2)
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
Compiler

Compiled 2745 to 1704 computations (37.9% saved)

localize9.0ms (0.1%)

Local error

Found 4 expressions with local error:

NewErrorProgram
0.0b
(hypot.f64 a1 a2)
0.0b
(pow.f64 (hypot.f64 a1 a2) 2)
0.2b
(/.f64 (sqrt.f64 2) (cos.f64 th))
0.3b
(/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (/.f64 (sqrt.f64 2) (cos.f64 th)))

series146.0ms (1.7%)

Counts
4 → 88
Calls

4 calls:

91.0ms
(/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (/.f64 (sqrt.f64 2) (cos.f64 th)))
38.0ms
(pow.f64 (hypot.f64 a1 a2) 2)
9.0ms
(hypot.f64 a1 a2)
7.0ms
(/.f64 (sqrt.f64 2) (cos.f64 th))

rewrite70.0ms (0.8%)

Algorithm
batch-egg-rewrite
Rules
569×log-prod_binary64
201×expm1-udef_binary64
201×log1p-udef_binary64
184×log-pow_binary64
151×egg-rr
Counts
4 → 151
Calls

4 calls:

65.0ms
(hypot.f64 a1 a2)
65.0ms
(pow.f64 (hypot.f64 a1 a2) 2)
65.0ms
(/.f64 (sqrt.f64 2) (cos.f64 th))
65.0ms
(/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (/.f64 (sqrt.f64 2) (cos.f64 th)))
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01136
123336
2279236
3512436

simplify73.0ms (0.9%)

Algorithm
egg-herbie
Rules
973×fma-neg_binary64
350×associate-*r*_binary64
318×fma-def_binary64
303×associate-*l*_binary64
254×associate-/l*_binary64
Counts
239 → 208
Iterations

Useful iterations: 2 (0.0ms)

IterNodesCost
01211937
13411879
211081505
348171505
456941505

prune168.0ms (2%)

Pruning

6 alts after pruning (5 fresh and 1 done)

PrunedKeptTotal
New2080208
Fresh055
Picked011
Done000
Total2086214
Error
0b
Counts
214 → 6
Alt Table
StatusErrorProgram
0.4b
(*.f64 (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (/.f64 (sqrt.f64 2) (cos.f64 th))) 1)
0.5b
(*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (*.f64 (cos.f64 th) (pow.f64 2 -1/2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 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)))
13.7b
(pow.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 (/.f64 (sqrt.f64 2) (cos.f64 th)))) 2)
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
Compiler

Compiled 4440 to 2907 computations (34.5% 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) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
0.3b
(*.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))

series155.0ms (1.8%)

Counts
3 → 84
Calls

3 calls:

88.0ms
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))))
50.0ms
(*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 a2) (sqrt.f64 2)))
17.0ms
(/.f64 (hypot.f64 a1 a2) (sqrt.f64 2))

rewrite65.0ms (0.8%)

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
Counts
3 → 109
Calls

3 calls:

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
01344
125038
2287638
3512338

simplify78.0ms (0.9%)

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

Useful iterations: 2 (0.0ms)

IterNodesCost
01172107
13332029
211331969
347981969
452671969

prune232.0ms (2.7%)

Pruning

6 alts after pruning (4 fresh and 2 done)

PrunedKeptTotal
New2700270
Fresh044
Picked011
Done011
Total2706276
Error
0b
Counts
276 → 6
Alt Table
StatusErrorProgram
0.4b
(*.f64 (/.f64 (pow.f64 (hypot.f64 a1 a2) 2) (/.f64 (sqrt.f64 2) (cos.f64 th))) 1)
0.5b
(*.f64 (pow.f64 (hypot.f64 a1 a2) 2) (*.f64 (cos.f64 th) (pow.f64 2 -1/2)))
0.4b
(*.f64 (cos.f64 th) (*.f64 (/.f64 (hypot.f64 a1 a2) 1) (/.f64 (hypot.f64 a1 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)))
13.7b
(pow.f64 (/.f64 (hypot.f64 a1 a2) (sqrt.f64 (/.f64 (sqrt.f64 2) (cos.f64 th)))) 2)
0.4b
(*.f64 (cos.f64 th) (*.f64 (hypot.f64 a1 a2) (*.f64 (hypot.f64 a1 a2) (pow.f64 2 -1/2))))
Compiler

Compiled 6074 to 3655 computations (39.8% saved)

regimes1.4s (16.2%)

Accuracy

Total 0.4b remaining (89.8%)

Threshold costs 0.4b (89.8%)

Counts
153 → 1
Compiler

Compiled 20272 to 15736 computations (22.4% saved)

simplify2.0ms (0%)

Algorithm
egg-herbie
Rules
*-commutative_binary64
*-rgt-identity_binary64
1-exp_binary64
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
01421
11721
21621

end109.0ms (1.3%)

Remove

(sort a1 a2)

Compiler

Compiled 171 to 123 computations (28.1% saved)

Profiling

Loading profile data...