X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=BAYES_50,RDNS_DYNAMIC X-Spam-Check-By: sourceware.org Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit To: From: "Kindle FireHD Under 30.00" Subject: IPad for 1/10th what you would expect to pay. No joke. Date: Thu, 29 Nov 2012 16:44:03 -0800 Message-ID: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hang on a second there... is this really true? Are people really buying merchandise at these prices? Yes, they are. They are really paying at times as little as ONE TENTH what you would normally pay. Ipads. MacBooks. Kindels. HDTVs. Endless inventory. http://www.dexianordic.com/bid/gjZkATwei6gCw7i4a9NiKG5545/products_N/55845/CNN_reports/Din/apple.aspx TVs. Laptops. Iphones. Ipads. Endless inventory, get some now. For immediate removal from the site and from the sender: http://www.dexianordic.com/cool-day/Din/sams/seeds_88787/exit_j23f7887/uZdWcSd8cr7CGj7SX5wvXD/home.aspx Or send a posal request to: Ladner Digital Realm 800 Norht ST. Joseph Ave, Suttons Bay MI 49682 of decimal places is achieved. For example:4.452 = 19.8025 (too low)4.472 = 19.9809 (too low, but close)4.482 = 20.0704 (too high)4.4752 = 20.025625 (too high)4.4732 = 20.007729 (too high)4.4722 = 19.998784 (too low, but close)Now it is known that the square root of 20 is between 4.472 and 4.473, so the decimal representation begins with 4.472... Digit-by-digit calculationThis is a method to find each digit of the square root in a sequence. It is slower than the Babylonian method (if you have a calculator that can divide in one operation), but it has several advantages:It can be easier for manual calculations.Every digit of the root found is known to be correct, i.e., it does not have to be changed later.If the square root has an expansion that terminates, the algorithm terminates after the last digit is found. Thus, it can be used to check whether a given integer is a square number.Napier's bones include an aid for the execution of this algorithm. The shifting nth-root algorithm is a generalization of this method.The algorithm works for any base, and naturally, the way it proceeds depends on the base chosen. Decimal (base 10)Write the original number in decimal form. The numbers are written similar to the long division algorithm, and, as in long division, the root will be written on the line above. Now separate the digits into pairs, starting from the decimal point and going both left and right. The decimal point of the root will be above the decimal point of the square. One digit of the root will appear above each pair of digits of the square.Beginning with the left-most pair of digits, do the following procedure for each pair:Starting on the left, bring down the most significant (leftmost) pair of digits not yet used (if all the digits have been used, write "00") and write them to the right of the remainder from the previous step (on the first step, there will be no remainder). In other words, multiply the remainder by 100 and add the two digits. This will be the current value c.Find p, y and x, as follows:Let p be the part of the root found so far, ignoring any decimal point. (For the first step, p = 0).Determine the greatest digit x such that . We will use a new variable y = x(20p + x).Note: 20p + x is simply twice p, with the digit x appended to the right).Note: You can find x by guessing what c/(20p) is and doing a trial calculation of y, then adjusting x upward or downward as necessary.Place the digitas the next digit of the root, i.e., above the two digits of the square you just brought down. Thus the next p will be the old p times 10 plus x.Subtract y from c to form a new remainder.If the remainder is zero and there are no more digits to bring down, then the algorithm has terminated. Otherwise go back to step 1 for another iteration. ExamplesFind the square root of 152.2756.12. 34/\/01 52.27 56011*1 <= 1 < 2*2x = 101y = x*x = 1*1 = 100 5222*2 <= 52 < 23*3x = 200 44y = (20+x)*x = 22*2 = 4408 27243*3 <= 827 < 244*4x = 307 29y = (240+x)*x = 243*3 = 72998 562464*4 <= 9856 < 2465*5x = 498 56y = (2460+x)*x = 2464*4 = 985600 00Algorithm terminates: Answer is 12.34Find the square root of 2.1. 4142/\/02.00 00 00 00021*1 <= 2 < 2*2x = 101y = x*x = 1*1 = 101 0024*4 <= 100 < 25*5x = 400 96y = (20+x)*x = 24*4 = 9604 00281*1 <= 400 < 282*2x = 102 81y = (280+x)*x = 281*1 = 28101 19 002824*4 <= 11900 < 2825*5x = 401 12 96y = (2820+x)*x = 2824*4 = 1129606 04 0028282*2 <= 60400 < 28283*3x = 2The desired precision is achieved:The square root of 2 is about 1.4142 Binary numeral system (base 2)This article or section may be written in a style that is too abstract to be readily understandable by general audiences.Please improve it by defining jargon or buzzwords, and by adding examples. (September 2012) Inherent to digit-by-digit algorithms is aand test step: find a digit, , when added to the right of a current solution , such that , whereis the value for which a root is desired. Expanding: . The current value of or, usually, the remaindercan be incrementally updated efficiently when working in binary, as the value ofwill be a single bit, and the operations needed to computeandcan be replaced with faster bit shift operations. This gives rise to simple computer implementations:short isqrt(short num) short res = 0;short bit = 1 << 14; // The second-to-top bit is set: 1L<<30 for long// "bit" starts at the highest power of four <= the argument.while (bit > num)bit >>= 2;while (bit != 0) if (num >= res + bit) num -= res + bit;res = (res >> 1) + bit;elseres >>= 1;bit >>= 2;return res;Faster algorithms, in binary and decimal or any other base, can be realized by using lookup tablesin effect trading more storage space for reduced run time. The duplex is the square of the central digit plus double the cross-product of digits equidistant from the center. The duplex is computed from the quotient digits (square root digits) computed thus far, but after the initial digits. The duplex is subtracted from the dividend digit prior to the second subtraction for the product of the quotient digit times the divisor digit. For perfect squares the duplex and the dividend will get smaller and reach zero after a few steps. For non-perfect squares the decimal value of the square root can be calculated to any precision desired. However, as the decimal places proliferate, the duplex adjustment gets larger and longer to calculate. The duplex method follows the Vedic ideal for an algorithm, one-line, mental calculation. It is flexible in choosing the first digit group and the divisor. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple