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.
Java and real numbers
Forum rules
Please, do not reply to an existing thread to report a new bug. Open a new thread instead. Also, please check the existing bug reports before posting a new one.
Please, do not reply to an existing thread to report a new bug. Open a new thread instead. Also, please check the existing bug reports before posting a new one.
Re: Java and real numbers
Can you please give us an example, because i've been trying to test the problem and it did not occurred to me.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.
best regards
Re: Java and real numbers
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.
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.
- luismawolf
- Posts: 30
- Joined: 6 years ago
- Gender:
Re: Java and real numbers
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.