Lably
Skip to content

Fractional part

Excess of a non-negative real number beyond its integer part

  • 2 min read
  • 2 chapters

Learn it on Lably

The fractional part of logarithms, specifically, is also known as the mantissa; by contrast with the mantissa, the integral part of a logarithm is called its characteristic. The word mantissa was introduced by Henry Briggs.

For a positive number written in a conventional positional numeral system (such as binary or decimal), its fractional part hence corresponds to the digits appearing after the radix point, such as the decimal point in English. The result is a real number in the half-open interval [0, 1).

For negative numbers

However, in case of negative numbers, there are various conflicting ways to extend the fractional part function to them: It is either defined in the same way as for positive numbers, i.e., by frac⁡(x)=x−⌊x⌋ (Graham, Knuth & Patashnik 1992), or as the part of the number to the right of the radix point frac⁡(x)=|x|−⌊|x|⌋ (Daintith 2004), or by the odd function: frac⁡(x)={x−⌊x⌋x≥0x−⌈x⌉x<0 with ⌈x⌉ as the smallest integer not less than x, also called the ceiling of x. By consequence, we may get, for example, three different values for the fractional part of just one x: let it be −1.3, its fractional part will be 0.7 according to the first definition, 0.3 according to the second definition, and −0.3 according to the third definition, whose result can also be obtained in a straightforward way by frac⁡(x)=x−⌊|x|⌋⋅sgn⁡(x).

The x−⌊x⌋ and the "odd function" definitions permit for unique decomposition of any real number x to the sum of its integer and fractional parts, where "integer part" refers to ⌊x⌋ or ⌊|x|⌋⋅sgn⁡(x) respectively. These two definitions of fractional-part function also provide idempotence.

The fractional part defined via difference from ⌊ ⌋ is usually denoted by curly braces: {x}:=x−⌊x⌋.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Basics