|
[Date Index]
[Thread Index]
[Author Index]
Re: Turning on numerical computation
- To: mathgroup at smc.vnet.net
- Subject: [mg63064] Re: Turning on numerical computation
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Tue, 13 Dec 2005 03:40:45 -0500 (EST)
- References: <dmuice$mlr$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
New Guy wrote:
> Mathematica outputs answers in symbolic form as the exact answer.
>
> I can force numeric output by N or using a decimal.
>
> Can I make numeric answers the default until I want to go back to
> symbolic. In other words, can I turn numeric on and off as my default
> output?
>
> Thank you.
>
Hello,
As two people have already pointed out, you CAN use $Post to change the
default behaviour of Mathematica. However, I wonder if this is really
wise - particularly if, as your name suggests - you are fairly new to
Mathematica.
Setting $Post=N will do many things - including converting integers to
reals, and spoiling any algebraic calculations that you do (unless you
like polynomials with fractional coefficients represented as real
numbers!). You could make a more complicated assignment to $Post and
avoid some of these problems, but even so, the point is, everyone learns
Mathematica by using it, and you will learn the 'wrong' system.
In any particular situation there is usually a better alternative. Say
you are doing a lot of calculations with Log with integer values - these
don't usually evaluate because the result is not exact. However, you can
always define your own Log function to get round that problem:
realLog[x_]:=N[Log[x]]
David Bailey
http://www.dbaileyconsultancy.co.uk
Prev by Date:
Re: The right context to declare a symbol
Next by Date:
Why is y a local variable here?
Previous by thread:
Re: Turning on numerical computation
Next by thread:
Convert to hypergeometric function
|