@@ -347,8 +347,9 @@ function truncate!(ps::Dict{Int,T};
347
347
end
348
348
349
349
truncate! (ps:: NTuple ; kwargs... ) = throw (ArgumentError (" `truncate!` not defined." ))
350
- Base. truncate (ps:: NTuple{0} ; kwargs... ) = ps
351
- function Base. truncate (ps:: NTuple{N,T} ;
350
+
351
+ _truncate (ps:: NTuple{0} ; kwargs... ) = ps
352
+ function _truncate (ps:: NTuple{N,T} ;
352
353
rtol:: Real = Base. rtoldefault (real (T)),
353
354
atol:: Real = 0 ,) where {N,T}
354
355
thresh = norm (ps, Inf ) * rtol + atol
@@ -415,8 +416,9 @@ function chop!(ps::Dict{Int,T};
415
416
end
416
417
417
418
chop! (ps:: NTuple ; kwargs... ) = throw (ArgumentError (" chop! not defined" ))
418
- Base. chop (ps:: NTuple{0} ; kwargs... ) = ps
419
- function Base. chop (ps:: NTuple{N,T} ;
419
+
420
+ _chop (ps:: NTuple{0} ; kwargs... ) = ps
421
+ function _chop (ps:: NTuple{N,T} ;
420
422
rtol:: Real = Base. rtoldefault (real (T)),
421
423
atol:: Real = 0 ,) where {N,T}
422
424
thresh = norm (ps, Inf ) * rtol + atol
@@ -530,19 +532,19 @@ function _eltype(P::Type{<:AbstractPolynomial}, p::AbstractPolynomial)
530
532
end
531
533
532
534
"""
533
- copy_with_eltype(::Val {T}, [::Val{X}], p::AbstractPolynomial)
535
+ copy_with_eltype(::Type {T}, [::Val{X}], p::AbstractPolynomial)
534
536
535
537
Copy polynomial `p` changing the underlying element type and optionally the symbol.
536
538
"""
537
- copy_with_eltype (:: Val {T} , :: Val{X} , p:: P ) where {T, X, S, Y, P <: AbstractPolynomial{S,Y} } =
538
- ⟒ (P){T, X }(p. coeffs)
539
- copy_with_eltype (V :: Val {T} , p:: P ) where {T, S, Y, P <: AbstractPolynomial{S,Y} } =
540
- copy_with_eltype (V , Val (Y), p)
539
+ copy_with_eltype (:: Type {T} , :: Val{X} , p:: P ) where {T, X, S, Y, P <: AbstractPolynomial{S,Y} } =
540
+ ⟒ (P){T, Symbol (X) }(p. coeffs)
541
+ copy_with_eltype (:: Type {T} , p:: P ) where {T, S, Y, P <: AbstractPolynomial{S,Y} } =
542
+ copy_with_eltype (T , Val (Y), p)
541
543
# easier to type if performance isn't an issue, but could be dropped
542
- copy_with_eltype (:: Type{T} , X, p:: P ) where {T, S, Y, P<: AbstractPolynomial{S, Y} } =
543
- copy_with_eltype (Val (T), Val (X), p)
544
- copy_with_eltype (:: Type{T} , p:: P ) where {T, S, X, P<: AbstractPolynomial{S,X} } =
545
- copy_with_eltype (Val (T), Val (X), p)
544
+ # copy_with_eltype(::Type{T}, X, p::P) where {T, S, Y, P<:AbstractPolynomial{S, Y}} =
545
+ # copy_with_eltype(Val(T), Val(X), p)
546
+ # copy_with_eltype(::Type{T}, p::P) where {T, S, X, P<:AbstractPolynomial{S,X}} =
547
+ # copy_with_eltype(Val(T), Val(X), p)
546
548
547
549
Base. iszero (p:: AbstractPolynomial ) = all (iszero, p)
548
550
0 commit comments