(FPCore (x y) :precision binary64 (/ (- x y) (+ x y)))
(FPCore (x y) :precision binary64 (let* ((t_0 (/ (- x y) (+ x y)))) (* (cbrt t_0) (cbrt (pow t_0 2.0)))))
double code(double x, double y) {
return (x - y) / (x + y);
}
double code(double x, double y) {
double t_0 = (x - y) / (x + y);
return cbrt(t_0) * cbrt(pow(t_0, 2.0));
}
public static double code(double x, double y) {
return (x - y) / (x + y);
}
public static double code(double x, double y) {
double t_0 = (x - y) / (x + y);
return Math.cbrt(t_0) * Math.cbrt(Math.pow(t_0, 2.0));
}
function code(x, y) return Float64(Float64(x - y) / Float64(x + y)) end
function code(x, y) t_0 = Float64(Float64(x - y) / Float64(x + y)) return Float64(cbrt(t_0) * cbrt((t_0 ^ 2.0))) end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := Block[{t$95$0 = N[(N[(x - y), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[t$95$0, 1/3], $MachinePrecision] * N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]
\frac{x - y}{x + y}
\begin{array}{l}
t_0 := \frac{x - y}{x + y}\\
\sqrt[3]{t_0} \cdot \sqrt[3]{{t_0}^{2}}
\end{array}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Applied egg-rr0.0
Final simplification0.0
herbie shell --seed 2022153
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
:precision binary64
:herbie-target
(- (/ x (+ x y)) (/ y (+ x y)))
(/ (- x y) (+ x y)))