\[\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.0 s
Input Error: 0.1
Output Error: 0.1
Log:
Profile: 🕒
\((\left(d2 + d3\right) * d1 + \left(d1 \cdot 3\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. Applied taylor to get
    \[d1 \cdot \left(d3 + 3\right) + d1 \cdot d2 \leadsto \left(d1 \cdot d3 + 3 \cdot d1\right) + d1 \cdot d2\]
    0.1
  6. Taylor expanded around 0 to get
    \[\color{red}{\left(d1 \cdot d3 + 3 \cdot d1\right)} + d1 \cdot d2 \leadsto \color{blue}{\left(d1 \cdot d3 + 3 \cdot d1\right)} + d1 \cdot d2\]
    0.1
  7. Applied simplify to get
    \[\color{red}{\left(d1 \cdot d3 + 3 \cdot d1\right) + d1 \cdot d2} \leadsto \color{blue}{(\left(d2 + d3\right) * d1 + \left(d1 \cdot 3\right))_*}\]
    0.1

  8. Removed slow pow expressions

Original test:


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