Skip to content

Commit

Permalink
Remove deprecated math.c_frexp (#19518)
Browse files Browse the repository at this point in the history
* Remove Deprecated math proc

* Remove Deprecated math proc

* Remove Deprecated math proc
  • Loading branch information
juancarlospaco authored Feb 14, 2022
1 parent 42eeab5 commit 8e8231f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ becomes an alias for `addr`.

- Changed mimedb to use an `OrderedTable` instead of `OrderedTableRef`, to use it in a const.

- Removed deprecated `math.c_frexp`.


## Language changes

- Pragma macros on type definitions can now return `nnkTypeSection` nodes as well as `nnkTypeDef`,
Expand Down
5 changes: 0 additions & 5 deletions lib/pure/math.nim
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ when defined(c) or defined(cpp):

proc c_signbit(x: SomeFloat): cint {.importc: "signbit", header: "<math.h>".}

func c_frexp*(x: cfloat, exponent: var cint): cfloat {.
importc: "frexpf", header: "<math.h>", deprecated: "Use `frexp` instead".}
func c_frexp*(x: cdouble, exponent: var cint): cdouble {.
importc: "frexp", header: "<math.h>", deprecated: "Use `frexp` instead".}

# don't export `c_frexp` in the future and remove `c_frexp2`.
func c_frexp2(x: cfloat, exponent: var cint): cfloat {.
importc: "frexpf", header: "<math.h>".}
Expand Down
6 changes: 0 additions & 6 deletions tests/stdlib/tmath.nim
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,6 @@ template main() =
doAssert lgamma(-0.0) == Inf
doAssert lgamma(-1.0) == Inf

when nimvm: discard
else:
var exponent: cint
doAssert c_frexp(0.0, exponent) == 0.0
doAssert c_frexp(-0.0, exponent) == -0.0
doAssert classify(c_frexp(-0.0, exponent)) == fcNegZero

static: main()
main()

0 comments on commit 8e8231f

Please sign in to comment.