Page 1 of 1

Java and real numbers

Posted: Fri Jun 07, 2013 2:40 pm
by gmo
Scanners throws Runtime error when reading real numbers either with nextFloat, or nextDouble.
also System.out.printf and DecimalFormat get wrong answer when printing a real number up to the n'th decimal place.

previously accepted problems get runtime error for this reason even when the code is EXACTLY the same.
problems with real numbers involved are yielding wrong judgments for java users.

don't know how severe is the situation but its certainly unfair for java users.

Re: Java and real numbers

Posted: Thu Jun 13, 2013 8:23 am
by george
gmo wrote:Scanners throws Runtime error when reading real numbers either with nextFloat, or nextDouble.
also System.out.printf and DecimalFormat get wrong answer when printing a real number up to the n'th decimal place.

previously accepted problems get runtime error for this reason even when the code is EXACTLY the same.
problems with real numbers involved are yielding wrong judgments for java users.

don't know how severe is the situation but its certainly unfair for java users.
Can you please give us an example, because i've been trying to test the problem and it did not occurred to me.

best regards

Re: Java and real numbers

Posted: Thu Oct 31, 2013 2:54 am
by gmo
Problem 1023 Financial Management http://coj.uci.cu/24h/problem.xhtml?abb=1023 is giving runtime error.
Tried with an already AC code, its exactly the same code just a copy paste and got Runtime Error...

there are other problems like this one, all of them involving real numbers.

Re: Java and real numbers

Posted: Tue Dec 02, 2014 10:33 am
by luismawolf
Este problema aún no ha tenido solución alguna y para dar solución a algunos problemas hay que programar mucho más, lo que hace que suba el tiempo, la memoria y el tamaño.