• wischi@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 hours ago

    Not only for audio, but everything that doesn’t have to be an exact base 10 representation (like money). Anything that represents something “analog” or “measured” is perfectly fine to store in a float. Temperature, humidity, windspeed, car velocity, rocket acceleration, etc. Calculations with floats are perfectly accurate and given the same bit length are as accurate as decimal types. The only thing they can’t do is exactly(!) represent base 10 decimals but for a very large amount of applications that doesn’t matter.