Truncation toward zero 2026-10-14
Truncation toward zero removes the fractional magnitude of a real number, giving the integer obtained by applying the floor function to its absolute value and restoring the original sign; a magnitude below one gives zero. More precisely,
The result is zero for . For example, and , whereas . Python's math.trunc uses this towards-zero convention, so replacing it by math.floor changes calculations with negative noninteger inputs. [ref].
Figure 1.
Truncation toward zero is symmetric in sign, while the fractional part defined by the floor function is always nonnegative
. Left: exact integer endpoint values distinguish the two sign-dependent truncation rules; a whole neighborhood of zero maps to zero. Right: takes the sign of a noninteger input, while lies in on both sides of zero. Open endpoints show excluded limiting values. Details.
For every real number ,
The discarded difference has the sign of when is noninteger. In contrast, the fractional part is always in . At , these two differences are and . Thus specifying a signed fractional remainder requires specifying which integer-valued operation is used.
Unlike the floor function and ceiling function, truncation toward zero need not commute with adding an integer. At and , , whereas . This matters if negative coordinates are assigned to equal-width bins by converting a quotient to an integer: belongs to the bin under the floor function, but truncation gives zero. The appropriate operation follows from the declared bin intervals.
Truncation toward zero is a nondecreasing function with a discontinuity of a function at each nonzero integer. It has no discontinuity of a function at zero, because it is identically zero on . Its agreement with the floor function on the positive side and the ceiling function on the negative side explains the different closed endpoints in the diagram.
Uniform convergence Created 2026-09-24 Updated 2026-10-14
A sequence of functions converges uniformly to , where is a metric space with metric , precisely when
For real numbers, use the absolute value . Compare the universal quantification and existential quantification:
The decisive change is whether can depend on . Uniform convergence implies pointwise convergence.[ref]
For functions taking values in real numbers on a nonempty domain of a function, the supremum error is , allowing . Then uniform convergence is equivalent to . The supremum need not be a maximum: pointwise strict bounds below only give , so use tolerance when proving this equivalence. This single error bound controls every possible input, including one chosen after seeing the index.
For and its pointwise limit on , the error is zero at one but approaches one as from below. Consequently
for every positive integer . This supremum is never attained: below one the error is , and at one it is zero. Deleting the endpoint leaves the same supremum error on . To disprove uniform convergence directly, choose : for any proposed , take and . The error equals , violating the strict tolerance. Thus a moving input defeats every proposed common threshold.
On the smaller interval , for a fixed , the pointwise limit is zero and
For and , the exact first successful common threshold is
The logarithm and floor function turn an infinite approximation statement into a finite stopping rule. At , fails tolerance , while succeeds. At and , the ratio is exactly three: is necessary because equality is insufficient. For , every error is zero. The domain of a function determines whether one threshold can certify every input.
Figure 1.
Supremum error and common thresholds distinguish uniform convergence from pointwise convergence
. Left: the error of remains one on and , but falls below from onward on . Right: the first successful threshold at a fixed input grows without bound near one. A common threshold covers all inputs at most . Both vertical axes use a logarithmic scale. Details.
For another explicit stopping rule, let on . Its uniform limit is zero and its supremum error is . For every , works, using the ceiling function. Unlike on , it controls even the endpoint.
The practical beauty of uniform convergence is that one quantitative bound can survive further operations: the uniform limit theorem preserves continuity, and uniform convergence preserves integrals on a compact interval controls accumulated error. Differentiation needs additional hypotheses, such as uniform derivative convergence with an anchored value. These results distinguish an approximation that looks accurate at selected inputs from one that justifies replacing a whole function in a calculation.