pspp-dev
[Top][All Lists]
Advanced

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

Re: trunc


From: John Darrington
Subject: Re: trunc
Date: Mon, 27 Nov 2006 08:50:39 +0800
User-agent: Mutt/1.5.9i

On Sat, Nov 25, 2006 at 06:58:41PM -0800, Ben Pfaff wrote:
     I'd suggest checking for trunc with Autoconf, then providing an
     implementation based on floor if it doesn't exist, i.e. something
     like this:
     
     #ifndef HAVE_TRUNC
     double
     trunc (double d)
     {
       return d >= 0.0 ? floor (d) : -floor (-d);
     }
     #endif
     
     I do something like this for the "round" function.

That's a good idea.  Maybe we should gather these sort of functions
into a common module and put it in libpspp and/or offer it to the
gnulib developers for inclusion there.

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

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