MathGroup Archive 2002

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

Search the Archive

Re: Bug in Solve?

  • To: mathgroup at
  • Subject: [mg36849] Re: [mg36834] Bug in Solve?
  • From: Daniel Lichtblau <danl at>
  • Date: Sun, 29 Sep 2002 02:55:11 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

David wrote:
> Hi,
> inside a program I need to solve this linear equation in terms of p1.
> However something odds happens. Sometimes the solution is computed and
> sometimes the result is empty [I mean no output...]. Is this a bug of the
> solve command or am I doing something wrong? The problem is robust to:
> changing name to the variables and other makeups..
> Thank you very much,
> David

That's the weirdest bug I've seen in weeks. As it happens, it's mine. At
least the inconsistent behavior, that is. I'll fix it, and maybe also
try to address the issue of how to handle approximate numbers in testing
subexpressions for zero.

I've excised your code and put in place a substantially smaller example
that I believe is responsible. The table will tend to give erratic

zz = (-1.*x^7*(-1. + p - 7.*x^6 + p*x^6 + 6.*x^7)*
  (7.000000000000002 - 7.000000000000002*x + 14.000000000000004*x^6 -
  14.000000000000004*x^7 + 7.000000000000002*x^12 -
  (p^2*(1. + 0.9*x^6)^2*(1. + x^6)^5);

Table [Developer`ClearCache[]; Developer`ZeroQ[zz], {10}]

One workaround would be to use exact input, say by preprocessing with

Daniel Lichtblau
Wolfram Research

  • References:
  • Prev by Date: Strange Behavior of Mathematica under Windows
  • Next by Date: Re: Mathematica 4.1 Config:Fonts
  • Previous by thread: Bug in Solve?
  • Next by thread: Re: Bug in Solve?