Maybe try Unitful.jl package, it has ustrip method for that and handles division of units well. For this particular case to unwrap you need to type x.val where x is a Furlong.
I agree, but since interface expectations are not written up for Number in general this may not be something that can be fixed quickly.
I kind of expected (one(x) - zero(x)) / oneunit(x) to work for Furlong, but apparently it doesn’t, not sure if that should be reported as an issue.
In general I am not even sure that “removing unit from a number” makes sense for all types which define oneunit but not zero. I am thinking about dates of course, which count from an epoch which should be considered an implementation detail,
I think Real(x / oneunit(x)) seems like the right generic approach. You could submit a PR to change it if that doesn’t work.
If x has units that are not equivalent to “unitless” (e.g., Furlong{n} for n != 0), IMO Real(x) should throw an error. (convert(Real, x) should definitely throw an error, Real(x) is a bit less clear.) Are there packages where this (incorrectly) works? If so let’s fix it .