changed floating point template parameter to real_t