You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Oliver Kohll <ol...@gtwm.co.uk> on 2007/03/02 15:21:03 UTC

ViewTools roundTo accuracy

Hello,

I recently had an issue using the roundTo method on some financial  
figures. Results were sometimes out by one or two pence (it was a  
cumulative effect).

Looking at the MathTool source code (ViewTools version 1.2), I can't  
see any problem. However, writing my own wrapper around Java's  
BigDecimal round method solved my problem. It may or may not be  
deemed appropriate to use this in MathTool, I'm just saying it worked  
for me. Haven't got any test cases I'm afraid.

Regards

Oliver Kohll

oliver@gtwm.co.uk / 0845 456 1810 / 07814 828608
Furze Bank, 34 Hanover Street, SWANSEA UK, SA1 6BA


NOTE
No contracts may be concluded on behalf of GT webMarque by means of e- 
mail
communications. The contents of this e-mail are confidential to the
intended recipient at the e-mail address to which it has been addressed;
it may not be disclosed to or used by anyone other than this addressee,
nor may it be copied in any way. If received in error please return to
sender via e-mail.

DISCLAIMER
Please note that neither GT webMarque Ltd nor the sender accept any
responsibility for viruses transmitted via e-mail. It is your
responsibility to scan attachments (if any).



Re: ViewTools roundTo accuracy

Posted by Claude Brisson <cl...@renegat.net>.
Le vendredi 02 mars 2007 à 15:38 +0100, Claude Brisson a écrit :
> Hi.
> 
> This problem should have been corrected in the latest subversion
> revision (1.4-dev).

(1.4-dev of VelocityTools I meant)

>   Claude
> 
> Le vendredi 02 mars 2007 à 14:21 +0000, Oliver Kohll a écrit :
> > Hello,
> > 
> > I recently had an issue using the roundTo method on some financial  
> > figures. Results were sometimes out by one or two pence (it was a  
> > cumulative effect).
> > 
> > Looking at the MathTool source code (ViewTools version 1.2), I can't  
> > see any problem. However, writing my own wrapper around Java's  
> > BigDecimal round method solved my problem. It may or may not be  
> > deemed appropriate to use this in MathTool, I'm just saying it worked  
> > for me. Haven't got any test cases I'm afraid.
> > 
> > Regards
> > 
> > Oliver Kohll
> > 
> > oliver@gtwm.co.uk / 0845 456 1810 / 07814 828608
> > Furze Bank, 34 Hanover Street, SWANSEA UK, SA1 6BA
> > 
> > 
> > NOTE
> > No contracts may be concluded on behalf of GT webMarque by means of e- 
> > mail
> > communications. The contents of this e-mail are confidential to the
> > intended recipient at the e-mail address to which it has been addressed;
> > it may not be disclosed to or used by anyone other than this addressee,
> > nor may it be copied in any way. If received in error please return to
> > sender via e-mail.
> > 
> > DISCLAIMER
> > Please note that neither GT webMarque Ltd nor the sender accept any
> > responsibility for viruses transmitted via e-mail. It is your
> > responsibility to scan attachments (if any).
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: ViewTools roundTo accuracy

Posted by Claude Brisson <cl...@renegat.net>.
Hi.

This problem should have been corrected in the latest subversion
revision (1.4-dev).

  Claude

Le vendredi 02 mars 2007 à 14:21 +0000, Oliver Kohll a écrit :
> Hello,
> 
> I recently had an issue using the roundTo method on some financial  
> figures. Results were sometimes out by one or two pence (it was a  
> cumulative effect).
> 
> Looking at the MathTool source code (ViewTools version 1.2), I can't  
> see any problem. However, writing my own wrapper around Java's  
> BigDecimal round method solved my problem. It may or may not be  
> deemed appropriate to use this in MathTool, I'm just saying it worked  
> for me. Haven't got any test cases I'm afraid.
> 
> Regards
> 
> Oliver Kohll
> 
> oliver@gtwm.co.uk / 0845 456 1810 / 07814 828608
> Furze Bank, 34 Hanover Street, SWANSEA UK, SA1 6BA
> 
> 
> NOTE
> No contracts may be concluded on behalf of GT webMarque by means of e- 
> mail
> communications. The contents of this e-mail are confidential to the
> intended recipient at the e-mail address to which it has been addressed;
> it may not be disclosed to or used by anyone other than this addressee,
> nor may it be copied in any way. If received in error please return to
> sender via e-mail.
> 
> DISCLAIMER
> Please note that neither GT webMarque Ltd nor the sender accept any
> responsibility for viruses transmitted via e-mail. It is your
> responsibility to scan attachments (if any).
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org