# Practical problem

GENIERE
This is a math problem, but requires a little preface.

In my home I am going to replace the wall-to-wall carpeting with Pergo type flooring. This type of flooring is less than half the price of real hard wood planks. Each “fake” wood plank varies in width and length depending on the manufacturer, but generally about 48” x 7.5 inches. Actual measurements are metric but in the US you’re usually provided the nearest inch equivalent. My wife wants the planks to run diagonally (45 degrees) across the floors in most rooms and also incorporate some “patterns”. Women! With the large square footage, wastage because of the diagonal run will probably cost me an additional $1500.00 -$20000.00. I’d like to minimize the waste.

Hmmm! This preface is taking longer than I thought so I apologize to the readers. Please bear with me a little longer.

When I replaced my Kitchen cabinets, I was in need of graph paper to plan the layout. Having none, I decided to print out a blank Excel spread sheet with the “squares” set to the appropriate number of pixels. Once in Excel, I realized I could simply color in the squares to simulate cabinet location and obtain exact measurements using a few simple Excel macros. The manufacturer's computer plans agreed closely with mine and the small error was theirs.

I’d like to use Excel again to plan the flooring layout and calculate waste. The problem is I need to find the diagonal of a square such the length of sides and the length of the diagonal are as close to integer values as is possible. Hopefully the decimal can be xx.99xxx. Each integer value will represent a convenient number of pixels on the spreadsheet.

My last calculus course was taken over 45 years ago and I haven’t used it in over 30 years. I’m hoping the number of pixels for the sides can be less then 20 to keep the as much displayed in one window as possible at 100% magnification.

I’d be very grateful if someone could supply an answer, trial and error has not worked.

...

Gokul43201
Staff Emeritus
Gold Member
So you want a square whose side and diagonal are both nearly integers ? The easiest way to do this would be on Excel itself. In column A you have sides = 1,2,3,... and in B1 you enter "=A1*sqrt(2)". Then just check column B for near integer values.

Here's a few that you can choose from :

side,diagonal

5, 7.07 (not great)
12, 16.97 (better)
17, 24.04 (about the same as the previous)
29, 41.01 (the best yet, but a little large)

tiling patterns here

Last edited:
GENIERE
Gokul43201 said:
So you want a square whose side and diagonal are both nearly integers ? The easiest way to do this would be on Excel itself. In column A you have sides = 1,2,3,... and in B1 you enter "=A1*sqrt(2)". Then just check column B for near integer values…
Now I am embarrassed. Many thanks!

uart