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

Add iszero(::Infinite) #21

Merged
merged 1 commit into from
Aug 10, 2020
Merged

Add iszero(::Infinite) #21

merged 1 commit into from
Aug 10, 2020

Conversation

omus
Copy link
Contributor

@omus omus commented Jul 28, 2020

Allows iszero to be called on . Useful for generic programming

julia> iszero(∞)
ERROR: InexactError: convert(Infinite, 0)
Stacktrace:
 [1] convert(::Type{Infinite}, ::Int64) at /Users/omus/.julia/dev/Infinity/src/infinite/conversion.jl:9
 [2] oftype(::Infinite, ::Int64) at ./essentials.jl:366
 [3] zero(::Infinite) at ./number.jl:265
 [4] iszero(::Infinite) at ./number.jl:40
 [5] top-level scope at REPL[4]:1

@codecov
Copy link

codecov bot commented Jul 28, 2020

Codecov Report

Merging #21 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #21   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          175       176    +1     
=========================================
+ Hits           175       176    +1     
Impacted Files Coverage Δ
src/infinite/comparison.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90038fe...c0ca08e. Read the comment docs.

@cjdoris cjdoris merged commit 71217e7 into cjdoris:master Aug 10, 2020
@cjdoris
Copy link
Owner

cjdoris commented Aug 10, 2020

Thanks!

@omus omus deleted the cv/iszero-infinite branch August 11, 2020 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants