3,901 karma · joined Oct 15, 2012 (14y ago) · 1,547 submissions
comment 12y ago · link · parent
comment 12y ago · link · parent
1. I said earlier that I already know how to find the numbers mathematically. What I don't have any intuition for is why the numbers are correct (such as why both e and pi should be in the answer).
2. You can't just distribute the exponents without justifying that it's valid. (I don't know the appropriate conditions for doing this myself either, but I know they exist.) For example (e^(2 i pi))^(1/2) is not e^(i pi), it's e^0. In other words, you need to first reduce it mod 2pi. Now if you're dealing with complex numbers I have no idea what the conditions should be.
comment 12y ago · link · parent
comment 12y ago · link · parent
Just like you, I learn from examples rather than by reading documentation... and I suspect that just like me, you don't end up spending 5 minutes writing perfect code. If true, to me, that means your friend's method is superior.
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 12y ago · link · parent
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-...
Do you know what the time complexity of their merging algorithm is?
As a side note, an optimal merging algorithm is in the paper called "On Optimal and Efficient in Place Merging", and it's too complicated for me to expect it in a standard library implementation. (Although the STL doesn't need to be optimal, I think the sub-optimal linear-time algorithms are also complicated enough to not be used for the standard library, but correct me if I'm wrong.)
comment 12y ago · link · parent
1127.
Complex Step Differentiation(blogs.mathworks.com ↗)
47 points · by wfunction · 12y ago · 8 comments
comment 12y ago · link · parent
Yeah then why do you suddenly jump when I tell you the same thing? To the best of my knowledge I don't have any malware, and to the best of your knowledge you don't either. Seems pretty equal to me, yet somehow you freak out when I say the same thing as you do. I'm pretty sure I'm at least as certain as you are that my system doesn't have any malware, so if that's not enough of an assurance for you then it shouldn't be enough for you either.