Post Reply 
Wanted: Efficient Algorithm to Square an Integer Number
03-06-2019, 03:54 PM (This post was last modified: 03-06-2019 03:54 PM by Martin Hepperle.)
Post: #1
Wanted: Efficient Algorithm to Square an Integer Number
Hi,

some programming languages (like (Turbo Pascal) offer special functions to square an integer number. These are said to be faster than multiplying the number by itself.

Where can I find algorithms like this? I searched the internet for a while and I am aware of Donald Knuth's books, but I did not find a suitable algorithm.

Some time ago I had a document describing many clever tricks for working with numbers in various digital representations (8 ... 64 bit integers, IEEE floating point). Many involved magic numbers and overflows etc.. It contained algorithms like inverting all bits in a number and similar. But I cannot find it anymore.
Any ideas, hints, links?

Thank you,
Martin
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Wanted: Efficient Algorithm to Square an Integer Number - Martin Hepperle - 03-06-2019 03:54 PM



User(s) browsing this thread: 1 Guest(s)