
(FPCore (x y) :precision binary64 (/ (- x y) (- 2.0 (+ x y))))
double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (2.0d0 - (x + y))
end function
public static double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
def code(x, y): return (x - y) / (2.0 - (x + y))
function code(x, y) return Float64(Float64(x - y) / Float64(2.0 - Float64(x + y))) end
function tmp = code(x, y) tmp = (x - y) / (2.0 - (x + y)); end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(2.0 - N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{2 - \left(x + y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (- x y) (- 2.0 (+ x y))))
double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (2.0d0 - (x + y))
end function
public static double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
def code(x, y): return (x - y) / (2.0 - (x + y))
function code(x, y) return Float64(Float64(x - y) / Float64(2.0 - Float64(x + y))) end
function tmp = code(x, y) tmp = (x - y) / (2.0 - (x + y)); end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(2.0 - N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{2 - \left(x + y\right)}
\end{array}
(FPCore (x y) :precision binary64 (let* ((t_0 (- 2.0 (+ x y)))) (- (/ x t_0) (/ y t_0))))
double code(double x, double y) {
double t_0 = 2.0 - (x + y);
return (x / t_0) - (y / t_0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
t_0 = 2.0d0 - (x + y)
code = (x / t_0) - (y / t_0)
end function
public static double code(double x, double y) {
double t_0 = 2.0 - (x + y);
return (x / t_0) - (y / t_0);
}
def code(x, y): t_0 = 2.0 - (x + y) return (x / t_0) - (y / t_0)
function code(x, y) t_0 = Float64(2.0 - Float64(x + y)) return Float64(Float64(x / t_0) - Float64(y / t_0)) end
function tmp = code(x, y) t_0 = 2.0 - (x + y); tmp = (x / t_0) - (y / t_0); end
code[x_, y_] := Block[{t$95$0 = N[(2.0 - N[(x + y), $MachinePrecision]), $MachinePrecision]}, N[(N[(x / t$95$0), $MachinePrecision] - N[(y / t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 - \left(x + y\right)\\
\frac{x}{t_0} - \frac{y}{t_0}
\end{array}
\end{array}
Initial program 100.0%
associate--r+100.0%
Simplified100.0%
div-sub100.0%
associate--l-100.0%
associate--l-100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(if (<= y -3.15e-6)
(+ 1.0 (/ 2.0 y))
(if (<= y -4.1e-55)
(* y -0.5)
(if (<= y 6.6e+53) (/ x (- 2.0 x)) (- 1.0 (/ x y))))))
double code(double x, double y) {
double tmp;
if (y <= -3.15e-6) {
tmp = 1.0 + (2.0 / y);
} else if (y <= -4.1e-55) {
tmp = y * -0.5;
} else if (y <= 6.6e+53) {
tmp = x / (2.0 - x);
} else {
tmp = 1.0 - (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-3.15d-6)) then
tmp = 1.0d0 + (2.0d0 / y)
else if (y <= (-4.1d-55)) then
tmp = y * (-0.5d0)
else if (y <= 6.6d+53) then
tmp = x / (2.0d0 - x)
else
tmp = 1.0d0 - (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.15e-6) {
tmp = 1.0 + (2.0 / y);
} else if (y <= -4.1e-55) {
tmp = y * -0.5;
} else if (y <= 6.6e+53) {
tmp = x / (2.0 - x);
} else {
tmp = 1.0 - (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.15e-6: tmp = 1.0 + (2.0 / y) elif y <= -4.1e-55: tmp = y * -0.5 elif y <= 6.6e+53: tmp = x / (2.0 - x) else: tmp = 1.0 - (x / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.15e-6) tmp = Float64(1.0 + Float64(2.0 / y)); elseif (y <= -4.1e-55) tmp = Float64(y * -0.5); elseif (y <= 6.6e+53) tmp = Float64(x / Float64(2.0 - x)); else tmp = Float64(1.0 - Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.15e-6) tmp = 1.0 + (2.0 / y); elseif (y <= -4.1e-55) tmp = y * -0.5; elseif (y <= 6.6e+53) tmp = x / (2.0 - x); else tmp = 1.0 - (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.15e-6], N[(1.0 + N[(2.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.1e-55], N[(y * -0.5), $MachinePrecision], If[LessEqual[y, 6.6e+53], N[(x / N[(2.0 - x), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.15 \cdot 10^{-6}:\\
\;\;\;\;1 + \frac{2}{y}\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-55}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+53}:\\
\;\;\;\;\frac{x}{2 - x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y}\\
\end{array}
\end{array}
if y < -3.14999999999999991e-6Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in x around 0 74.8%
mul-1-neg74.8%
distribute-neg-frac74.8%
Simplified74.8%
Taylor expanded in y around inf 74.6%
+-commutative74.6%
associate-*r/74.6%
metadata-eval74.6%
Simplified74.6%
if -3.14999999999999991e-6 < y < -4.0999999999999998e-55Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in x around 0 74.6%
mul-1-neg74.6%
distribute-neg-frac74.6%
Simplified74.6%
Taylor expanded in y around 0 71.6%
*-commutative71.6%
Simplified71.6%
if -4.0999999999999998e-55 < y < 6.6000000000000004e53Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in y around 0 76.9%
if 6.6000000000000004e53 < y Initial program 99.9%
associate--r+99.9%
Simplified99.9%
clear-num99.9%
associate-/r/99.6%
associate--l-99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 77.9%
Taylor expanded in y around 0 78.2%
mul-1-neg78.2%
unsub-neg78.2%
Simplified78.2%
Final simplification76.2%
(FPCore (x y) :precision binary64 (if (or (<= x -7.5e+25) (not (<= x 40000000000000.0))) (+ (/ y x) -1.0) 1.0))
double code(double x, double y) {
double tmp;
if ((x <= -7.5e+25) || !(x <= 40000000000000.0)) {
tmp = (y / x) + -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-7.5d+25)) .or. (.not. (x <= 40000000000000.0d0))) then
tmp = (y / x) + (-1.0d0)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -7.5e+25) || !(x <= 40000000000000.0)) {
tmp = (y / x) + -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -7.5e+25) or not (x <= 40000000000000.0): tmp = (y / x) + -1.0 else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if ((x <= -7.5e+25) || !(x <= 40000000000000.0)) tmp = Float64(Float64(y / x) + -1.0); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -7.5e+25) || ~((x <= 40000000000000.0))) tmp = (y / x) + -1.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -7.5e+25], N[Not[LessEqual[x, 40000000000000.0]], $MachinePrecision]], N[(N[(y / x), $MachinePrecision] + -1.0), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+25} \lor \neg \left(x \leq 40000000000000\right):\\
\;\;\;\;\frac{y}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -7.49999999999999993e25 or 4e13 < x Initial program 100.0%
associate--r+100.0%
Simplified100.0%
clear-num100.0%
associate-/r/99.7%
associate--l-99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 80.5%
Taylor expanded in x around 0 80.7%
if -7.49999999999999993e25 < x < 4e13Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in y around inf 56.3%
Final simplification68.2%
(FPCore (x y) :precision binary64 (if (or (<= x -1.8e+33) (not (<= x 6600000000000.0))) (+ (/ y x) -1.0) (/ y (+ y -2.0))))
double code(double x, double y) {
double tmp;
if ((x <= -1.8e+33) || !(x <= 6600000000000.0)) {
tmp = (y / x) + -1.0;
} else {
tmp = y / (y + -2.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-1.8d+33)) .or. (.not. (x <= 6600000000000.0d0))) then
tmp = (y / x) + (-1.0d0)
else
tmp = y / (y + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -1.8e+33) || !(x <= 6600000000000.0)) {
tmp = (y / x) + -1.0;
} else {
tmp = y / (y + -2.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -1.8e+33) or not (x <= 6600000000000.0): tmp = (y / x) + -1.0 else: tmp = y / (y + -2.0) return tmp
function code(x, y) tmp = 0.0 if ((x <= -1.8e+33) || !(x <= 6600000000000.0)) tmp = Float64(Float64(y / x) + -1.0); else tmp = Float64(y / Float64(y + -2.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -1.8e+33) || ~((x <= 6600000000000.0))) tmp = (y / x) + -1.0; else tmp = y / (y + -2.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -1.8e+33], N[Not[LessEqual[x, 6600000000000.0]], $MachinePrecision]], N[(N[(y / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(y / N[(y + -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+33} \lor \neg \left(x \leq 6600000000000\right):\\
\;\;\;\;\frac{y}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + -2}\\
\end{array}
\end{array}
if x < -1.8000000000000001e33 or 6.6e12 < x Initial program 100.0%
associate--r+100.0%
Simplified100.0%
clear-num100.0%
associate-/r/99.7%
associate--l-99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 80.5%
Taylor expanded in x around 0 80.7%
if -1.8000000000000001e33 < x < 6.6e12Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in x around 0 80.8%
mul-1-neg80.8%
distribute-neg-frac80.8%
Simplified80.8%
frac-2neg80.8%
div-inv80.7%
remove-double-neg80.7%
sub-neg80.7%
add-sqr-sqrt46.3%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod10.2%
add-sqr-sqrt24.9%
Applied egg-rr24.9%
distribute-neg-in24.9%
metadata-eval24.9%
Simplified24.9%
expm1-log1p-u24.9%
expm1-udef4.6%
un-div-inv4.6%
+-commutative4.6%
add-sqr-sqrt2.2%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod25.6%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
expm1-def80.8%
expm1-log1p80.8%
Simplified80.8%
Final simplification80.8%
(FPCore (x y) :precision binary64 (if (<= x -1.35e+29) (/ (- y x) x) (if (<= x 1250000000000.0) (/ y (+ y -2.0)) (+ (/ y x) -1.0))))
double code(double x, double y) {
double tmp;
if (x <= -1.35e+29) {
tmp = (y - x) / x;
} else if (x <= 1250000000000.0) {
tmp = y / (y + -2.0);
} else {
tmp = (y / x) + -1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.35d+29)) then
tmp = (y - x) / x
else if (x <= 1250000000000.0d0) then
tmp = y / (y + (-2.0d0))
else
tmp = (y / x) + (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.35e+29) {
tmp = (y - x) / x;
} else if (x <= 1250000000000.0) {
tmp = y / (y + -2.0);
} else {
tmp = (y / x) + -1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.35e+29: tmp = (y - x) / x elif x <= 1250000000000.0: tmp = y / (y + -2.0) else: tmp = (y / x) + -1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= -1.35e+29) tmp = Float64(Float64(y - x) / x); elseif (x <= 1250000000000.0) tmp = Float64(y / Float64(y + -2.0)); else tmp = Float64(Float64(y / x) + -1.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.35e+29) tmp = (y - x) / x; elseif (x <= 1250000000000.0) tmp = y / (y + -2.0); else tmp = (y / x) + -1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.35e+29], N[(N[(y - x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 1250000000000.0], N[(y / N[(y + -2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y / x), $MachinePrecision] + -1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+29}:\\
\;\;\;\;\frac{y - x}{x}\\
\mathbf{elif}\;x \leq 1250000000000:\\
\;\;\;\;\frac{y}{y + -2}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x} + -1\\
\end{array}
\end{array}
if x < -1.35e29Initial program 99.9%
associate--r+99.9%
Simplified99.9%
clear-num100.0%
associate-/r/99.8%
associate--l-99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 85.9%
associate-*l/86.0%
sub-neg86.0%
distribute-lft-in86.0%
neg-mul-186.0%
add-sqr-sqrt42.9%
sqrt-unprod79.0%
sqr-neg79.0%
sqrt-unprod43.3%
add-sqr-sqrt85.6%
neg-mul-185.6%
add-sqr-sqrt42.3%
sqrt-unprod78.8%
sqr-neg78.8%
sqrt-unprod43.2%
add-sqr-sqrt86.0%
Applied egg-rr86.0%
if -1.35e29 < x < 1.25e12Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in x around 0 80.8%
mul-1-neg80.8%
distribute-neg-frac80.8%
Simplified80.8%
frac-2neg80.8%
div-inv80.7%
remove-double-neg80.7%
sub-neg80.7%
add-sqr-sqrt46.3%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod10.2%
add-sqr-sqrt24.9%
Applied egg-rr24.9%
distribute-neg-in24.9%
metadata-eval24.9%
Simplified24.9%
expm1-log1p-u24.9%
expm1-udef4.6%
un-div-inv4.6%
+-commutative4.6%
add-sqr-sqrt2.2%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod25.6%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
expm1-def80.8%
expm1-log1p80.8%
Simplified80.8%
if 1.25e12 < x Initial program 100.0%
associate--r+100.0%
Simplified100.0%
clear-num100.0%
associate-/r/99.6%
associate--l-99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 76.8%
Taylor expanded in x around 0 77.1%
Final simplification80.8%
(FPCore (x y) :precision binary64 (/ (- x y) (- 2.0 (+ x y))))
double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (2.0d0 - (x + y))
end function
public static double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
def code(x, y): return (x - y) / (2.0 - (x + y))
function code(x, y) return Float64(Float64(x - y) / Float64(2.0 - Float64(x + y))) end
function tmp = code(x, y) tmp = (x - y) / (2.0 - (x + y)); end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(2.0 - N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{2 - \left(x + y\right)}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y) :precision binary64 (if (<= x -9e+74) -1.0 (if (<= x 7000000000000.0) 1.0 -1.0)))
double code(double x, double y) {
double tmp;
if (x <= -9e+74) {
tmp = -1.0;
} else if (x <= 7000000000000.0) {
tmp = 1.0;
} else {
tmp = -1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-9d+74)) then
tmp = -1.0d0
else if (x <= 7000000000000.0d0) then
tmp = 1.0d0
else
tmp = -1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -9e+74) {
tmp = -1.0;
} else if (x <= 7000000000000.0) {
tmp = 1.0;
} else {
tmp = -1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -9e+74: tmp = -1.0 elif x <= 7000000000000.0: tmp = 1.0 else: tmp = -1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= -9e+74) tmp = -1.0; elseif (x <= 7000000000000.0) tmp = 1.0; else tmp = -1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -9e+74) tmp = -1.0; elseif (x <= 7000000000000.0) tmp = 1.0; else tmp = -1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -9e+74], -1.0, If[LessEqual[x, 7000000000000.0], 1.0, -1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+74}:\\
\;\;\;\;-1\\
\mathbf{elif}\;x \leq 7000000000000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-1\\
\end{array}
\end{array}
if x < -8.9999999999999999e74 or 7e12 < x Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in x around inf 80.7%
if -8.9999999999999999e74 < x < 7e12Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in y around inf 56.2%
Final simplification68.0%
(FPCore (x y) :precision binary64 -1.0)
double code(double x, double y) {
return -1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = -1.0d0
end function
public static double code(double x, double y) {
return -1.0;
}
def code(x, y): return -1.0
function code(x, y) return -1.0 end
function tmp = code(x, y) tmp = -1.0; end
code[x_, y_] := -1.0
\begin{array}{l}
\\
-1
\end{array}
Initial program 100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in x around inf 40.5%
Final simplification40.5%
(FPCore (x y) :precision binary64 (let* ((t_0 (- 2.0 (+ x y)))) (- (/ x t_0) (/ y t_0))))
double code(double x, double y) {
double t_0 = 2.0 - (x + y);
return (x / t_0) - (y / t_0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
t_0 = 2.0d0 - (x + y)
code = (x / t_0) - (y / t_0)
end function
public static double code(double x, double y) {
double t_0 = 2.0 - (x + y);
return (x / t_0) - (y / t_0);
}
def code(x, y): t_0 = 2.0 - (x + y) return (x / t_0) - (y / t_0)
function code(x, y) t_0 = Float64(2.0 - Float64(x + y)) return Float64(Float64(x / t_0) - Float64(y / t_0)) end
function tmp = code(x, y) t_0 = 2.0 - (x + y); tmp = (x / t_0) - (y / t_0); end
code[x_, y_] := Block[{t$95$0 = N[(2.0 - N[(x + y), $MachinePrecision]), $MachinePrecision]}, N[(N[(x / t$95$0), $MachinePrecision] - N[(y / t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 - \left(x + y\right)\\
\frac{x}{t_0} - \frac{y}{t_0}
\end{array}
\end{array}
herbie shell --seed 2023238
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, C"
:precision binary64
:herbie-target
(- (/ x (- 2.0 (+ x y))) (/ y (- 2.0 (+ x y))))
(/ (- x y) (- 2.0 (+ x y))))