?

Average Error: 81.25% → 0%
Time: 6.3s
Precision: binary64

?

\[x = 10864 \land y = 18817\]
\[\left(9 \cdot {x}^{4} - {y}^{4}\right) + 2 \cdot \left(y \cdot y\right) \]
\[\mathsf{fma}\left({y}^{2}, 2, \mathsf{fma}\left(3, {x}^{2}, {y}^{2}\right) \cdot \left(3 \cdot {x}^{2} - {y}^{2}\right)\right) \]
(FPCore (x y)
 :precision binary64
 (+ (- (* 9.0 (pow x 4.0)) (pow y 4.0)) (* 2.0 (* y y))))
(FPCore (x y)
 :precision binary64
 (fma
  (pow y 2.0)
  2.0
  (* (fma 3.0 (pow x 2.0) (pow y 2.0)) (- (* 3.0 (pow x 2.0)) (pow y 2.0)))))
double code(double x, double y) {
	return ((9.0 * pow(x, 4.0)) - pow(y, 4.0)) + (2.0 * (y * y));
}
double code(double x, double y) {
	return fma(pow(y, 2.0), 2.0, (fma(3.0, pow(x, 2.0), pow(y, 2.0)) * ((3.0 * pow(x, 2.0)) - pow(y, 2.0))));
}
function code(x, y)
	return Float64(Float64(Float64(9.0 * (x ^ 4.0)) - (y ^ 4.0)) + Float64(2.0 * Float64(y * y)))
end
function code(x, y)
	return fma((y ^ 2.0), 2.0, Float64(fma(3.0, (x ^ 2.0), (y ^ 2.0)) * Float64(Float64(3.0 * (x ^ 2.0)) - (y ^ 2.0))))
end
code[x_, y_] := N[(N[(N[(9.0 * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision] - N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[Power[y, 2.0], $MachinePrecision] * 2.0 + N[(N[(3.0 * N[Power[x, 2.0], $MachinePrecision] + N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(3.0 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] - N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(9 \cdot {x}^{4} - {y}^{4}\right) + 2 \cdot \left(y \cdot y\right)
\mathsf{fma}\left({y}^{2}, 2, \mathsf{fma}\left(3, {x}^{2}, {y}^{2}\right) \cdot \left(3 \cdot {x}^{2} - {y}^{2}\right)\right)

Error?

Derivation?

  1. Initial program 81.25

    \[\left(9 \cdot {x}^{4} - {y}^{4}\right) + 2 \cdot \left(y \cdot y\right) \]
  2. Simplified81.25

    \[\leadsto \color{blue}{\mathsf{fma}\left({y}^{2}, 2, \mathsf{fma}\left(9, {x}^{4}, -{y}^{4}\right)\right)} \]
    Proof
  3. Applied egg-rr0

    \[\leadsto \mathsf{fma}\left({y}^{2}, 2, \color{blue}{\left(3 \cdot {x}^{2} + {y}^{2}\right) \cdot \left(3 \cdot {x}^{2} - {y}^{2}\right)}\right) \]
  4. Simplified0

    \[\leadsto \mathsf{fma}\left({y}^{2}, 2, \color{blue}{\mathsf{fma}\left(3, {x}^{2}, {y}^{2}\right) \cdot \left(3 \cdot {x}^{2} - {y}^{2}\right)}\right) \]
    Proof

Reproduce?

herbie shell --seed 2023136 
(FPCore (x y)
  :name "From Rump in a 1983 paper"
  :precision binary64
  :pre (and (== x 10864.0) (== y 18817.0))
  (+ (- (* 9.0 (pow x 4.0)) (pow y 4.0)) (* 2.0 (* y y))))