116k views
4 votes
Explain why the sawtooth function, sawtooth(x) = x − ⌊x⌋ for all real numbers x, takes only the fractional part of

a number when the number is positive.

1 Answer

7 votes

Final answer:

The sawtooth function subtracts the integer part of a positive real number from the number itself, leaving just the fractional part.

Step-by-step explanation:

The sawtooth function, sawtooth(x) = x − ⌊x⌋, is designed to extract the fractional part of any real number x. To understand why this function only takes the fractional part when x is positive, consider what the floor function (⌊x⌋) does. The floor function returns the largest integer less than or equal to x. So when x is a positive real number, x can be expressed as a sum of its integer part, which the floor function identifies, and its fractional part. Subtracting the integer part from the original number x leaves only the fractional component.

User Atmaram
by
7.9k points