Mike Ramsour/Larry Lustig, 

Hmmmm... 

Looks like the good one to fine tune for upcoming version 
of The Glorious R:BASE 2000 (ver 6.5++), to be released 
on June 15, 2001. 

I'll mention this to R:Team members during this afternoon 
meeting in Seattle. 

Mike,

THANKS for bringing this to our attention. I personally 
appreciate your efforts. 

Stay tuned ...

Very Best Regards,

Razzak.


At 01:28 PM 6/1/2001 -0700, Lawrence Lustig wrote:

>In the help file it doesn't say what ANINT will do
>with a .5 value, but trying your code sure looks like
>it's truncing that value instead of rounding up (doing
>it with 14.5001 does produce 15).

>You can get the result you're looking for with
>(INT(.vDiff + .5))

At 04:05 PM 6/1/2001 -0400, Mike Ramsour wrote:

>I am trying to round a double data type to 4 decimal places.  
>Here is an example of the code I am testing:
>
>SET VAR VMAX DOUBLE = .032
>SET VAR VMIN DOUBLE = .0291
>SET VAR VDIFF DOUBLE = (((.VMAX - .VMIN) * 10000) / 2)
>SET VAR VAINT  = (AINT(.VDIFF))
>SET VAR VANINT = (ANINT(.VDIFF))
>SET VAR VINT   = (INT(.VDIFF))
>SET VAR VNINT  = (NINT(.VDIFF))
>SHOW VAR %INT%
>
>The intent is to find the difference between two numbers and determine half
>of the result by either multiplying by .5 or dividing by 2.  I am raising
>the result by 10,000 so that I can use the ANINT function to round off the
>decimal point.
>
>The result of the third instruction above is 14.5.  According to the way I
>read the ANINT function the fifth instruction should give me an answer of 15
>since VDIFF is equal to 14.5.  The result I want is 15 but the answer I get
>is 14 indicating that the value was rounded down.  I am not using the BRND
>function but it almost acts like it is.
>
>Is there something I'm missing or is there a better way to go about this?
>
>Version:  RBWIN 6.5++ on NT Workstation 4.0
>

===================================-============================
Official R:BASE List Server:    mailto:[EMAIL PROTECTED]
RBTI Events/Training:        http://www.rbase2000.com/events
R:DCC Members:               http://www.rbase2000.com/rdcc
================================================================
R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
==================================-=============================

Reply via email to