Average Error: 24.9 → 12.6
Time: 32.4s
Precision: 64
Internal Precision: 1344
\[{\left(x + y\right)}^{4} - {\left(\left(x + y\right) - 1\right)}^{4}\]
\[\begin{array}{l} \mathbf{if}\;x \le -61204.86417145002 \lor \neg \left(x \le 25327.048769209945\right):\\ \;\;\;\;\left(4 \cdot x - 6\right) \cdot \left(x \cdot x\right) + 4 \cdot x\\ \mathbf{else}:\\ \;\;\;\;{\left(x + y\right)}^{4} - \left(\sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}} \cdot \sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}}\right) \cdot \sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < -61204.86417145002 or 25327.048769209945 < x

    1. Initial program 59.3

      \[{\left(x + y\right)}^{4} - {\left(\left(x + y\right) - 1\right)}^{4}\]
    2. Taylor expanded around inf 8.7

      \[\leadsto \color{blue}{\left(4 \cdot {x}^{3} + 4 \cdot x\right) - 6 \cdot {x}^{2}}\]
    3. Simplified8.9

      \[\leadsto \color{blue}{4 \cdot x + \left(4 \cdot x - 6\right) \cdot \left(x \cdot x\right)}\]

    if -61204.86417145002 < x < 25327.048769209945

    1. Initial program 13.8

      \[{\left(x + y\right)}^{4} - {\left(\left(x + y\right) - 1\right)}^{4}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt13.8

      \[\leadsto {\left(x + y\right)}^{4} - \color{blue}{\left(\sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}} \cdot \sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}}\right) \cdot \sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification12.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -61204.86417145002 \lor \neg \left(x \le 25327.048769209945\right):\\ \;\;\;\;\left(4 \cdot x - 6\right) \cdot \left(x \cdot x\right) + 4 \cdot x\\ \mathbf{else}:\\ \;\;\;\;{\left(x + y\right)}^{4} - \left(\sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}} \cdot \sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}}\right) \cdot \sqrt[3]{{\left(\left(x + y\right) - 1\right)}^{4}}\\ \end{array}\]

Runtime

Time bar (total: 32.4s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x y)
  :name "(x+y)^4-(x+y-1)^4"
  (- (pow (+ x y) 4) (pow (- (+ x y) 1) 4)))