Skip to content

Commit

Permalink
Merge pull request #17 from daschw/plain-precision
Browse files Browse the repository at this point in the history
Plain precision (fix #16)
  • Loading branch information
SimonDanisch authored Jun 30, 2019
2 parents 5c3d77f + 9a3b04f commit 8502c2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Showoff"
uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
author = ["Daniel C. Jones (@dcjones)"]
version = "0.3.0"
version = "0.3.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

[compat]
julia = "1"
julia = "1"

[extras]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 1 addition & 1 deletion src/Showoff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function plain_precision_heuristic(xs::AbstractArray{<:AbstractFloat})
ys = filter(isfinite, xs)
precision = 0
for y in ys
len, point, neg, digits = grisu(y, Base.Grisu.SHORTEST, 0)
len, point, neg, digits = grisu(convert(Float32, y), Base.Grisu.SHORTEST, 0)
precision = max(precision, len - point)
end
return max(precision, 0)
Expand Down

2 comments on commit 8502c2e

@SimonDanisch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/1671

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.1 -m "<description of version>" 8502c2ec11f93c4f50c609ff4168aab31154b39d
git push origin v0.3.1

Please sign in to comment.