\[\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: 4.2 s
Input Error: 0.1
Output Error: 0.1
Log:
Profile: 🕒
\(d1 \cdot \left(\left(d3 + 3\right) + d2\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.1
  3. Using strategy rm
    0.1
  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 distribute-lft-out to get
    \[\color{red}{d1 \cdot \left(d3 + 3\right) + d1 \cdot d2} \leadsto \color{blue}{d1 \cdot \left(\left(d3 + 3\right) + d2\right)}\]
    0.1

  7. 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)))