Finding Division Equivalents of n-Digit Numbers

In summary: That is, a pattern of integers that can be repeated forever.Such as:√2 = 1 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + ...)))) = [1; 2,2,2,2,...].√3 = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...)))))) = [1; 1,2,1,2,1,2,...].√5 = 2 + 1/(4 + 1/(4 + 1/(4 + 1/(4 + ...))))) = [
  • #1
iScience
466
5
Take a number r that is n-digits long where n is finite.
so if r =2385813...
$$r_1r_2r_3...r_n$$
$$r_1 = 2$$
$$r_2 = 3$$
$$r_3 = 8$$
etc..

I postulate (since I don't know this is true): Every such number can be expressed as a division between two other numbers, say a and b.

$$r = \frac{a}{b}$$

How would you go about finding a and b optimized by minimizing the number of digits in a and b?

In other words, there are an infinite number of combinations of a and b. but of that set of combinations, I want the one that requires the least number of digits in a and b combined.
 
  • Like
Likes ORF
Technology news on Phys.org
  • #2
r=a, b=1? Increasing both a and b by the same factor won't reduce the number of digits, and adding decimal points does not help either.
 
  • Like
Likes DrClaude
  • #3
I postulate (since I don't know this is true): Every such number can be expressed as a division between two other numbers, say a and b.
I expect you'll just have to factorize each then throw out common factors. There are utilities that will find the prime factors for you.
 
  • #4
points:
Every number is ultimately divisible by one or more prime numbers or is prime.

Division operations (as machine instructions) are slower than most other integer opcodes. Using division to create and multiplication to restore them is not going to be an optimal approach necessarily.

If what you stated was viable it would be something that people who build math libraries would use, don't you think? I do not know of any libraries using this approach, do you? I used to work on 8 bit and 16 bit machines. We would have committed nasty crimes back then to get some way to represent numbers with fewer digits of precision reliably and efficiently. Have look at this:

https://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0925083170.htm

This was an attempt to do sort of what you are looking at.
 
  • #5
I see that I completely misunderstood what was being asked. I read it as there being an n-digit fraction and the goal is to reduce that exact ratio to its lowest terms, e.g., given 0.94645 how to reduce the proper fraction 94645/100000 to its simplest/shortest equivalent proper fraction.

On review, I see the OP is concerned with integers, in which case it leaves nothing more to be done: as mfb indicates, b=1 is always optimal.

So I'm left to conclude that member @iScience has not correctly posed the question he/she originally set out to ask. :oldgrumpy:
 
  • #6
Well, this might not be exactly what you are doing, but since you didn't specify any restrictions you could express a complicated fraction as a sum of smaller fractions, eg:

1/3+1/5+1/9+1/16 +1/23 = (16560+9936+5520+3105+2160)/49680 = 37281/49680 = .750422705314...
 
  • #7
iScience said:
In other words, there are an infinite number of combinations of a and b. but of that set of combinations, I want the one that requires the least number of digits in a and b combined.
As a general rule the number of digits needed to represent a real number will be the same as the number of digits in the integers a and b combined, when r = a / b.

I think you should study the approximation of real numbers by the ratio of integers. Convert a real number to a continued fraction by repeated removal of the integer part, then inversion of the fractional part. Then evaluate the continued fraction back to a ratio a/b. Depending on how many terms you consider, you will get less digits or more accuracy.
https://en.wikipedia.org/wiki/Continued_fraction#Motivation_and_notation
 
  • #8
Could we please, please, please not just say "numbers" without distinguishing between "integers", "rational numbers", and "real numbers". The iscience just said "write a number as a ratio of two numbers" and mfb pointed out that "a" can always be written as "a/1". I suspect that iscience was asking if a number can always be written as a ratio of integers. The answer to that is "yes" for rational numbers (in fact that is a way "rational numbers" are commonly defined) but no for general real numbers.
 
  • #9
But iScience provides an example of what he is talking about: an n-digit integer.
 
  • #10
Any representation of an n-digit integer r, as an integer fraction, r = a / b will need at least one more digit than r, since b must take a value of at least 1.

But if r is a real number, then the integer ratio a / b takes it into the world of continued fraction approximations.

All the square roots of integers that are irrational can be represented by recurring continued fractions.
 

1. What is the purpose of finding division equivalents of n-digit numbers?

Finding division equivalents of n-digit numbers is important in various mathematical calculations, such as long division and fraction operations. It allows for easier and more efficient computation of numbers with multiple digits.

2. How do you find the division equivalent of an n-digit number?

To find the division equivalent of an n-digit number, you need to divide the number by a power of 10. For example, to find the division equivalent of 456, you divide it by 100 (10^2) to get 4.56.

3. Why is it important to understand division equivalents for scientific research?

In scientific research, accurate and efficient calculations are crucial. Finding division equivalents of n-digit numbers can help in data analysis, statistical calculations, and other mathematical operations involved in research. It also helps in understanding and interpreting complex numerical data.

4. Can division equivalents be used for numbers with decimal points?

Yes, division equivalents can also be used for numbers with decimal points. In this case, you need to multiply the number by a power of 10 to make it a whole number before finding its division equivalent. For example, to find the division equivalent of 5.6, you can multiply it by 10 (10^1) to get 56 and then divide it by 10 to get 5.6.

5. Are there any practical applications of division equivalents?

Yes, there are many practical applications of division equivalents in fields such as engineering, finance, and physics. For example, engineers use division equivalents to calculate the dimensions of objects, while financial analysts use them for currency conversions and interest rate calculations. In physics, division equivalents are used to convert units of measurement.

Similar threads

  • Programming and Computer Science
Replies
12
Views
1K
  • Programming and Computer Science
Replies
1
Views
956
  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
612
  • Computing and Technology
Replies
4
Views
768
  • Calculus and Beyond Homework Help
Replies
32
Views
2K
  • Introductory Physics Homework Help
Replies
23
Views
349
Back
Top