\[\left(d1 \cdot d2 + \left(d3 + 5\right) \cdot d1\right) + d1 \cdot 32\]
Test:
FastMath dist3
Bits:
128 bits
Bits error versus d1
Bits error versus d2
Bits error versus d3
Time: 8.6 s
Input Error: 0.1
Output Error: 0.1
Log:
Profile: 🕒
\(d1 \cdot \left(\left(d2 + d3\right) + \left(5 + 32\right)\right)\)
  1. Started with
    \[\left(d1 \cdot d2 + \left(d3 + 5\right) \cdot d1\right) + d1 \cdot 32\]
    0.1
  2. Applied simplify to get
    \[\color{red}{\left(d1 \cdot d2 + \left(d3 + 5\right) \cdot d1\right) + d1 \cdot 32} \leadsto \color{blue}{d1 \cdot \left(\left(d2 + d3\right) + \left(5 + 32\right)\right)}\]
    0.1

  3. Removed slow pow expressions

Original test:


(lambda ((d1 default) (d2 default) (d3 default))
  #:name "FastMath dist3"
  (+ (+ (* d1 d2) (* (+ d3 5) d1)) (* d1 32))
  #:target
  (* d1 (+ (+ 37 d3) d2)))