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


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

Re: evaluating functions and displaying results numerically

From "djmpark" <djmpark@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: evaluating functions and displaying results numerically
Date 2012-04-22 10:08 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jn0las$4v7$1@smc.vnet.net> (permalink)
References <13085423.12310.1334983918872.JavaMail.root@m06>

Show all headers | View raw


It's because Sin[1] is regarded by Mathematica as an exact expression.
Mathematica can often do manipulations with exact expressions and obtain
exact results. Mathematica does not convert then to approximate numbers
until you use N on them, or mix them with approximate numbers.

Sin[1] // N
0.841471 

And remember that the purpose of N is to convert exact numbers to
approximate numbers and not to format numbers. To format numbers for display
use NumberForm.


David Park
djmpark@comcast.net 
http://home.comcast.net/~djmpark/index.html 



From: Eduardo Fontana [mailto:prof.eduardofontana@gmail.com] 


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 "djmpark" <djmpark@comcast.net> - 2012-04-22 10:08 +0000

csiph-web