bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] ABS macro


From: Oskar Liljeblad
Subject: [Bug-gnulib] ABS macro
Date: Thu, 1 Jul 2004 10:04:49 +0200
User-agent: Mutt/1.5.6+20040523i

Some time ago I wrote to this list about the lack of an ABS
(absolute value) macro. I'd like to ask again - is there any
chance we will see an abs module in the near future?

========================================

Description:
ABS macro.

Files:
lib/abs.h

Depends-on:

configure.ac:

Makefile.am:
lib_SOURCES += abs.h

Include:
"abs.h"

Maintainer:
<maintainer>

========================================

/* ABS macro.
   Copyright (C) 2004 <place copyright here>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifndef _ABS_H
#define _ABS_H

/* Note: ABS is not for use with complex numbers.
   Use cabs etc for that purpose. */

/* ABS(a) returns the absolute value of A. */
#ifndef ABS
# define ABS(a) ((a) < 0 ? -(a) : (a))
#endif

#endif /* _ABS_H */

========================================

Regards,

Oskar Liljeblad (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]