|
-
Rounding numbers
What is the best way to deal with currency values?
What I mean is during the course of my program, numbers representing currency
values are calculated and stored as floats...consequently the artithmetic
produces numbers like 6.345234 etc.
I want to round these numbers to two decimal places (up or down as appropraite)
so I can write them back to the database in that form.
The Math.round() methods produce whole numbers...is their another way to
achieve this?
Many thanks
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks