Add a float version of calc_erfinv (by templating) on CPU (#26070)
Summary:
Currently calc_erfinv's float version on CPU is missing. This commit adds the float version (by templating).
I also used this opportunity to clean up calc_erfinv a bit.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26070
Reviewed By: ezyang
Differential Revision: D17368024
Pulled By: VitalyFedyunin
fbshipit-source-id: 00cc3097f340022b3788143e6c12b01c35d72f13