diff --git a/SL(3,Z).jl b/SL(3,Z).jl index 8489f04..548b7b9 100644 --- a/SL(3,Z).jl +++ b/SL(3,Z).jl @@ -55,10 +55,17 @@ A = readdlm("matrix.A.Mosek") const A_sqrt = real(sqrtm(A)) -SOS_EOI_fp_L₁, Ω_fp_dist = check_solution(κ, A_sqrt, Δ) +SOS_fp_diff, SOS_fp_L₁_distance = check_solution(κ, A_sqrt, Δ) + +@show SOS_fp_L₁_distance +@show GroupAlgebras.ɛ(SOS_fp_diff) κ_rational = rationalize(BigInt, κ;) A_sqrt_rational = rationalize(BigInt, A_sqrt) Δ_rational = rationalize(BigInt, Δ) -SOS_EOI_rat_L₁, Ω_rat_dist = check_solution(κ_rational, A_sqrt_rational, Δ_rational) +SOS_rational_diff, SOS_rat_L₁_distance = check_solution(κ_rational, A_sqrt_rational, Δ_rational) + +@assert isa(SOS_rat_L₁_distance, Rational{BigInt}) +@show float(SOS_rat_L₁_distance) +@show float(GroupAlgebras.ɛ(SOS_rational_diff)) diff --git a/property(T).jl b/property(T).jl index 28ce397..c309458 100644 --- a/property(T).jl +++ b/property(T).jl @@ -160,7 +160,8 @@ function check_solution{T<:Number}(κ::T, Δ::GroupAlgebraElement{T}) eoi = EOI(Δ, κ) result = resulting_SOS(sqrt_matrix, Δ) - return sum(abs.((result - eoi).coefficients)), sum(result.coefficients) + L₁_dist = norm(result - eoi,1) + return eoi - result, L₁_dist end function rationalize{T<:Integer, S<:Real}(::Type{T}, @@ -168,4 +169,4 @@ function rationalize{T<:Integer, S<:Real}(::Type{T}, r(x) = rationalize(T, x, tol=tol) return r.(X) -end +end;