Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with FullSimplify in Version 5: Rationals are converted to Reals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45500] Re: [mg45482] Problem with FullSimplify in Version 5: Rationals are converted to Reals
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sat, 10 Jan 2004 16:43:22 -0500 (EST)
  • References: <200401100500.AAA02414@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 10 Jan 2004, at 05:00, oberfeld wrote:

> Dear list,
>
> while trying to solve an equation that could be solved without problems
> in MA 4.2, Solve[] does not find a solution in Ma 5.0.0.0.
>
> I found that the problem is due to FullSimplify[] in Version 5.
>
> In Version 4.2,
> Full Simplify[
>      Erf    [
>      (
>      -(Log[10000000000]/Log[10]) -
>      Log[10^(-12 + (20 +deltaL)/10)]/Log[10]
>      )/
>      (Sqrt[2]*Sqrt[0.25302502757884177 +
>      (0.6089140226261116 - 0.005294904544574884*
>          (20 + deltaL))2])
>          ]
>           ]
>
> yields
>
> Out:=-Erf[Log[10^(deltaL/10)]/
>      (Sqrt[1.012100110315367 + (-0.010653685371740707 +
>           0.00005607202827231952*deltaL)*deltaL]*Log[10])]
>
> In Version 5, I get
>
> Out:=0.5 - 0.25*Erf[(0. -
> 0.30709257318568767*Log[E^(0.2302585092994046*deltaL)])/
>       Sqrt[0.5060500551576835 + (-0.005326842685870354 +
> 0.00002803601413615976*deltaL)*
>          deltaL]] +
>    0.25*Erf[(0. + 
> 0.30709257318568767*Log[E^(0.2302585092994046*deltaL)])/
>       Sqrt[0.5060500551576835 + (-0.005326842685870354 +
> 0.00002803601413615976*deltaL)*
>          deltaL]]
>
> So, FullSimplify[] in Version 5 has obviously converted *all numbers* 
> to
> Reals, while in Version 4.2, Rationals are used where available!!
>
> As a consequence, Solve[] Version 5 can not find a solution to an
> equation in which the above term appears.
>
> QUESTION: do you know of a fix available for FullSimplify[] in Version 
> 5
> that corrects for this behaviour?
> Or are there any Options which can be used to 'reset' FullSimplify[] in
> Version 5 to the behavior of Version 4.2??
>
>
> Best wishes,
>
> Daniel Oberfeld-Twistel
>
> ----------------------------
> Daniel Oberfeld-Twistel
> Institute of Psychology
> Experimental Psychology
> University of Mainz
> Staudingerweg 9
> 55099 Mainz
> Germany
>
>
>
If you use Simplify rather than FullSimplify you will get the old 
behaviour. Of course this will work only if your problem does not 
really need FullSimplify. Even if it does, you might be abel to 
dispense with it by making use of the TransformationFunctions option in 
Simplify.

As for the reason why this happens: if you look at Trace you will see 
that Simplify and FullSimplify obtain exactly the same expression


Erf[(-(Log[10000000000]/Log[10]) - Log[10^((deltaL + 20)/10 - 
12)]/Log[10])/
    (Sqrt[2]*Sqrt[2*(0.6089140226261116 - 0.005294904544574884*(deltaL + 
20)) + 0.25302502757884177])]

but then FullSimplify performs one more step which turns out to be 
fatal in this case. Namely, if factors our  -1. to get:


-1.*Erf[(0.43429448190325176*Log[E^(0.2302585092994046*deltaL)])/
     Sqrt[2.518113782096139 - 0.021179618178299536*deltaL]]

This seemingly innocent factoring out of the inexact number -1. forces 
the conversion of all numeric quantities to exact numbers, which in 
this case has fatal consequents. This might perhaps be a bug.


Andrzej Kozlowski
Chiba, Japan
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: RE: Graphics / cosmetics
  • Next by Date: Re: Compile
  • Previous by thread: Problem with FullSimplify in Version 5: Rationals are converted to Reals
  • Next by thread: Re: Problem with FullSimplify in Version 5: Rationals are converted to Reals