Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14471 > unrolled thread

Work on Basic Mathematica Stephen!

Started by"djmpark" <djmpark@comcast.net>
First post2013-05-12 07:28 +0000
Last post2013-06-04 03:14 +0000
Articles 20 on this page of 83 — 28 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Work on Basic Mathematica Stephen! "djmpark" <djmpark@comcast.net> - 2013-05-12 07:28 +0000
    Re: Work on Basic Mathematica Stephen! psycho_dad <s.nesseris@gmail.com> - 2013-05-13 07:47 +0000
    Re: Work on Basic Mathematica Stephen! psycho_dad <s.nesseris@gmail.com> - 2013-05-13 09:40 +0000
    Re: Work on Basic Mathematica Stephen! "Nasser M. Abbasi" <nma@12000.org> - 2013-05-14 07:14 +0000
    Re: Work on Basic Mathematica Stephen! Szabolcs Horvát <szhorvat@gmail.com> - 2013-05-15 06:54 +0000
    Re: Work on Basic Mathematica Stephen! Szabolcs Horvát <szhorvat@gmail.com> - 2013-05-16 07:28 +0000
    Re: Work on Basic Mathematica Stephen! Peter Klamser <klamser@googlemail.com> - 2013-05-16 07:28 +0000
    Re: Work on Basic Mathematica Stephen! Andrzej Kozlowski <akozlowski@gmail.com> - 2013-05-17 08:34 +0000
    Re: Work on Basic Mathematica Stephen! Murray Eisenberg <murray@math.umass.edu> - 2013-05-17 08:34 +0000
    Re: Work on Basic Mathematica Stephen! Peter Klamser <klamser@googlemail.com> - 2013-05-17 08:34 +0000
    Re: Work on Basic Mathematica Stephen! Andrzej Kozlowski <akozlowski@gmail.com> - 2013-05-18 06:38 +0000
    Re: Work on Basic Mathematica Stephen! Peter Klamser <klamser@googlemail.com> - 2013-05-18 06:37 +0000
    Re: Work on Basic Mathematica Stephen! Murray Eisenberg <murray@math.umass.edu> - 2013-05-19 09:46 +0000
    Re: Work on Basic Mathematica Stephen! paulmchale7@gmail.com - 2013-05-19 09:47 +0000
    Re: Work on Basic Mathematica Stephen! paulmchale7@gmail.com - 2013-05-19 09:47 +0000
      Re: Work on Basic Mathematica Stephen! Szabolcs Horvát <szhorvat@gmail.com> - 2013-05-23 07:51 +0000
      Re: Work on Basic Mathematica Stephen! "djmpark" <djmpark@comcast.net> - 2013-05-24 09:26 +0000
    Re: Work on Basic Mathematica Stephen! ?iso-8859-1?Q?J=E1nos_L=F6bb?= <janos@lobb.com> - 2013-05-19 09:47 +0000
    Re: Work on Basic Mathematica Stephen! Andrzej Kozlowski <akozlowski@gmail.com> - 2013-05-20 09:03 +0000
    Re: Work on Basic Mathematica Stephen! Andrzej Kozlowski <akozlowski@gmail.com> - 2013-05-20 09:03 +0000
    Re: Work on Basic Mathematica Stephen! "Ernst H.K. Stelzer" <ernst.stelzer@physikalischebiologie.de> - 2013-05-20 09:03 +0000
    Re: Work on Basic Mathematica Stephen! Ingolf Dahl <ingolf.dahl@telia.com> - 2013-05-20 09:03 +0000
    Re: Work on Basic Mathematica Stephen! David Annetts <david.annetts@iinet.net.au> - 2013-05-20 09:03 +0000
    Re: Work on Basic Mathematica Stephen! "mathgroup " <fizzymath@knology.net> - 2013-05-22 06:18 +0000
      expanding the use of symbolic computation in engineering .. was Re: Richard Fateman <fateman@cs.berkeley.edu> - 2013-05-23 07:51 +0000
      Re: expanding the use of symbolic computation in engineering .. was Re: W Craig Carter <ccarter@MIT.EDU> - 2013-05-24 09:23 +0000
    Re: Work on Basic Mathematica Stephen! "djmpark" <djmpark@comcast.net> - 2013-05-23 07:54 +0000
    Re: Work on Basic Mathematica Stephen! "mathgroup " <fizzymath@knology.net> - 2013-05-23 07:56 +0000
      Re: Work on Basic Mathematica Stephen! Richard Fateman <fateman@cs.berkeley.edu> - 2013-05-24 09:27 +0000
      Re: Work on Basic Mathematica Stephen! "djmpark" <djmpark@comcast.net> - 2013-05-25 09:35 +0000
      Re: Work on Basic Mathematica Stephen! Richard Fateman <fateman@eecs.berkeley.edu> - 2013-05-25 09:35 +0000
      Re: Work on Basic Mathematica Stephen! "djmpark" <djmpark@comcast.net> - 2013-05-25 09:35 +0000
    Re: Work on Basic Mathematica Stephen! "mathgroup " <fizzymath@knology.net> - 2013-05-24 09:28 +0000
    Re: Work on Basic Mathematica Stephen! Murray Eisenberg <murray@math.umass.edu> - 2013-05-24 09:23 +0000
    Re: Work on Basic Mathematica Stephen! "djmpark" <djmpark@comcast.net> - 2013-05-24 09:26 +0000
    Re: Work on Basic Mathematica Stephen! Andrzej Kozlowski <akozlowski@gmail.com> - 2013-05-25 09:34 +0000
      Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Richard Fateman <fateman@cs.berkeley.edu> - 2013-05-26 08:38 +0000
      more problems in Warsaw plan? Re: Work on Basic Mathematica Stephen! Richard Fateman <fateman@cs.berkeley.edu> - 2013-05-26 08:36 +0000
      Re: Work on Basic Mathematica Stephen! David Bailey <dave@removedbailey.co.uk> - 2013-05-28 07:47 +0000
    Re: Work on Basic Mathematica Stephen! John Doty <noqsiaerospace@gmail.com> - 2013-05-27 08:21 +0000
      Re: Work on Basic Mathematica Stephen! David Bailey <dave@removedbailey.co.uk> - 2013-06-02 04:24 +0000
    Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! John Doty <noqsiaerospace@gmail.com> - 2013-05-27 08:21 +0000
      Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Richard Fateman <fateman@cs.berkeley.edu> - 2013-05-28 07:49 +0000
        Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! David Bailey <dave@removedbailey.co.uk> - 2013-05-31 07:19 +0000
          Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-01 10:06 +0000
            Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! David Bailey <dave@removedbailey.co.uk> - 2013-06-02 04:22 +0000
              Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-03 07:25 +0000
                Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! David Bailey <dave@removedbailey.co.uk> - 2013-06-04 03:14 +0000
                Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Andrzej Kozlowski <akozlowski@gmail.com> - 2013-06-04 09:59 +0000
          Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Richard Fateman <fateman@eecs.berkeley.edu> - 2013-06-04 03:15 +0000
    Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Ingolf Dahl <ingolf.dahl@telia.com> - 2013-05-27 08:21 +0000
    Re: Work on Basic Mathematica Stephen! fd <fdimer@gmail.com> - 2013-05-28 07:46 +0000
      Re: Work on Basic Mathematica Stephen! David Bailey <dave@removedbailey.co.uk> - 2013-05-31 07:19 +0000
    Re: Work on Basic Mathematica Stephen! fd <felipe.dimer-de-oliveira@mq.edu.au> - 2013-05-28 07:47 +0000
    Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! fd <fdimer@gmail.com> - 2013-05-29 07:47 +0000
    Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Andrzej Kozlowski <akozlowski@gmail.com> - 2013-05-29 07:48 +0000
    Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! János Löbb <janos@lobb.com> - 2013-05-30 10:07 +0000
      Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! "Nasser M. Abbasi" <nma@12000.org> - 2013-05-31 07:15 +0000
    Re: Warsaw Univ. course,  was Re: Work on Basic Mathematica Stephen! Murray Eisenberg <murray@math.umass.edu> - 2013-05-30 10:08 +0000
    Applying Mathematica to practical problems John Doty <noqsiaerospace@gmail.com> - 2013-05-30 10:09 +0000
      Re: Applying Mathematica to practical problems Richard Fateman <fateman@cs.berkeley.edu> - 2013-05-31 07:15 +0000
      Re: Applying Mathematica to practical problems "Kevin J. McCann" <kjm@KevinMcCann.com> - 2013-05-31 07:18 +0000
    Re: Applying Mathematica to practical problems Andrzej Kozlowski <akozlowski@gmail.com> - 2013-05-31 07:16 +0000
      Re: Applying Mathematica to practical problems Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-01 10:07 +0000
      Re: Applying Mathematica to practical problems Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-01 10:07 +0000
      Re: Applying Mathematica to practical problems Andrzej Kozlowski <akozlowski@gmail.com> - 2013-06-02 04:23 +0000
        Re: Applying Mathematica to practical problems Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-03 07:24 +0000
        Re: Applying Mathematica to practical problems Andrzej Kozlowski <akozlowski@gmail.com> - 2013-06-04 03:11 +0000
        Re: Applying Mathematica to practical problems Andrzej Kozlowski <akozlowski@gmail.com> - 2013-06-04 03:11 +0000
        Re: Applying Mathematica to practical problems Richard Fateman <fateman@eecs.berkeley.edu> - 2013-06-04 03:10 +0000
        Re: Applying Mathematica to practical problems Andrzej Kozlowski <akozlowski@gmail.com> - 2013-06-04 03:11 +0000
        Re: Applying Mathematica to practical problems Andrzej Kozlowski <akozlowski@gmail.com> - 2013-06-04 03:13 +0000
    Mathematica numerics and... Re: Applying Mathematica to practical problems Daniel Lichtblau <danl@wolfram.com> - 2013-06-01 10:06 +0000
      Interval vs default,  was Re: Mathematica numerics and... Re: Applying Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-02 04:24 +0000
    Re: Applying Mathematica to practical problems Andrzej Kozlowski <akozlowski@gmail.com> - 2013-06-02 04:23 +0000
    Re: Applying Mathematica to practical problems James Stein <mathgroup@stein.org> - 2013-06-02 04:26 +0000
    Re: Applying Mathematica to practical problems Mark McClure <mcmcclur@unca.edu> - 2013-06-02 04:23 +0000
      Re: Applying Mathematica to practical problems Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-03 07:25 +0000
      Re: Applying Mathematica to practical problems Joe Gwinn <joegwinn@comcast.net> - 2013-06-03 07:26 +0000
    Re: Applying Mathematica to practical problems Waclaw Kusnierczyk <waku@idi.ntnu.no> - 2013-06-03 07:24 +0000
    Re: Warsaw Univ. course, was Re: Work on Basic Leonid Shifrin <lshifr@gmail.com> - 2013-06-04 03:12 +0000
    Re: Warsaw Univ. course, was Re: Work on Basic Leonid Shifrin <lshifr@gmail.com> - 2013-06-04 03:13 +0000
    Re: Interval vs default, was Re: Mathematica numerics and... Re: Applying Daniel Lichtblau <danl@wolfram.com> - 2013-06-04 03:14 +0000

Page 4 of 5 — ← Prev page 1 2 3 [4] 5  Next page →


#14685 — Re: Applying Mathematica to practical problems

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-05-31 07:15 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<ko9im4$kd3$1@smc.vnet.net>
In reply to#14678
On 5/30/2013 3:09 AM, John Doty wrote:
> Changing the topic here.
>
> On Tuesday, May 28, 2013 1:49:00 AM UTC-6, Richard Fateman wrote:
>
>> Learning Mathematica (only) exposes a student to a singularly
>> erroneous model of computation,
>
> A personal, subjective judgement. However, I would agree that
> exposing the student to *any* single model of computation, to the
> exclusion of others, is destructive.

Still, there are ones that are well-recognized as standard, a common
basis for software libraries, shared development environments, etc.
Others have been found lacking by refereed published articles
and have failed to gain adherents outside the originators. (Distrust
of significance arithmetic ala Mathematica is not a personal
subjective opinion only.).
>
>> Nice that you concede it is eccentric.
>
> Concede? I praise its eccentricity! It takes me places other tools
> cannot easily go.

I don't know what other tools you are considering. Certainly symbolic
computing goes places that numerical programs do not go (easily). That
doesn't really justify support for eccentric arithmetic.  If you
say that eccentric arithmetic is praiseworthy, I find that peculiar.
>
>> Productive perhaps if you do not encounter a quirk.
>
> There is no nontrivial quirk-free software.

This is a non-sequitur.

Analogy:

Your shoelace is untied and you should tie it.
No, because elsewhere there are some untied shoelaces.


>
>> Especially a hidden quirk that gives the wrong answer but no
>> warning.
>
> Mathematica applied to real problems is pretty good here.

Maybe, but is "pretty good"  the goal, and the occasional identified
errors be ignored?
>
>> And if you are not in a hurry for numerical results.
>
> OK, let's consider how I use Mathematica in mixed-signal chip design.

Please, too much.

<snip>

> You think Mathematica
> has problems? You've never used SPICE.

I've never used SPICE,though numbers of people have made academic
careers (at Berkeley) about it, and some people have made a great
deal of money directly or indirectly from it.

My impression is that the authors and implementers of SPICE
were substantially under-educated with respect to computer science
language design principles.  Electrical engineers writing user
interfaces, initially in FORTRAN --> prospects look dim.
Wolfram got some excellent people doing UI early on.
>
>\
<snip>
.
>
> But the big problem with SPICE isn't that it's quirky and
> error-prone, but that it buries the problem in (mostly irrelevant)
> detail.

I'm not going to defend SPICE. I do assume that a better "shell"
can be developed (and, I'm pretty sure, has been) to steer SPICE.

>
> Because SPICE is so slow and detailed

I thought that the reason people used SPICE, esp. proprietary
improved versions, was that it was fast.

<snip>
>  Furthermore, I
> haven't seen any errors attributable to the "quirks" of Mathematica
> in this process.

You may be using parts that work well.  But you might have encountered
errors but not noticed.  Would you have noticed if numeric results were
only good to 4 decimal digits rather than (say) 16?

<snip>

  But correct and accurate
> calculation in Mathematica just isn't a problem in this engineering
> flow.

That certainly can happen.  I am not asserting that results are
necessarily wrong!


[toc] | [prev] | [next] | [standalone]


#14689 — Re: Applying Mathematica to practical problems

From"Kevin J. McCann" <kjm@KevinMcCann.com>
Date2013-05-31 07:18 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<ko9isg$ket$1@smc.vnet.net>
In reply to#14678
A very interesting presentation. Thanks, John.

Kevin

On 5/30/2013 6:09 AM, John Doty wrote:
> Changing the topic here.
>
> On Tuesday, May 28, 2013 1:49:00 AM UTC-6, Richard Fateman wrote:
>
>> Learning Mathematica (only) exposes a student to a singularly erroneous
>> model of computation,
>
> A personal, subjective judgement. However, I would agree that exposing the student to *any* single model of computation, to the exclusion of others, is destructive.
>
>> Nice that you concede it is eccentric.
>
> Concede? I praise its eccentricity! It takes me places other tools cannot easily go.
>
>> Productive perhaps if you do not
>> encounter a quirk.
>
> There is no nontrivial quirk-free software.
>
>> Especially a hidden quirk that gives the wrong
>> answer but no warning.
>
> Mathematica applied to real problems is pretty good here.
>
>> And if you are not in a hurry for numerical
>> results.
>
> OK, let's consider how I use Mathematica in mixed-signal chip design. For my video chain chips, I start with two different approches in Mathematica. I have a nonlinear simulation environment that breaks the chip down into blocks, represented by functions, and composes a function representing the effect of a single clock step on the chip state from these functions. I iterate that function to "simulate". Some of the blocks are initially represented as Z transforms, so Mathematica's algebraic capabilities come in handy. The ease of partial evaluation helps with optimization: by evaluating as much of the function as possible before iterating it, special cases like consta nt inputs become very simple and fast.
>
> I also have a Mathematica model that starts as symbolic Z and Fourier transforms, and models the chip as linear operators. For numerical results, these operators turn into matrices.
>
> Once I've established the design parameters, I reduce the functional blocks to circuits and simulate with that fine Berkeley product, SPICE, the liguafranca of circuit simulation. You think Mathematica has problems? You've never used SPICE.
>
> Linguistically, SPICE is an absolute mess. "Grammar" is utterly ad-hoc, and variable with dialect. "1N914B" is a perfectly good model name for a diode, but "2N2222A"  cannot be used to name a transistor model in some dialects. There are a couple of dozen different dialects around, most containing incompatible proprietary extensions.
>
> For quirky unpredictability, SPICE is much, much worse than Mathematica. SPICE users get used to seeing spurious "trap oscillations", large amounts of energy appearing out of nowhere, and ridiculous time steps. Tuning the numerics to get sane results is an arcane art. As a programming language, SPICE is about as sophisticated as BASIC, but much less regular. Nevertheless, SPICE is very widely used and very productive. In the end, people find that it gets the job done (although many get rather exasperated in the process!.
>
> But the big problem with SPICE isn't that it's quirky and error-prone, but that it buries the problem in (mostly irrelevant) detail. I'm simulating thousands of transistors, each with ~100 model parameters, with state changing on picosecond time scales. My SPICE chip simulations tend to run at a billion times slower than real time. Data output is voluminous and difficult to analyze (sometimes I read it into Mathematica for reduction). These problems limit the range of questions I can practically ask of SPICE.
>
> On the other hand, the iterated function approach in Mathematica is 10,000-100,000 times faster than the SPICE approach, so it's a lot better for probing high-level behavior. The linear algebra approach in Mathematica   is even faster: bang a few matrices together and it tells me approximately what I'd get from averaging an unlimited number of simulation runs.
>
> Because SPICE is so slow and detailed it's very difficult to use as a design tool, where the question is "I want this behavior, how do I get it?" It'sbetter for design verification: "I have this circuit, how will it behave?". The linear approach in Mathematica is the quickest for design optimization,  but of course it can't probe nonlinear phenomena in "large signal" cases. The iterated function approach in Mathematica is a good compromise to bridge the gap.
>
> So, when I have two Mathematica models and a SPICE model that agree that the design will meet requirements, and agree with each other where their capabilities overlap, I release the design to the layout contractor. One result is another SPICE model, extracted from the silicon geometry, for verification. This model is extremely complex, with tens of thousands of "parasitic" resistors and capacitors, but I'll run a few test cases through it before releasing the design to the mask aggregator. So, before any silicon is patterned, I get four fairly independent looks at the design from different viewpoints through two radically different tools.
>
> There are still many things that can go wrong before I have an actual chip powered up and processing video. Some of them involve other software, but they have nothing to do with Mathematica, so I won't go into them here.
>
> The real world simply doesn't work the way you imagine in this case. The design process involves cross checks between multiple tools and models, so few design errors escape detection.  Furthermore, I haven't seen any errors attributable to the "quirks" of Mathematica in this process. I, of course, make and (hopefully) correct errors at a rapid pace. SPICE is rather treacherous. But correct and accurate calculation in Mathematica just isn't a problem in this engineering flow.
>

[toc] | [prev] | [next] | [standalone]


#14686 — Re: Applying Mathematica to practical problems

FromAndrzej Kozlowski <akozlowski@gmail.com>
Date2013-05-31 07:16 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<ko9ipa$kde$1@smc.vnet.net>
In reply to#14471
I think this is an excellent and quite fascinating account of serious 
and genuinely useful application of some of Mathematica's vast 
capabilities, which made me feel that the kind of stuff that the rest of 
us do is more akin to playing. To my mind, it also should make very 
clear (to anyone who had any doubts) the complete irrelevance of most of 
the "criticism" of Mathematica that Richard Fateman has been posting for 
over 2 decades (not that I expect him to stop doing it or even modify it 
in anyway).

I don't think the points John's makes needs any further support so I 
want to address just one issue: Richard's use of the words "erroneous, 
incorrect, buggy" etc. This has, in fact, already been addressed by John 
in the first sentence of his reply, but so briefly that I think there is 
still some room for additional comment. Almost always when RJF uses such 
words in connection with Mathemtica he is playing a kind of game, well 
familiar to the veterans of this forum but which could confuse 
newcomers. The idea is to make ambiguous statements that can be 
interpreted in at least two ways: one could be called "strong" and the 
other "weak". The "strong" interpretation is the one you hope will 
influence people not very familiar with the topic (or with this sort of 
rhetorical tricks), the weak one is what you turn to when pressed by 
people who demand precise justification of your claims. When this 
happens it turns out that the alleged "errors" are not at all what 
people normally call errors but merely aspect of design that Richard 
does not like (assuming, of course, that he does not have another hidden 
motive that goes beyond disliking the working of Mathematica).
Thus, Richard whenever he sees a chance to influence someone who he 
thinks is new to Mathematica, suggest that Mathematica's significance 
arithmetic is prone to give wrong answers and is unreliable. But when 
pressed, he has admitted on a number of occasions that:

1. Significance arithmetic, being a (faster) version of interval 
arithmetic, can be useful when used by people who understand it and that 
it is used quite reliably by many built-in Mathematica functions such as 
NSolve (and also Solve).
2. It is easy to switch to fixed precision arithmetic whenever one wants 
with a simple usage of Block.

In other words: significance arithmetic is a feature that Mathematica 
offers in addition to standard, fixed precision arithmetic. How can more 
be worse than less? Of course JRF when pressed, has admitted all this (I 
can post references but I don't think he will deny it) and his 
objections actually amount to just two things: the choice of 
significance arithmetic as the deafult for extended precision 
computations and the fact that Mathematica treats what are actually 
intervals as "numbers" instead of just calling them something else 
("fuzz balls"). Every time there is a serious discussion of these 
things, he is forced to concede all these points but then, at the next 
opportunity, he starts the whole things all over again. In the end, he 
becomes so careless that he ends up writing comical nonsense like:


> I will say that for scientific computing it is probably a bad feature
> to have finite numbers x   such that x ==0  and  x+1 == x.

Excuse me? I have always assumed that every number system has at least 
one finite number x such that x+1=x, this follows from the group 
axiom. Also, by the way, if we are talking about group addition then
"x ==0  and  x+1 == x"   is a not very economical way to express 
x==0.

More seriously, there are two things are being insinuated here, both of 
them false. The first is that having "numbers" with unusual properties 
is somehow "wrong" or even "eccentric" in mathematics. This is, of 
course, completely false and one can give lots of examples. To take just 
one: in non standard analysis one has infinitely many "infinitely small 
numbers" x such that n x <1 for every positive integer n. This is both 
logically sound and very useful in practical proofs and computations. 
Exactly the same is true of "fuzz balls".

Another insinuation, equally false, is that an unsuspecting "naive" user 
of Mathematica could fall into some trap because of this. Naive users of 
Mathematica practically never use arbitrary precision arithmetic. Users 
who need it will almost always look into the documentation and realise 
that they won't be dealing with numbers in the ordinary sense but 
intervals of variable size. This is why examples of the kind that RJF 
loves posting never come up naturally. The only time they occur is 
either then RJF posts them or sometimes when someone discovers low 
precision numbers and tries things like:

1`0 == 0

True

1`0 == 1

True


But, of course, to be able to enter numbers with no precision you really 
need to know, well, what it means for a number to have Precision 0. At 
this point, I suspect, RJF will be tempted to come up with his favourite 
example of the the kind of thing that awaits an unsuspecting user who 
for some reason needs to evaluate:

z = 1.11111111111111111111;While[(z = 2*z - z) != 0, Print[z]]

Well, see it for yourself (in Mathematica 9) and decide if anyone would 
find it so confusing.

Andrzej Kozlowski





On 30 May 2013, at 12:15, John Doty <noqsiaerospace@gmail.com> wrote:

> Changing the topic here.
>
> On Tuesday, May 28, 2013 1:49:00 AM UTC-6, Richard Fateman wrote:
>
>> Learning Mathematica (only) exposes a student to a singularly 
erroneous
>> model of computation,
>
> A personal, subjective judgement. However, I would agree that exposing 
the student to *any* single model of computation, to the exclusion of 
others, is destructive.
>
>> Nice that you concede it is eccentric.
>
> Concede? I praise its eccentricity! It takes me places other tools 
cannot easily go.
>
>> Productive perhaps if you do not
>> encounter a quirk.
>
> There is no nontrivial quirk-free software.
>
>> Especially a hidden quirk that gives the wrong
>> answer but no warning.
>
> Mathematica applied to real problems is pretty good here.
>
>> And if you are not in a hurry for numerical
>> results.
>
> OK, let's consider how I use Mathematica in mixed-signal chip design. 
For my video chain chips, I start with two different approches in 
Mathematica. I have a nonlinear simulation environment that breaks the 
chip down into blocks, represented by functions, and composes a function 
representing the effect of a single clock step on the chip state from 
these functions. I iterate that function to "simulate". Some of the 
blocks are initially represented as Z transforms, so Mathematica's 
algebraic capabilities come in handy. The ease of partial evaluation 
helps with optimization: by evaluating as much of the function as 
possible before iterating it, special cases like consta nt inputs become 
very simple and fast.
>
> I also have a Mathematica model that starts as symbolic Z and Fourier 
transforms, and models the chip as linear operators. For numerical 
results, these operators turn into matrices.
>
> Once I've established the design parameters, I reduce the functional 
blocks to circuits and simulate with that fine Berkeley product, SPICE, 
the liguafranca of circuit simulation. You think Mathematica has 
problems? You've never used SPICE.
>
> Linguistically, SPICE is an absolute mess. "Grammar" is utterly 
ad-hoc, and variable with dialect. "1N914B" is a perfectly good model 
name for a diode, but "2N2222A"  cannot be used to name a transistor 
model in some dialects. There are a couple of dozen different dialects 
around, most containing incompatible proprietary extensions.
>
> For quirky unpredictability, SPICE is much, much worse than 
Mathematica. SPICE users get used to seeing spurious "trap 
oscillations", large amounts of energy appearing out of nowhere, and 
ridiculous time steps. Tuning the numerics to get sane results is an 
arcane art. As a programming language, SPICE is about as sophisticated 
as BASIC, but much less regular. Nevertheless, SPICE is very widely used 
and very productive. In the end, people find that it gets the job done 
(although many get rather exasperated in the process!.
>
> But the big problem with SPICE isn't that it's quirky and error-prone, 
but that it buries the problem in (mostly irrelevant) detail. I'm 
simulating thousands of transistors, each with ~100 model parameters, 
with state changing on picosecond time scales. My SPICE chip simulations 
tend to run at a billion times slower than real time. Data output is 
voluminous and difficult to analyze (sometimes I read it into 
Mathematica for reduction). These problems limit the range of questions 
I can practically ask of SPICE.
>
> On the other hand, the iterated function approach in Mathematica is 
10,000-100,000 times faster than the SPICE approach, so it's a lot 
better for probing high-level behavior. The linear algebra approach in 
Mathematica   is even faster: bang a few matrices together and it tells 
me approximately what I'd get from averaging an unlimited number of 
simulation runs.
>
> Because SPICE is so slow and detailed it's very difficult to use as a 
design tool, where the question is "I want this behavior, how do I get 
it?" It'sbetter for design verification: "I have this circuit, how will 
it behave?". The linear approach in Mathematica is the quickest for 
design optimization,  but of course it can't probe nonlinear phenomena 
in "large signal" cases. The iterated function approach in Mathematica 
is a good compromise to bridge the gap.
>
> So, when I have two Mathematica models and a SPICE model that agree 
that the design will meet requirements, and agree with each other where 
their capabilities overlap, I release the design to the layout 
contractor. One result is another SPICE model, extracted from the 
silicon geometry, for verification. This model is extremely complex, 
with tens of thousands of "parasitic" resistors and capacitors, but I'll 
run a few test cases through it before releasing the design to the mask 
aggregator. So, before any silicon is patterned, I get four fairly 
independent looks at the design from different viewpoints through two 
radically different tools.
>
> There are still many things that can go wrong before I have an actual 
chip powered up and processing video. Some of them involve other 
software, but they have nothing to do with Mathematica, so I won't go 
into them here.
>
> The real world simply doesn't work the way you imagine in this case. 
The design process involves cross checks between multiple tools and 
models, so few design errors escape detection.  Furthermore, I haven't 
seen any errors attributable to the "quirks" of Mathematica in this 
process. I, of course, make and (hopefully) correct errors at a rapid 
pace. SPICE is rather treacherous. But correct and accurate calculation 
in Mathematica just isn't a problem in this engineering flow.
>

[toc] | [prev] | [next] | [standalone]


#14699 — Re: Applying Mathematica to practical problems

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-06-01 10:07 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<koch4d$t5m$1@smc.vnet.net>
In reply to#14686
On 5/31/2013 12:16 AM, Andrzej Kozlowski wrote:
> Excuse me? I have always assumed that every number system has at least
> one finite number x such that x+1=x, this follows from the group
> axiom. Also, by the way, if we are talking about group addition then
> "x ==0  and  x+1 == x"   is a not very economical way to express
> x==0.


I think that Andrzej is misreading/ miswriting...

It is fine to have an element x such that   x+1=1.  That
number is the identity under addition, or zero.

It is not ok to have an element such that  x+1=x.

(When x and 1 are supposed to be modeling the real numbers).


As for the rest of the attacks...

z = 1.11111111111111111111;While[(z = 2*z - z) != 0, Print[z]]

Well, see it for yourself (in Mathematica 9) and decide if anyone would
find it so confusing.

Mathematica 9  has adopted my suggestion that numbers with no precision 
be displayed differently (in a red box).  Prior versions (up to 7 or 8?)
just displayed 0.

Andrzej misconstrues my comments principally in the sense that he
assumes I think it is OK to have a design that gives naive users wrong
answers if it is possible for a skilled user to bypass the
potential disasters by switching arithmetic (etc.)

No, it is a bad design.

The rest of Andrzej's comments are, I think not worth responding to.





[toc] | [prev] | [next] | [standalone]


#14700 — Re: Applying Mathematica to practical problems

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-06-01 10:07 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<koch52$t5o$1@smc.vnet.net>
In reply to#14686
On 5/31/2013 12:16 AM, Andrzej Kozlowski wrote:
> I think this is an excellent and quite fascinating account of serious
> and genuinely useful application of some of Mathematica's vast
> capabilities,

Really I don't think he was using much of Mathematica's capabilities.

Symbolic Z transform and trying to optimize expressions by recognition
of constants.

> which made me feel that the kind of stuff that the rest of
> us do is more akin to playing.

Speak for yourself.

  To my mind, it also should make very
> clear (to anyone who had any doubts) the complete irrelevance of most of
> the "criticism" of Mathematica that Richard Fateman has been posting for
> over 2 decades (not that I expect him to stop doing it or even modify it
> in anyway).

Certainly not in response to Doty or you.
>
> I don't think the points John's makes needs any further support

eh, he seemed to say that he liked to use Mathematica but didn't like
to use SPICE.  Of the two, it seemed that SPICE was essential.  He
didn't explain how Mathematica was especially useful as compared to
other computer algebra systems.

  so I
> want to address just one issue: Richard's use of the words "erroneous,
> incorrect, buggy" etc. This has, in fact, already been addressed by John
> in the first sentence of his reply,

um, subjective and personal, you mean?


but so briefly that I think there is
> still some room for additional comment. Almost always when RJF uses such
> words in connection with Mathemtica he is playing a kind of game, well
> familiar to the veterans of this forum but which could confuse
> newcomers.

Newcomers to Mathematica end up confused when they realize the program
doesn't do what they thought it was supposed to do.


  The idea is to make ambiguous statements that can be
> interpreted in at least two ways: one could be called "strong" and the
> other "weak".

I suppose you are entitled to your opinion, but my thought is that
you are mistaken, at the very least.

  The "strong" interpretation is the one you hope will
> influence people not very familiar with the topic (or with this sort of
> rhetorical tricks), the weak one is what you turn to when pressed by
> people who demand precise justification of your claims. When this
> happens it turns out that the alleged "errors" are not at all what
> people normally call errors but merely aspect of design that Richard
> does not like

Sure, there are some people who might no worry about bad design.
They probably could justify (say) keeping loaded firearms unlocked in
a house with children.  After all, people know not to point firearms
at other people and click the trigger.  Just an opinion.


>(assuming, of course, that he does not have another hidden
> motive that goes beyond disliking the working of Mathematica).

I think my reports are generally quite specific and reproducible.
If you think none of them represent an error, I think you mistaken.


> Thus, Richard whenever he sees a chance to influence someone who he
> thinks is new to Mathematica, suggest that Mathematica's significance
> arithmetic is prone to give wrong answers and is unreliable.

Usually I point it out when someone discovers a problem in the first
place, and wonders about how it could be that an answer is so wrong.

The reason my comments reappear is generally because the questions/
complaints reappear.


  But when
> pressed, he has admitted on a number of occasions that:
>
> 1. Significance arithmetic, being a (faster) version of interval
> arithmetic, can be useful when used by people who understand it and that
> it is used quite reliably by many built-in Mathematica functions such as
> NSolve (and also Solve).

I doubt that I said this.  I probably said (since I believe it to be the
case)  that internal to routines in Mathematica, the default 
significance arithmetic is bypassed, essentially by separately computing
the precision of intermediate results and imposing that on the numbers 
in an iteration.  In other words, these routines work IN SPITE OF
significance arithmetic, not because of it.

> 2. It is easy to switch to fixed precision arithmetic whenever one wants
> with a simple usage of Block.

If you switch to fixed precision, then you have to know what
the precision should be fixed at.  Numerical analysts have some 
techniques for doing this, and these techniques can be implemented
in Mathematica, and have been, in some internal routines, by
clever people.  But Mathematica documentation would lead you to
believe that Mathematica does the right thing by default.  This
is, in general, false.  As you see by the example you quote, from me!

>
> In other words: significance arithmetic is a feature that Mathematica
> offers in addition to standard, fixed precision arithmetic.

There is double-float arithmetic, which is almost standard, but
has some quirks. More serious problems for the extended precision.

To use the fixed precision arithmetic, one has to either intersperse
SetPrecision[A,p] among the calculations, or set the system
variables $MaxPrecision and $MinPrecision to a particular integer.
Maybe there are other ways to do this, e.g. using integer arithmetic
and simulating binary point, ...

  How can more
> be worse than less?


The damage, however, is to the user who believes the Significance
arithmetic when it does not deserve to be believed.


Of course JRF when pressed, has admitted all this (I
> can post references but I don't think he will deny it)

I have heard of out-of-context quotes, but you don't even bother!
You simply misrepresent.

  and his
> objections actually amount to just two things: the choice of
> significance arithmetic as the deafult for extended precision
> computations and the fact that Mathematica treats what are actually
> intervals as "numbers" instead of just calling them something else
> ("fuzz balls").

I am not sure what you are claiming here.  If a number is an interval,
then what are the endpoints?  If they are numbers, then they too are
intervals, etc.  ad infinitum.   Much better to have numbers, and then
intervals which are pairs of numbers. end of recursion.

  Every time there is a serious discussion of these
> things, he is forced to concede all these points but then, at the next
> opportunity, he starts the whole things all over again.

I suppose you can make things up if you don't even bother to quote.

  In the end, he
> becomes so careless that he ends up writing comical nonsense like:
>
>
>> I will say that for scientific computing it is probably a bad feature
>> to have finite numbers x   such that x ==0  and  x+1 == x.
>
> Excuse me? I have always assumed that every number system has at least
> one finite number x such that x+1=x, this follows from the group
> axiom.

I think you mean x+1==1  when x is the additive identity  (e.g. zero for 
real numbers).

  Also, by the way, if we are talking about group addition then
> "x ==0  and  x+1 == x"   is a not very economical way to express
> x==0.

um,  read what I wrote and what you wrote  again.

>
> More seriously, there are two things are being insinuated here, both of
> them false. The first is that having "numbers" with unusual properties
> is somehow "wrong" or even "eccentric" in mathematics.

I contend that x==0   and x+1==x  is beyond eccentric. Mathematica
also may believe x+1==x+2, even though it also believes that
Solve[ s+1==s+2, s]    has no solutions.   Yet x is a solution!
(x=z from the computation below...)

  This is, of
> course, completely false and one can give lots of examples.

You can give an example that numbers in Mathematica sometimes
are not wrong.  That's not much comfort.  It is like you asking me
"How was your hamburger"  and I say "Parts of it were excellent"..


To take just
> one: in non standard analysis one has infinitely many "infinitely small
> numbers" x such that n x <1 for every positive integer n.

OK, If I want to model that I should definitely not use significance
arithmetic.  The zero-ish number z below has the property than
z==0
Rationalize[z] is 0
yet z<1 is false.


This is both
> logically sound and very useful in practical proofs and computations.
> Exactly the same is true of "fuzz balls".

I don't see how this relates to Mathematica.  There are many algebraic
systems possible.  Mathematica deals with just a few,  like the Ring
of integers, the Field of rational numbers, some modular stuff, 
Polynomials and Rational Functions,  Matrices,  floats as a model
of reals, principally.   complex numbers, and a bunch of other
stuff including Log, Exp, graphics stuff, maps, whatever.
Someone may have written a package for non-standard analysis, but
if so, probably did not use software extended precision.

>
> Another insinuation, equally false, is that an unsuspecting "naive" user
> of Mathematica could fall into some trap because of this.

How could you possibly know this?  Just read mathgroup to find people 
who fall into holes.

> Naive users of
> Mathematica practically never use arbitrary precision arithmetic.

Practically never, but occasionally?  Like slightly pregnant?

Users
> who need it will almost always look into the documentation and realise
> that they won't be dealing with numbers in the ordinary sense but
> intervals of variable size.

Users may use it simply by typing too many digits.

  This is why examples of the kind that RJF
> loves posting never come up naturally.

Except on Mathgroup occasionally.

  The only time they occur is
> either then RJF posts them or sometimes when someone discovers low
> precision numbers and tries things like:
>
> 1`0 == 0
>
> True
>
> 1`0 == 1
>
> True

No, I think that this pretty much unlikely. Discovering low precision 
numbers by typing them in.

  People who truly worry about
precision probably know a lot more about it than this.  They will
be troubled and surprised by Mathematica's model, most likely.
>
>
> But, of course, to be able to enter numbers with no precision you really
> need to know, well, what it means for a number to have Precision 0. At
> this point, I suspect, RJF will be tempted to come up with his favourite
> example of the the kind of thing that awaits an unsuspecting user who
> for some reason needs to evaluate:
>
> z = 1.11111111111111111111;While[(z = 2*z - z) != 0, Print[z]]
>
> Well, see it for yourself (in Mathematica 9) and decide if anyone would
> find it so confusing.

First of all you don't need so many digits.
(z = 1.11111111111111111; Do [z = 2*z - z, {36}]; z)  produces 0.
(z = 1.1111111111111111; Do [z = 2*z - z, {36}]; z)  produces 1.11111

RealDigits[z] is {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 1}
But
InputForm[z] is 1.1111111111111112

etc.

[toc] | [prev] | [next] | [standalone]


#14711 — Re: Applying Mathematica to practical problems

FromAndrzej Kozlowski <akozlowski@gmail.com>
Date2013-06-02 04:23 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<koehcf$2s8$1@smc.vnet.net>
In reply to#14686
I have to repeat what I have written many times already: the main reasons why I now generally do not respond to RJF's posts are

1) nothing new ever comes up
2) we are always arguing always cross purposes

I think I know why the first happens, but this time, out of politeness, I won't say. As for the second, I can only speculate. Perhaps our minds work so differently that even when we use the same words we invariably have different things in mind. Anyway, I don't have the time to go RJF's latest reply line by line so I will just consider a short sample, which, I think, illustrates my point pretty clearly.


On 1 Jun 2013, at 02:05, Richard Fateman <fateman@cs.berkeley.edu> wrote:
>>
>> 1. Significance arithmetic, being a (faster) version of interval
>> arithmetic, can be useful when used by people who understand it and that
>> it is used quite reliably by many built-in Mathematica functions such as
>> NSolve (and also Solve).
>
> I doubt that I said this.  I probably said (since I believe it to be the
> case)  that internal to routines in Mathematica, the default significance arithmetic is bypassed, essentially by separately computing
> the precision of intermediate results and imposing that on the numbers in an iteration.  In other words, these routines work IN SPITE OF
> significance arithmetic, not because of it.

A number of times Daniel Lichblau explained to you how significance arithmetic is used in his implementation of numerical Groebner Basis, which is a fundamental tool in NSolve. I believe is also used in some aspects of Solve and Reduced implemented by Adam Strzebonski (although it is possible that interval arithmetic is use instead, possibly both are). Daniel has even pointed out that nobody has been able to implement a working version using fixed precision, although a whole book and at least one doctoral thesis has been written on this topic. You have known about it a long time and never realy try to challenge Daniel's assertions (well, how could you, what do you know about this sort of stuff). At most, you try to deny the importance of the Groebner Basis approach itself, again, not based on any deep knowledge or experience.

>
>> 2. It is easy to switch to fixed precision arithmetic whenever one wants
>> with a simple usage of Block.
>
> If you switch to fixed precision, then you have to know what
> the precision should be fixed at.  Numerical analysts have some techniques for doing this, and these techniques can be implemented
> in Mathematica, and have been, in some internal routines, by
> clever people.  But Mathematica documentation would lead you to
> believe that Mathematica does the right thing by default.  This
> is, in general, false.  As you see by the example you quote, from me!

Significance arithmetic, when used properly, can accomplish most of the same things that Interval arithmetic can do, and it can do it automatically. Here is an example (due to Maxim Rytin): proving that a expression is non-zero.

N[Sum[E^(-(1/2 - k)^2/2) + E^(-k^2/2), {k, -12, 12}] - 2*Sqrt[2*Pi], 10]

 3.955157333*10^-34

Accuracy[%]

43.4028

Here we see that the accuracy of the result is greater than 43 and so the absolute error is less than 10^-43, therefore the result is mathematically proved to be different from zero. (Of course this is assuming that significance arithmetic does work the way it is supposed to work. Also, exactly the same thing can be achieved by using Interval but more more slowly).

>>
>
>
> The damage, however, is to the user who believes the Significance
> arithmetic when it does not deserve to be believed.

See the example above.
>
>> one: in non standard analysis one has infinitely many "infinitely 
small
>> numbers" x such that n x <1 for every positive integer n.
>
> OK, If I want to model that I should definitely not use significance
> arithmetic.  The zero-ish number z below has the property than
> z==0
> Rationalize[z] is 0
> yet z<1 is false.

This is one of many examples of "cross purpose" arguing. I was not discussing implementing non-standard analysis at all. My point was that that there is nothing logically more dubious about a finite "number" x such that x+1=1 than there is about a positive "number" x such that nx< 1 for every positive integer n, or, alternatively, finite "number" x such that x/n >1 for every positive integer n. Mathematicians often use the word "number" when referring to objects belonging to some "extension" of the real line.

The use of such things is justified purely by usefulness and both non-standard analysis and significance arithmetic are useful. Also, everything that can be done using these tools can also be done without them but at the cost of more work and less intuitive approach.

In other words, everything I wrote concerned an analogy between two approaches: one in mathematics the other in Mathematica. I can't imagine how you managed to misinterpret it but I am certainly no longer surprised.


>
>
> This is both
>> logically sound and very useful in practical proofs and computations.
>> Exactly the same is true of "fuzz balls".
>
> I don't see how this relates to Mathematica.  There are many algebraic
> systems possible.  Mathematica deals with just a few,  like the Ring
> of integers, the Field of rational numbers, some modular stuff, Polynomials and Rational Functions,  Matrices,  floats as a model
> of reals, principally.   complex numbers, and a bunch of other
> stuff including Log, Exp, graphics stuff, maps, whatever.
> Someone may have written a package for non-standard analysis, but
> if so, probably did not use software extended precision.

Again the same thing. So I think this illustrates my point and is a good place to stop.

Andrzej Kozlowski

[toc] | [prev] | [next] | [standalone]


#14716 — Re: Applying Mathematica to practical problems

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-06-03 07:24 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kohgbs$c9g$1@smc.vnet.net>
In reply to#14711
On 6/1/2013 9:23 PM, Andrzej Kozlowski wrote:
> This is one of many examples of "cross purpose" arguing. I was not
> discussing implementing non-standard analysis at all. My point was
> that that there is nothing logically more dubious about a finite
> "number" x such that x+1=1 than there is about a positive "number" x
> such that nx< 1 for every positive integer n, or, alternatively,
> finite "number" x such that x/n >1 for every positive integer n.
> Mathematicians often use the word "number" when referring to objects
> belonging to some "extension" of the real line.

Oh where to start.  Here's one place.

You say it is ok to have a number x such that x+1=1.  I agree.
I say it is NOT ok to have a number x such that x+1=x.
   You respond
It is ok to have a number x such that x+1=1.
   Can you see the difference?



Here's another.

AK says DanL says he wrote programs using significance arithmetic and 
they worked.

There are other places in Mathematica in which significance
arithmetic MUST NOT be used.  Convergent iterations, generally.
Will naive users be led astray by this kind of situation?
Maybe.

Also is the Grobner basis program in Mathematica the fastest?
I suspect it is not, though I have not compared it to Faugere's
work, or other unnamed systems. Is it the only one using significance
arithmetic?  I suspect it is.  What would that prove?  What
would that prove about use as a default?

Finally, I would remind AK (and others)
that proving some number of correct results
does not prove an algorithm is correct.  Proving even one incorrect
result demonstrates a bug.

RJF

[toc] | [prev] | [next] | [standalone]


#14722 — Re: Applying Mathematica to practical problems

FromAndrzej Kozlowski <akozlowski@gmail.com>
Date2013-06-04 03:11 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kojls4$kah$1@smc.vnet.net>
In reply to#14711

On 3 Jun 2013, at 17:01, Richard Fateman <fateman@eecs.berkeley.edu> wrote:

> On 6/3/2013 3:05 AM, Andrzej Kozlowski wrote:
> >
>
>       > On 3 Jun 2013, at 09:34, Richard Fateman
>      
> <fateman@cs.berkeley.edu>
>
>       > wrote:
>
>
>       >
>
>
>       >> On 6/1/2013 9:23 PM, Andrzej Kozlowski wrote:
>
>
>       >>> This is one of many examples of "cross purpose"
>       arguing. I was
>
>
>       >>> not discussing implementing non-standard analysis at
>       all. My
>
>
>       >>> point was that that there is nothing logically more
>       dubious about
>
>
>       >>> a finite "number" x such that x+1=1 than there is
>       about a
>
>
>       >>> positive "number" x such that nx< 1 for every
>       positive integer n,
>
>
>       >>> or, alternatively, finite "number" x such that x/n
>       >1 for every
>
>
>       >>> positive integer n. Mathematicians often use the word
>       "number"
>
>
>       >>> when referring to objects belonging to some
>       "extension" of the
>
>
>       >>> real line.
>
>
>       >>
>
>
>       >> Oh where to start.  Here's one place.
>
>
>       >>
>
>
>       >> You say it is ok to have a number x such that x+1=1.  I
>       agree. I
>
>
>       >> say it is NOT ok to have a number x such that x+1=x. You
>       respond It
>
>
>       >> is ok to have a number x such that x+1=1. Can you see the
>
>
>       >> difference?
>
>
>       >
>
>
>       > Yes, I was careless about this, but that was because it does
>       not
>
>
>       > really matter. It is O.K. to extend the real line to an
>       algebraic and
>
>
>       > topological sturcture which contains objects such x such that
>       x+1=x.
>
> So such systems have the AK seal of approval.  Argument settled??
>
> Since such objects do not satisfy the necessary axioms for real numbers, they cannot be part of the real line.

Surely, you must be joking Mr. Fateman. Really. Whoever suggested that 
they are elements of the real line? When I mentioned non-standard 
analysis you reacted as if you knew what it was, but now it seems you 
have no idea. Infinitely small and infinitely large quantities that 
appear in non-standard analysis also do not belong to the real line, 
because the reals satisfy the Archimedean Property and infinitesimals do 
not. But they belong to a non-Archimedean  field which contains the 
reals. It turns out that you can translate any argument that uses 
infinitesimals (elements of the non-Archimedean extension) into a valid 
one which uses only reals. Thus using non-standard analysis is only a 
convenience - it shortens proofs and computations and will never lead to 
incorrect answers.

In a quite different context, the same is true of interval arithmetic. 
Everything done with intervals can be proved by arguments that do not 
refer to real numbers. Intervals simply provide a tool that is much more 
convenient in certain situations.

Significance arithmetic is a first order approximation to interval 
arithmetic - in a completely precise sense (essentially the same as 
approximating the taylor series by its linear part). One can determine 
mathematically the situation in which taking the linear part of a Taylor 
expansion is the right thing to do; doing this sort of things goes back 
to Newton. The fact that by using zero precision numbers you can get 
strange looking answers (stange looking only to someone who does not 
understand the above) does not prove anything.



>
> Computer algebra systems sometimes have to adopt models of an extension to the real line to accommodate
> certain calculations typically involving limits and division by zero or perhaps complex numbers.  This
> extension may include +inf, -inf, and und  (these may be 1/0, -1/0, and 0/0).  There are other ways of
> doing this. Where to read about a design for such a system ? See the IEEE 754 binary float explanations.
>
> > Of course such objects do not
>       have inverses, so you can't conclude
>
>
>       > that 0=1.
>
> That is true, there is no number x such that  inf + x == 0.     inf+FiniteNumber is inf.
> It is usually somewhat discomforting to add to a system that used to be bound by the axioms of the reals,
> these exceptional numbers.  But there are only a few.

You are simply proving again that you have the habit of discussing things you do not understand. In non-standard analysis you "add" to the real numbers uncountably many quantities that are "infinitesimally small" and "infinitely large". That's "quite a few".


>
>
>       >> Also is the Grobner basis program in Mathematica the
>       fastest? I
>
>
>       >> suspect it is not, though I have not compared it to
>       Faugere's work,
>
>
>       >> or other unnamed systems. Is it the only one using
>       significance
>
>
>       >> arithmetic?  I suspect it is.  What would that prove?
>       What would
>
>
>       >> that prove about use as a default?
>
>
>       >
>
>
>       > This is nonsense. Faugere does not work on numerical analysis
>       and has
>
>
>       > not implemented a numerical Groebner basis. Other people have
>       worked
>
>
>       > on approximate Grobener bases using fixed precision
>       arithmetic but
>
>
>       > (as far as I know) there are no working implementations
>       available.
>
>
> I think the goal of the numerical Groebner basis algorithms is to provide a fast computation
> of the exact results by using approximate numerics.  If so it is not an entirely different subject.
> The numerical solution of systems of algebraic equations to find (one) solution IS a
> different task from finding them all.
> And of those researchers doing Groebner basis computations with numerical
> approximation, how does Mathematica compare?

It is hard to tell since I don't think there exists any implementation that could be used for comparison. This may be out of date, but Daniel should know. In his book on numerical polynomial algebra Stetter describes how this sort of thing might be done with fixed precision. He writes:

"Naturally, for large problems, or for small problems with long decimals, the computation may get
drowned in the swell of the integers. Anyway, it appears unreasonable to perform a computation in integer arithmetic only to round the result when it is obtained. Therefore, the development and the efficient and safe implementation of true floating-point GB-algorithms is still a central
research topic for numerical polynomial algebra. Kondratyev's Ph.D. thesis [10.3] represents a seminal first result in this direction."

However, a thesis is a thesis and a step from a thesis to a working implementation is not a trivial one. I rather doubt that it has been made.

Andrzej Kozlowski


[toc] | [prev] | [next] | [standalone]


#14723 — Re: Applying Mathematica to practical problems

FromAndrzej Kozlowski <akozlowski@gmail.com>
Date2013-06-04 03:11 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kojlso$kaj$1@smc.vnet.net>
In reply to#14711
On 3 Jun 2013, at 09:34, Richard Fateman <fateman@cs.berkeley.edu> wrote:

> On 6/1/2013 9:23 PM, Andrzej Kozlowski wrote:
>> This is one of many examples of "cross purpose" arguing. I was not
>> discussing implementing non-standard analysis at all. My point was
>> that that there is nothing logically more dubious about a finite
>> "number" x such that x+1=1 than there is about a positive "number" x
>> such that nx< 1 for every positive integer n, or, alternatively,
>> finite "number" x such that x/n >1 for every positive integer n.
>> Mathematicians often use the word "number" when referring to objects
>> belonging to some "extension" of the real line.
>
> Oh where to start.  Here's one place.
>
> You say it is ok to have a number x such that x+1=1.  I agree.
> I say it is NOT ok to have a number x such that x+1=x.
>   You respond
> It is ok to have a number x such that x+1=1.
>   Can you see the difference?

Yes, I was careless about this, but that was because it does not really 
matter. It is O.K. to extend the real line to an algebraic and 
topological sturcture which contains objects such x such that x+1=x. 
Of course such objects do not have inverses, so you can't conclude that 
0=1.  Admittedly, in Mathematica the underlying logic is obscured by 
the fact that it equality is not identity, so you do have

1`0 == 1

True

 1`0 == 0

 True

but

1`0 == 0

True

All this means that equality is a non-transitive relation on this 
extended set of objects (but identity is). That is also logically 
perfectly sound.

>
>
> Also is the Grobner basis program in Mathematica the fastest?
> I suspect it is not, though I have not compared it to Faugere's
> work, or other unnamed systems. Is it the only one using significance
> arithmetic?  I suspect it is.  What would that prove?  What
> would that prove about use as a default?

This is nonsense. Faugere does not work on numerical analysis and has 
not implemented a numerical Groebner basis. Other people have worked on 
approximate Grobener bases using fixed precision arithmetic but (as far 
as I know) there are no working implementations available.

Groebner bases with exact coefficients are an entirely different 
subject, unrelated to this discussion.


>
> Finally, I would remind AK (and others)
> that proving some number of correct results
> does not prove an algorithm is correct.  Proving even one incorrect
> result demonstrates a bug.
>

You have never demonstrated one incorrect result proved by Mathematica.

AK

[toc] | [prev] | [next] | [standalone]


#14724 — Re: Applying Mathematica to practical problems

FromRichard Fateman <fateman@eecs.berkeley.edu>
Date2013-06-04 03:10 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kojlrf$ka9$1@smc.vnet.net>
In reply to#14711
On 6/3/2013 3:05 AM, Andrzej Kozlowski wrote:
>
 > On 3 Jun 2013, at 09:34, Richard Fateman <fateman@cs.berkeley.edu>
 > wrote:
 >
 >> On 6/1/2013 9:23 PM, Andrzej Kozlowski wrote:
 >>> This is one of many examples of "cross purpose" arguing. I was
 >>> not discussing implementing non-standard analysis at all. My
 >>> point was that that there is nothing logically more dubious about
 >>> a finite "number" x such that x+1=1 than there is about a
 >>> positive "number" x such that nx< 1 for every positive integer n,
 >>> or, alternatively, finite "number" x such that x/n >1 for every
 >>> positive integer n. Mathematicians often use the word "number"
 >>> when referring to objects belonging to some "extension" of the
 >>> real line.
 >>
 >> Oh where to start.  Here's one place.
 >>
 >> You say it is ok to have a number x such that x+1=1.  I agree. I
 >> say it is NOT ok to have a number x such that x+1=x. You respond It
 >> is ok to have a number x such that x+1=1. Can you see the
 >> difference?
 >
 > Yes, I was careless about this, but that was because it does not
 > really matter. It is O.K. to extend the real line to an algebraic and
 > topological sturcture which contains objects such x such that x+1=x.
So such systems have the AK seal of approval.  Argument settled??

Since such objects do not satisfy the necessary axioms for real numbers, 
they cannot be part of the real line.

Computer algebra systems sometimes have to adopt models of an extension 
to the real line to accommodate
certain calculations typically involving limits and division by zero or 
perhaps complex numbers.  This
extension may include +inf, -inf, and und  (these may be 1/0, -1/0, and 
0/0).  There are other ways of
doing this. Where to read about a design for such a system ? See the 
IEEE 754 binary float explanations.

> Of course such objects do not  have inverses, so you can't conclude
 > that 0=1.
That is true, there is no number x such that  inf + x == 0. 
inf+FiniteNumber is inf.
It is usually somewhat discomforting to add to a system that used to be 
bound by the axioms of the reals,
these exceptional numbers.  But there are only a few.  3.  And they can 
be easily explained and they
come up in limited circumstances. They indeed cause some difficulties, 
and they are sometimes
excluded from certain kinds of systems entirely.

Mathematica has an infinitude of such numbers, and it means among other 
things that equality
fails to be transitive,  one of the fundamental axioms of many algebraic 
and probably all reasonable
logical systems.  In Mathematica:      A==B  and B==C   implies A==C.  
Is FALSE.


> All this means that equality is  a non-transitive relation on this
 > extended set of objects (but identity is). That is also logically
 > perfectly sound.

So your response is, like Peewee Herman  "I meant to do that!".

It is perhaps up to the users of Mathematica to decide if they are 
comfortable with what you
consider a "logically perfectly sound" system like this.  I find it 
objectionable.

It means one can encounter a value for x such that x==4  is true but x>3 
is false.

  It is difficult to disentangle such peculiar results from the rest of 
the arithmetic.

>>
 >>
 >> Also is the Grobner basis program in Mathematica the fastest? I
 >> suspect it is not, though I have not compared it to Faugere's work,
 >> or other unnamed systems. Is it the only one using significance
 >> arithmetic?  I suspect it is.  What would that prove? What would
 >> that prove about use as a default?
 >
 > This is nonsense. Faugere does not work on numerical analysis and has
 > not implemented a numerical Groebner basis. Other people have worked
 > on approximate Grobener bases using fixed precision arithmetic but
 > (as far as I know) there are no working implementations available.

I think the goal of the numerical Groebner basis algorithms is to 
provide a fast computation
of the exact results by using approximate numerics.  If so it is not an 
entirely different subject.
The numerical solution of systems of algebraic equations to find (one) 
solution IS a
different task from finding them all.
And of those researchers doing Groebner basis computations with numerical
approximation, how does Mathematica compare?

>
 >
 > Groebner bases with exact coefficients are an entirely different
 > subject, unrelated to this discussion.
 >
 >
 >>
 >> Finally, I would remind AK (and others) that proving some number of
 >> correct results does not prove an algorithm is correct. Proving
 >> even one incorrect result demonstrates a bug.
 >>
 >
 > You have never demonstrated one incorrect result proved by
 > Mathematica.
Right.  Mathematica does not actually "prove" incorrect results.  It 
merely delivers them.

Solve[x+1==x,x] returns {}
yet
1`0 +1`0 == 1`0 returns True.

RJF




>
 >
 > AK
 >

[toc] | [prev] | [next] | [standalone]


#14725 — Re: Applying Mathematica to practical problems

FromAndrzej Kozlowski <akozlowski@gmail.com>
Date2013-06-04 03:11 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kojltd$kal$1@smc.vnet.net>
In reply to#14711
For those who have seen the innumerate past discussion of this topic: 
essentially it all amounts to the fact I mentioned below, that on the 
set of all "numbers" available in Mathematica, the ordinary equality (==
 or Equal) is not an identity relation; in particular, it is 
non-transitive. That's all. In fact Richard made once (or rather, at 
least once) an attempt to show that one could dispense with Equal and 
replace it with SameQ - if I recall correctly it was not a success but I 
don't want to spend more time on this matter so won't bother looking for 
past posts about this.

My point about non-standard analysis was that seemingly strange 
"extensions" of the concept on number are common in mathematics: the 
best known example is adjoining positive and negative infinity to the 
real line. Non-standard analysis is another such example. Imbedding real 
and complex numbers in a wider set, which contains "non-exact" numbers 
is simply another example of this approach. I have not tried to consider 
this carefully, but I am pretty sure it can all be made logically 
consistent. In general the arithmetic of numbers of varying precision 
will be "strange", even the associative law for addition will not hold 
in general. There is nothing wrong with this. The only somewhat 
controversial issue is that Mathematica's extension of equality to such 
entities is not an identity relation. There are technical reasons for 
this and I don't think this is a problem, particularly that Mathematica 
also has (of course!) the genuine identity (SameQ or ===).

Andrzej Kozlowski


On 3 Jun 2013, at 12:05, Andrzej Kozlowski <akoz@mimuw.edu.pl> wrote:

>
> On 3 Jun 2013, at 09:34, Richard Fateman <fateman@cs.berkeley.edu> wrote:
>
>> On 6/1/2013 9:23 PM, Andrzej Kozlowski wrote:
>>> This is one of many examples of "cross purpose" arguing. I was not
>>> discussing implementing non-standard analysis at all. My point was
>>> that that there is nothing logically more dubious about a finite
>>> "number" x such that x+1=1 than there is about a positive "number" x
>>> such that nx< 1 for every positive integer n, or, alternatively,
>>> finite "number" x such that x/n >1 for every positive integer n.
>>> Mathematicians often use the word "number" when referring to objects
>>> belonging to some "extension" of the real line.
>>
>> Oh where to start.  Here's one place.
>>
>> You say it is ok to have a number x such that x+1=1.  I agree.
>> I say it is NOT ok to have a number x such that x+1=x.
>>  You respond
>> It is ok to have a number x such that x+1=1.
>>  Can you see the difference?
>
> Yes, I was careless about this, but that was because it does not 
really matter. It is O.K. to extend the real line to an algebraic and 
topological sturcture which contains objects such x such that x+1=x. 
Of course such objects do not have inverses, so you can't conclude that 
0=1.  Admittedly, in Mathematica the underlying logic is obscured by 
the fact that it equality is not identity, so you do have
>
> 1`0 == 1
>
> True
>
> 1`0 == 0
>
> True
>
> but
>
> 1`0 == 0
>
> True
>
> All this means that equality is a non-transitive relation on this 
extended set of objects (but identity is). That is also logically 
perfectly sound.
>
>>
>>
>> Also is the Grobner basis program in Mathematica the fastest?
>> I suspect it is not, though I have not compared it to Faugere's
>> work, or other unnamed systems. Is it the only one using significance
>> arithmetic?  I suspect it is.  What would that prove?  What
>> would that prove about use as a default?
>
> This is nonsense. Faugere does not work on numerical analysis and has 
not implemented a numerical Groebner basis. Other people have worked on 
approximate Grobener bases using fixed precision arithmetic but (as far 
as I know) there are no working implementations available.
>
> Groebner bases with exact coefficients are an entirely different 
subject, unrelated to this discussion.
>
>
>>
>> Finally, I would remind AK (and others)
>> that proving some number of correct results
>> does not prove an algorithm is correct.  Proving even one incorrect
>> result demonstrates a bug.
>>
>
> You have never demonstrated one incorrect result proved by 
Mathematica.
>
> AK
>

[toc] | [prev] | [next] | [standalone]


#14734 — Re: Applying Mathematica to practical problems

FromAndrzej Kozlowski <akozlowski@gmail.com>
Date2013-06-04 03:13 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kojlvu$kau$1@smc.vnet.net>
In reply to#14711
On 3 Jun 2013, at 17:14, Richard Fateman <fateman@EECS.Berkeley.EDU> wrote:

> On 6/3/2013 8:01 AM, Richard Fateman wrote:
> I said..
> Solve[x+1==x,x] returns {}
> yet
> 1`0 +1`0 == 1`0 returns True.
>
> oops.  make that last line 1`0+1 == 1`0 .
>
> Changing the semantics of ==  to the semantics of === may help
> in some circumstances, but it seems to me we went through this
> before.
> RJF

I forgot to deal with this little thing. Solve solves over the (exact) complex numbers. 1`0  is not an exact real number hence it is not an exact complex number. Non-exact reals and complexes are not included so your "proof" is just a bluff.

Andrzej Kozlowski

PS. I realize that Mathematica gives:

Element[1`0, Reals]

True

I have never liked this and I think it ought to be changed (unless something important depends on this).

[toc] | [prev] | [next] | [standalone]


#14695 — Mathematica numerics and... Re: Applying Mathematica to practical problems

FromDaniel Lichtblau <danl@wolfram.com>
Date2013-06-01 10:06 +0000
SubjectMathematica numerics and... Re: Applying Mathematica to practical problems
Message-ID<koch34$t5h$1@smc.vnet.net>
In reply to#14471
Others have commented on most issues raised in this subthread. I
wanted to
touch on just a few details.

On May 31, 2:15 am, Richard Fateman <fate...@cs.berkeley.edu> wrote:
> On 5/30/2013 3:09 AM, John Doty wrote:
>
> > Changing the topic here.
>
> > On Tuesday, May 28, 2013 1:49:00 AM UTC-6, Richard Fateman wrote:
>
> >> Learning Mathematica (only) exposes a student to a singularly
> >> erroneous model of computation,

I assume you (as ever) refer to significance arithmetic. If so,
while it is many things, "erroneous" is not one of them. It
operates as designed. You have expressed a couple of reasons
why you find that design not to your liking. The two that most
come to mind: bad behavior in iterations that "should" converge,
and fuzzy equality that you find to be unintuitive 9mostly this
arises at low precision).


> > A personal, subjective judgement. However, I would agree that
> > exposing the student to *any* single model of computation, to the
> > exclusion of others, is destructive.
>
> Still, there are ones that are well-recognized as standard, a common
> basis for software libraries, shared development environments, etc.
> Others have been found lacking by refereed published articles
> and have failed to gain adherents outside the originators. (Distrust
> of significance arithmetic ala Mathematica is not a personal
> subjective opinion only.).

No, but nor is it one that appears to be widely shared. As best I can
tell, most people in the field either do not write about it, or else
make the observation, correctly, that it is simply  a first-order
approximation to interval arithmetic.

As such, it has most of the qualities of interval arithmetic. Among
these are the issue that results with "large" intervals are sometimes
not very useful. Knowing that one ended up with a large interval,
however,
can be useful: it tells one that either the problem is not well
conditioned, or the method of solving it was not (and specifically, it
may have been a bad idea to use intervals to assess error bounds).

Significance arithmetic brings a few advantages. One is that computations
 are generally faster than their interval counterparts. Another is that it
is "significantly" easier to extend to functions for which interval
methods are out of reach (reason: one can compute derivatives but cannot
always find extrema for every function on every segment). A third is that
it is much easier to extend to complex values.

A drawback, relative to interval arithmetic, is that as a first-order
approximation, in terms of error propagation, significance arithmetic
breaks down at low precision where higher-order terms can cause the
estimates to be off. I will add that, at that point, intervals are going
to give results that are also not terribly useful.

I'm not sure what are the refereed articles referred to above. I suspect
they do not disagree in substantial ways with what I wrote though.  That
is to say, error estimates may be too conservative, and at low precision
results may not be useful.

Fixed precision has its own advantages and disadvantages in terms of speed,
error estimation, and the like. We certainly use it in places, even if
significance arithmetic is the default behavior of bignum arithmetic in
top-level Mathematic. For implementation purposes we use both modes.


> > Mathematica applied to real problems is pretty good here.
>
> Maybe, but is "pretty good"  the goal, and the occasional identified
> errors be ignored?

We do try to fix many bugs that are brought to our attention. We have a
better track record in some areas than others. I have no reason to
believe that numerics issues have received short shrift though.

Daniel Lichtblau
Wolfram Research

[toc] | [prev] | [next] | [standalone]


#14704 — Interval vs default, was Re: Mathematica numerics and... Re: Applying

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-06-02 04:24 +0000
SubjectInterval vs default, was Re: Mathematica numerics and... Re: Applying
Message-ID<koehdo$2sm$1@smc.vnet.net>
In reply to#14695
On 6/1/2013 3:06 AM, Daniel Lichtblau wrote:
> Others have commented on most issues raised in this subthread. I
> wanted to
> touch on just a few details.
>
> On May 31, 2:15 am, Richard Fateman <fate...@cs.berkeley.edu> wrote:
>> On 5/30/2013 3:09 AM, John Doty wrote:
>>
>>> Changing the topic here.
>>
>>> On Tuesday, May 28, 2013 1:49:00 AM UTC-6, Richard Fateman wrote:
>>
>>>> Learning Mathematica (only) exposes a student to a singularly
>>>> erroneous model of computation,
>
> I assume you (as ever) refer to significance arithmetic.

Yes.

If so,
> while it is many things, "erroneous" is not one of them. It
> operates as designed. You have expressed a couple of reasons
> why you find that design not to your liking. The two that most
> come to mind: bad behavior in iterations that "should" converge,
> and fuzzy equality that you find to be unintuitive 9mostly this
> arises at low precision).

Yes.  I consider these to be errors in the design.  I am not
complaining that the implementation (erroneously) diverges from
the design.

>
>
>>> A personal, subjective judgement. However, I would agree that
>>> exposing the student to *any* single model of computation, to the
>>> exclusion of others, is destructive.
>>
>> Still, there are ones that are well-recognized as standard, a common
>> basis for software libraries, shared development environments, etc.
>> Others have been found lacking by refereed published articles
>> and have failed to gain adherents outside the originators. (Distrust
>> of significance arithmetic ala Mathematica is not a personal
>> subjective opinion only.).
>
> No, but nor is it one that appears to be widely shared. As best I can
> tell, most people in the field either do not write about it, or else
> make the observation, correctly, that it is simply  a first-order
> approximation to interval arithmetic.

There is a wikipedia entry on the topic that (at least as of this time 
and date) is pretty good.
>
> As such, it has most of the qualities of interval arithmetic. Among
> these are the issue that results with "large" intervals are sometimes
> not very useful. Knowing that one ended up with a large interval,
> however,
> can be useful: it tells one that either the problem is not well
> conditioned, or the method of solving it was not (and specifically, it
> may have been a bad idea to use intervals to assess error bounds).

The important quality of interval arithmetic that is not preserved is
that interval arithmetic (done correctly) preserves validity. That is,
the correct answer is guaranteed to be enclosed in the result.
>
> Significance arithmetic brings a few advantages. One is that computations
>   are generally faster than their interval counterparts.

I wonder about this. There are libraries that do interval arithmetic,
and even interval arithmetic in arbitrary precision.  It might be 
possible to benchmark interval arithmetic against Mathematica arithmetic 
in some neutral setting.  (I think it would be difficult to
compare the two fairly in Mathematica ... there might be an issue if
an interval's endpoints were computed with significance arithmetic so it 
would naturally be slower....  But perhaps there is another way. See 
below, though.)

It seems to me that the default arithmetic is fairly complicated.  Each 
extended float number F has some other number E associated with it
(guess: it is a machine float representing something like log of 
relative error),  and calculations require mucking about with F and E
both, e.g. some calculations involving condition numbers relating to how 
fast a function changes as the argument changes.

> Another is that it
> is "significantly" easier to extend to functions for which interval
> methods are out of reach (reason: one can compute derivatives but cannot
> always find extrema for every function on every segment). A third is that
> it is much easier to extend to complex values.

I don't understand the derivative argument -- intervals can be computed
essentially by composition of interval functions. This may be overly
pessimistic compared to actually finding extrema, but it is, so far
as I know, fairly easy.  The extension of intervals to complex values
is another issue, but I don't know that significance arithmetic really
does better.  My understanding is that complex numbers as intervals
can be done by enclosures that are 2-D in the complex plane (e.g.
circles, rectangles, or some other shapes) or a design in which the
real and imaginary parts are expressed as separate intervals. I expect
that the Mathematica significance version is more like the latter, in
which case it shouldn't make much difference in ease of implementation.
Is there a place where this distinction is explained? Besides which,
if Mathematica allows Interval[{}] data, don't you have to write the
program, anyway?

>
> A drawback, relative to interval arithmetic, is that as a first-order
> approximation, in terms of error propagation, significance arithmetic
> breaks down at low precision where higher-order terms can cause the
> estimates to be off. I will add that, at that point, intervals are going
> to give results that are also not terribly useful.

An advocate of interval arithmetic  (and at least for the moment I will
take this position :)  )  would say that interval arithmetic guarantees
a valid answer.  That is, the answer is inside the interval.  Sometimes
the interval may be very wide, even infinitely wide.  But it contains 
the answer.  Not so for significance arithmetic.   While it may be
appropriately modest for the documentation for N[] to say that
N[expr,n] >>>attempts<<< to give a result ...   This is not really
what interval arithmetic does.  It guarantees...

>
> I'm not sure what are the refereed articles referred to above. I suspect
> they do not disagree in substantial ways with what I wrote though.  That
> is to say, error estimates may be too conservative, and at low precision
> results may not be useful.

There are a few references in the Wikipedia article.  There are a few
rants that you can find via Google.  I think the interaction of 
significance arithmetic and testing for equality / comparison in
Mathematica is potentially hazardous, in large part because it can do
bad things quite invisible to the user.  I do not know of a simple 
consistent way of fixing this.  While I haven't thought about this in a 
while, the last time I did, I found it necessary to keep backing out of
pieces of the Mathematica arithmetic design quite far. (like a 
retrenchment of significance arithmetic!)
>
> Fixed precision has its own advantages and disadvantages in terms of speed,
> error estimation, and the like. We certainly use it in places, even if
> significance arithmetic is the default behavior of bignum arithmetic in
> top-level Mathematic. For implementation purposes we use both modes.

Yes.
>
>
>>> Mathematica applied to real problems is pretty good here.
>>
>> Maybe, but is "pretty good"  the goal, and the occasional identified
>> errors be ignored?
>
> We do try to fix many bugs that are brought to our attention. We have a
> better track record in some areas than others. I have no reason to
> believe that numerics issues have received short shrift though.

I appreciate that you try to fix errors.  I appreciate that you engage 
in such discussions!
>
>
...
RJF

appendix, timing.

Timing[(z = 1.11111111111111111; Do [z = 2*z - z, {3600}]; z)]
takes 0.0156 seconds.  It gives the answer 0 * 10^1700,

Timing[(z = 1.111111111111; Do [z = 2*z - z, {3600}]; z)]
takesl 0.0156 seconds.  It gives the right answer, 1.11111..

Timing[(z = Interval[1]; Do [z = 2*z - z, {3600}]; z)]
takes 0.0625 seconds.   It gives the correct answer, Interval[{1,1}].

Slower by a factor of 4.  If intervals were economically
represented and efficiently manipulated, I expect that one could
get a factor of 4 back.











.


[toc] | [prev] | [next] | [standalone]


#14703 — Re: Applying Mathematica to practical problems

FromAndrzej Kozlowski <akozlowski@gmail.com>
Date2013-06-02 04:23 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<koehb6$2s3$1@smc.vnet.net>
In reply to#14471
On 1 Jun 2013, at 21:21, James Stein <mathgroup@stein.org> wrote:

>
>
> On Fri, May 31, 2013 at 12:37 AM, Andrzej Kozlowski <akozlowski@gmail.com> wrote:
> To my mind, it also should make very
> clear (to anyone who had any doubts) the complete irrelevance of most of
> the "criticism" of Mathematica that Richard Fateman has been posting for
> over 2 decades (not that I expect him to stop doing it or even modify it
> in anyway).
>
> To my mind, I always find Fateman's posts interesting and informative.
> I am glad he posts here, and that he persists despite comments such as yours.
> 

I do not deny that some of it could be interesting one, maybe twice to someone with poor memory. But I guess you have not been reading this forum for a very long time. Anyway, obviously nobody is trying to deny him the freedom to post here, especially that nowadays he seems to have lots of free time on his hands. Chacun a son gout.

Andrzej Kozlowski

[toc] | [prev] | [next] | [standalone]


#14708 — Re: Applying Mathematica to practical problems

FromJames Stein <mathgroup@stein.org>
Date2013-06-02 04:26 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<koehgu$2t5$1@smc.vnet.net>
In reply to#14471
On Fri, May 31, 2013 at 12:37 AM, Andrzej Kozlowski <akozlowski@gmail.com>wrote:

> To my mind, it also should make very

clear (to anyone who had any doubts) the complete irrelevance of most of
> the "criticism" of Mathematica that Richard Fateman has been posting for
> over 2 decades (not that I expect him to stop doing it or even modify it
> in anyway).


To my mind, I always find Fateman's posts interesting and informative.
I am glad he posts here, and that he persists despite comments such as
yours.

[toc] | [prev] | [next] | [standalone]


#14710 — Re: Applying Mathematica to practical problems

FromMark McClure <mcmcclur@unca.edu>
Date2013-06-02 04:23 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<koehbr$2s6$1@smc.vnet.net>
In reply to#14471
On Sat, Jun 1, 2013 at 6:27 AM, Richard Fateman <fateman@cs.berkeley.edu> wrote:
> On 5/31/2013 12:16 AM, Andrzej Kozlowski wrote:

>> Naive users of Mathematica practically never use arbitrary
>> precision arithmetic.
>
> Practically never, but occasionally?  Like slightly pregnant?

While I'd prefer to steer clear of the majority of this morass, I do
have one data point that might be useful.  In fact, I wrote the
following on sci.math.symbolic back in 2008:
>>>> I've been teaching undergraduate students to solve numerical
>>>> problems in calculus, differential equations, linear algebra, and
>>>> more recently numerical analysis using Mathematica since version
>>>> 1.2 and I don't believe I've ever seen the types of problems you
>>>> describe arise in that setting.

Well, that was five years ago and, as I've continued to teach with
Mathematica and even developed a course *on* Mathematica, I can now
expand on that a bit.  I have now seen a novice user develope some
serious confusion due to unexpected behavior surrounding significance
arithmetic - once.

Incidentally, the significance arithmetic was triggered, not by one of
RJF's standard tricks, but by a simple bug.  In versions 6 and 7 of
Mathematica, entering AiryA[0.0] yielded a non-machine number with
Precision $MachinePrecision, rather than a machine number with
Precsion MachinePrecision.  I was studying the structure of Julia sets
of Airy functions with an undergraduate research student and, as you
might imagine, it was, uhmm, inconvenient to iterate with
high-precision numbers.  Danny can verify the bug at least, as he
fixed it.

Finally, the main reason I find this debate so uninteresting is that
it is just simple observation that loads of people are doing good
numerical work with Mathematica.  We have better things to talk about.

Mark McClure

[toc] | [prev] | [next] | [standalone]


#14718 — Re: Applying Mathematica to practical problems

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-06-03 07:25 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kohgd6$c9n$1@smc.vnet.net>
In reply to#14710
On 6/1/2013 9:23 PM, Mark McClure wrote:
....

>
> Well, that was five years ago and, as I've continued to teach with
> Mathematica and even developed a course *on* Mathematica, I can now
> expand on that a bit.  I have now seen a novice user develope some
> serious confusion due to unexpected behavior surrounding significance
> arithmetic - once.

OK.  Introductory courses on Mathematica that don't even mention
extended floats and significance arithmetic are perhaps not exploring
a major part of the system that goes beyond what is available in
ordinary numeric systems (whose names may not be mentioned here).
That is, using Mathematica to execute machine-hardware arithmetic
only is fairly safe, but also unremarkable.
>
> Incidentally, the significance arithmetic was triggered, not by one of
> RJF's standard tricks, but by a simple bug.  In versions 6 and 7 of
> Mathematica, entering AiryA[0.0] yielded a non-machine number with
> Precision $MachinePrecision, rather than a machine number with
> Precsion MachinePrecision.

If you are able to entirely shield your users from a mistaken transition 
to extended precision, that might be good. However a serious
user, not under the protective umbrella of your introductory course,
might stumble into the pit.  I think we can hope that students in 
classes will have appropriate corrective influences surrounding them. It 
is the people trying to break new ground (maybe graduate students and 
above) who can get into mysterious difficulties.


> I was studying the structure of Julia sets
> of Airy functions with an undergraduate research student and, as you
> might imagine, it was, uhmm, inconvenient to iterate with
> high-precision numbers.  Danny can verify the bug at least, as he
> fixed it.

I can imagine.  However, how many Mathematica users would find it
puzzling?  How many people reading this note right now on mathgroup 
would find it puzzling?

>
> Finally, the main reason I find this debate so uninteresting is that
> it is just simple observation that loads of people are doing good
> numerical work with Mathematica.  We have better things to talk about.

Actually the "other side" of the debate is that it is hazardous
to do numerical work with Mathematica' non-machine floats.  And if
you are just using ordinary machine floats, the justification for
using Mathematica because somewhat less cogent.
>
> Mark McClure
>

[toc] | [prev] | [next] | [standalone]


#14720 — Re: Applying Mathematica to practical problems

FromJoe Gwinn <joegwinn@comcast.net>
Date2013-06-03 07:26 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kohgf3$ca4$1@smc.vnet.net>
In reply to#14710
In article <koehbr$2s6$1@smc.vnet.net>, Mark McClure
<mcmcclur@unca.edu> wrote:

> On Sat, Jun 1, 2013 at 6:27 AM, Richard Fateman <fateman@cs.berkeley.edu>
> wrote:
> > On 5/31/2013 12:16 AM, Andrzej Kozlowski wrote:
> 
> >> Naive users of Mathematica practically never use arbitrary
> >> precision arithmetic.
> >
> > Practically never, but occasionally?  Like slightly pregnant?
> 
> While I'd prefer to steer clear of the majority of this morass, I do
> have one data point that might be useful.  In fact, I wrote the
> following on sci.math.symbolic back in 2008:
> >>>> I've been teaching undergraduate students to solve numerical
> >>>> problems in calculus, differential equations, linear algebra, and
> >>>> more recently numerical analysis using Mathematica since version
> >>>> 1.2 and I don't believe I've ever seen the types of problems you
> >>>> describe arise in that setting.
> 
> Well, that was five years ago and, as I've continued to teach with
> Mathematica and even developed a course *on* Mathematica, I can now
> expand on that a bit.  I have now seen a novice user develope some
> serious confusion due to unexpected behavior surrounding significance
> arithmetic - once.
> 
> Incidentally, the significance arithmetic was triggered, not by one of
> RJF's standard tricks, but by a simple bug.  In versions 6 and 7 of
> Mathematica, entering AiryA[0.0] yielded a non-machine number with
> Precision $MachinePrecision, rather than a machine number with
> Precsion MachinePrecision.  I was studying the structure of Julia sets
> of Airy functions with an undergraduate research student and, as you
> might imagine, it was, uhmm, inconvenient to iterate with
> high-precision numbers.  Danny can verify the bug at least, as he
> fixed it.

I have to chime in here, with a story that well predates Mathematica:

In my first job, circa 1970, I learned Fortran, and was writing a
program to convert a tape written on a 16-bit machine to the 36-bit
format of the Univac 1108 mainframe.  I had endless trouble with the
Univac Field() function, which allowed access to defined subfields of a
36-bit word, the the bit level.  Field() could appear on either side of
the equals sign, and so was perfect for reformatting tape data.  I
struggled for a week, then asked my boss, who laughed and said that the
Field function was known not to work.  Oh.

I subsequently took a course on 1108 assembler language, and when I
returned the first program I wrote was an assembly-coded fortran
function that did the needed bit twiddling, the twiddling that Field()
couldn't do.

The point being that any large software entity will have errors, and
yet life goes on.

Joe Gwinn

[toc] | [prev] | [next] | [standalone]


#14714 — Re: Applying Mathematica to practical problems

FromWaclaw Kusnierczyk <waku@idi.ntnu.no>
Date2013-06-03 07:24 +0000
SubjectRe: Applying Mathematica to practical problems
Message-ID<kohgb7$c9d$1@smc.vnet.net>
In reply to#14471
Folks,

As allegedly Eleanor Roosevelt said, "Great minds discuss ideas; average 
minds discuss events; small minds discuss people."

Most of your points are very interesting, but it would be great to 
discuss Mathematica, not its users, whether delighted and disappointed.

Best,
vQ


On 06/02/2013 06:31 AM, James Stein wrote:
> On Fri, May 31, 2013 at 12:37 AM, Andrzej Kozlowski <akozlowski@gmail.com>wrote:
>
>> To my mind, it also should make very
> clear (to anyone who had any doubts) the complete irrelevance of most of
>> the "criticism" of Mathematica that Richard Fateman has been posting for
>> over 2 decades (not that I expect him to stop doing it or even modify it
>> in anyway).
>
> To my mind, I always find Fateman's posts interesting and informative.
> I am glad he posts here, and that he persists despite comments such as
> yours.
>
>

[toc] | [prev] | [next] | [standalone]


Page 4 of 5 — ← Prev page 1 2 3 [4] 5  Next page →

Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web