Skip to content

Commit

Permalink
fix(math): frexp, ldexp compile err if for float32
Browse files Browse the repository at this point in the history
  • Loading branch information
litlighilit committed Oct 4, 2024
1 parent ef291cf commit 1007e5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pylib/Lib/n_math.nim
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ true, but may return false without setting up an exception.]##

export frexpLib.frexp

func ldexp*(x: SomeFloat, i: int, exc: var ref Exception): float{.raises: [].} =
func ldexp*[F: SomeFloat](x: F, i: int, exc: var ref Exception): F{.raises: [].} =
## set exception to `exc` instead of raising it
##
## `exc`:
Expand Down Expand Up @@ -328,7 +328,7 @@ func ldexp*(x: SomeFloat, i: int, exc: var ref Exception): float{.raises: [].} =
return
exc = nil

func ldexp*(x: SomeFloat, i: int): float{.raises: [].} =
func ldexp*[F: SomeFloat](x: F, i: int): F{.raises: [].} =
## .. hint:: only set errno
var exc_unused: ref Exception
ldexp(x, i, exc_unused)
Expand Down

0 comments on commit 1007e5c

Please sign in to comment.