GLdouble

Does anything in opengl work with double precision ?
Ie if you load a matrix using glLoadMatrixd

would it just internally be converted to a float matrix instead of double ?

Yes, but no in “Legacy OpenGL”. Double precision is supported through GL_ARB_gpu_shader_fp64 and GL_ARB_vertex_attrib_64bit extensions, but it requires SM5 hardware (OpenGL 4.0+) and support in driver.
I’m not aware of drivers that uses double precision for any of gl*d commands.

It’s not just gl*d commands like glLoadMatrixd aren’t done using double precision in the driver, they shouldn’t be done. The spec says that.

Double precision computation can also be much slower than single, anywhere from 2x slower to 24x slower. And there is some GL4 hardware that doesn’t support it at all (AMD 5700 series and lower, I believe). So it’s a good idea to be sure that you actually need it.

Multiplying matrices on the CPU side in 64b is still a good idea though, before uploading to GL.