Clarence,

You are quite right, BRND should return zero as opposed to a null.

This doesn't seem too serious until you realize that actually, BRND returns
a null whenever argument 1 is less than argument 3. This leads to incorrect
rounding, even if you have ZERO set on. e.g. (BRND(1.009,6,.01)) returns
1.01, but (BRND(0.009,6,.01)) returns null when it should return 0.01.

In my opinion, this is a bug and should be reported to RDCC. Would you mind
doing that?

Thanks and regards,

Stephen Markson
ForenSys The Forensic Systems Group
www.ForensicSystemsGroup.com
416 482 2140


----- Original Message -----
From: "Clarence W. Robison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 12:21 PM
Subject: RE: Is this correct operation


> Yes 'SET ZERO' is off. My understanding of this feature is to allow 'NULL'
> values to be treated as 0.0 not unknown. However, this is not the case. I
> pass a known value, 0.0, to BRND and it returns NULL. BRND should return
0.0
> when given 0.0 regardless of the SET ZERO setting. BRND should return
'NULL'
> when given a NULL and SET ZERO OFF and return '0.0' when given a NULL and
SET
> ZERO ON.
>
> Further investigation shows that if the value should round to zero, ie,
> brnd(0.0001,6,0.01)) it still returns a NULL.  This should not be, it
should
> return a zero.
>
> I will have to throw in another if test because of this behavior where
BRND
> throws a NULL when given a 0.0 value.
>
> cheers -- Clarence


Reply via email to