Wikipedia:Reference desk/Archives/Computing/2019 August 16
Computing desk | ||
---|---|---|
< August 15 | << Jul | August | Sep >> | August 17 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
August 16
editComparing computers
editI was planning to improve (rewrite) Shakuntala Devi and landed upon this news-piece which documents her battle with an UNIVAC-1108. The latter took more than a minute to calculate the 23rd root of a random 201 digit number, thus losing to Devi, who took ~50 seconds.
My question is that, if an Apple II were used (which launched the same year), what would have been the time taken by it? Any approximation? ∯WBGconverse 13:45, 16 August 2019 (UTC)
- P.S:- The model number has been also reported to be UNIVAC 1110 in some media. At any case, how did these compare to other popular models of those days? Any model, which might have beaten Devi comfortably? ∯WBGconverse 13:50, 16 August 2019 (UTC)
- One issue in answering this question is that standard computers can't process 201-digit numbers natively, so they need to use bignum software to do this sort of calculation. It's possible that different versions of the software exist, or that they may be configured to store different numbers of digits, which would affect the time. (The number of digits matters because "the 23rd root of a random 201-digit number" would be irrational, so it must be computed to a certain number of decimal places.) --76.69.116.4 (talk) 14:57, 16 August 2019 (UTC)
- Thanks; that's a point! I am assuming 9/10 decimal places, FWIW. ∯WBGconverse 16:02, 16 August 2019 (UTC)
- The answer listed in the news report is 546372891, so perhaps that's the accuracy to which it was provided. By the way, the more important issue than the computational power of the machine used is the matter of the algorithm. I guess, for example, that Shakuntala's mental calculation was based upon (she would surely have the logarithmic tables memorized, at least to some precision, and division by 23 would be trivial for her), which does not necessitate the person/computer to store or work with the actual 201 digits to get the answer to the ~10 significant digits; double precision arithmetic, which UNIVACs could do since the 1960s, would suffice. Not sure if the computer used such approximations, and what numerical algorithms and databases it had access to. Of course, knowing what methods and approximations to use is part of the human advantage in such competitions. Abecedare (talk) 16:59, 16 August 2019 (UTC)
- If the answer was 546372891, then it wasn't a random 201-digit number. There are tricks that lightning calculators can use for some such roots (mainly odd-numbered roots of integers), which wouldn't be programmed into the computer. And if they had entered the number into the computers double-precision floating-point, it should have been able to calculate it in a tiny fraction of a second. Bubba73 You talkin' to me? 20:55, 16 August 2019 (UTC)
- And in fact, reading the badly scanned article, it doesn't say it was a random number. Obviously the number was 916,748,676,920,039,158,098,660,927,585,380,162,483,106,680,144,308,622,407,126,516,427,934,657,040,867,096,593,279,205,767,480,806,790,022,783,016,354,924,852,380,335,745,316,935,111,903,596,577,547,340,075,681,688,305,620,821,016,129,132,845,564,805,780,158,806,771, which is a 23rd power, and we can forget about irrationals and decimal places. --76.69.116.4 (talk) 21:06, 16 August 2019 (UTC)
- And that 201-digit number is written on the blackboard in the photo in the article. They probably used multiple-precision integers on the computer. Bubba73 You talkin' to me? 21:09, 16 August 2019 (UTC)
- And if the number was not an odd power of an integer, the problem is a lot harder, i.e. an even power or not the power of an integer. Bubba73 You talkin' to me? 22:45, 16 August 2019 (UTC)
- And that 201-digit number is written on the blackboard in the photo in the article. They probably used multiple-precision integers on the computer. Bubba73 You talkin' to me? 21:09, 16 August 2019 (UTC)
- And in fact, reading the badly scanned article, it doesn't say it was a random number. Obviously the number was 916,748,676,920,039,158,098,660,927,585,380,162,483,106,680,144,308,622,407,126,516,427,934,657,040,867,096,593,279,205,767,480,806,790,022,783,016,354,924,852,380,335,745,316,935,111,903,596,577,547,340,075,681,688,305,620,821,016,129,132,845,564,805,780,158,806,771, which is a 23rd power, and we can forget about irrationals and decimal places. --76.69.116.4 (talk) 21:06, 16 August 2019 (UTC)
- If the answer was 546372891, then it wasn't a random 201-digit number. There are tricks that lightning calculators can use for some such roots (mainly odd-numbered roots of integers), which wouldn't be programmed into the computer. And if they had entered the number into the computers double-precision floating-point, it should have been able to calculate it in a tiny fraction of a second. Bubba73 You talkin' to me? 20:55, 16 August 2019 (UTC)
- The answer listed in the news report is 546372891, so perhaps that's the accuracy to which it was provided. By the way, the more important issue than the computational power of the machine used is the matter of the algorithm. I guess, for example, that Shakuntala's mental calculation was based upon (she would surely have the logarithmic tables memorized, at least to some precision, and division by 23 would be trivial for her), which does not necessitate the person/computer to store or work with the actual 201 digits to get the answer to the ~10 significant digits; double precision arithmetic, which UNIVACs could do since the 1960s, would suffice. Not sure if the computer used such approximations, and what numerical algorithms and databases it had access to. Of course, knowing what methods and approximations to use is part of the human advantage in such competitions. Abecedare (talk) 16:59, 16 August 2019 (UTC)
- Thanks; that's a point! I am assuming 9/10 decimal places, FWIW. ∯WBGconverse 16:02, 16 August 2019 (UTC)
- One issue in answering this question is that standard computers can't process 201-digit numbers natively, so they need to use bignum software to do this sort of calculation. It's possible that different versions of the software exist, or that they may be configured to store different numbers of digits, which would affect the time. (The number of digits matters because "the 23rd root of a random 201-digit number" would be irrational, so it must be computed to a certain number of decimal places.) --76.69.116.4 (talk) 14:57, 16 August 2019 (UTC)
Here and here is some discussion. Bubba73 You talkin' to me? 22:51, 16 August 2019 (UTC)
- Great finds Bubba73! Abecedare (talk) 02:02, 18 August 2019 (UTC)
- And this talks about easy ways of taking the 13th root of 100-digit numbers. No doubt that the 23rd root of a 201-digit number is something along these lines. Bubba73 You talkin' to me? 03:19, 18 August 2019 (UTC)
The 13th root of a 201 digit number to 10-ish decimal places should take almost no time on an Apple II or even a pocket calculator. You'd use logarithms, not bignums. E.g. if the number is 3.4567e200, its common logarithm is 200+log10(3.4567) = 200.53866168963842, and 1/13th of that is 15.426050899202956, so the answer is 1e15 * 100.426050899202956 = 2.6671712379959103e15. At least 10 places of that should be accurate using Univac 1108 double precision or some 64-bit software floating point (pre-IEEE) on the Apple II. Computation time on the Apple might have been in double (or maybe triple) digit milliseconds vs much faster on the 1108 and sub-microsecond on today's PC's. Applesoft BASIC extended precision floating point apparently had a 1-byte exponent and 31-bit mantissa, so that would be about 9 decimal digits of precision, which might satisfy you. Otherwise I'm sure higher precision software existed though a quick web search doesn't find an easy link. The Univac had 36 bit words, so 72 bit double precision, for 20+ decimal places of precision. It looks from this that VisiCalc, the Apple II killer app spreadsheet, did decimal arithmetic to around 10 or 11 digits (guessing that the US govt budget was around 1e11 dollars in that era). Anyway math of that precision was no big deal even back then. Here is a 13-digit desk calculator from the 1960s. 173.228.123.207 (talk) 04:34, 18 August 2019 (UTC)
- I had an Apple II, and I don't remember for sure, but I doubt that it had 64-bit floating point. But Apple Pascal had 36-digit integers. You should be able to take the most-significant digits of the 201-digit number and take the 23rd root and account for the location of the decimal point (like they did with fixed-point back in the old days), and get the answer. My guess is under 1 second on the Apple II. Bubba73 You talkin' to me? 05:34, 18 August 2019 (UTC)
- Of course, a story about a computer crushing a mental calculator isn't going to make the news. Bubba73 You talkin' to me? 19:56, 18 August 2019 (UTC)
- Entering the first few digits into my calculator in scientific notation, taking the log, dividing by 23, and then take the exponential immediately gives 546372891.025, which rounded off to an integer gives the correct answer. Bubba73 You talkin' to me? 20:01, 18 August 2019 (UTC)
Google Fuchsia embedded device requirements.
editWhat are the minimum and maximum requirements for smartphones (such as RAM etc..)?Ajax-x86 (talk) 15:12, 16 August 2019 (UTC)
- According to our article, Google Fuchsia is "...designed to scale to any application from embedded RTOS (Real-Time Operating Systems) to mobile and desktop devices of all kinds". That implies that it would run with very minimal RAM, but with a reduced feature set. How low, and at what reduction of features, I do not know. SinisterLefty (talk) 18:01, 16 August 2019 (UTC)
Making columns responsive
editThere could be two-four columns of my articles, depending on the screen size. I used media query for my article class of title. However, nothing seems to happen when the site is displayed on different resolutions.
I tried adding @media ONLY screen instead of @media screen but this does not work neither.
@media screen and (min-width: 576px) {
.skill { float: left; width: 50%; }
} @media screen and (min-width: 1200px) {
.skill { width: 25%; }
}
What should I change in my code in order to get two or four columns of articles on 576px and 1200px screens respectively? Vs6507 20:39, 16 August 2019 (UTC)
- Try using the CSS3 columns property:
@media screen and (min-width: 576px) {
.skill {
columns: 2;
}
@media screen and (min-width: 1200px) {
.skill {
columns: 4;
}