Problem 42386. Faint Receipt
Solution Stats
Problem Comments
-
9 Comments
there may be a few incorrect tests here (e.g. test 2 with 'X31.6X' and qty=111 should return '531.69' if I am interpreting correctly)
agree with alfonso
I had the same issue with that particular test case.
I've updated the test suite. It should work now. I selected the option to have all previous solutions rescored, but I've never actually seen that option work for other problems I've worked on, so just submit your solutions again. Also, refer to comments on http://www.mathworks.com/matlabcentral/cody/problems/42385-combined-ages-4-non-symmetric-with-multiples-n-3 regarding not being able to use the "Test reference solution" button currently. Is anyone else having that problem?
I believe rescoring doesn't work immediately, but all solutions seem to be rescored now. "Test reference solution" doesn't work for me neither. As far as I remember it's not the first time it doesn't work (on my account), but previous incidents had shorter duration (week or so).
http://www.mathworks.com/matlabcentral/cody/solutions/686845#comment_5568
That link doesn't work as written (at least, it didn't for me). It does function, though, if you truncate the url at #.
Could I convince you to not use isequal() when comparing floating point numbers in the test suite?
Christian, generally, I would change out isequal(). However, in this case, the problem is dealing with currency; therefore, each amount has a fixed precision: two decimal places.
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
27464 Solvers
-
18561 Solvers
-
Getting the indices from a vector
9750 Solvers
-
Flag largest magnitude swings as they occur
678 Solvers
-
Calculate the area of a triangle between three points
2918 Solvers
More from this Author139
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!