Back to Vol 21, Issue 9

PHP Architect · Vol 21, Issue 9 · September 2022

PHP Puzzles: Fractional Math

by Oscar Merida

We’ve seen how working with floating-point values can be problematic. What if we had a class that worked with fractions directly by tracking the numerator and denominator as integers? Let’s see if it’s possible.

The full article is in PHP Architect Vol 21, Issue 9. Subscribe to read it and every new issue.

Subscribe

About the author

Oscar Merida

Our Partners

Collaborating with industry leaders to bring you the best PHP resources and expertise

Interested in partnering? Get in touch →