tag:blogger.com,1999:blog-5246987755651065286.post4198814307547990217..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 04-28-09 - Quadraticcbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5246987755651065286.post-67549128749361292822010-09-09T00:23:49.135-07:002010-09-09T00:23:49.135-07:00ADDENDUM : of course the other thing that's mi...ADDENDUM : of course the other thing that's missing is the checks for zero should really be checks against epsilon, and in the epsilon region you should use series expansion.<br /><br />Of course then saying it has 1 or 2 roots in that region is sort of lame, so just always say it has 2 and they might be very close or equal.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-17406026615445257602009-04-30T12:03:00.000-07:002009-04-30T12:03:00.000-07:00A pretty nice lib for your basic linear algebra ne...A pretty nice lib for your basic linear algebra needs is <A HREF="http://www.robertnz.net/nm_intro.htm" REL="nofollow">Newmat</A> (downloads <A HREF="http://www.robertnz.net/download.html" REL="nofollow">here</A>, that page has a strange organization).<br /><br />The code is (readable!) C++ with useful comments, it does some lazy evaluation to make sure temporaries don't kill performance, it avoids metaprogramming orgies that result in impossible to read error messages, it has optimized routines for most important special cases (upper/lower triangular, symmetric, diagonal and banded matrices) so there's no needless arithmetic on zeros, and performance is okay. Not something I'd use for HPC, but definitely handy to have around.ryghttps://www.blogger.com/profile/03031635656201499907noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-71014745054560386372009-04-30T08:57:00.000-07:002009-04-30T08:57:00.000-07:00Yeah, I went to this link :
http://math.stanford....Yeah, I went to this link :<br /><br />http://math.stanford.edu/~lekheng/courses/302/wnnr/other-sw.html<br /><br />and couldn't find a single useful thing there.<br /><br />I'm currently using some code I found for least squares and svd and some other things like that, and it's all that ancient horrible fortran stuff. It seems like nobody has written mathematical code since 1980 !?cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-16376128195218071732009-04-30T02:14:00.000-07:002009-04-30T02:14:00.000-07:00Well, the article does have a link to more "t...Well, the article does have a link to more "trusted" numeric libraries right at the bottom. However, a lot of them are 404s by now.<br /><br />Their main reference is Netlib, which is a pretty mixed bag itself. Yeah, a lot of it (especially LAPACK and the TOMS collection) is peer reviewed and has been in use for a long time; but precisely because it's been around that long (some of the code dates from the mid-60s), it's missing some significant algorithmic improvements and is usually tweaked for pre-IEEE floating point implementations. Plus most of it is either sparsely commented FORTRAN 66 or 77 code, or FORTRAN->C conversions with the same 6-char identifiers and the same lack of comments.ryghttps://www.blogger.com/profile/03031635656201499907noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-49262519462728826742009-04-29T12:19:00.000-07:002009-04-29T12:19:00.000-07:00I like the Blinn articles, but they don't really a...I like the Blinn articles, but they don't really add anything, he winds up saying that just using the Q formulation is best. I do like the intuition that he creates though.<br /><br />Sean, that NR bashing site just annoys me. Yeah, that's all well and good, so maybe it is horrible, so give me something better. Write a better book, make me a better library.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-67562436055957426372009-04-29T08:10:00.000-07:002009-04-29T08:10:00.000-07:00Have you read Jim Blinn's articles on the topic?
...Have you read Jim Blinn's articles on the topic?<br /><br />http://portal.acm.org/citation.cfm?id=1100878<br /><br />http://portal.acm.org/citation.cfm?id=1158859<br /><br />They make for a good read...<br /><br />JLjldhttps://www.blogger.com/profile/06516966931840281472noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-78183654265210157402009-04-29T02:42:00.000-07:002009-04-29T02:42:00.000-07:00link<A HREF="http://math.stanford.edu/~lekheng/courses/302/wnnr/nr.html" REL="nofollow">link</A>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-12767296729033850002009-04-29T02:41:00.000-07:002009-04-29T02:41:00.000-07:00It's possible NR has converged over time to someth...It's possible NR has converged over time to something better, but it's long been complained that NR is not a trustworth source for numerical algorithms.<br /><br />http://math.stanford.edu/~lekheng/courses/302/wnnr/nr.htmlAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-59894370003714206262009-04-28T18:31:00.000-07:002009-04-28T18:31:00.000-07:00Yeah, you are right. I just took a quick look and...Yeah, you are right. I just took a quick look and noticed there wasn't a special case for that.Brianhttps://www.blogger.com/profile/18061165495812067689noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-15353535597099077392009-04-28T18:14:00.000-07:002009-04-28T18:14:00.000-07:00Hmm.. doesn't the Q formulation do that for you? ...Hmm.. doesn't the Q formulation do that for you? The root near zero will be the C/Q root.<br /><br />It does seem like the errors can still get really huge any time one of the coefficients dwarfs others.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-78082806936139454132009-04-28T18:02:00.000-07:002009-04-28T18:02:00.000-07:00You have the case where b^2>>4ac where you h...You have the case where b^2>>4ac where you have huge error bounds for the root near zero unless you rewrite the quadratic equation.Brianhttps://www.blogger.com/profile/18061165495812067689noreply@blogger.com