?

Average Accuracy: 100.0% → 100.0%
Time: 2.4s
Precision: binary64
Cost: 448

?

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

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 100.0%

    \[\left(x + 1\right) \cdot y - x \]
  2. Final simplification100.0%

    \[\leadsto \left(x + 1\right) \cdot y - x \]

Alternatives

Alternative 1
Accuracy98.7%
Cost585
\[\begin{array}{l} \mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1\right):\\ \;\;\;\;x \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;y - x\\ \end{array} \]
Alternative 2
Accuracy98.7%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;x \cdot y - x\\ \mathbf{elif}\;x \leq 1:\\ \;\;\;\;y - x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 3
Accuracy56.3%
Cost456
\[\begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+14}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq 1:\\ \;\;\;\;-x\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 4
Accuracy84.4%
Cost456
\[\begin{array}{l} \mathbf{if}\;y \leq 9500000000000:\\ \;\;\;\;y - x\\ \mathbf{elif}\;y \leq 1.86 \cdot 10^{+80}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;y - x\\ \end{array} \]
Alternative 5
Accuracy43.4%
Cost128
\[-x \]

Error

Reproduce?

herbie shell --seed 2023147 
(FPCore (x y)
  :name "Data.Colour.SRGB:transferFunction from colour-2.3.3"
  :precision binary64
  (- (* (+ x 1.0) y) x))