The fractional part or decimal part of a non‐negative
real number
In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every ...
is the excess beyond that number's
integer part. If the latter is defined as the largest integer not greater than , called
floor of or
, its fractional part can be written as:
:
.
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. The result is a real number in the half-open
interval
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 , or as the part of the number to the right of the radix point , or by the Weisstein,_Eric_W._"Fractional_Part."_From_MathWorld--A_Wolfram_Web_Resource/ref>
:
with_
_as_the_smallest_integer_not_less_than_,_also_called_the_
:Weisstein,_Eric_W._"Fractional_Part."_From_MathWorld--A_Wolfram_Web_Resource/ref>
:
with_
_as_the_smallest_integer_not_less_than_,_also_called_the_ceiling_function">ceiling_of_._By_consequence,_we_may_get,_for_example,_three_different_values_for_the_fractional_part_of_just_one_:_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
: