On Sat, Oct 06, 2001 at 12:42:21PM -0500, Jeremy Nelson wrote:
> >Hmm, but $trunc(0 3.141592654) returns nothing.  I have new_math on, but
> >doubt this has much to do with it.  I would generally consider this to
> >be a bug in implementation.
> 
> $trunc(0 ..) is not permitted; if you need to truncate to an integer,
> just chop it off at the decminal point.

That's what I wound up doing.  It's just not logical that 0 doesn't
work IMO.


> >We've also determined that it rounds.  Rounding is probably not what you
> >want in trunc either.  I consider this a bug in the naming of the
> >function, round should round, trunc should trunc.
> 
> I use printf to do the truncation, and it's too complicated to do it 
> myself, so tough. ;-)
> 
> You are of course welcome to submit patches if you want to see this 
> done another way.  Please be aware that some may depend on current behavior,
> so if anyone complains about the change, i'll send them to you. ;-)

I didn't claim to have a good solution, only pointed out that the
current behavior wasn't what was expected.  If I had a good solution,
I'd have a patch to test it..


> And no, a new /set will not be permitted.

A set for controlling trunc?  Um, I can think of a few things that could
use a /set, that's not one of them.

-- 
Joseph Carter <[EMAIL PROTECTED]>            Free software developer

<|Rain|> #define struct union /* great space saver */

Attachment: msg00105/pgp00000.pgp
Description: PGP signature

Reply via email to