?

Average Error: 0.0 → 0.0
Time: 3.5s
Precision: binary64
Cost: 448

?

\[500 \cdot \left(x - y\right) \]
\[y \cdot -500 - x \cdot -500 \]
(FPCore (x y) :precision binary64 (* 500.0 (- x y)))
(FPCore (x y) :precision binary64 (- (* y -500.0) (* x -500.0)))
double code(double x, double y) {
	return 500.0 * (x - y);
}
double code(double x, double y) {
	return (y * -500.0) - (x * -500.0);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 500.0d0 * (x - y)
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (y * (-500.0d0)) - (x * (-500.0d0))
end function
public static double code(double x, double y) {
	return 500.0 * (x - y);
}
public static double code(double x, double y) {
	return (y * -500.0) - (x * -500.0);
}
def code(x, y):
	return 500.0 * (x - y)
def code(x, y):
	return (y * -500.0) - (x * -500.0)
function code(x, y)
	return Float64(500.0 * Float64(x - y))
end
function code(x, y)
	return Float64(Float64(y * -500.0) - Float64(x * -500.0))
end
function tmp = code(x, y)
	tmp = 500.0 * (x - y);
end
function tmp = code(x, y)
	tmp = (y * -500.0) - (x * -500.0);
end
code[x_, y_] := N[(500.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[(y * -500.0), $MachinePrecision] - N[(x * -500.0), $MachinePrecision]), $MachinePrecision]
500 \cdot \left(x - y\right)
y \cdot -500 - x \cdot -500

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.0

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

    \[\leadsto \color{blue}{y \cdot -500 - x \cdot -500} \]
  3. Final simplification0.0

    \[\leadsto y \cdot -500 - x \cdot -500 \]

Alternatives

Alternative 1
Error16.9
Cost720
\[\begin{array}{l} \mathbf{if}\;x \leq -30000000:\\ \;\;\;\;500 \cdot x\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{-76}:\\ \;\;\;\;-500 \cdot y\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+116}:\\ \;\;\;\;500 \cdot x\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+137}:\\ \;\;\;\;-500 \cdot y\\ \mathbf{else}:\\ \;\;\;\;500 \cdot x\\ \end{array} \]
Alternative 2
Error0.0
Cost320
\[500 \cdot \left(x - y\right) \]
Alternative 3
Error31.5
Cost192
\[-500 \cdot y \]

Error

Reproduce?

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