use real_t in place of double for easy selection of precision