
(FPCore (x y) :precision binary64 (- (+ x y) (* x y)))
double code(double x, double y) {
return (x + y) - (x * y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x + y) - (x * y)
end function
public static double code(double x, double y) {
return (x + y) - (x * y);
}
def code(x, y): return (x + y) - (x * y)
function code(x, y) return Float64(Float64(x + y) - Float64(x * y)) end
function tmp = code(x, y) tmp = (x + y) - (x * y); end
code[x_, y_] := N[(N[(x + y), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - x \cdot y
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (+ x y) (* x y)))
double code(double x, double y) {
return (x + y) - (x * y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x + y) - (x * y)
end function
public static double code(double x, double y) {
return (x + y) - (x * y);
}
def code(x, y): return (x + y) - (x * y)
function code(x, y) return Float64(Float64(x + y) - Float64(x * y)) end
function tmp = code(x, y) tmp = (x + y) - (x * y); end
code[x_, y_] := N[(N[(x + y), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - x \cdot y
\end{array}
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (fma x (- 1.0 y) y))
assert(x < y);
double code(double x, double y) {
return fma(x, (1.0 - y), y);
}
x, y = sort([x, y]) function code(x, y) return fma(x, Float64(1.0 - y), y) end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(x * N[(1.0 - y), $MachinePrecision] + y), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\mathsf{fma}\left(x, 1 - y, y\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
*-commutative100.0%
associate--l+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
distribute-rgt-out--100.0%
fma-define100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification100.0%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(let* ((t_0 (* x (- y))))
(if (<= y -1.0)
t_0
(if (<= y 6.2e-94) x (if (<= y 2.9e+97) y (if (<= y 3.2e+151) t_0 y))))))assert(x < y);
double code(double x, double y) {
double t_0 = x * -y;
double tmp;
if (y <= -1.0) {
tmp = t_0;
} else if (y <= 6.2e-94) {
tmp = x;
} else if (y <= 2.9e+97) {
tmp = y;
} else if (y <= 3.2e+151) {
tmp = t_0;
} else {
tmp = y;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x * -y
if (y <= (-1.0d0)) then
tmp = t_0
else if (y <= 6.2d-94) then
tmp = x
else if (y <= 2.9d+97) then
tmp = y
else if (y <= 3.2d+151) then
tmp = t_0
else
tmp = y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double t_0 = x * -y;
double tmp;
if (y <= -1.0) {
tmp = t_0;
} else if (y <= 6.2e-94) {
tmp = x;
} else if (y <= 2.9e+97) {
tmp = y;
} else if (y <= 3.2e+151) {
tmp = t_0;
} else {
tmp = y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): t_0 = x * -y tmp = 0 if y <= -1.0: tmp = t_0 elif y <= 6.2e-94: tmp = x elif y <= 2.9e+97: tmp = y elif y <= 3.2e+151: tmp = t_0 else: tmp = y return tmp
x, y = sort([x, y]) function code(x, y) t_0 = Float64(x * Float64(-y)) tmp = 0.0 if (y <= -1.0) tmp = t_0; elseif (y <= 6.2e-94) tmp = x; elseif (y <= 2.9e+97) tmp = y; elseif (y <= 3.2e+151) tmp = t_0; else tmp = y; end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
t_0 = x * -y;
tmp = 0.0;
if (y <= -1.0)
tmp = t_0;
elseif (y <= 6.2e-94)
tmp = x;
elseif (y <= 2.9e+97)
tmp = y;
elseif (y <= 3.2e+151)
tmp = t_0;
else
tmp = y;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(x * (-y)), $MachinePrecision]}, If[LessEqual[y, -1.0], t$95$0, If[LessEqual[y, 6.2e-94], x, If[LessEqual[y, 2.9e+97], y, If[LessEqual[y, 3.2e+151], t$95$0, y]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := x \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-94}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+97}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+151}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1 or 2.89999999999999987e97 < y < 3.19999999999999994e151Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 99.0%
mul-1-neg99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in x around inf 53.5%
mul-1-neg53.5%
distribute-lft-neg-out53.5%
*-commutative53.5%
Simplified53.5%
if -1 < y < 6.1999999999999996e-94Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 78.6%
if 6.1999999999999996e-94 < y < 2.89999999999999987e97 or 3.19999999999999994e151 < y Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 54.4%
Final simplification64.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (or (<= x -5.5e-209) (not (<= x 2.8e-11))) (* x (- 1.0 y)) y))
assert(x < y);
double code(double x, double y) {
double tmp;
if ((x <= -5.5e-209) || !(x <= 2.8e-11)) {
tmp = x * (1.0 - y);
} else {
tmp = y;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-5.5d-209)) .or. (.not. (x <= 2.8d-11))) then
tmp = x * (1.0d0 - y)
else
tmp = y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if ((x <= -5.5e-209) || !(x <= 2.8e-11)) {
tmp = x * (1.0 - y);
} else {
tmp = y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if (x <= -5.5e-209) or not (x <= 2.8e-11): tmp = x * (1.0 - y) else: tmp = y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if ((x <= -5.5e-209) || !(x <= 2.8e-11)) tmp = Float64(x * Float64(1.0 - y)); else tmp = y; end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if ((x <= -5.5e-209) || ~((x <= 2.8e-11)))
tmp = x * (1.0 - y);
else
tmp = y;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[Or[LessEqual[x, -5.5e-209], N[Not[LessEqual[x, 2.8e-11]], $MachinePrecision]], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-209} \lor \neg \left(x \leq 2.8 \cdot 10^{-11}\right):\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -5.5000000000000001e-209 or 2.8e-11 < x Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 82.7%
if -5.5000000000000001e-209 < x < 2.8e-11Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 84.2%
Final simplification83.1%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 2.8e-93) (* x (- 1.0 y)) (* y (- 1.0 x))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 2.8e-93) {
tmp = x * (1.0 - y);
} else {
tmp = y * (1.0 - x);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.8d-93) then
tmp = x * (1.0d0 - y)
else
tmp = y * (1.0d0 - x)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 2.8e-93) {
tmp = x * (1.0 - y);
} else {
tmp = y * (1.0 - x);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 2.8e-93: tmp = x * (1.0 - y) else: tmp = y * (1.0 - x) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 2.8e-93) tmp = Float64(x * Float64(1.0 - y)); else tmp = Float64(y * Float64(1.0 - x)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 2.8e-93)
tmp = x * (1.0 - y);
else
tmp = y * (1.0 - x);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 2.8e-93], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.8 \cdot 10^{-93}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - x\right)\\
\end{array}
\end{array}
if y < 2.79999999999999998e-93Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 68.2%
if 2.79999999999999998e-93 < y Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 84.9%
mul-1-neg84.9%
unsub-neg84.9%
Simplified84.9%
Final simplification73.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 6.5e-95) (* x (- 1.0 y)) (- y (* x y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 6.5e-95) {
tmp = x * (1.0 - y);
} else {
tmp = y - (x * y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 6.5d-95) then
tmp = x * (1.0d0 - y)
else
tmp = y - (x * y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 6.5e-95) {
tmp = x * (1.0 - y);
} else {
tmp = y - (x * y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 6.5e-95: tmp = x * (1.0 - y) else: tmp = y - (x * y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 6.5e-95) tmp = Float64(x * Float64(1.0 - y)); else tmp = Float64(y - Float64(x * y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 6.5e-95)
tmp = x * (1.0 - y);
else
tmp = y - (x * y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 6.5e-95], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], N[(y - N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.5 \cdot 10^{-95}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;y - x \cdot y\\
\end{array}
\end{array}
if y < 6.49999999999999985e-95Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 68.2%
if 6.49999999999999985e-95 < y Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 84.9%
mul-1-neg84.9%
unsub-neg84.9%
Simplified84.9%
sub-neg84.9%
distribute-rgt-in84.9%
*-un-lft-identity84.9%
Applied egg-rr84.9%
distribute-lft-neg-out84.9%
unsub-neg84.9%
*-commutative84.9%
Applied egg-rr84.9%
Final simplification73.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (+ y (* x (- 1.0 y))))
assert(x < y);
double code(double x, double y) {
return y + (x * (1.0 - y));
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y + (x * (1.0d0 - y))
end function
assert x < y;
public static double code(double x, double y) {
return y + (x * (1.0 - y));
}
[x, y] = sort([x, y]) def code(x, y): return y + (x * (1.0 - y))
x, y = sort([x, y]) function code(x, y) return Float64(y + Float64(x * Float64(1.0 - y))) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = y + (x * (1.0 - y));
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(y + N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
y + x \cdot \left(1 - y\right)
\end{array}
Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification100.0%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.4e-94) x y))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.4e-94) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.4d-94) then
tmp = x
else
tmp = y
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.4e-94) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.4e-94: tmp = x else: tmp = y return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.4e-94) tmp = x; else tmp = y; end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.4e-94)
tmp = x;
else
tmp = y;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.4e-94], x, y]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.4 \cdot 10^{-94}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.3999999999999999e-94Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 49.5%
if 1.3999999999999999e-94 < y Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 51.0%
Final simplification49.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 x)
assert(x < y);
double code(double x, double y) {
return x;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x
end function
assert x < y;
public static double code(double x, double y) {
return x;
}
[x, y] = sort([x, y]) def code(x, y): return x
x, y = sort([x, y]) function code(x, y) return x end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = x;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := x
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
x
\end{array}
Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
unsub-neg100.0%
cancel-sign-sub-inv100.0%
associate--l+100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-out100.0%
*-commutative100.0%
distribute-rgt-out100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 38.9%
Final simplification38.9%
herbie shell --seed 2024077
(FPCore (x y)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, A"
:precision binary64
(- (+ x y) (* x y)))