bug-gnulib
[Top][All Lists]
Advanced

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

Re: modules 'round', 'roundf', 'roundl' for review


From: Bruno Haible
Subject: Re: modules 'round', 'roundf', 'roundl' for review
Date: Sun, 7 Oct 2007 06:30:36 +0200
User-agent: KMail/1.5.4

PS: A third possible implementation - if you want to rely on FLOOR and CEIL -
is like this:

DOUBLE
ROUND (DOUBLE x)
{
  if (x >= L_(0.0))
    return FLOOR (x + L_(0.5));
  else
    return CEIL (x - L_(0.5));
}

And another nit:

> +    HAVE_DECL_ROUND=0
> +    AC_LIBOBJ([round])
> +    ROUND_LIBM=

If the lib/round.c substitute relies on floor, then it is wrong to set
ROUND_LIBM to empty. In this case you need to set ROUND_LIBM="$FLOOR_LIBM"
(and ensure that FLOOR_LIBM is already computed at this point in the
configure file).

Bruno





reply via email to

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