In the case of Uniswap, the swap fee is specified as a percentage, so it is stored as a fractional value. For example, a 3% fee would be stored as 3/100 = 0.03.
You can use the fixed type, which represents a fixed point decimal number with a specified number of decimal places. For example, to specify a number with 3 decimal places, you can use the fixed128x18 type, which represents a 128-bit fixed point number with 18 decimal places.
The fixed type was introduced in Solidity version 0.5.0, so you will need to use a version of Solidity that is at least 0.5.0 to use it.