Skip to content

Commit 5e94508

Browse files
authored
Shorter isapproxinteger check for integers (#340)
* check isinteger in isapproxinteger * Version bump to v0.7.58
1 parent 6d1fd79 commit 5e94508

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.7.57"
3+
version = "0.7.58"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/LinearAlgebra/helper.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end
5151

5252
# The second case handles zero
5353
isapproxinteger(::Integer) = true
54-
isapproxinteger(x) = isapprox(x,round(Int,x)) || isapprox(x+1,round(Int,x+1))
54+
isapproxinteger(x) = isinteger(x) || isapprox(x,round(Int,x)) || isapprox(x+1,round(Int,x+1))
5555

5656

5757
# This creates ApproxFunBase.real, ApproxFunBase.eps and ApproxFunBase.dou

0 commit comments

Comments
 (0)