Average Error: 0.0 → 0.0
Time: 2.2s
Precision: binary64
\[{x}^{4} - {y}^{4} \]
\[\begin{array}{l} t_0 := -{y}^{4}\\ \mathsf{fma}\left(1, {x}^{4}, t_0\right) + \mathsf{fma}\left(t_0, 1, {y}^{4}\right) \end{array} \]
{x}^{4} - {y}^{4}
\begin{array}{l}
t_0 := -{y}^{4}\\
\mathsf{fma}\left(1, {x}^{4}, t_0\right) + \mathsf{fma}\left(t_0, 1, {y}^{4}\right)
\end{array}
(FPCore (x y) :precision binary64 (- (pow x 4.0) (pow y 4.0)))
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (- (pow y 4.0))))
   (+ (fma 1.0 (pow x 4.0) t_0) (fma t_0 1.0 (pow y 4.0)))))
double code(double x, double y) {
	return pow(x, 4.0) - pow(y, 4.0);
}
double code(double x, double y) {
	double t_0 = -pow(y, 4.0);
	return fma(1.0, pow(x, 4.0), t_0) + fma(t_0, 1.0, pow(y, 4.0));
}

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 0.0

    \[{x}^{4} - {y}^{4} \]
  2. Applied *-un-lft-identity_binary640.0

    \[\leadsto {x}^{4} - \color{blue}{1 \cdot {y}^{4}} \]
  3. Applied *-un-lft-identity_binary640.0

    \[\leadsto \color{blue}{1 \cdot {x}^{4}} - 1 \cdot {y}^{4} \]
  4. Applied prod-diff_binary640.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(1, {x}^{4}, -{y}^{4} \cdot 1\right) + \mathsf{fma}\left(-{y}^{4}, 1, {y}^{4} \cdot 1\right)} \]
  5. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(1, {x}^{4}, -{y}^{4}\right) + \mathsf{fma}\left(-{y}^{4}, 1, {y}^{4}\right) \]

Reproduce

herbie shell --seed 2022019 
(FPCore (x y)
  :name "Radioactive exchange between two surfaces"
  :precision binary64
  (- (pow x 4.0) (pow y 4.0)))