\[(x * y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
Test:
simple fma test
Bits:
128 bits
Bits error versus x
Bits error versus y
Bits error versus z
Time: 15.2 s
Input Error: 46.0
Output Error: 22.1
Log:
Profile: 🕒
\(\begin{cases} \left((\left(\frac{-1}{x}\right) * \left(\frac{-1}{y}\right) + \left(\frac{-1}{z}\right))_* - \frac{\frac{1}{x}}{y}\right) - 1 & \text{when } z \le -3.2784791869173944 \cdot 10^{-06} \\ \left((x * y + z)_* - 1\right) - \frac{{\left(y \cdot x\right)}^2 - z \cdot z}{y \cdot x - z} & \text{when } z \le 5.906184364389485 \cdot 10^{-18} \\ \left((\left(\frac{-1}{x}\right) * \left(\frac{-1}{y}\right) + \left(\frac{-1}{z}\right))_* - \frac{\frac{1}{x}}{y}\right) - 1 & \text{otherwise} \end{cases}\)

    if z < -3.2784791869173944e-06 or 5.906184364389485e-18 < z

    1. Started with
      \[(x * y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
      61.1
    2. Using strategy rm
      61.1
    3. Applied add-exp-log to get
      \[(x * y + z)_* - \left(1 + \color{red}{\left(x \cdot y + z\right)}\right) \leadsto (x * y + z)_* - \left(1 + \color{blue}{e^{\log \left(x \cdot y + z\right)}}\right)\]
      62.5
    4. Applied taylor to get
      \[(x * y + z)_* - \left(1 + e^{\log \left(x \cdot y + z\right)}\right) \leadsto (\left(\frac{-1}{x}\right) * \left(\frac{-1}{y}\right) + \left(\frac{-1}{z}\right))_* - \left(e^{-\left(\log y + \log x\right)} + 1\right)\]
      55.1
    5. Taylor expanded around -inf to get
      \[\color{red}{(\left(\frac{-1}{x}\right) * \left(\frac{-1}{y}\right) + \left(\frac{-1}{z}\right))_* - \left(e^{-\left(\log y + \log x\right)} + 1\right)} \leadsto \color{blue}{(\left(\frac{-1}{x}\right) * \left(\frac{-1}{y}\right) + \left(\frac{-1}{z}\right))_* - \left(e^{-\left(\log y + \log x\right)} + 1\right)}\]
      55.1
    6. Applied simplify to get
      \[(\left(\frac{-1}{x}\right) * \left(\frac{-1}{y}\right) + \left(\frac{-1}{z}\right))_* - \left(e^{-\left(\log y + \log x\right)} + 1\right) \leadsto \left((\left(\frac{-1}{x}\right) * \left(\frac{-1}{y}\right) + \left(\frac{-1}{z}\right))_* - \frac{\frac{1}{x}}{y}\right) - 1\]
      15.3

    7. Applied final simplification

    if -3.2784791869173944e-06 < z < 5.906184364389485e-18

    1. Started with
      \[(x * y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
      29.4
    2. Using strategy rm
      29.4
    3. Applied flip-+ to get
      \[(x * y + z)_* - \left(1 + \color{red}{\left(x \cdot y + z\right)}\right) \leadsto (x * y + z)_* - \left(1 + \color{blue}{\frac{{\left(x \cdot y\right)}^2 - {z}^2}{x \cdot y - z}}\right)\]
      29.6
    4. Applied taylor to get
      \[(x * y + z)_* - \left(1 + \frac{{\left(x \cdot y\right)}^2 - {z}^2}{x \cdot y - z}\right) \leadsto (x * y + z)_* - \left(1 + \frac{{y}^2 \cdot {x}^2 - {z}^2}{x \cdot y - z}\right)\]
      34.4
    5. Taylor expanded around inf to get
      \[(x * y + z)_* - \left(1 + \frac{\color{red}{{y}^2 \cdot {x}^2 - {z}^2}}{x \cdot y - z}\right) \leadsto (x * y + z)_* - \left(1 + \frac{\color{blue}{{y}^2 \cdot {x}^2 - {z}^2}}{x \cdot y - z}\right)\]
      34.4
    6. Applied simplify to get
      \[(x * y + z)_* - \left(1 + \frac{{y}^2 \cdot {x}^2 - {z}^2}{x \cdot y - z}\right) \leadsto \left((x * y + z)_* - 1\right) - \frac{{x}^2 \cdot \left(y \cdot y\right) - z \cdot z}{y \cdot x - z}\]
      34.4

    7. Applied final simplification
    8. Applied simplify to get
      \[\color{red}{\left((x * y + z)_* - 1\right) - \frac{{x}^2 \cdot \left(y \cdot y\right) - z \cdot z}{y \cdot x - z}} \leadsto \color{blue}{\left((x * y + z)_* - 1\right) - \frac{{\left(y \cdot x\right)}^2 - z \cdot z}{y \cdot x - z}}\]
      29.6

  1. Removed slow pow expressions

Original test:


(lambda ((x default) (y default) (z default))
  #:name "simple fma test"
  (- (fma x y z) (+ 1 (+ (* x y) z)))
  #:target
  -1)