This site is supported by donations to The OEIS Foundation.

# Fractional part

The fractional part of a real number may be defined in two ways, which differ only for negative numbers.

Definition 1:

The fractional part of a real number is most commonly defined as

$\{x\}:={\rm {frac}}(x):=x-\lfloor x\rfloor ,\quad x\in \mathbb {R} ,\,$ where $\lfloor x\rfloor \,$ is the floor function (i.e. the integer nearest to $-\infty \,$ ).

With this definition, we have

$x=\lfloor x\rfloor +\{x\}={\rm {floor}}(x)+{\rm {frac}}(x),\quad x\in \mathbb {R} .\,$ Definition 2:

The fractional part of a real number is sometimes defined as

$\{x\}:={\rm {frac}}(x):=\operatorname {sgn}(x)(|x|-\lfloor |x|\rfloor )=x-[x],\quad x\in \mathbb {R} ,\,$ where

• $\operatorname {sgn}(x)\,$ is the sign function,
• $|x|\,:=\,{\rm {abs}}(x)\,$ is the absolute value,
• $\lfloor x\rfloor \,:=\,{\rm {floor}}(x)\,$ is the floor function (i.e. the integer nearest to $-\infty \,$ ),
• $\lceil x\rceil \,:=\,{\rm {ceil}}(x)\,$ is the ceiling function (i.e. the integer nearest to $+\infty \,$ ) and
• $[x]\,:=\,{\rm {int}}(x)\,$ is the integer part (i.e. the integer nearest to 0).

With this definition, we have

$x=[x]+\{x\}={\rm {int}}(x)+{\rm {frac}}(x).\,$ ## Fractional part of a complex number

The fractional part of a complex number $z\,=\,x+iy\,$ is defined as

${\rm {frac}}(z)={\rm {frac}}(x+iy):={\rm {frac}}(x)+i\,{\rm {frac}}(y),\quad z\in \mathbb {C} ,\,$ where the fractional part definition may be one of the above two for real numbers.

Definition 1:

With this definition, we have

$z=\lfloor z\rfloor +\{z\}={\rm {floor}}(z)+{\rm {frac}}(z),\quad z\in \mathbb {C} ,\,$ with

$\lfloor z\rfloor =\lfloor x+iy\rfloor :=\lfloor x\rfloor +i\,\lfloor y\rfloor ,\quad z\in \mathbb {C} .\,$ Definition 2:

With this definition, we have

$z=[z]+\{z\}={\rm {int}}(z)+{\rm {frac}}(z),\quad z\in \mathbb {C} ,\,$ with

${\rm {int}}(z)={\rm {int}}(x+iy):={\rm {int}}(x)+i\,{\rm {int}}(y),\quad z\in \mathbb {C} .\,$ 