INCREDIBLE ! 
Author Message
 INCREDIBLE !

Request:
?round(11.5) ; round(12.5) ; round(13.5) ; round(14.5)

Result:
12 12 14 14

NO COMMENT

Someone can help me ?



Tue, 10 Aug 2004 00:55:16 GMT  
 INCREDIBLE !
David,

Quote:
>Someone can help me ?

It's called Banker's Rounding, is by design and explained here

HOWTO: Implement Custom Rounding Procedures (Q196652)
http://support.microsoft.com/default.aspx?scid=kb;;Q196652

Mattias

===
Mattias Sj?gren (VB MVP)

http://www.msjogren.net/dotnet/



Tue, 10 Aug 2004 01:31:10 GMT  
 INCREDIBLE !
Thaks Mattias,
Now I Know then Name .....

Banker's Rounding !

Ok ... but now the incredible thing for me are :

1)
Visual Basic for Applications does not have any function that does
arithmetic rounding.

2) Thi is the Italian Documentation of the funcion :
Funzione Round
Descrizione

Restituisce un numero arrotondato in base al numero di cifre decimali
specificato.

Sintassi

Round(espressione[, numcifredecimali])

La sintassi della funzione Round composta dalle seguenti parti:

      Parte Descrizione
      espressione Obbligatoria. Espressione numerica da arrotondare.
      numcifredecimali Facoltativa. Numero che specifica il numero di cifre
decimali da includere nell'arrotondamento. Se omesso, la funzione Round
restituisce numeri interi.

Where this "little" featues is documented?

3)
Why using Excel and SQL Server the same round function apply an arithmetic
rounding ?

David.



Quote:
> David,

> >Someone can help me ?

> It's called Banker's Rounding, is by design and explained here

> HOWTO: Implement Custom Rounding Procedures (Q196652)
> http://support.microsoft.com/default.aspx?scid=kb;;Q196652

> Mattias

> ===
> Mattias Sj?gren (VB MVP)

> http://www.msjogren.net/dotnet/



Tue, 10 Aug 2004 16:58:51 GMT  
 INCREDIBLE !
I must admit, thats pretty weird.  You'd think that bankers rounding would
be more suitable for Excel than VB.


Quote:
> Thaks Mattias,
> Now I Know then Name .....

> Banker's Rounding !

> Ok ... but now the incredible thing for me are :

> 1)
> Visual Basic for Applications does not have any function that does
> arithmetic rounding.

> 2) Thi is the Italian Documentation of the funcion :
> Funzione Round
> Descrizione

> Restituisce un numero arrotondato in base al numero di cifre decimali
> specificato.

> Sintassi

> Round(espressione[, numcifredecimali])

> La sintassi della funzione Round composta dalle seguenti parti:

>       Parte Descrizione
>       espressione Obbligatoria. Espressione numerica da arrotondare.
>       numcifredecimali Facoltativa. Numero che specifica il numero di
cifre
> decimali da includere nell'arrotondamento. Se omesso, la funzione Round
> restituisce numeri interi.

> Where this "little" featues is documented?

> 3)
> Why using Excel and SQL Server the same round function apply an arithmetic
> rounding ?

> David.


messaggio

> > David,

> > >Someone can help me ?

> > It's called Banker's Rounding, is by design and explained here

> > HOWTO: Implement Custom Rounding Procedures (Q196652)
> > http://support.microsoft.com/default.aspx?scid=kb;;Q196652

> > Mattias

> > ===
> > Mattias Sj?gren (VB MVP)

> > http://www.msjogren.net/dotnet/



Tue, 10 Aug 2004 21:24:46 GMT  
 INCREDIBLE !
Banker's rounding is, as I understand it, more a feature of the Intel chip
architecture than of VB per se.  It is the default rounding (executed in
hardware) for any programming language on any PC.

Jim Deutch
MS Dev MVP

Quote:
> Thaks Mattias,
> Now I Know then Name .....

> Banker's Rounding !

> Ok ... but now the incredible thing for me are :

> 1)
> Visual Basic for Applications does not have any function that does
> arithmetic rounding.

> 2) Thi is the Italian Documentation of the funcion :
> Funzione Round
> Descrizione

> Restituisce un numero arrotondato in base al numero di cifre decimali
> specificato.

> Sintassi

> Round(espressione[, numcifredecimali])

> La sintassi della funzione Round composta dalle seguenti parti:

>       Parte Descrizione
>       espressione Obbligatoria. Espressione numerica da arrotondare.
>       numcifredecimali Facoltativa. Numero che specifica il numero di
cifre
> decimali da includere nell'arrotondamento. Se omesso, la funzione Round
> restituisce numeri interi.

> Where this "little" featues is documented?

> 3)
> Why using Excel and SQL Server the same round function apply an arithmetic
> rounding ?

> David.


messaggio

> > David,

> > >Someone can help me ?

> > It's called Banker's Rounding, is by design and explained here

> > HOWTO: Implement Custom Rounding Procedures (Q196652)
> > http://support.microsoft.com/default.aspx?scid=kb;;Q196652

> > Mattias

> > ===
> > Mattias Sj?gren (VB MVP)

> > http://www.msjogren.net/dotnet/



Wed, 11 Aug 2004 02:02:13 GMT  
 INCREDIBLE !


Quote:
> Thaks Mattias,
> Now I Know then Name .....

> Banker's Rounding !

> Ok ... but now the incredible thing for me are :

> 1)
> Visual Basic for Applications does not have any function that does
> arithmetic rounding.

If you always want to round up, add .5 and truncate.


Fri, 13 Aug 2004 13:33:27 GMT  
 INCREDIBLE !

Quote:



> > Visual Basic for Applications does not have any function that does
> > arithmetic rounding.

> If you always want to round up, add .5 and truncate.

I thought "always round up" was -Int(-X) ...  >=)

--
Joe Foster <mailto:jlfoster%40znet.com>  Sign the Check! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Fri, 13 Aug 2004 14:36:43 GMT  
 INCREDIBLE !
ASTM in days bygone (for chemistry, anyway).  0.5 is midway, so do we go up
or down?  Simple.  Go to the nearest even number!  That's the rule, look at
the quirks in some of the OLD Texas calculators (pre CBM PET era) and it may
give a hint as to why they made it a rule!  In science, we also round
12.0005 to 12.000, but 12.0015 to 12.002.  I haven't got around to looking
at the European rule yet, but I bet they are there in BXLS!

regards,.

Bob.


Quote:
> Request:
> ?round(11.5) ; round(12.5) ; round(13.5) ; round(14.5)

> Result:
> 12 12 14 14

> NO COMMENT

> Someone can help me ?



Sat, 28 Aug 2004 08:02:47 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Access 2000: Incredible Errors Converting Old Databases

2. Side note: VB.net's Help files are incredible, I suggest everyone try them

3. INCREDIBLE RESOLUTION and SOUND CARD in QB 4.5!

4. Codebase is Incredible!!!

5. Incredible GUI Enabler ActiveX

6. An incredible difficult topic ....

7. Playstation 2, XBox, GameCube Incredible Prices!!

8. Incredible!!

9. The incredible disappearing VB5

10. The incredible disappearing VB5

11. Incredible Problem in DBCombo (NEW PROGRAMMER)

12. IT IS INCREDIBLE

 

 
Powered by phpBB® Forum Software