Java and real numbers

Here is where you should report any bugs detected in the COJ. Our development team will take care of them as soon as possible.
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.
gmo
Posts: 6
Joined: Tue Jan 24, 2012 12:38 am
Gender: None specified

Java and real numbers

Postby gmo » Fri Jun 07, 2013 2:40 pm

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.



george
COJ Developer
Posts: 43
Joined: Wed Oct 26, 2011 10:49 pm
Gender: None specified

Re: Java and real numbers

Postby george » Thu Jun 13, 2013 8:23 am

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

gmo
Posts: 6
Joined: Tue Jan 24, 2012 12:38 am
Gender: None specified

Re: Java and real numbers

Postby gmo » Thu Oct 31, 2013 2:54 am

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.

User avatar
luismawolf
Posts: 30
Joined: Thu Nov 13, 2014 3:12 pm
Gender: Male

Re: Java and real numbers

Postby luismawolf » Tue Dec 02, 2014 10:33 am

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.


Return to “Bugs”

Who is online

Users browsing this forum: No registered users and 1 guest