Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3812

Re: Solve never calls Equal?

From Daniel Lichtblau <danl@wolfram.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Solve never calls Equal?
Date 2011-07-19 11:01 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j03o77$a76$1@smc.vnet.net> (permalink)
References (2 earlier) <201107160941.FAA08237@smc.vnet.net> <7BBB2BCC-0234-4BDA-A129-3270EBA623CE@mimuw.edu.pl> <ivuc93$gth$1@smc.vnet.net> <4E2377E3.2010606@cs.berkeley.edu> <201107181013.GAA26896@smc.vnet.net>

Show all headers | View raw


On 07/18/2011 05:13 AM, Andrzej Kozlowski wrote:
>>
>>
>> I think it is hard to claim that these test could be done only with
> Significance arithmetic.  However, DanL has indicated that tracing Equal
> may not be effective if the system programs utilize some internal call
> to a system entry into PossibleZeroQ.  The point remains that
>> redefining Equal as done here does not seem to adversely affect
> NSolve, Reduce, NIntegrate. Nor does it seem to take much time.
>>
>> RJF
>
> As usual, your reply avoids the only important thing, which is the
> example that I posted.
>
> Reduce[Exp[x] - x == 1/2&&   Abs[x]<   1, x]
>
>
> Try it again yourself, with Equal replaced by SameQ and without. What do
> you see?
> [...]
> Hint: this equation is being solved *exactly* and yet your "improvement"
> breaks it.
> [...]

I think a minor variant of the Equal-->SameQ might be safer. One needs 
to restrict to cases where both arguments have finite precision.

Unprotect[Equal];
Equal[a_?NumericQ,
    b_?NumericQ] /; (Precision[a] =!= Infinity &&
     Precision[b] =!= Infinity) := SameQ[a, b]

With this version the Reduce example will work. Not sure what will be 
the effect in gerneral though.

Daniel Lichtblau
Wolfram Research

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Numerical accuracy/precision - this is a bug or a feature? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-15 09:07 +0000
  Solve never calls Equal? Richard Fateman <fateman@cs.berkeley.edu> - 2011-07-16 09:42 +0000
  Re: Solve never calls Equal? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-17 10:08 +0000
  Re: Solve never calls Equal? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-17 10:06 +0000
  Re: Solve never calls Equal? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-17 10:07 +0000
    Re: Solve never calls Equal? Richard Fateman <fateman@cs.berkeley.edu> - 2011-07-18 10:15 +0000
    Re: Solve never calls Equal? Richard Fateman <fateman@cs.berkeley.edu> - 2011-07-18 10:17 +0000
    Re: Solve never calls Equal? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-18 10:16 +0000
      Re: Solve never calls Equal? Richard Fateman <fateman@cs.berkeley.edu> - 2011-07-19 10:55 +0000
    Re: Solve never calls Equal? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-19 10:56 +0000
    Re: Solve never calls Equal? Richard Fateman <fateman@eecs.berkeley.edu> - 2011-07-19 11:00 +0000
    Re: Solve never calls Equal? Daniel Lichtblau <danl@wolfram.com> - 2011-07-19 11:01 +0000
  Re: Solve never calls Equal? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-17 10:08 +0000
  Re: Solve never calls Equal? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-07-18 10:13 +0000

csiph-web