MathGroup Archive 1999

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

Search the Archive

Re: Is it a bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17640] Re: Is it a bug?
  • From: "F. Mittermayr" <mitterma at linz.vai.co.at>
  • Date: Fri, 21 May 1999 03:37:33 -0400
  • Organization: IBM Global Services - Remote Access Mail & News Services
  • References: <37393190.0@webpc1.vai.co.at>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks to all who have told me that it is not a strange result.

But now look at the online-help under "Cases - Further Examples". You can
find the following lines:

This finds all elements in the list that are integers.
Cases[{.....}, _Integer]

And now we test it:

    x = Sqrt[I]-1/Sqrt[2](1+I);
    Cases[{x, x//FullSimplify},_Integer]
Out[]= {0}

It cannot be that a number becomes an integer by doing a "FullSimplify".
Shouldn't the text in the online-help be changed to the following:

This finds s o m e elements in the list that are integers and when you are
in doubt look at the FullForm!!

The statement "Cases[{...},_Integer]" is quite useless because often I want
to know if elements are integers but seldom I want to know if the FullForm
of an element is integer.

Why doesn't Mathematica do any calculation on the expression x =
Sqrt[I]-1/Sqrt[2](1+I); ??
If you have Cases[ { I I }, _Integer ] the expression is calculated to -1.
Is the expression to complicated ??

Regards
Franz Mittermayr


F. Mittermayr wrote in message <37393190.0 at webpc1.vai.co.at>...
>A = {1 + Sqrt[2] I , 1 + 2 * 3 I};
>Cases[A, _Complex]
>
>Out[1] = {1+6 I}
>
>Isn't it a strange result?
>
>
>
>




  • Prev by Date: Re: fourier transform and bug reporting
  • Next by Date: Re: Re: raw TCP/IP socket communication in mathematica
  • Previous by thread: Re: Is it a bug?
  • Next by thread: Re: Re: Is it a bug?