Skip to content
This repository was archived by the owner on Dec 10, 2023. It is now read-only.

Remove explicit methods for zero and one #21

Merged
merged 1 commit into from
May 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/DoubleDouble.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import Base:
convert,
*, +, -, /, sqrt, <,
rem, abs, rand, promote_rule,
show, big,
zero, one
show, big

abstract AbstractDouble{T} <: Real

Expand Down Expand Up @@ -52,11 +51,6 @@ function splitprec(x::AbstractFloat)
end


zero{T<:AbstractFloat}(::Type{Double{T}}) = Double(zero(T))
one{T<:AbstractFloat}(::Type{Double{T}}) = Double(one(T))
zero(a::Double) = Double(zero(a.hi))
one(a::Double) = Double(one(a.hi))

# ones(T::Double, dims...) = fill!(Array(T, dims...), (one)(T))
# zeros(T::Double, dims...) = fill!(Array(T, dims...), (zero)(T))

Expand Down