Forumula used for Calc's "RATE()" function?

I searched the source code but could not find the actual code used to create the RATE() (APR) function.

Can anyone tell me what code this function uses?

thanks,

https://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr2.cxx?r=edcbe8c4#2134

See ODF specification for the mathematical formula solved by the function.