Skip to content

Instantly share code, notes, and snippets.

@iyengarajay
Last active November 2, 2017 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iyengarajay/d7efa92b08dd2e0bf1a72832d4b56b3d to your computer and use it in GitHub Desktop.
Save iyengarajay/d7efa92b08dd2e0bf1a72832d4b56b3d to your computer and use it in GitHub Desktop.
import java.math.BigDecimal;
public class FloatingPointCorrected {
public static void main(String[] args) {
System.out.println(new BigDecimal("0.1").add(new BigDecimal("0.2")));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment