For example, don't trigger on https://duckduckgo.com/?q=gcd+2&t=ffab&ia=answer - it doesn't provide any useful info.
IA Page: http://duck.co/ia/view/greatest_common_factor
Maintainer: @austinheimark
I do see that as an issues but what can be done, it that you could just display gcd of 2 = gcd 2,2 =2 or gcd 2,0 = 2..... so basically what i mean is, when the user does not provide the second value then assume that the second value is zero or two....because in reality the gcd of a single number is its self.
@procommand We can just return if there is only one input number - I.e., return unless @numbers > 1. I see your point, and I guess some people might actually be trying to find out the gcd of a single number, @duckduckgo/duckduckhack-contributors any thoughts?
@GuiltyDolphin Agreed; if theres only 1 number in the input it should just return
@GuiltyDolphin @procommand, When 2 numbers are entered (let's say x and y), a message saying "Greatest common factor: x and y" comes along with the answer. What we can do is, if one number is entered we can give a message "Greatest common factor: x and 0", along with the answer x.
@harisphnx Both @mintsoft and I believe we shouldn't trigger on a single number - I'd like to get @austinheimark's opinion as maintainer.
yeah, i guess you are right about just returning. But we could give users info about why we returned, and it could be like "Cannot compute GCD for a single number, please provide a second number followed by a comma...Example: (GCD 2,6)".... but it all matter what we all think together
By definition it requires two or more numbers. We don't typically provide usage messages either for the wrong syntax.
@procommand can I help you get started or involved with anything in the next week or two? I'll make sure to be around Slack and GitHub if so.
@zekiel @GuiltyDolphin @austinheimark I have a fix for this, but it's the way @procommand said it is not usually done. I submitted a pull request (https://github.com/duckduckgo/zeroclickinfo-goodies/pull/3167) if you guys could look it over please!
Most helpful comment
By definition it requires two or more numbers. We don't typically provide usage messages either for the wrong syntax.