?

Average Accuracy: 100.0% → 100.0%
Time: 4.4s
Precision: binary64
Cost: 704

?

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

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 100.0%

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

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

Alternatives

Alternative 1
Accuracy54.7%
Cost1380
\[\begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-21}:\\ \;\;\;\;-x\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-164}:\\ \;\;\;\;0.918938533204673\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-227}:\\ \;\;\;\;y \cdot -0.5\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-272}:\\ \;\;\;\;0.918938533204673\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-304}:\\ \;\;\;\;y \cdot -0.5\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{-228}:\\ \;\;\;\;0.918938533204673\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-155}:\\ \;\;\;\;y \cdot -0.5\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-45}:\\ \;\;\;\;0.918938533204673\\ \mathbf{elif}\;x \leq 0.85:\\ \;\;\;\;y \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;-x\\ \end{array} \]
Alternative 2
Accuracy98.3%
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -5800 \lor \neg \left(x \leq 38000000\right):\\ \;\;\;\;x \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + \left(0.918938533204673 - y \cdot 0.5\right)\\ \end{array} \]
Alternative 3
Accuracy83.4%
Cost588
\[\begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+54}:\\ \;\;\;\;y \cdot -0.5\\ \mathbf{elif}\;y \leq -260:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq 1.85:\\ \;\;\;\;0.918938533204673 - x\\ \mathbf{else}:\\ \;\;\;\;y \cdot -0.5\\ \end{array} \]
Alternative 4
Accuracy97.4%
Cost585
\[\begin{array}{l} \mathbf{if}\;y \leq -1.45 \lor \neg \left(y \leq 1.2\right):\\ \;\;\;\;y \cdot \left(x - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;0.918938533204673 - x\\ \end{array} \]
Alternative 5
Accuracy97.4%
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -1.45:\\ \;\;\;\;x \cdot y + y \cdot -0.5\\ \mathbf{elif}\;y \leq 1:\\ \;\;\;\;0.918938533204673 - x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x - 0.5\right)\\ \end{array} \]
Alternative 6
Accuracy54.7%
Cost392
\[\begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-21}:\\ \;\;\;\;-x\\ \mathbf{elif}\;x \leq 0.92:\\ \;\;\;\;0.918938533204673\\ \mathbf{else}:\\ \;\;\;\;-x\\ \end{array} \]
Alternative 7
Accuracy29.5%
Cost64
\[0.918938533204673 \]

Error

Reproduce?

herbie shell --seed 2023151 
(FPCore (x y)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))