-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds zero(::Type{Interval}) and one(::Type{Interval}), and tests
The reason to add these methods is to keep up with the usage of zero/one in Base, and because it is useful to play smoothly with TaylorSeries. It also deletes two methods of ⊆, which are already in the package, which were left in root_finding_tests.jl
- Loading branch information
Luis Benet
committed
Sep 1, 2015
1 parent
2e2f492
commit 2fcee54
Showing
3 changed files
with
4 additions
and
2 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 |
---|---|---|
|
@@ -14,7 +14,9 @@ facts("Consistency tests") do | |
@fact isa( zero(b), Interval ) --> true | ||
|
||
@fact zero(b) --> 0.0 | ||
@fact zero(b) == zero(typeof(b)) --> true | ||
@fact one(a) --> 1.0 | ||
@fact one(a) == one(typeof(a)) --> true | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lbenet
Member
|
||
@fact one(a) --> big(1.0) | ||
@fact a == b --> false | ||
@fact a != b --> true | ||
|
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
I think you mean one here...