0

I am working on a project, which requires an array of float values to be converted to their corresponding fractions with a lowest common denominator found as well.

For instance, if given an array of {0.0, 0.21428572, 0.14285715, 0.64285713}, they would be converted to their corresponding fractions then an LCD would be found (in this case, 14).

Any suggestions? I have tried using the Fraction classes but none offer more than one LCD determinant.

Carl Flood
  • 29
  • 7
  • You could transform to fractions: https://stackoverflow.com/questions/31585931 and then find the LCD https://stackoverflow.com/questions/4201860/how-to-find-gcd-lcm-on-a-set-of-numbers ? – tkruse Jun 17 '19 at 08:52
  • Which "fraction classes" are you using, the java SDK has no such class. Also show the code you have so far. – tkruse Jun 17 '19 at 08:55

0 Answers0