?

Average Error: 0.0 → 0.0
Time: 7.1s
Precision: binary64
Cost: 7424

?

\[\left(-0.1 \leq x \land x \leq 0.1\right) \land \left(-0.1 \leq y \land y \leq 0.1\right)\]
\[\frac{1 + x}{1 + y} \]
\[\frac{1 + x}{1 + {y}^{3}} \cdot \left(1 + y \cdot \left(y + -1\right)\right) \]
(FPCore (x y) :precision binary64 (/ (+ 1.0 x) (+ 1.0 y)))
(FPCore (x y)
 :precision binary64
 (* (/ (+ 1.0 x) (+ 1.0 (pow y 3.0))) (+ 1.0 (* y (+ y -1.0)))))
double code(double x, double y) {
	return (1.0 + x) / (1.0 + y);
}
double code(double x, double y) {
	return ((1.0 + x) / (1.0 + pow(y, 3.0))) * (1.0 + (y * (y + -1.0)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (1.0d0 + x) / (1.0d0 + y)
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((1.0d0 + x) / (1.0d0 + (y ** 3.0d0))) * (1.0d0 + (y * (y + (-1.0d0))))
end function
public static double code(double x, double y) {
	return (1.0 + x) / (1.0 + y);
}
public static double code(double x, double y) {
	return ((1.0 + x) / (1.0 + Math.pow(y, 3.0))) * (1.0 + (y * (y + -1.0)));
}
def code(x, y):
	return (1.0 + x) / (1.0 + y)
def code(x, y):
	return ((1.0 + x) / (1.0 + math.pow(y, 3.0))) * (1.0 + (y * (y + -1.0)))
function code(x, y)
	return Float64(Float64(1.0 + x) / Float64(1.0 + y))
end
function code(x, y)
	return Float64(Float64(Float64(1.0 + x) / Float64(1.0 + (y ^ 3.0))) * Float64(1.0 + Float64(y * Float64(y + -1.0))))
end
function tmp = code(x, y)
	tmp = (1.0 + x) / (1.0 + y);
end
function tmp = code(x, y)
	tmp = ((1.0 + x) / (1.0 + (y ^ 3.0))) * (1.0 + (y * (y + -1.0)));
end
code[x_, y_] := N[(N[(1.0 + x), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[(N[(1.0 + x), $MachinePrecision] / N[(1.0 + N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(y * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1 + x}{1 + y}
\frac{1 + x}{1 + {y}^{3}} \cdot \left(1 + y \cdot \left(y + -1\right)\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.0

    \[\frac{1 + x}{1 + y} \]
  2. Applied egg-rr0.0

    \[\leadsto \color{blue}{\frac{1 + x}{1 + {y}^{3}} \cdot \left(1 + y \cdot \left(y - 1\right)\right)} \]
  3. Final simplification0.0

    \[\leadsto \frac{1 + x}{1 + {y}^{3}} \cdot \left(1 + y \cdot \left(y + -1\right)\right) \]

Alternatives

Alternative 1
Error1.2
Cost841
\[\begin{array}{l} t_0 := 1 + y \leq 1\\ \mathbf{if}\;t_0 \lor \neg t_0:\\ \;\;\;\;\frac{1}{1 + y}\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \]
Alternative 2
Error0.5
Cost448
\[\left(1 + x\right) \cdot \left(1 - y\right) \]
Alternative 3
Error0.0
Cost448
\[\frac{1 + x}{1 + y} \]
Alternative 4
Error1.1
Cost192
\[1 + x \]
Alternative 5
Error2.3
Cost64
\[1 \]

Error

Reproduce?

herbie shell --seed 1 
(FPCore (x y)
  :name "(1+x)/(1+y)"
  :precision binary64
  :pre (and (and (<= -0.1 x) (<= x 0.1)) (and (<= -0.1 y) (<= y 0.1)))
  (/ (+ 1.0 x) (+ 1.0 y)))