In that case, I think the simplest option would be to parse str(float). Some split() and strip() operations should get you want you want, or just use a regex.
Aaron Meurer On Thu, Apr 15, 2021 at 11:56 PM Paul Royik <[email protected]> wrote: > > One digit. Ignore scientific notation. > > On Friday, April 16, 2021 at 1:23:53 AM UTC+3 [email protected] wrote: >> >> How would you count small numbers like 1.1e-30. Is that 1 digit or 31 >> digits after the decimal? >> >> Aaron Meurer >> >> On Thu, Apr 15, 2021 at 2:31 PM Paul Royik <[email protected]> wrote: >> > >> > Rational(1,2).evalf(), how do I get 1 here (since 0.5 has 1 digit after >> > the dot)? >> > >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "sympy" group. >> > To unsubscribe from this group and stop receiving emails from it, send an >> > email to [email protected]. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msgid/sympy/73ee2ab4-7b12-4938-a1ed-079b3a33fc14n%40googlegroups.com. > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/643b8e44-91f1-475f-87ed-f444d584bbaen%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2B25i06T1oxo3gRVWd7fYV1h9Z6tcvP6W5mHx95Gz%2BcOw%40mail.gmail.com.
