Ideas in the Night

Tag Archives: powers

First, ∞ is not number. It’s symbol for infinity. For example in the natural numbers set N (the set of all positive integers), there are infinite number of numbers, but none of them is ∞.

But now to the example…

What is 1? Layman probably would say that that’s 1, but according to mathematicians 1 is not defined; we can’t say (at least by our understanding on infinity we have at the moment) what it is.

But what if we get ”close” to 1? Let’s examine following:lim2

From arithmetic operations in infinity we remember, that

 

lim3

So what we have at the first limit sentence is ”1 ” and for

lim2

an exact value can in fact be determined! It’s the Napier’s number e, that’s an irrational number i.e. its decimal representation is infinite. It’s approximately 2.718281828459.

What I presented here, I came familiar with on my first university year.

On Infinity on Amazon

Advertisements

Mathematically the number of digits in given integer > 0 can be determined with logarithm.

The number of digits in an integer > 0 is

Trunc(Logk(number)) + 1

Trunc comes from the Pascal programming language and means truncation. ”number” is 10 base system number of k base system number.

The idea is to examine how many powers of base system k there is in the number, that is how many times the given number can be divided with the base number until we get number < 1. With this our friend logarithm helps us to determine that. As a reminder, logarithm is reverse operation to power.

Examples:

In 10 base system in number 12345678 there is 7 powers of 10: Trunc(Log1012345678) = 7, the number of digits is 7 + 1 = 8.

The hexdecimal system number 99916 = 245710, Log16 2457 = 2.8156…, the number of digits is 2 + 1 = 3.

Hex number FF16 = 25510, Log16 255 = 1.9985…, the number of digits is 1 + 1 = 2.

Binary number (k = 2) 100000002 = 128, Log2 128 = 7, the number of digits is 7 + 1 = 8.

Binary number 101000012 = 16110, Trunc(Log2 161) = Trunc(7.33091…) = 7, the number of digits is 7 + 1 = 8.

ID-100291565

Image courtesy of Stuart Miles at FreeDigitalPhotos.net

Via programming the number of digits can be determined by dividing the number by the base system number k until the number being divided is < 1. Now the number of digits is the number of divisions.

Below is a C programming language program that determines the number digits of 10 base system number that can be positive or negative decimal number:

#include <stdio.h>
#include <math.h>

int detDigits(double);

void main(void) {

  double decimalnumber;
  int number_of_digits;

  printf("Give a decimal number: ");
  scanf("%lf", &decimalnumber);

  number_of_digits = detDigits(decimalnumber);

  printf("The number of digits is %d.",number_of_digits);

}

int detDigits(double dn) {

  int digits_integer_part, digits_decimal_part;
  int worknumber;

  if (dn == 0) return 1;

  if (dn < 0) dn = -dn;

  digits_integer_part = ((int)log10(dn)) + 1;
  dn = dn – (int)dn;

  worknumber = (int) dn;

  while (worknumber % 10 != 0) {
    dn = dn * 10;
    worknumber = (int)dn;
}

/* Variable "worknumber" now holds the number of digits
of decimal part of the given number + 1 */

  digits_decimal_part = worknumber – 1;

  return digits_integer_part + digits_decimal_part;
}

Another way of determining the number of the digits is of course converting the decimal number to string and by examining the number of characters.


I remember the time when I was still studying at lukio (equivalent school is high school in the US, gymnasium in Sweden, Gymnasium in Germany) when there were exercises to determine positive integer powers of imaginary unit i. I invented at that time a method to easily determine the power without using the taught method of grouping the exponent. Later on my university times I invented a formula to determine arbitrary real number power of imaginary unit i.

The method

Complex number z is of form z = a + bi, where the previous is the real part and the latter the imaginary part. Now we’re interested only in imaginary unit i. So we examine complex number z = i, the magnitude of i = 1.

The argument (arg) of imaginary unit i is 90°. From this fact it follows that multiplying with i corresponds 90° rotation on the complex plane. Thus, if the exponent is a positive integer, there’s exactly 4 possibilities for the power of i: 1, -1, i, -i.

yksikkoympyra

 

The power can be determined by dividing the exponent by 4 and examining the decimal part of the division. There are now 4 possibilities: .0; .25; .5; .75. These tell how many percent of unit circle on the complex plane has been rotated.

Based on this the following table can be presented:

table

The first line is the decimal part of division by 4 of the exponent, the second line tells place in the unit circle of the complex plane, the third line tells the the power of imaginary unit i.

For example to determine i12345678 , we first divide the exponent 12345678 by 4, the result is 3086419.5. The decimal part is .5, so we see from the table above, that the power is -1.

The formula for arbitrary real number exponent

I invented this formula myself some time in the year 1997 when I was studying for the second year at the university of Jyväskylä. I thought my formula was too simple, so I didn’t show it to the maths department staff. Anyway, the formula is as follows:

ipowx

Many years ago, I asked on local science magazine’s net forum, that does this kind of formula already exist. The existing formula was a bit different. In the same forum one reader presented a proof to this formula.

On Complex Numbers