Charles Greathouse on Wed, 20 Jul 2016 16:01:59 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: floor(121^(1/2))=10(??) |
Zak Seidov <zakseidov@yahoo.com> writes:
> OK, I understand, that sometimes floor is wrong.
> But plz help to write a code for computing perfect power number
> . . .
Perhaps you want something like:
myfloor(x)={local(t);t=sqrt(x);floor(t+1/(10^(2+precision(t))))}
(There's probably a more efficient way to enter the small correction.)
-- Bill