The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Re: [mg4362] Re: c code generation
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Ross Moore and Penny Crittle

Posts: 6
Registered: 12/7/04
Re: [mg4362] Re: c code generation
Posted: Jul 19, 1996 2:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Mark Evans wrote:

>The whole point of using a tool like Mathematica is to avoid writing C

Absolutely wrong!

You always endeavour to use the best tool,
or the most convenient set of tools, for the job at hand.

If you have a good fast C program,
then that should be able to be used ``in conjunction with'' Mathematica.
Indeed Mathematica provides ways to do this.

Thus Mathematica can provide a nice `Front End' to the C code,
displaying the result `as if' Mathematica had done it itself.

This is especially convenient for creating complicated graphics
which require much computing to decide what to plot,
or what colour to set for a each pixel, say.
Many examples can be found in various books, and elsewhere.

> .... If you must do that, I recommend a standard reference like
>Numerical Recipies in C. In any event, Mathematica does not generate C
>code for you.

Nobody asks it to.
( Though doubtless it is flexible enough to do so,
if you really wanted to devise a program to do this. )

Mathematica lets you ignore much of the visual/interface aspects
of the code that you will find in this reference,
allowing your C code to concentrate on the numerics (almost) exclusively.

>What you can do -- and what is very helpful -- is to check your own C
>code against Mathematica output to verify its correctness.

But why the competitive connotations to this comment?

If I already have good C code, why rewrite it in Mathematica,
when all I need do is `link to it', from Mathematica.


Ross Moore

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.