Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How do I increase the precision of MATLAB?
Date: Sun, 11 Jan 2009 13:20:19 -0500
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <gkdd93$28h$1@fred.mathworks.com>
References: <gkb7mu$4r$1@fred.mathworks.com>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1231698019 2321 172.31.57.88 (11 Jan 2009 18:20:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 11 Jan 2009 18:20:19 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
In-Reply-To: <gkb7mu$4r$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:510848


Thiago wrote:

> z =
>      2.225167162095353e+003 -9.020383145678592e+002i
>>> exp( i*z )
> ans =
>                Inf +              Infi
> ----------------------------------------------------------------------------------------------
> 
> Yes, I know that exponentials grow fast, but I'd like to find an exact number.

Thaigo, you may have a perfectly valid reason for wanting to do this, and others have suggested strategies, and perhaps it's an interesting exercise.  But usually this sort of question is a sign of a naively implemented "textbook" formula that was never intended for real computations, and a sign that intermediate values are getting out of hand.  It's hard for me to imagine that a number whose magnitude is something like 10^300 times the number of atoms in the observable universe (source: Wikipedia) represents anything real and could really be a quantity of interest.  It seems much more likely that you are now going to turn around and divide it by a similarly large (and similarly imprecisely-computed) value.  I could be wrong.