I don't really know what C stands for, but for Fishers' P: jingju
If you want to self-define a function to compute Fishers' P value, you can refer to the blog. But you may notice that computing fishers' is involving lots of calculations, thus might-be over-floating during the computation. that is one reason why calculating fishers' in more than 2 by 2 is time-consuming.