{"id":24378,"date":"2021-10-14T09:46:49","date_gmt":"2021-10-14T04:16:49","guid":{"rendered":"https:\/\/python-programs.com\/?p=24378"},"modified":"2021-11-05T21:06:48","modified_gmt":"2021-11-05T15:36:48","slug":"python-program-for-asinh-function","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-asinh-function\/","title":{"rendered":"Python Program for asinh() Function"},"content":{"rendered":"
In the previous article, we have discussed Python Program for acosh() Function<\/a> The inverse hyperbolic sine of a number is returned by the math.asinh() method.<\/p>\n Syntax:<\/strong><\/p>\n Parameter:<\/strong><\/p>\n x:<\/strong> This is required. It is a positive or a negative number. If x is not a number, a TypeError is returned.<\/p>\n Return Value:<\/strong><\/p>\n Returns a float value representing a number’s inverse hyperbolic sine.<\/p>\n Examples:<\/strong><\/p>\n Example1:<\/strong><\/p>\n Input:<\/strong><\/p>\n Output:<\/strong><\/p>\n Example2:<\/strong><\/p>\n Input:<\/strong><\/p>\n Output:<\/strong><\/p>\n Approach:<\/strong><\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Approach:<\/strong><\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Know all about Mathematical Functions in Python by going through our Python Mathematical Methods Examples<\/a> well explained step by step.<\/p>\n In the previous article, we have discussed Python Program for acosh() Function asinh() Function\u00a0in Python: The inverse hyperbolic sine of a number is returned by the math.asinh() method. Syntax: math.asinh(x) Parameter: x: This is required. It is a positive or a negative number. If x is not a number, a TypeError is returned. Return Value: …<\/p>\n
\nasinh() Function\u00a0in Python:<\/strong><\/p>\nmath.asinh(x)<\/pre>\n
\n
Given first number = 9\r\nGiven second number = 45<\/pre>\n
The result after applying asinh() function on above given first number 9 = 2.8934439858858716\r\nThe result after applying asinh() function on above given second number 45 = 4.49993310426429<\/pre>\n
Given first number = 30\r\nGiven second number = 60<\/pre>\n
The result after applying asinh() function on above given first number 30 = 4.09462222433053\r\nThe result after applying asinh() function on above given second number 60 = 4.78756117999381<\/pre>\n
Program for asinh() Function in Python<\/h2>\n
\n
Method #1: Using Built-in Functions (Static Input)<\/h3>\n
\n
# Import math module using the import keyword.\r\nimport math\r\n# Give the list as static input and store it in a variable.\r\ngvn_lst = [1, 4, 6, 3]\r\n# Give the first number as static input and store it in another variable.\r\ngvn_numb1 = 9\r\n# Apply math.asinh() function to the given first number to get the inverse\r\n# hyperbolic sine of a given number\r\n# Store it in another variable.\r\nfnl_rslt = math.asinh(gvn_numb1)\r\n# Print the above result.\r\nprint(\"The result after applying asinh() function on above given first number\",\r\n gvn_numb1, \" = \", fnl_rslt)\r\n# similarly do the same for the other number.\r\ngvn_numb2 = 45\r\nprint(\"The result after applying asinh() function on above given second number\",\r\n gvn_numb2, \" = \", math.asinh(gvn_numb2))\r\n# Apply math.asinh() function to the given list element and print it.\r\nprint(\r\n \"The result after applying asinh() function on given list element gvnlst[1] = \", math.asinh(gvn_lst[1]))\r\n<\/pre>\n
The result after applying asinh() function on above given first number 9 = 2.8934439858858716\r\nThe result after applying asinh() function on above given second number 45 = 4.49993310426429\r\nThe result after applying asinh() function on given list element gvnlst[1] = 2.0947125472611012<\/pre>\n
Method #2: Using Built-in Functions (User Input)<\/h3>\n
\n
# Import math module using the import keyword.\r\nimport math\r\n# Give the list as user input using list(),map(),input(),and split() functions.\r\n# Store it in a variable.\r\ngvn_lst = list(map(float, input(\r\n 'Enter some random List Elements separated by spaces = ').split()))\r\n# Give the first number as user input using the float(input()) function\r\n# and store it in a variable.\r\ngvn_numb1 = float(input(\"Enter some random number = \"))\r\n# Apply math.asinh() function to the given first number to get the inverse\r\n# hyperbolic sine of a given number\r\n# Store it in another variable.\r\nfnl_rslt = math.asinh(gvn_numb1)\r\n# Print the above result.\r\nprint(\"The result after applying asinh() function on above given first number\",\r\n gvn_numb1, \" = \", fnl_rslt)\r\n# similarly do the same for the other number.\r\ngvn_numb2 = float(input(\"Enter some random number = \"))\r\nprint(\"The result after applying asinh() function on above given second number\",\r\n gvn_numb2, \" = \", math.asinh(gvn_numb2))\r\n# Apply math.asinh() function to the given list element and print it.\r\nprint(\r\n \"The result after applying asinh() function on given list element gvnlst[2] = \", math.asinh(gvn_lst[2]))\r\n<\/pre>\n
Enter some random List Elements separated by spaces = 15 25 35 45\r\nEnter some random number = 30\r\nThe result after applying asinh() function on above given first number 30.0 = 4.09462222433053\r\nEnter some random number = 60\r\nThe result after applying asinh() function on above given second number 60.0 = 4.78756117999381\r\nThe result after applying asinh() function on given list element gvnlst[2] = 4.248699261236361<\/pre>\n
\n