Seems like a bad idea. The computer is going to make calculations like "How many people can the world sustain", then make decisions on who to kill to keep that population low. It will anticipate people that want to destroy it because of this decision and start killing them off. As more and more people want revenge on this computer, it becomes more and more like a terminator scenario. The only difference is, the computer will calculate our reaction before we do and make preemptive strikes. The computer may just kill off all humans before we even realize what it's doing.
Heck...it might be making these calculations 100 of years in the future. For example...it does the math, realizes that in 150 years when it starts to have to kill people, humans will rebel against it, so instead of waiting 149 years, it decides to just take us all out today because it's going to eventually happen anyway and it calculates its more humane to do it now because it only has to kill 7.125 billion people instead of 50 billion people 150 years from now.