@@ -119,9 +119,6 @@ rawtype(::Type{FixedPoint{T,f}}) where {T <: Integer,f} = T
119119rawtype (:: Type{F} ) where {F <: FixedPoint } = rawtype (supertype (F))
120120rawtype (x:: FixedPoint ) = rawtype (typeof (x))
121121
122- # This IOBuffer is used during module definition to generate typealias names
123- _iotypealias = IOBuffer ()
124-
125122# Printing. These are used to generate type-symbols, so we need them
126123# before we include any files.
127124function showtype (io:: IO , :: Type{X} ) where {X <: FixedPoint }
@@ -132,10 +129,10 @@ function showtype(io::IO, ::Type{X}) where {X <: FixedPoint}
132129 io
133130end
134131function show (io:: IO , x:: FixedPoint{T,f} ) where {T,f}
135- show (io, round (convert (Float64,x), digits= ceil (Int,f/ _log2_10)))
132+ log10_2 = 0.3010299956639812
133+ show (io, round (convert (Float64,x), digits= ceil (Int, f * log10_2)))
136134 get (io, :compact , false ) || showtype (io, typeof (x))
137135end
138- const _log2_10 = 3.321928094887362
139136
140137function Base. showarg (io:: IO , a:: Array{T} , toplevel) where {T<: FixedPoint }
141138 toplevel || print (io, " ::" )
0 commit comments