Created
October 31, 2020 21:34
-
-
Save naxmefy/1dfb2fa55ff15966bf6324f14f49d03d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decimalToReducedFraction(d) { | |
for(n=1;d*n%1!==0;n++); | |
return [d*n,n]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment