Top "Arithmeticexception" questions

An ArithmeticException is an Exception that indicates an error generated when performing a calculation.

ArithmeticException: "Non-terminating decimal expansion; no exact representable decimal result"

Why does the following code raise the exception shown below? BigDecimal a = new BigDecimal("1.6"); BigDecimal b = new BigDecimal("9.2"); a.divide(…

java bigdecimal arithmeticexception
Java division by zero doesnt throw an ArithmeticException - why?

Why doesn't this code throw an ArithmeticException? Take a look: public class NewClass { public static void main(String[] args) { // TODO …

java arithmeticexception
How to prevent arithmetic overflow error when using SUM on INT column?

I am using SQL Server 2008 R2 and I have an INT column where the data inserted never surpasses the max …

sql-server-2008-r2 int sum overflow arithmeticexception
Why does division by zero with floating point (or double precision) numbers not throw java.lang.ArithmeticException: / by zero in Java

The following statement throws java.lang.ArithmeticException: / by zero as obvious. System.out.println(0/0); because the literal 0 is considered to …

java exception arithmeticexception dividebyzeroexception
How to truncate a BigDecimal without rounding

After a series of calculations in my code, I have a BigDecimal with value 0.01954 I then need to multiply this …

java rounding bigdecimal arithmeticexception
Exception in thread "main" java.lang.ArithmeticException: / by zero

I have two questions about Exceptions. Firstly, I got this message from my code... Exception in thread "main" java.lang.…

java exception main arithmeticexception
Arithmetic Exception in gdb, but I'm not dividing by zero?

I've been getting a Floating point exception (core dumped) error in my C++ program, and gdb shows that the problem …

c++ exception gdb arithmeticexception
"Non-terminating decimal expansion; no exact representable decimal result" happens even when divide by 100

My java code is running on HP-UX hpdev B.11.23 U ia64 and sometimes it will produce the following exception: java.…

java bigdecimal arithmeticexception
ASP.NET Overflow or underflow in the arithmetic operation when returning large file bigger 1 GB

I went across some sort of limitation in ASP.NET. I reduced the problem into a sample project in ASP.…

asp.net arithmeticexception
Dividing a double by zero in Java

Possible Duplicate: Why doesn't Java throw an Exception when dividing by 0.0? Why the following statement in Java will not report …

java divide-by-zero arithmeticexception