Numeric facts on fractions, that few are aware of.

Assume a fraction k/m, with 0≤k≤m and look at its digits written out

  1. The fraction has a finite number of digits (less m) OR is a repeated sequence with at the most m-1 digits per group
  2. A repeated sequence will have at the most n-1 zeroes next to each other, if the number m is below 10ⁿ
  3. Interesting digit-structure of the sequence times m, with many 9’s (base minus 1) .

Continue reading “Numeric facts on fractions, that few are aware of.”

Diagonal to width, simple fractions. Different aspect ratios

Obviously it is easy to calculate the diagonal of e.g. a sensor from the width and height with Pythagoras.
And a bit more tedious the other way round using the aspect ratio. [*]
But for common aspect ratios it is even simpler, 1+1/n fractions within less than 0.4%

Continue reading “Diagonal to width, simple fractions. Different aspect ratios”

Working with numbers in Q with large nominator/denominator in C#

A nerdy idea:

A C# class that quicly can supply a lot of primes (here limited to about the largest prime about 50G – as arrays with over 2G entries are not currently supported without splitting the arrays)

A struct that supports basic arithmetic for large accurately represented numbers in Q,  by factorization into primes.

A test program that tries to find solutions for a!b!=c! with 1<a<b<c

Continue reading “Working with numbers in Q with large nominator/denominator in C#”

Length of round (carpet) roll

Carpet

For some reason, surprisingly few know this extremely simple formula, please share it.

I have actually seen in a carpet store an employee unrolling the carpet to measure the length!!

[The formula is simple to prove too… r=kφ, L=∫r dφ=∫kφ dφ=½k(φ2²-φ1²)=½k(φ21)×(φ21)=½(r2+r1) ×n2π=(r2+r1) × nπ , q.e.d.]