From ac18923631bfa7175d3cb2c5185295c91996fbf5 Mon Sep 17 00:00:00 2001 From: kalmar Date: Sun, 25 Jun 2017 09:28:44 +0200 Subject: [PATCH] use IntervalArithmetic instead of ValidatedNumerics --- src/CheckSolution.jl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/CheckSolution.jl b/src/CheckSolution.jl index 32e9b93..813d876 100644 --- a/src/CheckSolution.jl +++ b/src/CheckSolution.jl @@ -1,9 +1,12 @@ import Base: rationalize -using ValidatedNumerics -ValidatedNumerics.setrounding(Interval, :accurate) -ValidatedNumerics.setformat(:standard) -# setprecision(Interval, 53) # slightly faster than 256 +using IntervalArithmetic + +IntervalArithmetic.setrounding(Interval, :accurate) +IntervalArithmetic.setformat(sigfigs=10) +IntervalArithmetic.setprecision(Interval, 53) # slightly faster than 256 + +import IntervalArithmetic.± function EOI{T<:Number}(Δ::GroupRingElem{T}, λ::T) return Δ*Δ - λ*Δ @@ -41,8 +44,6 @@ function correct_to_augmentation_ideal{T<:Rational}(sqrt_matrix::Array{T,2}) return sqrt_corrected end -import ValidatedNumerics.± - function (±){T<:Number}(X::AbstractArray{T}, tol::Real) r{T}(x::T) = (x == zero(T)? @interval(0) : x ± tol) return r.(X)