-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to identify periods in decimals of bignumbers #3176
Comments
You can use fractions for that, like:" math.fraction(1, 6).toString() // "0.1(6)"
math.fraction(1, 7).toString() // "0.(142857)" EDIT: Fractions cannot work with BigNumber though, you'll have to calculate with fractions from the start. |
thank you very much !!
I wish I could from whatever str formula find the decimal period |
@nycos62 , p.s. perhaps, can you just work with fractions all the time? |
You can use You should be aware though that the representation may not be exact, for example you may have a value like |
I might have found some sort of middle solution...
|
Hello, maybe a stupid question, but is there a natural way to get periodicity in BigNumbers decimals
as you can see it ends with digit '7'
I wish to identify here a period of length 1 starting at decimal 2 :
'0.1 ͞6'
thx
The text was updated successfully, but these errors were encountered: