Bug 24669: Improve numeric input handling in smart-rules.pl