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


Groups > comp.soft-sys.math.mathematica > #9747

Re: evaluating functions and displaying results numerically

From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: evaluating functions and displaying results numerically
Date 2012-04-22 10:07 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jn0l9t$4uk$1@smc.vnet.net> (permalink)
References <jmtdec$sjd$1@smc.vnet.net>

Show all headers | View raw


On 4/20/2012 11:35 PM, Eduardo Fontana wrote:
> Once in a while a face a problem with Mathematica in which I cannot
> get a straightforward numerical output.
> I have a function defined in mathematica, I try to evaluate the
> function with numerical arguments and mathematica returns a replica of
> my function with the same arguments. It must be something I set
> without noticing. I cannot get numerical results at all.
> In another instance, I have a summation of about 1000 terms defined as
> a function of 3 arguments. When I use numerical arguments, instead of
> Mathematica calculating a numerical result it generates a symbolic
> output with all 1000 terms. Even if a try something very simple such
> as
> In[1]: Sin[1]
> the output is
> Out[1]: Sin[1]
> Could anyone give me a clue on this?
> regards
>

thats becuase it defaults to keeping things in
symbolic form.

If you want numeric result, then you need to tell it. Either use

In[2]:= Sin[1.]
Out[2]= 0.841471

or use N on the result

In[3]:= N[Sin[1],$MachinePrecision]
Out[3]= 0.8414709848078965

--Nasser

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

evaluating functions and displaying results numerically Eduardo Fontana <prof.eduardofontana@gmail.com> - 2012-04-21 04:35 +0000
  Re: evaluating functions and displaying results numerically "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-04-22 10:10 +0000
  Re: evaluating functions and displaying results numerically "Nasser M. Abbasi" <nma@12000.org> - 2012-04-22 10:07 +0000
  Re: evaluating functions and displaying results numerically Eduardo Fontana <prof.eduardofontana@gmail.com> - 2012-04-24 09:30 +0000

csiph-web