and also this thread:
particularly the discussions on pages 9 & 10 there.
I don't believe that "warm" and "cool" is a very helpful way of thinking about it - its vague and imprecise. Mostly it means lower chroma in the shadows, which is then often exaggerated and misinterpreted as complementary hue (fine, if you want
to exaggerate it as a deliberate artistic choice - but not just as a mistake, eh?). (Daylight with its blue shadows is a special case -see the discussion in the first link)
Instead of trying to derive formulas, why not accurately
observe what's happening and paint the correct
colours? (I'm trying to get people to think more about accurate
nuanced colour-identification - where you end up
is more important than what you mix it from).