floating point not matching expeccting text

Re: floating point not matching expeccting text

by Juan Carlos Rodríguez-del-Pino -
Number of replies: 1
Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Sudevan K.

This type of problem is a challenge for me that I accept with a smile.

I took your test cases, wrote and small program and the tests failed. I tried modifying the format of the test cases but they still failed. For a while, I thought that the testing system has some bugs, but After many tests, I rewrite from scratch your test and voila the tests worked as expected. ​At that moment I was astonished. I looked for hidden characters in your test code with no luck.

Finally, I realized that to represent the minus sign, you wrote a large hyphen from the UTF-8 charset (\342) instead of the common hyphen of the ASCII table with char code 45.


You can see that the hyphen near the 1.0 is a little bit larger than the hyphen near the 2.0


Please, use the common hyphen to represent the minus sign and the problem will vanish.


Best regards,

Juan Carlos.

Average of ratings: Useful (2)
In reply to Juan Carlos Rodríguez-del-Pino

Re: floating point not matching expeccting text

by Sudevan K -
Dear Juan Carlos,
Many thanks for resolving the issue. Definitely, it should be a copy-paste issue, seems I copied the output from the program description.
Thanks again.