Most TOTP implementations produce codes which can be six digits long, but codes can have a length of any good non-zero integer.
depending on the value from the discriminant, the roots are calculated as specified from https://carahioi544061.robhasawiki.com/user