added more static_cast<xreal_t>