Integer roots: Difference between revisions

Content added Content deleted
(→‎{{header|Ruby}}: Added Ruby)
m (→‎{{header|Ruby}}: added comment)
Line 301: Line 301:
return b if b<2
return b if b<2
a1, c = a-1, 1
a1, c = a-1, 1
f = -> x { (a1*x+b/(x**a1))/a}
f = -> x { (a1*x+b/(x**a1))/a} # a lambda with argument x
d = f[c]
d = f[c]
e = f[d]
e = f[d]