compensated summation in norm
- To: mathgroup at smc.vnet.net
- Subject: [mg132210] compensated summation in norm
- From: Alex Krasnov <akrasnov at cory.eecs.berkeley.edu>
- Date: Sat, 18 Jan 2014 05:00:06 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
The documentation states that Norm[v, p] is equivalent to Total[Abs[v]^p]^(1/p). Total has a documented option Method -> Automatic|"CompensatedSummation". Norm has an undocumented option Method. Is this option supposed to correspond to the option of Total? If so, then it appears to have no effect. Furthermore, Norm is not consistent with the use of Total, having much larger numerical error: In: Norm[ConstantArray[0.1, 10^6], 1, Method -> Automatic]-10^5 Out: 2.2354652173817158*^-7 In: Norm[ConstantArray[0.1, 10^6], 1, Method -> "CompensatedSummation"]-10^5 Out: 2.2354652173817158*^-7 In: Total[ConstantArray[0.1, 10^6], Method -> Automatic]-10^5 Out: 8.731149137020111*^-10 In: Total[ConstantArray[0.1, 10^6], Method -> "CompensatedSummation"]-10^5 Out: 0. This behavior should be made consistent, and the documentation should be corrected. Alex