Some items (such as string, cloth, fluids etc) can be sold in decimal values.
This example will show how to sell string in meters (price etc) but where the customer can order any length – but at least 30 centimeters.
In admin->catalog make the string as a product and under inventory set “Minimum Qty Allowed in Shopping Cart” to “0.3” and “Qty Uses Decimals” to yes. Set up the price as the price per meter.
Also please make sure that the information about the product states that the any length (over 0,3 m) can be ordered and that the price is per meter.
When the customer adds 2.5678 m in the basket, magento will calculate the correct price and show it to the customer.