# Why are depth buffer values clamped to (0, 1)?

This is a simple question.

I know that in OpenGL or other graphics API, the values stored in the depth buffer are automatically clamped to (0,1).

I just want to know why people do this instead of just keeping the actual depth values as float. Is that just because of the non-linear depth equation which makes the closer depth values more precise and the further depth values less precies?

Thank you!

Of course, later hardware arrived that could use floating-point depths; IIRC Dreamcast's depth representation was an arbitrary positive float representing $\frac{1}{w}$.