#J, 18 bytes
J, 18 bytes
%@(-<.)^:(~:<.)^:_
In J, the idiom u ^: v ^:_ means "Keep applying the verb u while condition v returns true.
In our case, the ending condition is defined by the hook ~:<., which means "the floor of the number <. is not equal ~: to the number itself" -- so we'll stop when the main verb u returns an int.
u in this case is another hook -<. -- the number minus its floor -- whose return value is fed into @ the reciprocal verb %.
#J, 18 bytes
%@(-<.)^:(~:<.)^:_
In J, the idiom u ^: v ^:_ means "Keep applying the verb u while condition v returns true.
In our case, the ending condition is defined by the hook ~:<., which means "the floor of the number <. is not equal ~: to the number itself" -- so we'll stop when the main verb u returns an int.
u in this case is another hook -<. -- the number minus its floor -- whose return value is fed into @ the reciprocal verb %.
J, 18 bytes
%@(-<.)^:(~:<.)^:_
In J, the idiom u ^: v ^:_ means "Keep applying the verb u while condition v returns true.
In our case, the ending condition is defined by the hook ~:<., which means "the floor of the number <. is not equal ~: to the number itself" -- so we'll stop when the main verb u returns an int.
u in this case is another hook -<. -- the number minus its floor -- whose return value is fed into @ the reciprocal verb %.
#J, 18 bytes
%@(-<.)^:(~:<.)^:_
In J, the idiom u ^: v ^:_ means "Keep applying the verb u while condition v returns true.
In our case, the ending condition is defined by the hook ~:<., which means "the floor of the number <. is not equal ~: to the number itself" -- so we'll stop when the main verb u returns an int.
u in this case is another hook -<. -- the number minus its floor -- whose return value is fed into @ the reciprocal verb %.