Edit: To clarify, the directory listed above also has full .S assembly files, that show more complicated calculations.
I showed sqrt because it's the simplest.
@TheToaster
C++ is a proper superset of C. I see no reason why C-related questions would be unwelcome here.
@shubham1355
New thread for the same question? Or are we following an X-Y problem? (What is is you are really trying to do?)
@Ganado
That example is just the C-to-assembly interface for using the processor sqrt function over doubles.
Every compiler vendor will generally provide assembly routines for math functions on the architectures it compiles for. Some functions, like cube root, are unlikely to have a direct processor instruction to compute, necessitating a simple, tight assembly routine. Everything else will, as you posted, simply have a small function that simply frobs the assembler.