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. by Oscar Merida

This article was originally published in the September 2022 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

Leave a comment

Use the form below to leave a comment: