\[\left(d1 \cdot 3 + d1 \cdot d2\right) + d1 \cdot d3\]
Test:
FastMath test3
Bits:
128 bits
Bits error versus d1
Bits error versus d2
Bits error versus d3
Time: 5.4 s
Input Error: 0.1
Output Error: 0.0
Log:
Profile: 🕒
\((d1 * \left(d2 + 3\right) + \left(d3 \cdot d1\right))_*\)
  1. Started with
    \[\left(d1 \cdot 3 + d1 \cdot d2\right) + d1 \cdot d3\]
    0.1
  2. Applied simplify to get
    \[\color{red}{\left(d1 \cdot 3 + d1 \cdot d2\right) + d1 \cdot d3} \leadsto \color{blue}{(d1 * \left(d3 + 3\right) + \left(d1 \cdot d2\right))_*}\]
    0.0
  3. Using strategy rm
    0.0
  4. Applied fma-udef to get
    \[\color{red}{(d1 * \left(d3 + 3\right) + \left(d1 \cdot d2\right))_*} \leadsto \color{blue}{d1 \cdot \left(d3 + 3\right) + d1 \cdot d2}\]
    0.1
  5. Using strategy rm
    0.1
  6. Applied flip-+ to get
    \[d1 \cdot \color{red}{\left(d3 + 3\right)} + d1 \cdot d2 \leadsto d1 \cdot \color{blue}{\frac{{d3}^2 - {3}^2}{d3 - 3}} + d1 \cdot d2\]
    11.5
  7. Applied associate-*r/ to get
    \[\color{red}{d1 \cdot \frac{{d3}^2 - {3}^2}{d3 - 3}} + d1 \cdot d2 \leadsto \color{blue}{\frac{d1 \cdot \left({d3}^2 - {3}^2\right)}{d3 - 3}} + d1 \cdot d2\]
    13.4
  8. Applied taylor to get
    \[\frac{d1 \cdot \left({d3}^2 - {3}^2\right)}{d3 - 3} + d1 \cdot d2 \leadsto d1 \cdot d3 + \left(3 \cdot d1 + d1 \cdot d2\right)\]
    0.1
  9. Taylor expanded around 0 to get
    \[\color{red}{d1 \cdot d3 + \left(3 \cdot d1 + d1 \cdot d2\right)} \leadsto \color{blue}{d1 \cdot d3 + \left(3 \cdot d1 + d1 \cdot d2\right)}\]
    0.1
  10. Applied simplify to get
    \[d1 \cdot d3 + \left(3 \cdot d1 + d1 \cdot d2\right) \leadsto (d1 * \left(d2 + 3\right) + \left(d3 \cdot d1\right))_*\]
    0.0

  11. Applied final simplification

Original test:


(lambda ((d1 default) (d2 default) (d3 default))
  #:name "FastMath test3"
  (+ (+ (* d1 3) (* d1 d2)) (* d1 d3))
  #:target
  (* d1 (+ (+ 3 d2) d3)))