Browse Prior Art Database

# Square Root Routine

IP.com Disclosure Number: IPCOM000074438D
Original Publication Date: 1971-Apr-01
Included in the Prior Art Database: 2005-Feb-23
Document File: 2 page(s) / 35K

IBM

## Related People

Barsness, LR: AUTHOR [+3]

## Abstract

A square-root routine is provided particularly for a computer which does not have multiply or divide instructions. The routine is performed by first converting the input number to an integer. The decimal point is moved to the right by some multiple of two digits. Zeros are added to the right of the number, if necessary, to facilitate moving the decimal point and specifying the desired digits of accuracy. A zero digit is added to the front of the number if there are an odd number of digits to ensure two R digits for the input field. Having done this, the resultant square root field is set up with R zero digits.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 2

Square Root Routine

A square-root routine is provided particularly for a computer which does not have multiply or divide instructions. The routine is performed by first converting the input number to an integer. The decimal point is moved to the right by some multiple of two digits. Zeros are added to the right of the number, if necessary, to facilitate moving the decimal point and specifying the desired digits of accuracy. A zero digit is added to the front of the number if there are an odd number of digits to ensure two R digits for the input field. Having done this, the resultant square root field is set up with R zero digits.

The leftmost digit in the R field is set to 9. This one digit number is squared and then compared with the first two digits of the modified input number. The squared number must be equal to or less than the input number. If not, the digit is reduced by one, and the procedure is repeated until the equal or low condition occurs. Thereafter, the next digit to the right in the root field is set to 9, and the two digit number is squared and the result is compared with the first four digits of the modified input number. The equal or low condition must again be+obtained. The procedure is repeated until all R digits are set, whereby the result is the largest number which when squared does not exceed the modified input number. The decimal point is then properly reset in the result.

1

Page 2 of 2

2