Converting Float32 to N0f32 in FixedPointNumbers.jl

question

#1

this works in Julia 0.6.2:

Float32(1.0) |> N0f8
Float32(1.0) |> N0f16

this will not work

Float32(1.0) |> N0f32
Float32(1.0) |> N0f64
Float64(1.0) |> N0f64

It looks like when the number of bits is the same or larger, it won’t work.
error message:

ArgumentError: FixedPointNumbers.Normed{UInt64,64} is a 64-bit type representing 0 values from 0.0 to 1.0; cannot represent 1.0

is this a bug?


#2

seems like it. should probably submit an issue on github


#3

thanks, submitted.