\[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)\]
Test:
Rosa's FloatVsDoubleBenchmark
Bits:
128 bits
Bits error versus x1
Bits error versus x2
Time: 47.8 s
Input Error: 0.6
Output Error: 0.5
Log:
Profile: 🕒
\(\left(\left(\frac{{x1}^{2} \cdot 3}{{x1}^2 + 1} \cdot \left(\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1\right) + \left({x1}^3 + \left(x1 + x1\right)\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(\left(x1 \cdot 3\right) \cdot x1 - \left(2 \cdot x2 + x1\right)\right)\right) + \left({x1}^2 + 1\right) \cdot \left(\frac{\frac{\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1}{{x1}^2 + 1} - 3}{\frac{{x1}^2 + 1}{\left(\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1\right) \cdot \left(x1 \cdot 2\right)}} + \left(\frac{\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right)\)
  1. Started with
    \[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)\]
    0.6
  2. Applied simplify to get
    \[\color{red}{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)} \leadsto \color{blue}{\left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right)}\]
    0.5
  3. Using strategy rm
    0.5
  4. Applied add-exp-log to get
    \[\left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \color{red}{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right) \leadsto \left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \color{blue}{e^{\log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right)\]
    13.0
  5. Applied add-exp-log to get
    \[\left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{\color{red}{\left(x1 \cdot \left(x1 \cdot 3\right)\right)} \cdot e^{\log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right) \leadsto \left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{\color{blue}{e^{\log \left(x1 \cdot \left(x1 \cdot 3\right)\right)}} \cdot e^{\log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right)\]
    13.0
  6. Applied prod-exp to get
    \[\left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{\color{red}{e^{\log \left(x1 \cdot \left(x1 \cdot 3\right)\right)} \cdot e^{\log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right) \leadsto \left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{\color{blue}{e^{\log \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right)\]
    13.0
  7. Applied taylor to get
    \[\left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{e^{\log \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right) \leadsto \left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{e^{\left(\log 3 + 2 \cdot \log x1\right) + \log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right)\]
    23.3
  8. Taylor expanded around 0 to get
    \[\left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{e^{\color{red}{\left(\log 3 + 2 \cdot \log x1\right)} + \log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right) \leadsto \left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{e^{\color{blue}{\left(\log 3 + 2 \cdot \log x1\right)} + \log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right)\]
    23.3
  9. Applied simplify to get
    \[\left(\left(\left(x1 + x1\right) + \left({x1}^3 + \frac{e^{\left(\log 3 + 2 \cdot \log x1\right) + \log \left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right)}}{{x1}^2 + 1}\right)\right) + \left(\left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{{x1}^2 + 1} - 3\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)\right) \cdot \left(2 \cdot x1\right)}{{x1}^2 + 1} + \left(\frac{x1 \cdot \left(x1 \cdot 3\right) + \left(x2 \cdot 2 - x1\right)}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right) \cdot \left({x1}^2 + 1\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + x2 \cdot 2\right)\right) \leadsto \left(\left(\frac{{x1}^{2} \cdot 3}{{x1}^2 + 1} \cdot \left(\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1\right) + \left({x1}^3 + \left(x1 + x1\right)\right)\right) + \frac{3}{{x1}^2 + 1} \cdot \left(\left(x1 \cdot 3\right) \cdot x1 - \left(2 \cdot x2 + x1\right)\right)\right) + \left({x1}^2 + 1\right) \cdot \left(\frac{\frac{\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1}{{x1}^2 + 1} - 3}{\frac{{x1}^2 + 1}{\left(\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1\right) \cdot \left(x1 \cdot 2\right)}} + \left(\frac{\left(2 \cdot x2 - x1\right) + \left(x1 \cdot 3\right) \cdot x1}{\frac{{x1}^2 + 1}{4}} - 6\right) \cdot {x1}^2\right)\]
    0.5

  10. Applied final simplification

Original test:


(lambda ((x1 default) (x2 default))
  #: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))))))