Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define round/trunc/ceil/floor to Bool #25085

Merged
merged 1 commit into from
Feb 26, 2022
Merged

define round/trunc/ceil/floor to Bool #25085

merged 1 commit into from
Feb 26, 2022

Conversation

simonbyrne
Copy link
Contributor

Fixes #25074

@StefanKarpinski
Copy link
Member

Test failure in ambiguous:

Some tests did not pass: 60 passed, 1 failed, 0 errored, 2 broken.ambiguous: Test Failed at /tmp/julia/share/julia/test/ambiguous.jl:156
Expression: detect_ambiguities(Core, Base; imported=true, recursive=true, ambiguous_bottom=false) == []
Evaluated: Tuple{Method,Method}[(floor(::Type{T}, x::Float16) where T<:Integer in Base at float.jl:350, floor(::Type{Bool}, x::AbstractFloat) in Base at float.jl:358), (round(::Type{T}, x::Float16) where T<:Integer in Base at float.jl:354, round(::Type{Bool}, x::AbstractFloat) in Base at float.jl:360), (trunc(::Type{T}, x::Float16) where T<:Integer in Base at float.jl:346, trunc(::Type{Bool}, x::AbstractFloat) in Base at float.jl:357), (ceil(::Type{T}, x::Float16) where T<:Integer in Base at float.jl:352, ceil(::Type{Bool}, x::AbstractFloat) in Base at float.jl:359)] == Any[]
Stacktrace:
[1] record(::Test.DefaultTestSet, ::Test.Fail) at /home/travis/build/JuliaLang/julia/usr/share/julia/site/v0.7/Test/src/Test.jl:671
[2] (::getfield(, Symbol("##42#46")))() at /tmp/julia/share/julia/test/runtests.jl:198
[3] cd(::getfield(, Symbol("##42#46")), ::String) at ./file.jl:70
[4] top-level scope
[5] include at ./boot.jl:279 [inlined]
[6] include_relative(::Module, ::String) at ./loading.jl:509
[7] include(::Module, ::String) at ./sysimg.jl:15
[8] process_options(::Base.JLOptions) at ./client.jl:328
[9] _start() at ./client.jl:379

@ViralBShah ViralBShah added the maths Mathematical functions label Feb 25, 2022
@ViralBShah
Copy link
Member

@simonbyrne Should we get this merged? Seems like should be straightforward, assuming the ambiguity has got resolved magically.

@simonbyrne
Copy link
Contributor Author

Seems fine now.

@simonbyrne simonbyrne merged commit fe1264a into master Feb 26, 2022
@simonbyrne simonbyrne deleted the sb/roundbool branch February 26, 2022 06:08
@ViralBShah ViralBShah added the backport 1.8 Change should be backported to release-1.8 label Feb 26, 2022
staticfloat pushed a commit to JuliaCI/julia-buildkite-testing that referenced this pull request Mar 2, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
KristofferC pushed a commit that referenced this pull request Mar 15, 2022
KristofferC pushed a commit that referenced this pull request Mar 16, 2022
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maths Mathematical functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make round(::Type{Bool}, ::AbstractFloat) work
4 participants