pig tutorial - apache pig tutorial - Apache Pig - COSH() - pig latin - apache pig - pig hadoop
What is cosh() function?
- The inverse hyperbolic functions are the area hyperbolic sine "arsinh" (also denoted "sinh−1", "asinh" or sometimes "arcsinh") and so on.
- Just as the points (cos t, sin t) form a circle with a unit radius, the points (cosh t, sinh t) form the right half of the equilateral hyperbola.
Learn apache pig - apache pig tutorial - cosh function in apache - apache pig examples - apache pig programs
COSH() function in Apache Pic
- The COSH() function of Pig Latin is used to compute the hyperbolic cosine of a specified expression.
- Ensure that we have a file named wikitechy_math.txt in the HDFS directory /pig_data/.
- This file contains integer and floating point values as shown below.
- You have loaded this file nito Pig with a relation named math_data as given below.
- You compute the hyperbolic cosine values of the contents of the wikitechy_math.txt file using COSH() function as shown below.
- Above statement stores the result in the relation named cosh_data.
Now you can the contents of the relation using the Dump operator as given below.
The output shows that the result in the file>cosh_data.