Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hypot(3) [redhat man page]

HYPOT(3)						     Linux Programmer's Manual							  HYPOT(3)

NAME
hypot - Euclidean distance function SYNOPSIS
#include <math.h> double hypot(double x, double y); DESCRIPTION
The hypot() function returns the sqrt(x*x + y*y). This is the length of the hypotenuse of a right-angle triangle with sides of length x and y, or the distance of the point (x, y) from the origin. CONFORMING TO
SVID 3, BSD 4.3 SEE ALSO
sqrt(3) 1993-06-25 HYPOT(3)

Check Out this Related Man Page

HYPOT(3)						     Linux Programmer's Manual							  HYPOT(3)

NAME
hypot, hypotf, hypotl - Euclidean distance function SYNOPSIS
#include <math.h> double hypot(double x, double y); float hypotf(float x, float y); long double hypotl(long double x, long double y); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): hypot(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; or cc -std=c99 hypotf(), hypotl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE; or cc -std=c99 DESCRIPTION
The hypot() function returns sqrt(x*x+y*y). This is the length of the hypotenuse of a right-angled triangle with sides of length x and y, or the distance of the point (x,y) from the origin. The calculation is performed without undue overflow or underflow during the intermediate steps of the calculation. RETURN VALUE
On success, these functions return the length of a right-angled triangle with sides of length x and y. If x or y is an infinity, positive infinity is returned. If x or y is a NaN, and the other argument is not an infinity, a NaN is returned. If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively. If both arguments are subnormal, and the result is subnormal, a range error occurs, and the correct result is returned. ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions. The following errors can occur: Range error: result overflow errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised. Range error: result underflow An underflow floating-point exception (FE_UNDERFLOW) is raised. These functions do not set errno for this case. CONFORMING TO
C99, POSIX.1-2001. The variant returning double also conforms to SVr4, 4.3BSD. SEE ALSO
cabs(3), sqrt(3) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2008-08-05 HYPOT(3)
Man Page

12 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk substr

Hello life savers!! Is there any way to use substr in awk command for returning one part of a string from declared start and stop point? I mean I know we have this: substr(string, start, length) Do we have anything like possible to use in awk ? : substr(string, start, stop) ... (9 Replies)
Discussion started by: @man
9 Replies

2. Shell Programming and Scripting

Grep float/integers but skip some integers

Hi, I am working in bash in Mac OSX, I have following 'input.txt' file: <INFO> HypoTestTool: >>> Done running HypoTestInverter on the workspace combined <INFO> HypoTestTool: The computed upper limit is: 11 +/- 1.02651 <INFO> HypoTestTool: expected limit (median) 11 <INFO> HypoTestTool: ... (13 Replies)
Discussion started by: Asif Siddique
13 Replies

3. UNIX for Dummies Questions & Answers

Want to remove all lines but not latest 50 lines from a file

Hi, I have a huge file which has Lacs of lines. File system got full. I want your guys help to suggest me a solution so that I can remove all lines from that file but not last 50,000 lines. I want solution which can remove lines from existing file so that I can have some space left with. (28 Replies)
Discussion started by: prashant2507198
28 Replies

4. Shell Programming and Scripting

Join not working properly

I want to join two files , with file 1 col 3 and file 2 col 1 as key. The join command is erratic for some reason. File 2 is a master file having all the names, and file 1 has some values. I want to add the names from fil2 in file 1. If I use the original master file, some output is missing. ... (16 Replies)
Discussion started by: ritakadm
16 Replies

5. Programming

Is C worth the effort?

Hello guys, I have a little question. I think about learning c or c++ because im very interessted in low Level programming. And because i love Unix Too i thought C would be the better choice since Most it Done in c. Or should i learn c++? Because C++ has all this nice Features like oop and... (9 Replies)
Discussion started by: dryPants
9 Replies

6. Shell Programming and Scripting

Rsync exclude & include?

hi I have a few folders and a few files , for example Directory A B C D E Files 1 2 3 4 5 I want B directory and "2" File that does not sync But other directories and file sync What is the solution ? Is there a way to sync time is under one minute? os centos 6.8 thanks... (5 Replies)
Discussion started by: mnnn
5 Replies

7. OS X (Apple)

Noob trying to improve

Hi everyone! This is my first post here, I hope that I will not already be violating any rule! I also would like to apologize in advance as my post will definitely be a noob post... please have patience and faith :rolleyes:! Now that I have set the ground rules :D:D, my objective is trying... (39 Replies)
Discussion started by: Ardzii
39 Replies

8. Shell Programming and Scripting

Question regarding tar command.

I wish my tar -xf hello.tar command should return successful even if the tar has already been extracted at the same location i.e. exists by the same or a different user. Currently i am getting this error as another user has extracted the same tar at the same location. tar: README - cannot... (6 Replies)
Discussion started by: mohtashims
6 Replies

9. SCO

Long file names within shell script

I am downloading a zip file that contain files that are very long. I am trying to process them, but cannot. I can move the files from one directory to another at the shell prompt, but not within a shell script, I get a stat error. The files look somewhat like this; ... (5 Replies)
Discussion started by: trolley
5 Replies

10. Shell Programming and Scripting

In shell scripting found "\n-" and don't know what is it for

Working on UNIX shell scripting I found in env file the following export H1="\n- " echo "${H1} Waiting for dependencies of ${MONITOR_KEY} to be satisfied ..." >> ${LOG} What is in shell \n- The new line character? Thanks for contribution (2 Replies)
Discussion started by: digioleg54
2 Replies

11. Shell Programming and Scripting

Avoiding external utilities

under past circumstances, id be fine running commands like this: case 1: printf '%s\n' "${MASSIVETEXT}" | egrep "i am on the first line" case 2: vprintf '%s\n' "${MASSIVETEXT}" | egrep -v "i am on the first line" This works fine. Bit it calls external utility "egrep" and "printf". ... (5 Replies)
Discussion started by: SkySmart
5 Replies

12. UNIX for Beginners Questions & Answers

AIX version selection

Hi, I would like to upgrade my AIX box 6.1 to 7.1/7.2. Current info of my AIX 6.1 box / > oslevel -s 6100-09-11-1810 System Model: IBM,9117-MMD Machine Serial Number: xxx Processor Type: PowerPC_POWER7 Processor Implementation Mode: POWER 7 Processor Version: PV_7_Compat Number Of... (10 Replies)
Discussion started by: Phat
10 Replies