🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #17

Re: Absolute value??

#17
From: Greg Hunt
Date: Wed, 28 Oct 1992 12:47
21 lines
1304 bytes
In article <94562@netnews.upenn.edu>, mmuhamad@pixmap.seas.upenn.edu (Mohd Zaki Muhamad) writes:
>
>    Do any of you out there know any function that can turn all data
> (negative or positive) to be positive...i mean in absolute value
> so that I can compare them and find  which one is the largest?  For your
> info,
> I am addressing this question to C language programmer.  Is the function
> defined in the math.h?   Thanks.

Try the abs(3c) function, it does absolute values.  It's part of the
standard library, I think.  For more info, try:

   man abs | more

Enjoy!

-- 
Greg Hunt                            email: hunt@dg-rtp.rtp.dg.com
DG/UX Core Development
Data General Corporation
Research Triangle Park, NC, USA      These opinions are mine, not DG's.
Technical Details
Message-ID: <1992Oct28.124722.11089@dg-rtp.dg.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!hela.iti.org!usc!rpi!psinntp!psinntp!dg-rtp!hobbit!hunt
References: <94562@netnews.upenn.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!hela.iti.org!usc!rpi!psinntp!psinntp!dg-rtp!hobbit!hunt
From: hunt@dg-rtp.rtp.dg.com (Greg Hunt)
Subject: Re: Absolute value??
Message-ID: <1992Oct28.124722.11089@dg-rtp.dg.com>
Sender: hunt@robin (Greg Hunt)
Date: Wed, 28 Oct 92 12:47:22 GMT
Reply-To: hunt@dg-rtp.rtp.dg.com
References:  <94562@netnews.upenn.edu>
Organization: Data General Corp., Research Triangle Park, NC
Lines: 21