[CLN-list] Questions?

Richard B. Kreckel kreckel at ginac.de
Fri Jun 2 00:50:39 CEST 2006


Wilson Castro wrote:

>            cl_I m;
>            cl_I factor;
>            cln::isqrt( n , &m);
>            while( m > 1 )
>            {
>                factor = cln::floor1( n, m*m);
>                if( factor*(m*m) == n  )
>                {
>                    cout << "sqrt( "<< n <<" ) = " << m << "*sqrt( "<< factor 
><< " )" << endl; 
>                    return ;
>                }
>                m = m - 1;
>            }    
>            
>
Oh, it just occured to me: In order to speed up that program *without* 
changing the algorithm, you may wish to read about the functions 
square() and floor2() in the CLN manual.

  -richy.

-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>



More information about the CLN-list mailing list