added min and max functions for doubles

Implemented a minimum and maximum function for doubles.