-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests, update CI and README (#10)
* Add a couple of tests * Fix some bitrot
- Loading branch information
Showing
5 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,10 @@ authors = ["John Lapeyre <[email protected]>"] | |
version = "0.2.4" | ||
|
||
[compat] | ||
Aqua = ">= 0.8" | ||
julia = "1" | ||
JET = ">= 0.0" | ||
Test = ">= 0.0" | ||
|
||
[extras] | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
# ILog2 | ||
|
||
[![Build Status](https://github.com/JuliaMath/ILog2.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/JuliaMath/ILog2.jl/actions/workflows/CI.yml?query=branch%3Amaster) | ||
[![Build Status](https://ci.appveyor.com/api/projects/status/github/JuliaMath/ILog2.jl?svg=true)](https://ci.appveyor.com/project/JuliaMath/ILog2-jl) | ||
[![Codecov](https://codecov.io/gh/JuliaMath/ILog2.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaMath/ILog2.jl) | ||
[![Coveralls](https://coveralls.io/repos/github/JuliaMath/ILog2.jl/badge.svg?branch=master)](https://coveralls.io/github/JuliaMath/ILog2.jl?branch=master) | ||
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) | ||
[![JET QA](https://img.shields.io/badge/JET.jl-%E2%9C%88%EF%B8%8F-%23aa4444)](https://github.com/aviatesk/JET.jl) | ||
[![](https://img.shields.io/badge/%F0%9F%9B%A9%EF%B8%8F_tested_with-JET.jl-233f9a)](https://github.com/aviatesk/JET.jl) | ||
|
||
This package provides a fast implementation of the integer-valued, base-2 logarithm. | ||
`ilog2` supports other types of numbers, as well. It also provides `checkispow2`. | ||
|
||
`ilog2(n::Real)` compute the largest `m` such that `2^m <= n`. | ||
|
||
|
||
`ilog2(n::Real, RoundUp)` compute the smallest `m` such that `2^m >= n`. | ||
|
||
|
||
`checkispow2(n::Number)` returns `ilog2(n)` if `n` is a power of two. | ||
Otherwise throws a `DomainError`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters