Skip to content

Commit

Permalink
Remove checked conversions in two more cases. NFC. (#34406)
Browse files Browse the repository at this point in the history
Like #34398, but in a different place. I also realized there was a good reason to
do this beside personal preference: Once we start tracking nothrow more closely (to
optimize try/catch, etc.), we we'll want to make sure not to emit error paths that the
julia optimizer itself can't eliminate.
  • Loading branch information
Keno authored Jan 17, 2020
1 parent 4254045 commit 833e6bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/ryu/shortest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ integer. If a `maxsignif` argument is provided, then `b < maxsignif`.
U = uinttype(T)
uf = reinterpret(U, f)
m = uf & significand_mask(T)
e = Int((uf & exponent_mask(T)) >> significand_bits(T))
e = ((uf & exponent_mask(T)) >> significand_bits(T)) % Int

## Step 1
# mf * 2^ef == f
Expand Down
3 changes: 2 additions & 1 deletion base/special/rem_pio2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ function paynehanek(x::Float64)
X = (u & significand_mask(Float64)) | (one(UInt64) << significand_bits(Float64))
# Get k from formula above
# k = exponent(x)-52
k = Int((u & exponent_mask(Float64)) >> significand_bits(Float64)) - exponent_bias(Float64) - significand_bits(Float64)
raw_exponent = ((u & exponent_mask(Float64)) >> significand_bits(Float64)) % Int
k = raw_exponent - exponent_bias(Float64) - significand_bits(Float64)

# 2. Let α = 1/2π, then:
#
Expand Down

2 comments on commit 833e6bf

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your test job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

Please sign in to comment.