/**
 * Given a dictionary of floating-point numbers and a target floating-point number,
 * modify the dictionary items by subtracting the target value from the dictionary values.
 *
 * @param dictValues A dictionary containing floating-point numbers as values.
 * @param floatValue The target floating-point number to be subtracted from the dictionary values.
 * @return The modified dictionary with the updated values.
 */
fun modifyDictFloat(dictValues: Map<String, Double>, floatValue: Double): Map<String, Double> {

    val modifiedDict = mutableMapOf<String, Double>()

    // Iterate over the dictionary items
    for ((key, value) in dictValues) {
        // Subtract the floatValue from each dictionary value
        var modifiedValue = value - floatValue

        // Round the modified value to 5 decimal places
        modifiedValue = "%.5f".format(modifiedValue).toDouble()

        // Update the modified value in the dictionary
        modifiedDict[key] = modifiedValue
    }

    return modifiedDict
}

// Example usage
/**
 * Given a dictionary of floating-point numbers and a target floating-point number,
 * modify the dictionary items by subtracting the target value from the dictionary values.
 *
 * @param dictValues A dictionary containing floating-point numbers as values.
 * @param floatValue The target floating-point number to be subtracted from the dictionary values.
 * @return The modified dictionary with the updated values.
 */
fun modifyDictFloat(dictValues: Map<String, Double>, floatValue: Double): Map<String, Double> {
/**
 * Given a dictionary of floating-point numbers and a target floating-point number,
 * modify the dictionary items by subtracting the target value from the dictionary values.
 *
 * @param dictValues A dictionary containing floating-point numbers as values.
 * @param floatValue The target floating-point number to be subtracted from the dictionary values.
 * @return The modified dictionary with the updated values.
 */
fun modifyDictFloat(dictValues: Map<String, Double>, floatValue: Double): Map<String, Double> {

    val modifiedDict = mutableMapOf<String, Double>()

    // Iterate over the dictionary items
    for ((key, value) in dictValues) {
        // Subtract the floatValue from each dictionary value
        var modifiedValue = value - floatValue

        // Round the modified value to 5 decimal places
        modifiedValue = "%.5f".format(modifiedValue).toDouble()

        // Update the modified value in the dictionary
        modifiedDict[key] = modifiedValue
    }

    return modifiedDict
}

// Example usage