Average Error: 3.6 → 0.1
Time: 28.1s
Precision: 64
Internal Precision: 320
\[\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2\]
\[\log_* (1 + (e^{\left(d + a\right) + \left(b + c\right)} - 1)^*) \cdot 2\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original3.6
Target3.8
Herbie0.1
\[\left(a + b\right) \cdot 2 + \left(c + d\right) \cdot 2\]

Derivation

  1. Initial program 3.6

    \[\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2\]
  2. Using strategy rm
  3. Applied associate-+r+2.7

    \[\leadsto \left(a + \color{blue}{\left(\left(b + c\right) + d\right)}\right) \cdot 2\]
  4. Using strategy rm
  5. Applied log1p-expm1-u2.8

    \[\leadsto \color{blue}{\log_* (1 + (e^{a + \left(\left(b + c\right) + d\right)} - 1)^*)} \cdot 2\]
  6. Using strategy rm
  7. Applied log1p-expm1-u2.8

    \[\leadsto \color{blue}{\log_* (1 + (e^{\log_* (1 + (e^{a + \left(\left(b + c\right) + d\right)} - 1)^*)} - 1)^*)} \cdot 2\]
  8. Applied simplify0.1

    \[\leadsto \log_* (1 + \color{blue}{(e^{\left(d + a\right) + \left(b + c\right)} - 1)^*}) \cdot 2\]

Runtime

Time bar (total: 28.1s)Debug logProfile

herbie shell --seed 2018207 +o rules:numerics
(FPCore (a b c d)
  :name "Expression, p6"
  :pre (and (<= -14 a -13) (<= -3 b -2) (<= 3 c 3.5) (<= 12.5 d 13.5))

  :herbie-target
  (+ (* (+ a b) 2) (* (+ c d) 2))

  (* (+ a (+ b (+ c d))) 2))