Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 6.3

COLUMN

Fast Exponentiation

It's Not Just for Numbers

Issue: 6.3 (March/April 2008)
Author: Charles Yeomans
Author Bio: Charles will be speaking at Real World 2008 on topics other than algorithms.
Article Description: No description available.
Article Length (in bytes): 7,731
Starting Page Number: 38
Article Number: 6317
Related Link(s): None

Excerpt of article text...

The problem we set for ourselves in this issue's column is: given integers x and N, compute x^N. Since this is a primitive operation in almost every public-key cryptographic system, it is both interesting and useful to understand how to do it quickly. And as a consequence, we can apply what we have learned to write a handy string function.

Let us begin with the direct translation of the meaning of exponentiation into code.

Function Power(x as Integer, N as Integer) as Integer

...End of Excerpt. Please purchase the magazine to read the full article.