[…] Both functions use an analytical approximation for the Lambert W function, followed by one or two iterations of Halley's method to ensure maximum …