Added support for non-integral types (by default now rep_type = double