G
gamo
Does anyone knows how to write a sub for gcd?
Any chances that will be include in the core like sort or like UBASIC?
TIA
Any chances that will be include in the core like sort or like UBASIC?
TIA
gamo said:This message is in MIME format.
while the remaining parts are likely unreadable without MIME-aware tools.
Does anyone knows how to write a sub for gcd?
Any chances that will be include in the core like sort
Does anyone knows how to write a sub for gcd?
Michele said:Does anyone knows how to write a sub for gcd?
Yes I know!
Ok, now I know you don't believe me...
sub gcd { $_[1]?gcd($_[1],$_[0]%$_[1]):$_[0] }
I belive you, but it is just a gcd of a PAIR of numbers.Does anyone knows how to write a sub for gcd?
Yes I know!
Ok, now I know you don't believe me...
sub gcd { $_[1]?gcd($_[1],$_[0]%$_[1]):$_[0] }
^^^^^^^^^^^^^
^^^^^^^^^^^^^
I belive you, but it is just a gcd of a PAIR of numbers.Yes I know!
Ok, now I know you don't believe me...
sub gcd { $_[1]?gcd($_[1],$_[0]%$_[1]):$_[0] }
I find this in the ToolBox module
sub gcd {
^^^^^^...............^^^^^^^^^^^^^
Do you mean $n=shift ?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.