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

${\displaystyle \{x\}:={\rm {frac}}(x):=x-\lfloor x\rfloor ,\quad x\in \mathbb {R} ,\,}$

where ${\displaystyle \scriptstyle \lfloor x\rfloor \,}$ is the floor function (i.e. the integer nearest to ${\displaystyle \scriptstyle -\infty \,}$).

With this definition, we have

${\displaystyle 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

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

where

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

With this definition, we have

${\displaystyle x=[x]+\{x\}={\rm {int}}(x)+{\rm {frac}}(x).\,}$

## Fractional part of a complex number

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

${\displaystyle {\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

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

with

${\displaystyle \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

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

with

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