Re: Simplifying polynomial and rounding problems

• To: mathgroup at smc.vnet.net
• Subject: [mg82851] Re: [mg82801] Simplifying polynomial and rounding problems
• From: "W. Craig Carter" <ccarter at mit.edu>
• Date: Thu, 1 Nov 2007 05:16:42 -0500 (EST)
• References: <200710311114.GAA22494@smc.vnet.net>

```I suggest that you take advantage of mathematica's ability
to do things exactly.

Rationalize[0.6721560269293043, 10^(-16)]
goes to 48760501/72543426.

Let the fractions remain in your factorization, and then if
you want a numerical result later, convert using
N[expr,NumberOfDigitsInPrecision]

Craig

On Wed, 31 Oct 2007, Isaac Martinez G. wrote:

> Date: Wed, 31 Oct 2007 06:14:15 -0500 (EST)
> From: Isaac Martinez G. <isaac.martinez at sbcglobal.net>
> To: mathgroup at smc.vnet.net
> Subject: [mg82801] Simplifying polynomial and rounding problems
>
> I am having problems with Mathematica precision/accuracy (or whatever you call it)
> I have the following expression
> A1=1.0000000000000002-0.6721560269293043s^2 - 0.32784397307069685s^4
> Now when I factorize:
> There are a couple of (-1+s)(1+s) factors or something very close to 1. Like 0.999999999999999997+s
> I want to elliminate those factors but due to the fact that it is not really 1, but 0.999999999999999997 Mathematica does not always cancel those factors neither with A1/((-1.+s)(1.+s)) nor A1/((-1+s)(1+s)).
> How can I avoid the problem of 1 versus 0.999999999999999997
> I am doing directional coupler design and I do need to elliminate some factors from an ABCD matrix where 5 to 6 decimal places is just fine in the last step.
> I have tried
> Factor[]
> Cancel[]
> FactorList[]
> but I always have this problem and it screws up my program.
> Sorry, I am  new to Mathematica
>
> I am new to Mathematica.....
>
>

```

• Prev by Date: Re: Problem with element and Maximize
• Next by Date: Re: How to construct a vector whose elements are also vectors?
• Previous by thread: Re: Re: Problem with element and Maximize
• Next by thread: Re: Simplifying polynomial and rounding problems