Looking for a root finder / equation solver

for example cos(x)==x, and I want a return of 0.7390851332151607.

Could be done with a zero finder, because it’s equivalent to cos(x)-x==0.

Could also be done with a fixed point finder. Whatever works.

Is something like that in the CUDA math libraries? Or do I have to write this iteration myself?