CHALLENGE using root_fortran to find root of a complex function

It is highly questionable as to whether that is “fine”.

Standard-wise, that is acceptable with defined behavior. In fact, you can even use an integer literal, 3 / acos( -1.0_wp )

But mixed-mode arithmetic is something that fails many a programmer, best to stay away.