POSITION:028,114
COLOUR:STANDARD
TEXT:00,To refresh your memory, a square root of a number is any number that is
TEXT:16,multiplied by itself to produce a number. For example, the square root
TEXT:16,of 25 is 5, because 5 times 5 gives 25.
TEXT:32,This library routine can accept both atom and sequence data objects. For
TEXT:16,sequence data objects passed to sqrt(), a sequence with the same length
TEXT:16,is generated, with each atom element a sequare root of the elements in
TEXT:16,the original sequence. For example, {16,0.25} passed to sqrt() returns
TEXT:16,a value of {4,0.5}. The one word of caution is not to pass a negative
TEXT:16,atom value or a sequence with any negative atom elements to sqrt(), or
TEXT:16,your program will encounter a runtime error message. A demo program is
TEXT:16,available showing how atoms and sequences are squared using sqrt().
TEXT:32,The opposite of squaring a number is to raise a number by the power of
TEXT:16,2. Euphoria has a library routine that can raise a number to the power
TEXT:16,of 2, or any power for that matter.
