Average Error: 0.5 → 0.5
Time: 4.3m
Precision: 64
Internal Precision: 128
\[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\]
\[x1 + \left(\left(\left(\left(\left(\left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(x1 \cdot x1\right)\right) + x1 \cdot \left(-6 \cdot x1\right)\right) \cdot \left(1 + x1 \cdot x1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right)\]

Error

Bits error versus x1

Bits error versus x2

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \color{blue}{\left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(-6\right)\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\]
  4. Applied distribute-lft-in0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot \left(-6\right)\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\]
  5. Applied associate-+r+0.5

    \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\right) + \left(x1 \cdot x1\right) \cdot \left(-6\right)\right)} \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\]
  6. Simplified0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\right) + \color{blue}{x1 \cdot \left(x1 \cdot -6\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\]
  7. Final simplification0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(x1 \cdot x1\right)\right) + x1 \cdot \left(-6 \cdot x1\right)\right) \cdot \left(1 + x1 \cdot x1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right)\]

Reproduce

herbie shell --seed 2019016 +o rules:numerics
(FPCore (x1 x2)
  :name "Rosa's FloatVsDoubleBenchmark"
  (+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))) (+ (* x1 x1) 1)) (* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* (* x1 x1) x1)) x1) (* 3 (/ (- (- (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))))))

Details

Time bar (total: 4.3m)Debug log

sample948.0ms

Algorithm
intervals
Results
492×(pre true 80)
462×(body real 80)
(body real 1280)
(body real 320)
(body real 160)
(body real 640)

simplify426.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
425.0ms
(+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))) (+ (* x1 x1) 1)) (* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* (* x1 x1) x1)) x1) (* 3 (/ (- (- (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))))

prune79.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.5b

localize194.0ms

Local error

Found 4 expressions with local error:

8.4b
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3)) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1))))))
5.8b
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))
3.7b
(- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3))
0.7b
(/ (- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3)) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))))

rewrite154.0ms

Algorithm
rewrite-expression-head
Rules
192×times-frac
185×add-sqr-sqrt
140×*-un-lft-identity
110×add-cube-cbrt
39×prod-diff
30×difference-of-squares
15×distribute-lft-out--
13×div-inv
13×fma-neg
13×associate-/r*
11×add-exp-log
11×add-cbrt-cube
add-log-exp
associate-/l*
pow1
associate-*l*
associate-/l/
log1p-expm1-u
frac-sub
expm1-log1p-u
fma-udef
associate-*r*
div-exp
cbrt-undiv
flip--
flip-+
associate-/r/
flip3--
flip3-+
associate--r+
cbrt-unprod
*-commutative
prod-exp
associate-*l/
pow-prod-down
div-sub
diff-log
distribute-lft-in
frac-2neg
sub-neg
clear-num
distribute-rgt-in
Counts
4 → 225
Calls
4 calls:
Slowest
87.0ms
(/ (- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3)) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))))
45.0ms
(- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3))
7.0ms
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))
3.0ms
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3)) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1))))))

series421.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
185.0ms
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3)) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1))))))
153.0ms
(/ (- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3)) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))))
49.0ms
(- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3))
33.0ms
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))

simplify1.1m

Counts
307 → 237
Calls
307 calls:
Slowest
717.0ms
(/ (sqrt (- (/ (fma x1 (* 3 x1) (* x2 2)) (fma x1 x1 1)) (+ (/ x1 (fma x1 x1 1)) 3))) (/ 1 (sqrt (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1))))))
628.0ms
(/ 1 (/ (sqrt (fma x1 x1 1)) (* (cbrt (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))) (cbrt (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))))))
583.0ms
(- (* (fma x1 (* 3 x1) (* x2 2)) (- (/ x1 (fma x1 x1 1)) 3)) (* (fma x1 x1 1) (- (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (* 3 3))))
575.0ms
(- (* (fma x1 (* 3 x1) (* x2 2)) (- (/ x1 (fma x1 x1 1)) 3)) (* (fma x1 x1 1) (- (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (* 3 3))))
556.0ms
(fma (- (+ (/ x1 (fma x1 x1 1)) 3)) 1 (* (+ (/ x1 (fma x1 x1 1)) 3) 1))

prune8.7s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0.4b

localize79.0ms

Local error

Found 4 expressions with local error:

8.6b
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (* (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))) (* (fma x1 x1 1) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))))))
5.8b
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))
3.8b
(- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))))
0.7b
(/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (* (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))) (* (fma x1 x1 1) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))))))

rewrite88.0ms

Algorithm
rewrite-expression-head
Rules
100×associate-*r/
36×frac-add
32×frac-sub
24×add-exp-log
24×add-cbrt-cube
22×flip-+
22×flip3-+
20×flip--
20×flip3--
20×frac-times
18×associate-/l/
18×associate-/r/
14×associate-*l/
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
cbrt-unprod
prod-exp
div-exp
cbrt-undiv
add-log-exp
pow1
associate-*l*
log1p-expm1-u
expm1-log1p-u
associate-/l*
fma-udef
associate-*r*
times-frac
distribute-lft-in
distribute-rgt-in
associate--r+
div-inv
associate--l+
*-commutative
pow-prod-down
prod-diff
div-sub
diff-log
fma-neg
frac-2neg
sub-neg
associate-/r*
clear-num
Counts
4 → 135
Calls
4 calls:
Slowest
58.0ms
(/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (* (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))) (* (fma x1 x1 1) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))))))
20.0ms
(- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))))
4.0ms
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))
0.0ms
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (* (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))) (* (fma x1 x1 1) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))))))

series808.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
305.0ms
(/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (* (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))) (* (fma x1 x1 1) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))))))
298.0ms
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (* (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))) (* (fma x1 x1 1) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))))))
150.0ms
(- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))))
54.0ms
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))

simplify31.7s

Counts
119 → 147
Calls
119 calls:
Slowest
1.3s
(- (* (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (* (/ x1 (fma x1 x1 1)) x1) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (* 3 3) (* 3 3)) (* (* (/ x1 (fma x1 x1 1)) 3) (* (/ x1 (fma x1 x1 1)) 3)))))) (- (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))) (* (* (fma x1 x1 1) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (pow (/ x1 (fma x1 x1 1)) 3) (pow (/ x1 (fma x1 x1 1)) 3)) (* (pow 3 3) (pow 3 3))))))
1.2s
(- (* (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (* x1 x1) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (* (fma x1 x1 1) (fma x1 x1 1)) (- (* (* 3 3) (* 3 3)) (* (* (/ x1 (fma x1 x1 1)) 3) (* (/ x1 (fma x1 x1 1)) 3)))))) (- (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))) (* (* (* (fma x1 x1 1) (fma x1 x1 1)) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (pow (/ x1 (fma x1 x1 1)) 3) (pow (/ x1 (fma x1 x1 1)) 3)) (* (pow 3 3) (pow 3 3))))))
1.0s
(- (* (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (* x1 (/ x1 (fma x1 x1 1))) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (* 3 3) (* 3 3)) (* (* (/ x1 (fma x1 x1 1)) 3) (* (/ x1 (fma x1 x1 1)) 3)))))) (- (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))) (* (* (fma x1 x1 1) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (pow (/ x1 (fma x1 x1 1)) 3) (pow (/ x1 (fma x1 x1 1)) 3)) (* (pow 3 3) (pow 3 3))))))
915.0ms
(- (* (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (* x1 (/ x1 (fma x1 x1 1))) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (* 3 3) (* 3 3)) (* (* (/ x1 (fma x1 x1 1)) 3) (* (/ x1 (fma x1 x1 1)) 3)))))) (- (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))) (* (* (fma x1 x1 1) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (pow (/ x1 (fma x1 x1 1)) 3) (pow (/ x1 (fma x1 x1 1)) 3)) (* (pow 3 3) (pow 3 3))))))
902.0ms
(- (* (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (* x1 x1) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (* (fma x1 x1 1) (fma x1 x1 1)) (- (* (* 3 3) (* 3 3)) (* (* (/ x1 (fma x1 x1 1)) 3) (* (/ x1 (fma x1 x1 1)) 3)))))) (- (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))) (* (* (* (fma x1 x1 1) (fma x1 x1 1)) (+ (* 3 3) (* (/ x1 (fma x1 x1 1)) 3))) (* (fma x1 x1 1) (- (* (pow (/ x1 (fma x1 x1 1)) 3) (pow (/ x1 (fma x1 x1 1)) 3)) (* (pow 3 3) (pow 3 3))))))

prune7.2s

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 0.4b

localize38.0ms

Local error

Found 4 expressions with local error:

8.4b
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1))))))
5.8b
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))
3.8b
(- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))))
0.7b
(/ (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))))

rewrite94.0ms

Algorithm
rewrite-expression-head
Rules
421×times-frac
202×add-cube-cbrt
202×*-un-lft-identity
202×add-sqr-sqrt
36×associate-*r/
30×div-inv
18×add-exp-log
18×add-cbrt-cube
16×frac-sub
13×associate-/l*
13×associate-/r*
12×frac-add
10×flip-+
10×flip3-+
div-exp
cbrt-undiv
flip--
flip3--
add-log-exp
pow1
associate-*l/
associate-*l*
log1p-expm1-u
frac-times
expm1-log1p-u
fma-udef
associate-*r*
distribute-lft-in
distribute-rgt-in
associate--r+
associate-/r/
associate--l+
div-sub
associate-/l/
cbrt-unprod
*-commutative
prod-exp
pow-prod-down
prod-diff
diff-log
fma-neg
frac-2neg
sub-neg
clear-num
Counts
4 → 288
Calls
4 calls:
Slowest
50.0ms
(/ (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))))
28.0ms
(- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))))
4.0ms
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))
0.0ms
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1))))))

series789.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
293.0ms
(/ (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1)))))
284.0ms
(fma (fma 4 (/ (fma 3 (* x1 x1) (- (* x2 2) x1)) (fma x1 x1 1)) -6) (* x1 x1) (/ (/ (- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3)))) (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (/ (fma x1 x1 1) (fma (fma x1 (* 3 x1) (* x2 2)) (* x1 2) (* (* x1 2) (- x1))))))
153.0ms
(- (* (fma x1 (* 3 x1) (* x2 2)) (+ (* (/ x1 (fma x1 x1 1)) (/ x1 (fma x1 x1 1))) (- (* 3 3) (* (/ x1 (fma x1 x1 1)) 3)))) (* (fma x1 x1 1) (+ (pow (/ x1 (fma x1 x1 1)) 3) (pow 3 3))))
58.0ms
(* (/ 3 (/ (fma x1 x1 1) (* x1 x1))) (fma 3 (* x1 x1) (- (* x2 2) x1)))

simplify1.8m

Counts
438 → 300
Calls
438 calls:
Slowest
1.6s
(/ (/ 1 (sqrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1))))) (/ 1 1))
1.5s
(/ (/ 1 (sqrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1))))) 1)
1.5s
(/ (/ 1 (* (cbrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (cbrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))))) (/ 1 1))
1.5s
(/ (/ 1 (* (cbrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (cbrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))))) 1)
1.4s
(/ 1 (* (cbrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1)))) (cbrt (fma (fma x1 x1 1) (fma -3 (/ x1 (fma x1 x1 1)) 9) (/ (* x1 x1) (fma x1 x1 1))))))

prune11.9s

Pruning

5 alts after pruning (4 fresh and 1 done)

Merged error: 0.4b

localize78.0ms

Local error

Found 4 expressions with local error:

5.9b
(* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))
5.8b
(* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))
3.7b
(- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)
2.7b
(+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6)))

rewrite221.0ms

Algorithm
rewrite-expression-head
Rules
23×associate-*r/
19×add-cube-cbrt
19×*-un-lft-identity
19×add-sqr-sqrt
18×associate-*r*
18×times-frac
15×fma-neg
11×flip--
11×add-exp-log
11×add-cbrt-cube
11×flip3--
10×frac-add
pow1
sub-neg
add-log-exp
distribute-lft-in
distribute-rgt-in
log1p-expm1-u
associate-/r/
associate-+r+
associate-+l+
frac-times
expm1-log1p-u
flip-+
cbrt-unprod
prod-exp
flip3-+
div-inv
*-commutative
associate-*l/
pow-prod-down
associate-*l*
div-exp
div-sub
fma-def
sum-log
+-commutative
cbrt-undiv
associate--l-
Counts
4 → 116
Calls
4 calls:
Slowest
91.0ms
(+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6)))
82.0ms
(- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)
26.0ms
(* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))
20.0ms
(* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))

series273.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
161.0ms
(+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6)))
42.0ms
(- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)
42.0ms
(* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))
29.0ms
(* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))

simplify11.2s

Counts
91 → 128
Calls
91 calls:
Slowest
608.0ms
(+ (* (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (* (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (* 3 3))) (+ (* (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (+ (* 6 6) (* (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6)))) (* (+ (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3) (* (* x1 x1) (- (pow (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 3) (pow 6 3)))))
416.0ms
(+ (* (* (* (* 2 x1) (- (+ (* (* 3 x1) x1) (* 2 x2)) x1)) (- (pow (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3) (pow 3 3))) (+ (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6)) (* (* (+ (* x1 x1) 1) (+ (* (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (+ (* 3 3) (* (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)))) (* (* x1 x1) (- (* (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* 6 6)))))
402.0ms
(+ (* (* (* (* 2 x1) (- (+ (* (* 3 x1) x1) (* 2 x2)) x1)) (- (* (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (* 3 3))) (+ (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6)) (* (* (+ (* x1 x1) 1) (+ (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* 6 6)))))
369.0ms
(* (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))))
365.0ms
(* (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))))

prune2.3s

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 0.4b

regimes426.0ms

Accuracy

0% (0.1b remaining)

Error of 0.5b against oracle of 0.4b and baseline of 0.5b

bsearch7.0ms

end0.0ms

sample5.9s

Algorithm
intervals
Results
15099×(pre true 80)
14030×(body real 80)
433×(body real 640)
272×(body real 320)
185×(body real 1280)
179×(body real 160)