On Tue, Mar 08, 2005 at 12:24:42AM +1030, Berndt Josef Wulf wrote:
> G'day,
>
> thanks for supplying the man page on trunc(). This function is indeed missing
> in NetBSD - not sure why.
>
> Anyhow, I think I've found a solution that works and may be acceptable for
> inclusion into the source tr
One more try
#define trunc(x) (((x) >= 0) ? floor(x) : ceil(x))
Quoting Krzysztof Kamieniecki <[EMAIL PROTECTED]>:
> I think the problem is that trunc is not part of the C++ standard. It is
> officially part of C99 so we could link in that library.
>
> This is the macro I would suggest, since in
I think the problem is that trunc is not part of the C++ standard. It is
officially part of C99 so we could link in that library.
This is the macro I would suggest, since int only goes to ~2 billion :)
Also I would prefer a function call because
#define trunc(x) ((x >= 0) ? floor(x) : ceil(x))
G'day,
thanks for supplying the man page on trunc(). This function is indeed missing
in NetBSD - not sure why.
Anyhow, I think I've found a solution that works and may be acceptable for
inclusion into the source tree for platforms that lack this functionality.
Find patch below that checks for
Hi,
not having NetBSD available I can only show you what man trunc tells me
under Linux:
---
NAME
trunc, truncf, truncl - round to integer, towards zero
SYNOPSIS
#include
double trunc(double x);
float truncf(flo
G'day,
gr_frequency_modulator_fc.cc: In member function `virtual int
gr_frequency_modulator_fc::work(int, gr_vector_const_void_star&,
gr_vector_void_star&)':
gr_frequency_modulator_fc.cc:65: error: `trunc' undeclared (first use this
function)
where does trunc() come from? It's not part o