How to round a number like 1678.5445 to 1678.6?.
johans22 0 Newbie Poster
Recommended Answers
Jump to PostYou need to specify the problem more precisely, because 1678.6 is probably not exactly representable as a double. So the question arises as to how close a representation you are willing to accept.
The obvious solution would be to multiply the number by 10, round to the nearest integer, …
Jump to PostHow to round a number like 1678.5445 to 1678.6?.
Do you really need to round it like that? What benefit would that give you? Its questionable if it should even be rounded that way.
All 5 Replies
arkoenig 340 Practically a Master Poster
sergent 52 Posting Pro
sergent 52 Posting Pro
mrnutty 761 Senior Poster
Derek Elensar 34 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.