?

Average Error: 0.0 → 0.0
Time: 5.6s
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 0.0

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

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

Alternatives

Alternative 1
Error19.5
Cost852
\[\begin{array}{l} \mathbf{if}\;y \leq -1.18 \cdot 10^{-29}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-50}:\\ \;\;\;\;-x\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-13}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1:\\ \;\;\;\;-x\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+84}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Alternative 2
Error0.7
Cost584
\[\begin{array}{l} t_0 := \left(1 + x\right) \cdot y\\ \mathbf{if}\;y \leq -1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 1:\\ \;\;\;\;y - x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error0.9
Cost584
\[\begin{array}{l} t_0 := \left(y - 1\right) \cdot x\\ \mathbf{if}\;x \leq -1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-10}:\\ \;\;\;\;y - x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error18.9
Cost392
\[\begin{array}{l} \mathbf{if}\;x \leq -5.6 \cdot 10^{-9}:\\ \;\;\;\;-x\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-56}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;-x\\ \end{array} \]
Alternative 5
Error9.7
Cost192
\[y - x \]
Alternative 6
Error35.9
Cost64
\[y \]

Error

Reproduce?

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