As said above it's hard to compare the two outright. I'm often found thinking i'd like an E39 when i meet a nice one on the road.
It's hard to deny the brilliance of the E39 M5 but then again the E36 M3 isn't exactly a slouch either. I think for me though two doors will always be the perfect amount