Float values in Range slider

Does anybody know a good way to let users select floating point values in admin forms?

For non-floating point integer selection I usually used the range slider, and this works quite well. I tried by simply using floating points as min/max/default like this:

  type: range
  label: "Margin in em"
  default: 0.0
    min: 0.0
    max: 4.0

but had no success (the result is just a stepped integer slider with discrete steps of 0, 1, 2, 3 and so on). As a workaround I could just multiply the range by 1000 and then divide it by 1000 in the template, but ideally I’d like to display the real units to the user and not some ×1000 value (in a weird nonstandard unit like mili-em or “mem”).