How to work with Fractions in java class file to share(1).docx - How to work with Fractions in java How to do mathematical operations with Fractions in

How to work with Fractions in java class file to share(1).docx

This preview shows page 1 - 3 out of 13 pages.

How to work with Fractions in java / How to do mathematical operations with Fractions in java A fraction is a quantity which is not a whole number rather it is formed by using two numbers. A fraction has two parts: numerator and denominator separated by a “/”. Examples of fraction are: 15/2, 35/6 A fraction should always be represented in reduced (or simplest) form where there are no common multiples of numerator and denominator. Example, 56/12 is not in its reduced from since its numerator and denominator still have common multiples. It reduced form will be 14/3(dividing both numerator and denominator by 4). For reducing a fraction to its simplest form, Greatest Common Divisor (GCD) of its numerator and denominator is calculated. GCD is the largest number from the common multiples of numerator and denominator. Both the numerator and denominator are divided by GCD to get the reduced form of fraction. In above case GCD of
Image of page 1
56 and 12 is 4, dividing numerator and denominator by 4 gives 14/3 which is the simplest form of fraction. Operations of Fractions All mathematical operations are performed on fractions as well but have a different method. Common operations are: Addition: For adding two fractions, numerator of first fraction is multiplied by the denominator of second and
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 13 pages?

  • Spring '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors