KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can you round any number (not just integers > 0) to N significant digits? For example, if I want to round to three significant digits, I'm looking for a formula that could take: 1,239,451 and return 1,240,000 12.1257 and return 12.1 .0681 and return .0681 5 and return 5 Naturally the algorithm should not be hard-coded to only handle N of 3, although that would be a start.
Tags (comma-separated)
Save Edits
Cancel