mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-30 10:00:28 +01:00
use IntervalArithmetic instead of ValidatedNumerics
This commit is contained in:
parent
ff4f9e7857
commit
ac18923631
@ -1,9 +1,12 @@
|
|||||||
import Base: rationalize
|
import Base: rationalize
|
||||||
|
|
||||||
using ValidatedNumerics
|
using IntervalArithmetic
|
||||||
ValidatedNumerics.setrounding(Interval, :accurate)
|
|
||||||
ValidatedNumerics.setformat(:standard)
|
IntervalArithmetic.setrounding(Interval, :accurate)
|
||||||
# setprecision(Interval, 53) # slightly faster than 256
|
IntervalArithmetic.setformat(sigfigs=10)
|
||||||
|
IntervalArithmetic.setprecision(Interval, 53) # slightly faster than 256
|
||||||
|
|
||||||
|
import IntervalArithmetic.±
|
||||||
|
|
||||||
function EOI{T<:Number}(Δ::GroupRingElem{T}, λ::T)
|
function EOI{T<:Number}(Δ::GroupRingElem{T}, λ::T)
|
||||||
return Δ*Δ - λ*Δ
|
return Δ*Δ - λ*Δ
|
||||||
@ -41,8 +44,6 @@ function correct_to_augmentation_ideal{T<:Rational}(sqrt_matrix::Array{T,2})
|
|||||||
return sqrt_corrected
|
return sqrt_corrected
|
||||||
end
|
end
|
||||||
|
|
||||||
import ValidatedNumerics.±
|
|
||||||
|
|
||||||
function (±){T<:Number}(X::AbstractArray{T}, tol::Real)
|
function (±){T<:Number}(X::AbstractArray{T}, tol::Real)
|
||||||
r{T}(x::T) = (x == zero(T)? @interval(0) : x ± tol)
|
r{T}(x::T) = (x == zero(T)? @interval(0) : x ± tol)
|
||||||
return r.(X)
|
return r.(X)
|
||||||
|
Loading…
Reference in New Issue
Block a user