Re: //N bug, but WHY?

*To*: mathgroup at smc.vnet.net*Subject*: [mg58666] Re: //N bug, but WHY?*From*: Richard Fateman <fateman at cs.berkeley.edu>*Date*: Wed, 13 Jul 2005 03:28:57 -0400 (EDT)*Organization*: University of California, Berkeley*References*: <data3n$mec$1@smc.vnet.net> <db030a$r7o$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

... > > symbio wrote: > >>Evaluating (using //N) two exact same expressions, gives wrong answer unless >... The same question was asked the previous day, and answered, in sci.math.symbolic. Symbio knows about email enough to provide a bogus return address, but doesn't know much about numerical computation, and is unwilling to learn. So he or she asks and asks. At least Symbio found the mathematica newsgroup. It occurs to me that the right answer, for someone like Symbio who really doesn't want to be burdened by any computational knowledge, is simple: Never EVER use N[...], but always N[...,<somenumber>], and hope for the best. In Symbio's case he or she should just replace the the locution ......//N with the locution .....//N[#,16]& and Symbio's answer comes out "right". No need for FullSimplify etc etc. So in this regard, there is a "bug" and it even has a "fix". More significantly, and the reason I bother to write again, is the following advice. (at least if you believe in the validity of the Mathematica software-float numerics). Suggestion to WRI: Change the meaning of N to N[#,16]& and alter N so that the only time the current N[] is used is by explicit demand, e.g. N[...., DoItFasterAndMaybeWrongUsingMachineArithmetic] Regards RJF