FlexFloat: A Software Library for Transprecision Computing