A lightweight struct for multi-precision computing