home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!portal!dfuller
- From: dfuller@portal.hq.videocart.com (Dave Fuller)
- Subject: Re: the abs() function in C
- Message-ID: <By03nB.F2M@portal.hq.videocart.com>
- Organization: VideOcart Inc.
- X-Newsreader: Tin 1.1 PL3
- References: <pebi.722223424@zephyr.aem.umn.edu>
- Date: Fri, 20 Nov 1992 06:06:46 GMT
- Lines: 17
-
- pebi@aem.umn.edu (Peter A. Bidian) writes:
- :
- : Isn't abs(-2)=2 in C?
- : I always get 0.
- :
- : Confused!
- :
- : Peter
- :
-
- Correct. abs(-2) should return an integer value of 2. Maybe if some more
- code were made available, there is another reason you are seeing a 0
- for the value.
-
- Dave Fuller
- dfuller@portal.hq.videocart.com
-
-