Advice 1: How to degree on a calculator

Not all calculators have a function of a number raised to the degree. In order to determine the capabilities of your calculator, find out whether it is engineering. If you do not know, then find the button on your calculator, depicting x in y sepedi. If it is, then, the trick will fail.
How to degree on a calculator
You will need
  • calculator
Instruction
1
Determine what your calculator. Does it have enough buttons? If you see only the functions of addition, subtraction, multiplication, division and a few buttons, then on your calculator actions such as raising a number to the degreeof impossible. You can achieve the desired degree by simply multiplying the number by itself the required number of times, namely, equal to your degree.
2
If you have a scientific calculator, and you see it the button with the function x, elevated to the degree of y, then perform the next action. Enter a number value that you need to build in a degree, and then click, which was discussed above. Now enter the value of the degree and get the result by clicking on the button with the sign still. The result is obtained.
Useful advice
If you use the calculator that is included in the standard set of Windows programs, it is possible to enlarge to engineering and back).

Advice 2: How to build in a degree in pascal

The Pascal programming language differs from most others in that it lacks the operator of raising to the degree. Therefore, the fragment program for the implementation of this mathematical operation has to be on their own.
How to build in a degree in pascal
Instruction
1
The simplest case occurs when the number should be built in a small whole positive degree. This mathematical operation can be done in literally one line. For example, if the number should always be elevated to the fourth degree, use this line:b:=a*a*a*a;write a and b must be of a type appropriate to the range and type of number under construction in the degree.
2
If the number is also elevated to a whole and positive degree, but it is large, and, moreover, can change, use cycle. To do this, place in the program fragment like this:c:=a;if b=0 then c:=1;if b>=2 then for i:=2 to b do c:=a*c;Here a is the number to be elevated to the degree, b is the exponent, c is the result. The variables i and b are necessarily of type integer.
3
To raise a number to a fractional degree, use the properties of logarithms. The corresponding program fragment will look like this:c:=exp(b*ln(a));This method does not allow to work with zero and negative numbers. To resolve the first of these disadvantages, use of such a structure:if a=0 then c:=1 else c:=exp(b*ln(a));This will allow you to bypass the limitation on the range of values of the input parameter of the natural logarithm, which, if zero has no mathematical meaning. The second drawback, however, will remain in force to build the degree of a negative number still fail. Use all variables of type real.
4
To build in a degree of a negative number, take its module, substitute in the previous expression, then change the sign of the result. In Pascal it would look as follows:c:=(-1)*exp(b*ln(abs(a)));Then, if the degree is even, take the modulus from the result:if round(b/2)=b/2 then c:=abs(c);
5
Sometimes there is a need for a universal piece of software that allows the construction of degree in any numbers. Then compile it as follows:c:=0;if a0 then c:=exp(b*ln(a));if b=0 then c:=1;if round(b/2)=b/2 then c:=abs(c);Here all variables are also of type real.
Search
Is the advice useful?