Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Meaningless Drivel
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Sheriffs:
Rob Spoor
Junilu Lacar
paul wheaton
Saloon Keepers:
Stephan van Hulst
Tim Moores
Tim Holloway
Carey Brown
Scott Selikoff
Bartenders:
Piet Souris
Jj Roberts
fred rosenberger
Forum:
Meaningless Drivel
Rounding decimal number to nearest 0.05
Pradeep bhatt
Ranch Hand
Posts: 8944
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I want to round decimal number to nearest 0.05. Let me know if the following examples are correct.
12.325 becomes 12.33 and gets rounded to 12.35.
12.315 becomes 12.32 -> 12.30
12.323 ->12.32->12.30
12.399->12.40
12.385->12.40
thanks
Groovy
Pradeep bhatt
Ranch Hand
Posts: 8944
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Anyone ?
Groovy
Chetan Parekh
Ranch Hand
Posts: 3640
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Rules for Rounding
My blood is tested +ve for Java.
Pradeep bhatt
Ranch Hand
Posts: 8944
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Chetan.
Actually the formula is quite simple
Round(A*20)/20.
Groovy
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Math.round errors?
round()
how to display negative values within parenthesis using <display:column > ?
round
rounding off in java
More...