If the actual temperature of the beer drops more than about 2-4F below the low end of the yeast strain, it'll likely go dormant. You'll get some nasty, nasty beer as a most likely result if it is during very active fermentation. Those are the times I see brewers end up with sour apple flavors and that sort of thing.
You must keep it within a few degrees on the top or bottom end of the recommended temperature range otherwise you'll tend to get off flavors.
If the ambient temp is cycling as low as 40F, it doesn't matter how active the fermentation was, it'll conk out the yeast. Temperature variability isn't the worst thing ever, but BIG swings means you are not likely to produce drinkable beer (or produce beer at all).