?

Average Accuracy: 87.2% → 87.2%
Time: 2.7s
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 84.8%

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

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

Alternatives

Alternative 1
Accuracy60.6%
Cost656
\[\begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{-101}:\\ \;\;\;\;-x\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{-89}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-42}:\\ \;\;\;\;-x\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-17}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;-x\\ \end{array} \]
Alternative 2
Accuracy86.0%
Cost585
\[\begin{array}{l} \mathbf{if}\;y \leq -95000 \lor \neg \left(y \leq 1\right):\\ \;\;\;\;\left(x + 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;y - x\\ \end{array} \]
Alternative 3
Accuracy85.9%
Cost585
\[\begin{array}{l} \mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 4.8 \cdot 10^{-12}\right):\\ \;\;\;\;x \cdot y - x\\ \mathbf{else}:\\ \;\;\;\;y - x\\ \end{array} \]
Alternative 4
Accuracy75.4%
Cost192
\[y - x \]
Alternative 5
Accuracy38.9%
Cost64
\[y \]

Error

Reproduce?

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