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

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