A great atmospheric calculator here:
Aerospaceweb.org | Atmospheric Properties Calculator
Enter altitude and speed at the top and get the results below.
I entered 40000 ft, M0.79 and no temp increment (standard day)
TAT will be -29 °C while the laminar temp is -33 °C if I understand things correctly. -56 °C is the "ambient temp".