MathGroup Archive 2010

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

Search the Archive

Re: Branching on error messages?

  • To: mathgroup at
  • Subject: [mg108978] Re: Branching on error messages?
  • From: "Carl K. Woll" <carlw at>
  • Date: Thu, 8 Apr 2010 08:39:02 -0400 (EDT)
  • References: <>

Look up Check.

Carl Woll
Wolfram Research

On 4/8/2010 7:59 AM, Jack L Goldberg 1 wrote:
> Hi Folks,
> In a module I have written I call Reduce and in the most common case,
> Reduce does exactly what I want.  In some rarer cases, however, Reduce
> returns the error message
> Reduce::nsmet: ... (basically, Reduce doesn't know how to simplify
> transcendental equations.)
> Suppose in Line L6 of my module I have this code
> L6 = Reduce[L5, var, Reals];
> I want something like this instead,
> L6 = If[ Reduce[L5, var, Reals] generates no error message,
> Reduce[L5,var,Reals], Module[ ... ];
> So if there is an error message, we go to Module[...] which I hope
> corrects things by introducing numerical methods.
> An alternative is this: Define newReduce which acts like Reduce when
> no error message of the type Reduce::nsmet occurs and uses my
> numerical techniques otherwise.
> I am unsure how to code L6 or whether to explore defining my own newReduce?
> Any guidance is appreciated, as usual.
> Jack

  • Prev by Date: Re: convert txt to binary file
  • Next by Date: Re: convert txt to binary file
  • Previous by thread: Branching on error messages?
  • Next by thread: How to enter an integral in a formula and have mathematica *not*