I put my recommendation first, with my reasoning about the moral basis of school and homework underneath if you are interested.
Recommendation
It is not cheating and is probably more moral than doing the homework.
I would recommend that you and your sister consider the possible benefits of practicing manually solving the maths problems for exams or more advanced study. If she decides she doesn't need more practice, she could sound out her teacher. A really good teacher may even encourage her to do the programming as a maths/science fair project. If it sounds like the teacher won't like it, just don't tell them. See Ben Crowell's comment - most teachers will give a knee-jerk reaction rather than actually thinking about it, so why upset the teacher for no reason?
If she tells the teacher and the teacher disapproves, it really makes no difference. If she is sure she can do the maths well enough manually, it is unethical for the teacher to insist that she does more useless practice, and your sister has no ethical responsibility to obey an unethical requirement, especially when it is out of school time.
In the end, it is up to your sister to take control of her education and do what she thinks will help her learn and get qualifications and have a good all-round life. Encourage her, but if she feels uncomfortable with it, don't push it.
General Theory of homework
The moral justification for making a student do school "work" and homework is the extent that it produces something valuable for the student, ie. skills/understanding and qualifications. School "work" has no moral value beyond this. The teacher is not an employer, and no one except the student has anything to gain by the "work". Equally, no one is disadvantaged when the student takes a short cut on doing the "work", except the student herself. "Cheating" implies that she will get something unfairly or that other students will be disadvantaged, but it should now be clear that there is no way to cheat on school work or homework (excluding summative assessments).
Therefore education needs to balance striving for deep understanding, getting formal qualifications, and minimising the opportunity cost to the student (lost time for socialising, relaxation, and extra curricular activities). It is these factors alone that usually need to be analysed in order to determine the morality of an educational activity. What the teacher wants is not really morally relevant in the calculation.
For example, in a recent meta-analysis, high homework requirements have been shown on average to have a neutral or only slight positive impact on student educational outcomes, while other studies indicate it can have a large negative effect on extra curricular activities and student health. Therefore homework itself is on shaky moral ground, and more than 2 hours of homework a day is almost certainly unethical, no matter what the teacher or school demands.
From another perspective, it is questionable how much a teacher can prescribe a student's activities outside of school grounds and school hours. Consider how upset a teacher would get if parents tried to require that students do an hour of chores during class time! Unless a student is committing fraud, whether or however your sister decides to do her homework is outside the jurisdiction of her teacher to control.
Your Situation
Your sister making a "homework machine" obviously leads to a deeper understanding, and increased time for extra curricular activities (if you include programming as the extra-curricular activity!), at the possible expense of being fast at manually doing those problems when she sits the test or studies more advanced work. If she is confident in solving these problems manually, then there is no issue here. An ideal teacher would have used formative assessment to determine a more profitable use of the student's time, and so wouldn't give those drills as homework in the first place.
For your sister, her moral course of action is to maximise her education while minimising the opportunity cost.
The only real moral issue would be if she used the "homework machine" to fraudulently gain an advantage on summative assessments, however, I am assuming that she would use this for homework, and not smuggle her computer into the exam.