Details

Time bar (total: 3.9s)

sample27.0ms

Algorithm
intervals
Results
6.0ms177×body80valid
5.0ms26×body2560valid
3.0ms20×body1280valid
2.0msbody5120valid
1.0ms10×body640valid
1.0msbody320valid
0.0msbody160valid

simplify5.0ms

Algorithm
egg-herbie
Counts
1 → 1
Iterations

Useful iterations: 0 (1.0ms)

IterNodesCost
0228
1248
2248

prune2.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 40.8b

localize10.0ms

Local error

Found 3 expressions with local error:

0.0b
(+ (* re re) (* im im))
1.8b
(+ (sqrt (+ (* re re) (* im im))) re)
29.2b
(sqrt (+ (* re re) (* im im)))

rewrite15.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
*-un-lft-identity
add-sqr-sqrt
pow1 add-cube-cbrt
add-exp-log flip3-+ sqrt-prod add-cbrt-cube flip-+
+-commutative sqrt-div sum-log
rem-sqrt-square sqrt-pow1 pow1/2 distribute-lft-out
Counts
3 → 38
Calls
3 calls:
4.0ms
(+ (* re re) (* im im))
6.0ms
(+ (sqrt (+ (* re re) (* im im))) re)
4.0ms
(sqrt (+ (* re re) (* im im)))

series108.0ms

Counts
3 → 9
Calls
3 calls:
26.0ms
(+ (* re re) (* im im))
43.0ms
(+ (sqrt (+ (* re re) (* im im))) re)
39.0ms
(sqrt (+ (* re re) (* im im)))

simplify66.0ms

Algorithm
egg-herbie
Counts
47 → 47
Iterations

Useful iterations: 3 (57.0ms)

IterNodesCost
0178275
1689252
22704248
35001246

prune141.0ms

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 18.0b

localize13.0ms

Local error

Found 4 expressions with local error:

0.5b
(- (sqrt (+ (* re re) (* im im))) re)
6.3b
(sqrt (* 2.0 (/ (pow im 2) (- (sqrt (+ (* re re) (* im im))) re))))
20.4b
(/ (pow im 2) (- (sqrt (+ (* re re) (* im im))) re))
29.2b
(sqrt (+ (* re re) (* im im)))

rewrite42.0ms

Algorithm
rewrite-expression-head
Rules
69×add-sqr-sqrt
48×*-un-lft-identity times-frac
28×add-cube-cbrt
21×unpow-prod-down
20×difference-of-squares
14×sqrt-prod
10×distribute-lft-out--
add-exp-log
pow1 associate-/l*
unpow2 sqr-pow
associate-/r* add-cbrt-cube add-log-exp
sqrt-pow1 sqrt-div div-exp
flip3-- pow1/2 associate-/r/ flip--
cbrt-undiv pow-to-exp sub-neg rem-sqrt-square frac-2neg flip3-+ diff-log associate-*r/ pow-prod-down pow-exp clear-num flip-+ div-inv
Counts
4 → 120
Calls
4 calls:
7.0ms
(- (sqrt (+ (* re re) (* im im))) re)
15.0ms
(sqrt (* 2.0 (/ (pow im 2) (- (sqrt (+ (* re re) (* im im))) re))))
12.0ms
(/ (pow im 2) (- (sqrt (+ (* re re) (* im im))) re))
4.0ms
(sqrt (+ (* re re) (* im im)))

series347.0ms

Counts
4 → 12
Calls
4 calls:
49.0ms
(- (sqrt (+ (* re re) (* im im))) re)
190.0ms
(sqrt (* 2.0 (/ (pow im 2) (- (sqrt (+ (* re re) (* im im))) re))))
73.0ms
(/ (pow im 2) (- (sqrt (+ (* re re) (* im im))) re))
34.0ms
(sqrt (+ (* re re) (* im im)))

simplify52.0ms

Algorithm
egg-herbie
Counts
132 → 132
Iterations

Useful iterations: 2 (39.0ms)

IterNodesCost
04471428
115821323
250011313

prune308.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 13.8b

localize18.0ms

Local error

Found 4 expressions with local error:

0.0b
(/ (pow im (/ 2 2)) (/ (- (sqrt (+ (* re re) (* im im))) re) im))
0.5b
(- (sqrt (+ (* re re) (* im im))) re)
6.3b
(sqrt (* 2.0 (/ (pow im (/ 2 2)) (/ (- (sqrt (+ (* re re) (* im im))) re) im))))
29.2b
(sqrt (+ (* re re) (* im im)))

rewrite61.0ms

Algorithm
rewrite-expression-head
Rules
298×times-frac
232×add-sqr-sqrt
181×*-un-lft-identity
131×add-cube-cbrt
69×unpow-prod-down
50×difference-of-squares
29×sqrt-prod
25×distribute-lft-out--
23×sqr-pow
22×associate-/r*
17×add-exp-log
div-exp add-cbrt-cube div-inv
pow1
associate-/l*
add-log-exp
cbrt-undiv sqrt-pow1 sqrt-div
pow-to-exp pow1/2 pow-exp
sub-neg rem-sqrt-square flip3-- frac-2neg flip3-+ diff-log associate-*r/ pow-prod-down clear-num associate-/r/ flip-- flip-+
Counts
4 → 244
Calls
4 calls:
15.0ms
(/ (pow im (/ 2 2)) (/ (- (sqrt (+ (* re re) (* im im))) re) im))
7.0ms
(- (sqrt (+ (* re re) (* im im))) re)
18.0ms
(sqrt (* 2.0 (/ (pow im (/ 2 2)) (/ (- (sqrt (+ (* re re) (* im im))) re) im))))
4.0ms
(sqrt (+ (* re re) (* im im)))

series355.0ms

Counts
4 → 12
Calls
4 calls:
74.0ms
(/ (pow im (/ 2 2)) (/ (- (sqrt (+ (* re re) (* im im))) re) im))
49.0ms
(- (sqrt (+ (* re re) (* im im))) re)
192.0ms
(sqrt (* 2.0 (/ (pow im (/ 2 2)) (/ (- (sqrt (+ (* re re) (* im im))) re) im))))
40.0ms
(sqrt (+ (* re re) (* im im)))

simplify139.0ms

Algorithm
egg-herbie
Counts
256 → 256
Iterations

Useful iterations: 1 (20.0ms)

IterNodesCost
09123659
142803320
250013320

prune431.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 10.9b

localize17.0ms

Local error

Found 4 expressions with local error:

0.0b
(* (fabs im) (/ (fabs im) (- (sqrt (+ (* re re) (* im im))) re)))
0.5b
(- (sqrt (+ (* re re) (* im im))) re)
6.3b
(sqrt (* 2.0 (* (fabs im) (/ (fabs im) (- (sqrt (+ (* re re) (* im im))) re)))))
29.2b
(sqrt (+ (* re re) (* im im)))

rewrite40.0ms

Algorithm
rewrite-expression-head
Rules
38×add-sqr-sqrt
24×*-un-lft-identity associate-*r*
19×times-frac
16×add-cube-cbrt
13×pow1
add-exp-log add-cbrt-cube
sqrt-prod difference-of-squares
add-log-exp
sqrt-pow1 pow-prod-down distribute-lft-out--
sqrt-div associate-*r/ associate-*l*
flip3-- pow1/2 prod-exp associate-/r/ flip-- cbrt-unprod unswap-sqr
cbrt-undiv sub-neg rem-sqrt-square flip3-+ diff-log div-exp *-commutative flip-+ div-inv
Counts
4 → 86
Calls
4 calls:
14.0ms
(* (fabs im) (/ (fabs im) (- (sqrt (+ (* re re) (* im im))) re)))
7.0ms
(- (sqrt (+ (* re re) (* im im))) re)
11.0ms
(sqrt (* 2.0 (* (fabs im) (/ (fabs im) (- (sqrt (+ (* re re) (* im im))) re)))))
4.0ms
(sqrt (+ (* re re) (* im im)))

series328.0ms

Counts
4 → 12
Calls
4 calls:
83.0ms
(* (fabs im) (/ (fabs im) (- (sqrt (+ (* re re) (* im im))) re)))
51.0ms
(- (sqrt (+ (* re re) (* im im))) re)
155.0ms
(sqrt (* 2.0 (* (fabs im) (/ (fabs im) (- (sqrt (+ (* re re) (* im im))) re)))))
39.0ms
(sqrt (+ (* re re) (* im im)))

simplify58.0ms

Algorithm
egg-herbie
Counts
98 → 98
Iterations

Useful iterations: 2 (49.0ms)

IterNodesCost
0487944
12188844
25001836

prune273.0ms

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 10.9b

regimes197.0ms

Accuracy

59.1% (12.1b remaining)

Error of 23.2b against oracle of 11.1b and baseline of 40.7b

bsearch152.0ms

Steps
ItersRangePoint
10
7.491092794297452e+92
1.1133938054187134e+105
2.37750825737912e+102
10
3.881047267995072e-257
1.772377591316065e-238
1.4937844730964523e-255
7
-1.5405955983178716e+163
-1.652330989326774e+161
-1.6813323895701712e+161

simplify2.0ms

Algorithm
egg-herbie
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
06134
16334
26334

end0.0ms

sample670.0ms

Algorithm
intervals
Results
211.0ms6080×body80valid
140.0ms699×body2560valid
71.0ms447×body1280valid
63.0ms262×body5120valid
33.0ms266×body640valid
14.0ms154×body320valid
6.0ms92×body160valid