I think something is wrong in your math. theList =. i. 3 normL2 theList 5 nize2 normL2 theList 1.2214 ^ 5 % 25 1.2214
That's what you're calculating. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Harms > Sent: Sunday, August 05, 2007 11:58 AM > To: [email protected] > Subject: [Jprogramming] real vector normalization rounding error? > > Working on elementary aspects of matrix math, I've defined > what I think are L1- and L2- norm and normalization verbs for > real vectors. > > normL1 =: +/@:| > nize1 =: ] % normL1 > > normL2 =: +/@:*: > nize2 =: ] [EMAIL PROTECTED] normL2 > > If I've done the math right, for any real vector "theList", > the statement > > nize2 normL2 theList > > should produce 1. > > In practice this often deviates from 1 by an appreciable > degree. I interpret that to be due to the rounding involved > in the calculations. Is that what causes results beyond the > normal tolerance? > > If so, is there a standard or basic technique to compensate > for this kind of rounding error? Or does this throw us into > the need for special math utilities, or something even more involved? > > > Tracy Harms > > > > > ______________________________________________________________ > ______________________ > Building a website is a piece of cake. Yahoo! Small Business > gives you all the tools to get online. > http://smallbusiness.yahoo.com/webhosting > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
