Average Error: 29.8 → 20.3
Time: 35.4s
Precision: 64
Internal Precision: 128
\[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
\[\begin{array}{l} \mathbf{if}\;n \le -1188204565.7360165:\\ \;\;\;\;\frac{\frac{\frac{-1}{2}}{x}}{x \cdot n} + \left(\frac{\log x}{n \cdot \left(x \cdot n\right)} + \frac{\frac{1}{x}}{n}\right)\\ \mathbf{elif}\;n \le -8.42372548633578 \cdot 10^{-288}:\\ \;\;\;\;\log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right) + \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \left(\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)\\ \mathbf{elif}\;n \le 3215896251.905344:\\ \;\;\;\;\log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right) + \left(e^{\frac{\log_* (1 + x)}{n}} - {x}^{\left(\frac{1}{n}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{x \cdot n} - \frac{\frac{\frac{1}{2}}{x}}{x \cdot n}\right) + \frac{\frac{\log x}{n \cdot n}}{x}\\ \end{array}\]

Error

Bits error versus x

Bits error versus n

Derivation

  1. Split input into 4 regimes
  2. if n < -1188204565.7360165

    1. Initial program 46.0

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
    2. Taylor expanded around -inf 63.2

      \[\leadsto \color{blue}{\left(\frac{\log -1}{x \cdot {n}^{2}} + \frac{1}{x \cdot n}\right) - \left(\frac{1}{2} \cdot \frac{1}{{x}^{2} \cdot n} + \frac{\log \left(\frac{-1}{x}\right)}{x \cdot {n}^{2}}\right)}\]
    3. Simplified32.8

      \[\leadsto \color{blue}{\frac{\frac{\frac{-1}{2}}{x}}{x \cdot n} + \left(\left(\frac{\frac{1}{x}}{n} + 0\right) + \frac{\log x}{n \cdot \left(x \cdot n\right)}\right)}\]

    if -1188204565.7360165 < n < -8.42372548633578e-288

    1. Initial program 1.2

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
    2. Using strategy rm
    3. Applied add-log-exp1.4

      \[\leadsto {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \color{blue}{\log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)}\]
    4. Applied add-log-exp1.4

      \[\leadsto \color{blue}{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}\right)} - \log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)\]
    5. Applied diff-log1.4

      \[\leadsto \color{blue}{\log \left(\frac{e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}}{e^{{x}^{\left(\frac{1}{n}\right)}}}\right)}\]
    6. Simplified1.4

      \[\leadsto \log \color{blue}{\left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt1.4

      \[\leadsto \log \left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - \color{blue}{\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}}}\right)\]
    9. Applied add-sqr-sqrt1.4

      \[\leadsto \log \left(e^{\color{blue}{\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}} - \sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}}\right)\]
    10. Applied prod-diff1.4

      \[\leadsto \log \left(e^{\color{blue}{(\left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) + \left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_* + (\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}}\right)\]
    11. Applied exp-sum1.4

      \[\leadsto \log \color{blue}{\left(e^{(\left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) + \left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*} \cdot e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right)}\]
    12. Applied log-prod1.4

      \[\leadsto \color{blue}{\log \left(e^{(\left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) + \left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right) + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right)}\]
    13. Simplified1.3

      \[\leadsto \color{blue}{\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right)} + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right)\]
    14. Using strategy rm
    15. Applied expm1-log1p-u1.3

      \[\leadsto \left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right) + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{\color{blue}{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}}\right))_*}\right)\]
    16. Using strategy rm
    17. Applied add-cube-cbrt1.3

      \[\leadsto \color{blue}{\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right) \cdot \sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}} + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right)\]

    if -8.42372548633578e-288 < n < 3215896251.905344

    1. Initial program 20.2

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
    2. Using strategy rm
    3. Applied add-log-exp20.2

      \[\leadsto {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \color{blue}{\log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)}\]
    4. Applied add-log-exp20.2

      \[\leadsto \color{blue}{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}\right)} - \log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)\]
    5. Applied diff-log20.2

      \[\leadsto \color{blue}{\log \left(\frac{e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}}{e^{{x}^{\left(\frac{1}{n}\right)}}}\right)}\]
    6. Simplified20.2

      \[\leadsto \log \color{blue}{\left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt20.2

      \[\leadsto \log \left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - \color{blue}{\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}}}\right)\]
    9. Applied add-sqr-sqrt20.2

      \[\leadsto \log \left(e^{\color{blue}{\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}} - \sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}}\right)\]
    10. Applied prod-diff20.2

      \[\leadsto \log \left(e^{\color{blue}{(\left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) + \left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_* + (\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}}\right)\]
    11. Applied exp-sum20.2

      \[\leadsto \log \color{blue}{\left(e^{(\left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) + \left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*} \cdot e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right)}\]
    12. Applied log-prod20.2

      \[\leadsto \color{blue}{\log \left(e^{(\left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}\right) + \left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right) + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right)}\]
    13. Simplified20.2

      \[\leadsto \color{blue}{\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right)} + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right))_*}\right)\]
    14. Using strategy rm
    15. Applied expm1-log1p-u20.2

      \[\leadsto \left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right) + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{\color{blue}{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}}\right))_*}\right)\]
    16. Using strategy rm
    17. Applied add-exp-log24.2

      \[\leadsto \left({\color{blue}{\left(e^{\log \left(x + 1\right)}\right)}}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right) + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right)\]
    18. Applied pow-exp24.2

      \[\leadsto \left(\color{blue}{e^{\log \left(x + 1\right) \cdot \frac{1}{n}}} - {x}^{\left(\frac{1}{n}\right)}\right) + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right)\]
    19. Simplified5.9

      \[\leadsto \left(e^{\color{blue}{\frac{\log_* (1 + x)}{n}}} - {x}^{\left(\frac{1}{n}\right)}\right) + \log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right)\]

    if 3215896251.905344 < n

    1. Initial program 44.9

      \[{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\]
    2. Using strategy rm
    3. Applied add-log-exp44.9

      \[\leadsto {\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \color{blue}{\log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)}\]
    4. Applied add-log-exp44.9

      \[\leadsto \color{blue}{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}\right)} - \log \left(e^{{x}^{\left(\frac{1}{n}\right)}}\right)\]
    5. Applied diff-log44.9

      \[\leadsto \color{blue}{\log \left(\frac{e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}}}{e^{{x}^{\left(\frac{1}{n}\right)}}}\right)}\]
    6. Simplified44.9

      \[\leadsto \log \color{blue}{\left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}\]
    7. Taylor expanded around inf 32.9

      \[\leadsto \color{blue}{\frac{1}{x \cdot n} - \left(\frac{\log \left(\frac{1}{x}\right)}{x \cdot {n}^{2}} + \frac{1}{2} \cdot \frac{1}{{x}^{2} \cdot n}\right)}\]
    8. Simplified32.9

      \[\leadsto \color{blue}{\left(\frac{1}{n \cdot x} - \frac{\frac{\frac{1}{2}}{x}}{n \cdot x}\right) + \frac{\frac{\log x}{n \cdot n}}{x}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification20.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \le -1188204565.7360165:\\ \;\;\;\;\frac{\frac{\frac{-1}{2}}{x}}{x \cdot n} + \left(\frac{\log x}{n \cdot \left(x \cdot n\right)} + \frac{\frac{1}{x}}{n}\right)\\ \mathbf{elif}\;n \le -8.42372548633578 \cdot 10^{-288}:\\ \;\;\;\;\log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right) + \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \left(\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)\\ \mathbf{elif}\;n \le 3215896251.905344:\\ \;\;\;\;\log \left(e^{(\left(-\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) + \left(\sqrt{{x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt{(e^{\log_* (1 + {x}^{\left(\frac{1}{n}\right)})} - 1)^*}\right))_*}\right) + \left(e^{\frac{\log_* (1 + x)}{n}} - {x}^{\left(\frac{1}{n}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{x \cdot n} - \frac{\frac{\frac{1}{2}}{x}}{x \cdot n}\right) + \frac{\frac{\log x}{n \cdot n}}{x}\\ \end{array}\]

Reproduce

herbie shell --seed 2019016 +o rules:numerics
(FPCore (x n)
  :name "2nthrt (problem 3.4.6)"
  (- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))

Details

Time bar (total: 34.2s)Debug log

sample302.0ms

Algorithm
intervals
Results
601×(pre true 80)
164×(body real 80)
160×(body nan 80)
97×(body real 1280)
51×(body real 640)
33×(body exit 10240)
27×(body nan 1280)
24×(body real 320)
17×(body nan 640)
13×(body nan 320)
11×(body real 160)
(body nan 160)

simplify46.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
46.0ms
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))

prune14.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 29.9b

localize29.0ms

Local error

Found 3 expressions with local error:

2.2b
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
1.0b
(pow (+ x 1) (/ 1 n))
0.8b
(pow x (/ 1 n))

rewrite19.0ms

Algorithm
rewrite-expression-head
Rules
24×add-sqr-sqrt
22×*-un-lft-identity
20×add-cube-cbrt
18×prod-diff
16×unpow-prod-down
pow-unpow
fma-neg
add-log-exp
add-exp-log
pow1
log1p-expm1-u
add-cbrt-cube
expm1-log1p-u
difference-of-squares
div-inv
pow-to-exp
distribute-lft-out--
flip--
pow-exp
diff-log
flip3--
pow-pow
sub-neg
Counts
3 → 74
Calls
3 calls:
Slowest
15.0ms
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
2.0ms
(pow (+ x 1) (/ 1 n))
1.0ms
(pow x (/ 1 n))

series345.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
213.0ms
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
69.0ms
(pow (+ x 1) (/ 1 n))
64.0ms
(pow x (/ 1 n))

simplify3.3s

Counts
69 → 83
Calls
69 calls:
Slowest
986.0ms
(- (+ (/ (log -1) n) (+ 1 (/ 1 (* x n)))) (/ (log (/ -1 x)) n))
446.0ms
(- (/ 1 (* x n)) (+ (/ (log (/ 1 x)) (* x (pow n 2))) (* 1/2 (/ 1 (* (pow x 2) n)))))
434.0ms
(- (+ (/ (log -1) (* x (pow n 2))) (/ 1 (* x n))) (+ (* 1/2 (/ 1 (* (pow x 2) n))) (/ (log (/ -1 x)) (* x (pow n 2)))))
271.0ms
(- (+ (* 1/2 (/ (pow (log (/ 1 x)) 2) (pow n 2))) 1) (/ (log (/ 1 x)) n))
67.0ms
(- (+ (/ (log -1) n) (+ (* 1/2 (/ (pow (log -1) 2) (pow n 2))) (+ (* 1/2 (/ (pow (log (/ -1 x)) 2) (pow n 2))) 1))) (+ (/ (log (/ -1 x)) n) (/ (* (log (/ -1 x)) (log -1)) (pow n 2))))

prune934.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 18.3b

localize13.0ms

Local error

Found 4 expressions with local error:

2.2b
(- (pow (+ 1 x) (/ 1 n)) (pow x (/ 1 n)))
2.0b
(log (exp (- (pow (+ 1 x) (/ 1 n)) (pow x (/ 1 n)))))
1.0b
(pow (+ 1 x) (/ 1 n))
0.8b
(pow x (/ 1 n))

rewrite42.0ms

Algorithm
rewrite-expression-head
Rules
43×add-sqr-sqrt
39×*-un-lft-identity
36×prod-diff
35×add-cube-cbrt
26×unpow-prod-down
23×log-prod
20×exp-sum
pow-unpow
log-pow
add-log-exp
fma-neg
exp-prod
pow1
add-exp-log
difference-of-squares
log1p-expm1-u
add-cbrt-cube
expm1-log1p-u
distribute-lft-out--
div-inv
sub-neg
pow-to-exp
flip--
pow-exp
rem-log-exp
diff-log
exp-diff
flip3--
pow-pow
log-div
Counts
4 → 115
Calls
4 calls:
Slowest
24.0ms
(log (exp (- (pow (+ 1 x) (/ 1 n)) (pow x (/ 1 n)))))
11.0ms
(- (pow (+ 1 x) (/ 1 n)) (pow x (/ 1 n)))
3.0ms
(pow (+ 1 x) (/ 1 n))
1.0ms
(pow x (/ 1 n))

series512.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
204.0ms
(- (pow (+ 1 x) (/ 1 n)) (pow x (/ 1 n)))
165.0ms
(log (exp (- (pow (+ 1 x) (/ 1 n)) (pow x (/ 1 n)))))
72.0ms
(pow x (/ 1 n))
70.0ms
(pow (+ 1 x) (/ 1 n))

simplify5.1s

Counts
103 → 127
Calls
103 calls:
Slowest
591.0ms
(- (+ (/ (log -1) n) (+ 1 (/ 1 (* x n)))) (/ (log (/ -1 x)) n))
448.0ms
(- (+ (/ (log -1) (* x (pow n 2))) (/ 1 (* x n))) (+ (* 1/2 (/ 1 (* (pow x 2) n))) (/ (log (/ -1 x)) (* x (pow n 2)))))
442.0ms
(- (/ 1 (* x n)) (+ (/ (log (/ 1 x)) (* x (pow n 2))) (* 1/2 (/ 1 (* (pow x 2) n)))))
388.0ms
(- (+ (/ (log -1) (* x (pow n 2))) (/ 1 (* x n))) (+ (* 1/2 (/ 1 (* (pow x 2) n))) (/ (log (/ -1 x)) (* x (pow n 2)))))
377.0ms
(- (/ 1 (* x n)) (+ (/ (log (/ 1 x)) (* x (pow n 2))) (* 1/2 (/ 1 (* (pow x 2) n)))))

prune1.5s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 18.3b

localize34.0ms

Local error

Found 4 expressions with local error:

2.4b
(fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (pow x (/ 1 n)))))
2.2b
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
1.0b
(pow (+ x 1) (/ 1 n))
0.8b
(pow x (/ 1 n))

rewrite13.0ms

Algorithm
rewrite-expression-head
Rules
25×add-sqr-sqrt
23×*-un-lft-identity
21×add-cube-cbrt
18×prod-diff
16×unpow-prod-down
pow-unpow
add-log-exp
fma-neg
add-exp-log
pow1
log1p-expm1-u
add-cbrt-cube
expm1-log1p-u
difference-of-squares
div-inv
pow-to-exp
distribute-lft-out--
flip--
fma-udef
pow-exp
diff-log
flip3--
pow-pow
sub-neg
Counts
4 → 84
Calls
4 calls:
Slowest
10.0ms
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
2.0ms
(pow (+ x 1) (/ 1 n))
1.0ms
(pow x (/ 1 n))
0.0ms
(fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (pow x (/ 1 n)))))

series537.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
225.0ms
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
149.0ms
(fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (pow x (/ 1 n)))))
82.0ms
(pow x (/ 1 n))
81.0ms
(pow (+ x 1) (/ 1 n))

simplify2.7s

Counts
72 → 96
Calls
72 calls:
Slowest
600.0ms
(- (+ (/ (log -1) n) (+ 1 (/ 1 (* x n)))) (/ (log (/ -1 x)) n))
350.0ms
(- (/ 1 (* x n)) (+ (/ (log (/ 1 x)) (* x (pow n 2))) (* 1/2 (/ 1 (* (pow x 2) n)))))
335.0ms
(- (+ (/ (log -1) (* x (pow n 2))) (/ 1 (* x n))) (+ (* 1/2 (/ 1 (* (pow x 2) n))) (/ (log (/ -1 x)) (* x (pow n 2)))))
222.0ms
(- (+ (* 1/2 (/ (pow (log (/ 1 x)) 2) (pow n 2))) 1) (/ (log (/ 1 x)) n))
98.0ms
(- (+ (/ (log -1) n) (+ (* 1/2 (/ (pow (log -1) 2) (pow n 2))) (+ (* 1/2 (/ (pow (log (/ -1 x)) 2) (pow n 2))) 1))) (+ (/ (log (/ -1 x)) n) (/ (* (log (/ -1 x)) (log -1)) (pow n 2))))

prune1.4s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 18.3b

localize35.0ms

Local error

Found 4 expressions with local error:

32.8b
(fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (expm1 (log1p (pow x (/ 1 n)))))))
30.9b
(log (exp (fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (expm1 (log1p (pow x (/ 1 n)))))))))
2.2b
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
1.0b
(pow (+ x 1) (/ 1 n))

rewrite27.0ms

Algorithm
rewrite-expression-head
Rules
26×add-sqr-sqrt
24×*-un-lft-identity
22×add-cube-cbrt
18×prod-diff
16×unpow-prod-down
add-log-exp
fma-neg
pow1
add-exp-log
log1p-expm1-u
log-pow
add-cbrt-cube
log-prod
pow-unpow
expm1-log1p-u
exp-prod
difference-of-squares
fma-udef
distribute-lft-out--
flip--
div-inv
pow-exp
exp-sum
rem-log-exp
diff-log
flip3--
pow-pow
sub-neg
pow-to-exp
Counts
4 → 88
Calls
4 calls:
Slowest
20.0ms
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
3.0ms
(pow (+ x 1) (/ 1 n))
2.0ms
(log (exp (fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (expm1 (log1p (pow x (/ 1 n)))))))))
0.0ms
(fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (expm1 (log1p (pow x (/ 1 n)))))))

series773.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
258.0ms
(fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (expm1 (log1p (pow x (/ 1 n)))))))
258.0ms
(log (exp (fma (- (sqrt (pow x (/ 1 n)))) (sqrt (pow x (/ 1 n))) (* (sqrt (pow x (/ 1 n))) (sqrt (expm1 (log1p (pow x (/ 1 n)))))))))
175.0ms
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n)))
81.0ms
(pow (+ x 1) (/ 1 n))

simplify2.7s

Counts
76 → 100
Calls
76 calls:
Slowest
552.0ms
(- (+ (/ (log -1) n) (+ 1 (/ 1 (* x n)))) (/ (log (/ -1 x)) n))
360.0ms
(- (/ 1 (* x n)) (+ (/ (log (/ 1 x)) (* x (pow n 2))) (* 1/2 (/ 1 (* (pow x 2) n)))))
347.0ms
(- (+ (/ (log -1) (* x (pow n 2))) (/ 1 (* x n))) (+ (* 1/2 (/ 1 (* (pow x 2) n))) (/ (log (/ -1 x)) (* x (pow n 2)))))
53.0ms
(- (+ 1 (/ 1 (* x n))) (/ (log (/ 1 x)) n))
47.0ms
(fma (pow (sqrt (+ x 1)) (/ 1 n)) (pow (sqrt (+ x 1)) (/ 1 n)) (- (* (sqrt (pow x (/ 1 n))) (sqrt (pow x (/ 1 n))))))

prune1.7s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 18.3b

regimes446.0ms

Accuracy

81.7% (2.1b remaining)

Error of 20.3b against oracle of 18.2b and baseline of 29.8b

bsearch571.0ms

end0.0ms

sample11.1s

Algorithm
intervals
Results
18827×(pre true 80)
5015×(body nan 80)
4749×(body real 80)
3215×(body real 1280)
1570×(body real 640)
1188×(body exit 10240)
850×(body real 320)
632×(body nan 1280)
624×(body nan 640)
430×(body real 160)
376×(body nan 320)
178×(body nan 160)