I am looking into combining the decimals=D and sigfigs=S criteria, in a prioritized fashion. Namely: round to D decimals, but keep a minimum of S significant figures.
Say we want to round to two decimals, but we want the result to retain at least two significant figures, e.g. round 1234.56789 to 1234.57 (two decimals, first priority), but round 0.00018793 to 0.00019 (two significant figures).
I read the documentation and played with the API a tiny bit and I believe this requires custom logic and two calls to sigfig.round(). Is that correct? If yes -- is this use case too exotic or should it maybe be supported via an official method, maybe needing only a single call to sigfig.round()?