Remy José Cano Ramírez on Sat, 29 Dec 2012 20:05:39 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Square of an unsigned integer without products.


Greetings,

About the following:

----------------------------------------------------------------------------------------
    /*
       Please review and comment if at certain low level the computers today already
       make such calculations with the method shown below.
    */
     
    uisqr(x)={my(i,j,k); x+sum(i=1,2,sum(j=1,(x-1),sum(k=(j+1),x,1)))};
----------------------------------------------------------------------------------------

(Also available at: http://pastebin.com/qb7FHEzA)

Regards,

Remy