GLU - the OpenGL Utility library is an additional library that contains a handful of functions for additional tasks.
It is traditional and can be found in a lot of tutorials and examples.
gluPerspective's source code is very simple and can be replaced easily.
The code here comes from glh library (OpenGL Helper Library), which is for Windows, LGPL license
http://www.geocities.com/vmelkon/glhlibrary.html

It has glhPerspectivef2 and glhPerspectived2 (a float and double version).
Here is the float version of the code, slightly simplified :