# Computing Fixed-Point Square Roots and Their Reciprocals Using Goldschmidt Algorithm

## Repeated subtraction method

The repeated subtraction method first subtracts the given number from the odd numbers until you get zero. The step in which zero is obtained is the square root of the number. It is a time-consuming and lengthy process.
Find the square root of 36 using the repeated subtraction method

1. 36-1 = 35
2. 35-3 = 32
3. 32-5 = 27
4. 27-7 = 20
5. 20-9 = 11
6. 11-11 = 0

We got zero in the sixth step. Hence,  √36 = 6.

Square root calculation is used in finance, quadratic formula, standard deviation lengths and distance, and many more. With this blog, we will understand what is square root, the formula and symbol, and some solved examples.

Looking to Learn Math? Explore Wiingy’s Online Math Tutoring Services to learn from top mathematicians and experts.

## What are the methods to find the square root of a number?

The numbers that end with 2,3, 7 0r 8 at the unit place are not perfect square numbers and are a little difficult to find. The numbers ending with 1,4,5,6 or 9 in the unit place are perfect square numbers and can be found easily using the prime factorization or the long division method.
The method to find the square root is

• Prime factorization method
• Long division method
• Repeated subtraction method

## Prime factorization method

Prime factorization is one of the easiest methods to find the square root of any number. Let us take n as the prime number, by grouping the similar numbers we get n2, by multiplying the similar n2. The value we get is the square root of the number.
Let us take the number 144 as an example and solve them using the prime factorization method.
The prime factor of 144 = 12×12
By squaring them we get 122, since two is the only similar square we take the common one.
Here, the common square is 12.
Hence, the √144 = 12

## Long division method

• Step 1: Find the smallest integer that can divide the number.
• Step 2: Keep following the long division using divisor and dividend.
• Step 3: When the particular number of satisfaction is reached the quotient is the square root of the number.

Find the square root of 2

• Step 1: Find the smallest integer that can divide the number. 1 is the perfect root number that is smaller and closest to 2.
• Step 2: Keep following the long division using divisor and dividend.
• Step 3: When the particular number of satisfaction is reached the quotient is the square root of the number. Hence, the √2 = 1.4142

Some pressure measurements are used to indirectly derive another type of measurand. One of these is the Rate of Flow of a gas or liquid. The flow rate along a closed pipe is directly proportional to the square root of the pressure drop or differential pressure between two points.

Since the relationship is non-linear there is a greater change in flow at low pressures compared to higher ones. In order to optimize the resolution of flow measurement the output on some differential pressure transmitters can be altered so that it is directly proportional to the flow rate rather than the differential pressure.

The reverse formula for converting a square root extraction output to a linear one is: #### Articles You May Like :

4-20 mA Formula & Convert

Linear % To Square root %

3-15 psi to 4-20mA Convert

Pressure Switch Principle

Control Loop Testing

## Introduction

Ideally, we want to know that whatever value we compute for the square root is close to the actual value. In other words, the error, $\epsilon$, should be trending toward zero when the algorithm terminates. Therefore,

Substituting $\epsilon$ into $y = y_0 + \epsilon$ yields:

This result can be represented as a recursion:

To achieve quadratic convergence on the square root, an initial estimate of the root, $y_0$, is required. An estimate too far from the true root will cause convergence to be linear instead of quadratic. In other words, if the initial estimate of the root, $y_0$,is much less than or greater than the root, then each iteration approaches the root linearly according to:

Quadratic convergence returns to the recursion once the approximation of the root, $y_i$, is in the vicinity of the real root. Therefore, a good initial estimate of the root is required.

Another feature of the Newton-Raphson square root algorithm is that each iteration requires a division to be performed. In terms of computer arithmetic, division is generally far slower than multiplication except when these operations can be implemented as right shift and left shift operations, respectively.

Whole numbers are straightforward, and their application, as well as equation, is hardly ever complicated. The real challenge kicks in when one needs to deal with complex numbers and decimals. Did you know there are infinitely complex numbers between two consecutive whole numbers? While this is indeed a fascinating fact, it takes mathematics to another level.

Every student will learn the square roots of whole numbers, at least till 25 in their primary school days. So it is apparent that you can easily answer when you are asked –

If your answer is 12, you are right. Now let’s try something new-

It is not that easy, isn’t it?

Well, it is because 146’s square root is not a whole number, so it is a bit challenging to find its accurate answer. In such situations estimating square root is the way to go. There are several ways to calculate the approximate values, and among them, the simplest ones are stated below.

Дополнительно:  Ноутбук выключается во время игры. Что можно сделать?

### Approximate the Square Root to the Nearest Integer

To determine the square root to its nearest tenth, let’s continue with the example stated above.

Your foremost step will be a vague estimation, which is determining the closest roots that comes just before and after 146. In this case, it will be

√144 < √146 < √169

Now simplify this equation to estimate the square root to the nearest integer.

12 < √146 < 13

From here it is clear that the square root of 146 is between 12 and 13. As 146 is way closer to 144 than 169, its estimate square root integer will be 12.

### Estimating Square Root to its Nearest Tenth

Moving forward with the same example,

12 < √146 < 13

To find the square root to its nearest tenth subtracts the lower number from the one in your question. That is –

146 – 144 = 2

Now subtract the lower number from the higher number, that is –

169 – 144 = 25

The complex part of your approximation will be

2/25 = 0.08

Now, round it to the nearest tenth of the decimal. For this example, it will be

0.08 ≈ 0.1

12 + 0.1 = 12.1

So, its estimate square root to its nearest tenth is 12.1.

Now let’s confirm the result with another square root estimation method.

### Linear Approximation of Square Root

So, it is clear that the square root of 146 is somewhere between 12 and 13. In this method, you need to draw a line and divide it into 10 equal parts, write the smaller number in its left end and the higher in its right end. It should look something like this.

Here 2 represents 12, and 3 represents 13. Since 146 is way closer to 144 than it is to 169 that linear approximation will be 12.1.

While it is feasible to use square root by estimation method when the number is relatively small, the real challenge comes when the number in question is significantly big.

### Approximate Square Root of Large Numbers

For this, let’s take a new example,

The first step to estimating roots for these kinds of numbers is to make groups of two starting from the rightmost digit, like

The number of groups you get will be the number of digits in your square root. In this case, it is two. Here instead of taking the closest square root, we will take the closest squares roots in hundreds or thousands. That is-

√1,600 < √2,439 < √2,500

Now simplify this equation,

40 < √2,439 < 50

So, it is clear that the number is somewhere between 40 and 50, now since the number is significantly closer to 50, we will check the square of the number just below it,

49² = 2401, which is way closer than 2500.

Thus, the estimation of the square root for √2,439 will be 49.

Had the number been an almost equal distance, the numbers you need to take under consideration are from the middle.

Even though these methods are going to help you to estimate square roots, only practice can take you places. Visit Vedantu to get an array of sample sheets and sample papers for numerous such topics and sharpen your mathematic skills. Check their live classes and tuitions to understand critical topics in a more comprehensive way.

The square root of a number is the value obtained by raising the number to the power ½. The number obtained by multiplying a number by itself is called a square number. Square and square roots are inverse Mathematical operations. Squares and square roots are used generally in solving quadratic equations and many other Mathematical calculations. Square root is denoted by a symbol ‘√’. Square root of a number ‘x’ is written as √x or x½. Square root of any number has two values: one positive and one negative. However, the magnitude of both the values remain the same.

Value of Root 1 = +1 or -1

1 is the most important element of Mathematics. One or unity in Mathematics is used to represent a single entity in a number, measurement, or calculation. The number ‘1’ has a few peculiar properties which are very important in Mathematical calculations. They are:

• ‘1’ is the number used to represent a single identity.

• ‘1’ is added to any integer to get the immediate successive integer.

• When ‘1’ is subtracted from any integer, the immediately preceding integer is obtained.

• 1 is the multiplicative identity of any number. i.e. When any number is multiplied by itself, the number itself is obtained as the product.

• The multiplicative inverse of any number is the value obtained when ‘1’ is divided by the number.

• When any number is divided by ‘1’, the answer is the number itself.

• When the number is divided by itself, the answer obtained is one.

• The value of any number raised to the power zero is equal to unity.

### Square Root of +1

So, square root of 1 can be calculated as:

The formula for finding the roots of a quadratic equation can also be used to find the square root of 1.

Let the square of the number ‘x’ be equal to ‘1’. This can be written as:

The above equation is a quadratic equation which can be represented in standard form as:

The above equation is of the form ax2 + bx + c = 0. So, a = 1, b = 0 and c = -1.

The value of ‘x’ can be found using the formula:

Comparing equations (1) and (2), we can infer that the value of under root 1 is equal to either positive or negative unity.

Most commonly, the value of under root 1 is taken as positive unity or + 1.

### Value of Square Root of -1

Root value of ‘-1’ does not exist in theory. It is an imaginary number represented as ‘i’. Root of -1 is generally used to represent complex numbers which include both the real part and the imaginary part. With the knowledge of the square root of negative unity, the root value of any negative number can be found. Square root of -1 is a positive or negative imaginary unit ‘i’. However, in most cases, the value of the root of -1 is taken as a positive imaginary unit ‘i’.

Дополнительно:  Скачать bluestacks уже с root правами

Square Root of First 30 Integers:

### Square root 1 to 10:

Values of Square Root 1 to 10 is Listed in the Table Below:

These values of square root 1 to 10 are depicted on the number line as a square root spiral.

(Image will be updated soon)

= 7 (1) — 5 (1) + 2 (1)

= 7 — 5 + 2 = 4.

• ‘I’ is the first unit of imaginary numbers. It is equivalent to number ‘1’ in real numbers.

• When negative unity is raised to the power of odd numbers the answer is -1 and when negative unity is raised to the power of even numbers, the answer is + 1.

• The value of root 1 to any power is equal to 1.

### Significance of Square Roots

In the applied area of Mathematics, the concept of square roots is considered to be highly important. The concept lays the basic foundation for algebra. Students who plan to score exceptionally in the subject should study this chapter in detail.

Vedantu tries to explain complex concepts in simple terms. It makes it convenient for the students to dive deeper into the logical reasoning behind the numerical values. There are many benefits for studying square roots-

• Square roots from basic to complex hold a significant weightage in board exams.

• The tricks related to calculating the square roots help in setting the mind map for mastering Math.

• It further helps in taking your mathematical skills to the level of abstraction.

• With the help of square roots, students will be able to hone their calculative skills in an intelligent manner.

• Besides being important in the concept of algebra, square roots play a significant role in boosting your child’s theoretical and statistical methods.

• In addition to Math, square roots would help you to get a better understanding of some important laws in Physics.

### Learn Square Roots Easily

Square roots might seem to be complicated at times. With Vedantu, Students can clear all their doubts related to it.

In order to make the concept easy, we provide sample problems at the right intervals. You can easily get a firm grip over the topics that are considered to be of main importance in solving algebra.

• To start with, students should understand the definition of the concept as defined by the Vedantu experts. The definition is formulated by the experts and will stick with you in the long run.

• Before coming to the other numbers, it is important that you take one step at a time. Starting from Number 1, Vedantu has covered all the details related to its value, method and example problems to help you score well on the topic.

• Vedantu provides a detailed tabular representation for the square root of the first 30 integers. It also provides a table consisting of values from 1 to 10.

• Experts at Vedantu make sure to include all the concepts for the particular topic you are looking for. Along with the square root of +1, it has also covered the square root of -1. Questions related to it are most likely to be asked in the exams. It helps you in scoring well on the ‘High-order thinking skills(HOTS).

• To make sure that students have fun during their learning process, Vedantu consists of ‘fun facts’

• related to the topic. Students from all the classes find it intriguing and curious enough to know more about the concept.

• To score well in Mathematics, it is very important to keep practicing the example problems. Vedantu experts have formulated some important examples along with the solutions. It will help you in understanding the kind of questions expected out of the topic.

## Perfect square and not a perfect square

A perfect square number is one whose square roots give a whole number. The square root of 4 is 2, the square root of 400 is 20, etc.,
A not-perfect square number is one whose roots are not whole numbers but rather decimals.
The square root of 5 = 7.071

## The formula for finding the square root

The formula is simple x = √y or x = y2

What is a square root?
The square root of a value is a number when multiplied by itself gives the original number or the square root is the inverse of squaring the numbers. Which tells that both concepts are dependable on each other

Give an example of a perfect square number.
The numbers that are perfect squares are 4,16 and 25 are some of the examples for perfect square numbers.

What are irrational numbers?
Any number that is not expressed as a fraction is called an irrational number.

What is the square root of -1?
We know the definition of square root, thus multiplying or squaring these values we get 1 and not a negative result.
-1 = (-1) (-1) = 1. The square root of -1 is i

The square root symbol is denoted as √ called a radicand.

What is the formula for square root?
The formula is simple x = y or x = y2

What is the square root of 100?
The square root of 100 is 10

## Estimating $y_0$ for Floating Point Implementations

There are several approaches used to choose $y_0$.
For floating point numbers, one approach is to break apart the
floating point format, i.e. into its exponent and mantissa
components. The estimate of the square root is obtained by simply
manipulating the exponent and putting the components back together
again. This approach works for floating point representations because
the mantissa represents a constrained range of numbers: $0.5$ to $1.0$.
The floating point exponent allows a much larger set of numbers.
Thus,

Another approach to determine the estimate of the square root is to use tables, with the objective to refine the initial estimate and minimize the number of iterations required to converge to the root. This is the approach used for many square root implementations in many floating point processors. On an historical note, an incompletely specified table was the source of the infamous FDIV error in the Intel Pentium processor.

## Fixed-Point Goldschmidt $\sqrt{S}$ and $1/\sqrt{S}$ Algorithm Description

The introduction section provides a derivation of a square root algorithm based on the algorithm of Newton and Raphson. In addition, it discusses an approach for estimating the initial value of the square root for floating point values so that quadratic, rather than linear, convergence to the root can be achieved. For the target application, 32-bit fixed-point numbers are used instead of floating point numbers. (Note: the primary reason for using the 32-bit fixed-point representation is that the algorithm is implemented to support a motion controller embedded in an FPGA’s programmable logic rather than in an FPGA using an embedded soft-core microprocessor.)

## Square root

The square root of a value is a number when multiplied by itself gives the original number or the square root is the inverse of squaring the numbers. Which tells that both concepts are dependable on each other.

Дополнительно:  Устранение ошибок типа "синий экран" в FWPKCLNT.SYS 🎮

The square root of a number in the radical form is denoted as √ when they are in the exponential form they are denoted as the (number)1/2 or the (number) 0.5.

Let us take p and q. The square root of p = √q or p = q2 the number that is positive when positive or multiplied gives the exact number.
That is if we take the number 9 the square root of 9 is found by multiplying the number twice.
9 = 32 or √9 = 3, when the number three is multiplied it gives the number 9.

## Solved examples

Q1: Solve the equation √2a+9 = 5
A1: √2a+9 = 5
Let us take square on both sides
2a+9 = 52
2a+9 = 25
2a = 25-9
2a = 16
a = 16/2
a=8

Q2: Square root of 125 using the prime factorization method
A2: The prime factors of 125 = 5×5×5
√125 = 5×5
= 5 × 2.236
= 11.8

Q3: Square root of 12 using the long division method

A 3: √12 = 3.464

Q4: Find the square root of pi

A 4: √𝛑 = 1.77

Q5: Find the square root of 64 using the repeated subtraction method

1. 64-1 = 63
2. 63-3 = 60
3. 60 – 5 = 55
4. 55-7 = 48
5. 48 – 9 = 39
6. 39-11 = 28
7. 28-13 = 15
8. 15-15 = 0
9. √64 = 8

Looking to Learn Math? Explore Wiingy’s Online Math Tutoring Services to learn from top mathematicians and experts.

## Rational and irrational numbers

Rational numbers are expressed as a fraction of the integer. That is they are simple fractions and p/q ≠0.
Let us take the number 121 as an example:
The square root of 121 = 11, when we divide the number 121/11 = 11 and not zero or a complicated fraction.
An irrational number leads to complicated fractions and is often difficult to solve. Any number that is not expressed as a fraction is called an irrational number.
The square root of 5 = 7.071 which cannot be further converted into a fraction and is also not equal to 0.

## The square root of -1

Understanding the square root of minus values is simple. There is no real square root for the negative integers which are often referred to as imaginary roots. Why? Because what happens when you multiply two negative values is you get a positive number and not a negative one. Let’s say we need to find the square root of -1. We know the definition of square root, thus multiplying or squaring these values we get 1 and not a negative result.
-1 = (-1) (-1) = 1.
Therefore they are referred to as imaginary roots and are denoted as I.
Find the square root of -2
√-2 = 1.4142i

## Floating-Point Goldschmidt $\sqrt{S}$ and $1/\sqrt{S}$ Algorithm Description

### Floating-Point Goldschmidt $\sqrt{S}$ and $1/\sqrt{S}$ Algorithm #1

$$b_0 = S$$

$$x_0 = SY_0$$

$$y_0 = Y_0$$

### Selection of Algorithm to Implement in Fixed-Point

Testing of these two algorithms using Excel demonstrated that Algorithm #1 appeared to be more consistent with respect to the termination condition. Even though a fixed number of iterations, i.e. 6 or initialization plus five more cycles, was the goal, Algorithm #1 appeared to provide a more robust way to terminate. Therefore, Algorithm #1 was selected for implementation in fixed-point.

### Fixed-Point Implementation of Goldschmidt Algorithm #1

$$y_0 = Y_0$$

The algorithm has converged when $b_i \le B(1-\epsilon)$, or when a pre-determined number of iterations have been performed. The results are:

In the fixed-point arithmetic unit implemented for the target application, left/right shifts of the double length product are provided by a single cycle barrel shifter at the output of the multiplier. This means that the arithmetic right shift operation shown in the equations above are free. Similarly, operations like scaling by powers of 2 are also free.

Finally, for the target application, the fixed-point arithmetic was performed using 32-bit signed values. The double length fixed-point product was generated using a 4-bits at a time Booth multiplier rather than a multiplier constructed from the built-in 18-bit multiplier-accumulators available in the target application’s FPGA. The custom-designed, Booth multiplier does not deliver single cycle performance, or even 4 cycle performance. In fact, it requires 11 cycles to compute the product (10 for the multiplier and 1 for the barrel shifter) since in the target application both the ALU and the multiplier are actually implemented as 40-bit wide functions in order to provide guard bits on both ends in order to support chained operations and improved rounding / truncation of intermediate results. Taken all together, the Booth multiplier is slightly slower and uses fewer resources than a multiplier built with the built-in hardware multipliers of the target FPGA for a similar numerical format.)

## Symbol of the square root

The square root symbol is denoted in a radical way. Let us say we have to express x in the square root then it is denoted as x. The symbol in radical form is also called radicant. Here x = any number.
The square root of 4 is expressed as √4

## Initial Fixed-Point Square Root Estimate, $y_0$

The approach required to estimate the initial starting value of the root for fixed-point representations is similar to that used for floating-point representations. However, the fact that fixed-point representations provide both an integer and a fractional component complicates how the estimate is computed. The primary factor complicating the estimation of the initial square root value for fixed-point representation is that the algorithm simultaneously computes that square root and the inverse square root. The inverse square root of a fractional-only fixed-point value may have a fixed-point integer component that exceeds the fixed-point representation’s integer component. (Note: for a fully general purpose algorithm, changing the decimal point location in the fixed-point representation would be a requirement. However, for the target application, the range of fixed-point values to which the algorithm is applied can be limited in a manner that avoids the need to float the decimal point of the fixed-point representation.

Оцените статью 