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:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Meaningless Drivel
Rounding decimal number to nearest 0.05
Pradeep bhatt
Ranch Hand
Posts: 8945
I like...
posted 18 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: 8945
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Anyone ?
Groovy
Chetan Parekh
Ranch Hand
Posts: 3640
posted 18 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: 8945
I like...
posted 18 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
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
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...