A Flash Developer Resource Site

# Thread: how to make Simplify fractions in actionscript 3

1. ## how to make Simplify fractions in actionscript 3

hello
At first I apologize for my bad English language
Because of this I will explain the required by image

2. There's more than one way to skin this cat...

You could find all the prime factors of both the numerator and denominator and eliminate any factors they have in common. In your example. the prime factors of 33 are 3, 11 and the prime factors of 9 are 3, 3. Since the numerator and denominator both contain a 3, you eliminate that number (i.e. divide numerator and denominator by 3) leaving 11 / 3. Here's an algorithm to find the prime factors: https://www.geeksforgeeks.org/print-...a-given-number

Another way would be to find the GCD (greatest common divisor) of the numerator and denominator and then divide them both by the GCD. You can use Euclid's algorithm for this: https://en.wikipedia.org/wiki/Euclidean_algorithm

3. Originally Posted by kofa
hello
At first I apologize for my bad English language
Because of this I will explain the required by image

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap