Skip to content

Commit

Permalink
Revert cbrt change
Browse files Browse the repository at this point in the history
On Linux, cbrt seems to be less accurate in CI, we are a bit more
accurate overall with what we already have.
  • Loading branch information
facelessuser committed Nov 22, 2023
1 parent 0bb1258 commit b0aa9f7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions coloraide/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
)
from typing import Callable, Sequence, Iterator, Any, Iterable, overload

PY311 = (3, 11) <= sys.version_info

NaN = math.nan
INF = math.inf

Expand Down Expand Up @@ -158,9 +156,6 @@ def nth_root(n: float, p: float) -> float:
# Can't do anything with zero
return 0

if PY311 and p == 3:
return math.cbrt(n) # type: ignore[attr-defined, no-any-return, unused-ignore]

return math.copysign(abs(n) ** (p ** -1), n)


Expand Down

0 comments on commit b0aa9f7

Please sign in to comment.