At the core, it should be mathematically accurate. This formula is used to remap values: NewValue = (OldValue - OldMin) * (NewMax - NewMin) / (OldMax - OldMin) + NewMin.
However, finding the OldMin and OldMax is quite an expensive operation in this implementation, so at higher resolutions (2k+) performance would start to drop quite a bit. To alleviate it, the node makes sampling for OldMin and OldMax values in lower resolution. Though there are some countermeasures, in some cases when resolution optimization is too extreme for a given image, due to downsampling OldMin and OldMax values can be sampled inaccurately (a small bit higher or lower than they are in fact). Most of the times, however, countermeasures mentioned above tend to work great, so it will produce a mathematically accurate result at a good speed for most cases.
One more note: I've spotted some strange occurrences when the image is being remapped to a range other than 0...1. It is possible that some pixels would get a value a little bit off this new range. For example, if you remap it to a range of 0.41 - 1, some pixel сan get a value of 0.409998 or like that. I believe this is a precision issue due to operating with Float values, but I'm not sure about it. As a workaround, I've decided to clamp such "stray" values — in practice, it shouldn't cause any problems, as the margin of error there is minuscule.
In the end, I've decided to release this node to the public as Auto Levels Plus. I think that auto levels functionality with an ability to specify a custom remap range is pretty cool in itself, with an HDR data support coming as an extra boon

Will post here when it's live.