Analytic functions with blackbody

See #3077 
The only other code I see that does this is in the new-ish all_world2pix implementation: https://github.com/astropy/astropy/blob/7aedf59249c2b24aa43e8002a5b50edec3742ef5/astropy/wcs/wcs.py#L1521

But I would make the same point there--it should probably be taken out or at least changed to use np.errstate.