Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: compensated summation in norm
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Alex Krasnov

Posts: 12
Registered: 7/12/13
compensated summation in norm
Posted: Jan 18, 2014 5:01 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.