Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

compensated summation in norm

  • To: mathgroup at
  • Subject: [mg132210] compensated summation in norm
  • From: Alex Krasnov <akrasnov at>
  • Date: Sat, 18 Jan 2014 05:00:06 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

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 


  • Prev by Date: Default value in pattern matching
  • Next by Date: Re: School project - NEED HELP!
  • Previous by thread: Re: Default value in pattern matching
  • Next by thread: Unnecessary parentheses around TagBox for MakeBoxes?