ENA, Section 1.4, Exercise 4d

Specification

?
\[\left(0 \leq x \land x \leq 1000000000\right) \land \left(-1 \leq \varepsilon \land \varepsilon \leq 1\right)\]
\[\begin{array}{l} \\ x - \sqrt{x \cdot x - \varepsilon} \end{array} \]
(FPCore (x eps) :precision binary64 (- x (sqrt (- (* x x) eps))))
double code(double x, double eps) {
	return x - sqrt(((x * x) - eps));
}
real(8) function code(x, eps)
    real(8), intent (in) :: x
    real(8), intent (in) :: eps
    code = x - sqrt(((x * x) - eps))
end function
public static double code(double x, double eps) {
	return x - Math.sqrt(((x * x) - eps));
}
def code(x, eps):
	return x - math.sqrt(((x * x) - eps))
function code(x, eps)
	return Float64(x - sqrt(Float64(Float64(x * x) - eps)))
end
function tmp = code(x, eps)
	tmp = x - sqrt(((x * x) - eps));
end
code[x_, eps_] := N[(x - N[Sqrt[N[(N[(x * x), $MachinePrecision] - eps), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \sqrt{x \cdot x - \varepsilon}
\end{array}

Reproduce

?
herbie shell --seed 2024005 
(FPCore (x eps)
  :name "ENA, Section 1.4, Exercise 4d"
  :precision binary64
  :pre (and (and (<= 0.0 x) (<= x 1000000000.0)) (and (<= -1.0 eps) (<= eps 1.0)))

  :herbie-target
  (/ eps (+ x (sqrt (- (* x x) eps))))

  (- x (sqrt (- (* x x) eps))))

Please file a bug report with this information.

Backtrace

repr->cost: arity mismatch; the expected number of arguments does not match the given number expected: 2 given: 1LC
loop.../private/map.rkt5419
f490.../match/compiler.rkt54840
make-alt-table/home/nightlies/herbie/platforms/src/core/alt-table.rkt400
(unnamed)/usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt48618
initialize-alt-table!/home/nightlies/herbie/platforms/src/mainloop.rkt3160
mutate!/home/nightlies/herbie/platforms/src/mainloop.rkt3520
run-improve!/home/nightlies/herbie/platforms/src/mainloop.rkt3380
get-alternatives/report/home/nightlies/herbie/platforms/src/sandbox.rkt1690
(unnamed)/home/nightlies/herbie/platforms/src/sandbox.rkt2626
(unnamed)/usr/share/racket/pkgs/profile-lib/main.rkt4010
profile-thunk/usr/share/racket/pkgs/profile-lib/main.rkt90
(unnamed)/usr/share/racket/collects/racket/engine.rkt4224