From 10662a15f4abcfba5957e39c0ce6a7c0e87ad02e Mon Sep 17 00:00:00 2001 From: GregPlowman Date: Fri, 12 May 2017 12:00:07 +1000 Subject: [PATCH] Remove explicit methods for zero and one Revert PR #19 (but leave tests) --- src/DoubleDouble.jl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/DoubleDouble.jl b/src/DoubleDouble.jl index 5b97256..5511147 100644 --- a/src/DoubleDouble.jl +++ b/src/DoubleDouble.jl @@ -5,8 +5,7 @@ import Base: convert, *, +, -, /, sqrt, <, rem, abs, rand, promote_rule, - show, big, - zero, one + show, big abstract AbstractDouble{T} <: Real @@ -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))