hey everybody, i was writing a java program and i could not figure out how to round a number[double] to 4 decimal places...i tried a lot of things(adsbygoogle = window.adsbygoogle || []).push({});

the math function's round function rounds the double to one decimal place so that does not work.

i tried various algorithms like dividing by .0001 and then rounded it and stored it into an integer and then divided the integer by 1000...still not working

please help me out...even non-java programmers can help by telling me the algorithm....thank u.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Urgent help needed !

Loading...

Similar Threads for Urgent help needed | Date |
---|---|

Urgent Casio program help for AP Calc riemann sums | Mar 18, 2015 |

Calculators Urgent TI-89 Titanium HELP NEEDED! | Apr 26, 2008 |

Urgent - Help my Internet Explorer has broke? | Mar 1, 2008 |

Urgent help needed with phone | Jan 3, 2006 |

Urgent help needed. | Oct 1, 2004 |

**Physics Forums - The Fusion of Science and Community**