?

Average Error: 0.0 → 0.0
Time: 36.7s
Precision: binary64
Cost: 6784

?

\[500 \cdot \left(x - y\right) \]
\[\mathsf{fma}\left(x, 500, \left(-y\right) \cdot 500\right) \]
(FPCore (x y) :precision binary64 (* 500.0 (- x y)))
(FPCore (x y) :precision binary64 (fma x 500.0 (* (- y) 500.0)))
double code(double x, double y) {
	return 500.0 * (x - y);
}
double code(double x, double y) {
	return fma(x, 500.0, (-y * 500.0));
}
function code(x, y)
	return Float64(500.0 * Float64(x - y))
end
function code(x, y)
	return fma(x, 500.0, Float64(Float64(-y) * 500.0))
end
code[x_, y_] := N[(500.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(x * 500.0 + N[((-y) * 500.0), $MachinePrecision]), $MachinePrecision]
500 \cdot \left(x - y\right)
\mathsf{fma}\left(x, 500, \left(-y\right) \cdot 500\right)

Error?

Derivation?

  1. Initial program 0.0

    \[500 \cdot \left(x - y\right) \]
  2. Applied egg-rr0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, 500, \left(-y\right) \cdot 500\right)} \]

Alternatives

Alternative 1
Error17.1
Cost984
\[\begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{+74}:\\ \;\;\;\;500 \cdot x\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{-74}:\\ \;\;\;\;y \cdot -500\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-105}:\\ \;\;\;\;500 \cdot x\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-5}:\\ \;\;\;\;y \cdot -500\\ \mathbf{elif}\;x \leq 3 \cdot 10^{+86}:\\ \;\;\;\;500 \cdot x\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+102}:\\ \;\;\;\;y \cdot -500\\ \mathbf{else}:\\ \;\;\;\;500 \cdot x\\ \end{array} \]
Alternative 2
Error0.0
Cost320
\[500 \cdot \left(x - y\right) \]
Alternative 3
Error31.7
Cost192
\[500 \cdot x \]

Error

Reproduce?

herbie shell --seed 2023033 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, B"
  :precision binary64
  (* 500.0 (- x y)))