Average Error: 0.0 → 0.0
Time: 9.5s
Precision: 64
Internal Precision: 128
\[\left(a + b\right) \cdot \left(a + b\right)\]
\[\log \left(e^{b}\right) \cdot \left(\left(a + a\right) + b\right) + {a}^{2}\]

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(\left(b \cdot a + b \cdot b\right) + b \cdot a\right) + a \cdot a\]

Derivation

  1. Initial program 0.0

    \[\left(a + b\right) \cdot \left(a + b\right)\]
  2. Taylor expanded around -inf 0.0

    \[\leadsto \color{blue}{{a}^{2} + \left({b}^{2} + 2 \cdot \left(a \cdot b\right)\right)}\]
  3. Using strategy rm
  4. Applied add-log-exp0.0

    \[\leadsto {a}^{2} + \left({b}^{2} + \color{blue}{\log \left(e^{2 \cdot \left(a \cdot b\right)}\right)}\right)\]
  5. Applied add-log-exp0.0

    \[\leadsto {a}^{2} + \left(\color{blue}{\log \left(e^{{b}^{2}}\right)} + \log \left(e^{2 \cdot \left(a \cdot b\right)}\right)\right)\]
  6. Applied sum-log0.0

    \[\leadsto {a}^{2} + \color{blue}{\log \left(e^{{b}^{2}} \cdot e^{2 \cdot \left(a \cdot b\right)}\right)}\]
  7. Simplified0.0

    \[\leadsto {a}^{2} + \log \color{blue}{\left({\left(e^{b}\right)}^{\left(\left(a + a\right) + b\right)}\right)}\]
  8. Using strategy rm
  9. Applied log-pow0.0

    \[\leadsto {a}^{2} + \color{blue}{\left(\left(a + a\right) + b\right) \cdot \log \left(e^{b}\right)}\]
  10. Final simplification0.0

    \[\leadsto \log \left(e^{b}\right) \cdot \left(\left(a + a\right) + b\right) + {a}^{2}\]

Runtime

Time bar (total: 9.5s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.00.00.00.00%
herbie shell --seed 2018354 
(FPCore (a b)
  :name "Expression 4, p15"
  :pre (and (<= 5 a 10) (<= 0 b 0.001))

  :herbie-target
  (+ (+ (+ (* b a) (* b b)) (* b a)) (* a a))

  (* (+ a b) (+ a b)))