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


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

Re: evaluating functions and displaying results numerically

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: evaluating functions and displaying results numerically
Date 2012-04-22 10:11 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jn0lfl$50c$1@smc.vnet.net> (permalink)
References <201204210433.AAA29272@smc.vnet.net>

Show all headers | View raw


If you give Mathematica an exact input, it will only provide an exact
output even if that requires maintaining the input form

x1 = Sin[1]

Sin[1]

Compare with what happens with an inexact input

x2 = Sin[1.]

0.841471

An exact result can be converted with N

x3 = Sin[1] // N

0.841471

x1 == x2 == x3

True

Some exact results are immediately available

Sin[Pi/4]

1/Sqrt[2]


Bob Hanlon


On Sat, Apr 21, 2012 at 12:33 AM, Eduardo Fontana
<prof.eduardofontana@gmail.com> 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
>

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


Thread

Re: evaluating functions and displaying results numerically Bob Hanlon <hanlonr357@gmail.com> - 2012-04-22 10:11 +0000

csiph-web