Please, do not use isequal with floats, prefer abs(a-b) < tol. I've found a solution, but it gives an error of order 1e-15. Rounding solutions to 10 or 14 decimal places is close enough. And looking at all other solutions so far, I am the first one to truly solve this problem (please, try my commented code).
Wow! That was hard to fix. The problem now tests against a tolerance of 1e–10. I also had to update a few of the anti-hacking checks to allow for a solution. Thanks to Rafael S.T. Vieira for providing a solution that could be used as a reference while fixing the test suite.
I also deleted the most recent hacking solutions.
Thanks again for fixing it, Grant. :)
Project Euler: Problem 8, Find largest product in a large string of numbers
Back to basics 2 - Function Path
Make a simplified barcode
Flag largest magnitude swings as they occur
The Dark Side of the Die
Restricted Addition v2
Restricted Multiplication v1
Test Driven Solution - Probability Problem 3
Restricted Addition v3
Test Driven Solution - Probability Problem 1
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office