Re: Faulty feature of Factor?
- To: mathgroup at smc.vnet.net
- Subject: [mg25145] Re: Faulty feature of Factor?
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sun, 10 Sep 2000 21:25:39 -0400 (EDT)
- References: <8pfd6a$cs0@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jack,
Maybe with inexact coefficients, N[the leading coefficient] is extracted
Suggestion for work around:
{Factor[x - 0.1], Factor[ -4 I x^2 - x + .45]}
{1.*(-0.1 + 1.*x), (4. + 0.*I)*
(0.12917010694971984 + 0.22130847988008057*I - I*x)*
(0.22130847988008057 - 0.37917010694971987*I + x)}
% /. x_ /; FractionalPart[x] == 0 :> IntegerPart[x]
{-0.1 + x, 4*(0.12917010694971984 + 0.22130847988008057*
I - I*x)*(0.22130847988008057 - 0.37917010694971987*
I + x)}.
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Jack Goldberg" <jackgold at math.lsa.umich.edu> wrote in message
news:8pfd6a$cs0 at smc.vnet.net...
> Hi group,
>
> Guess what Mathematica returns when you ask for Factor[x-.1] ? Don't
peek;
> guess first.
>
> If this is a feature, please explain its usefulness.
>
> If this is a (pardon the b-word) bug, how can one get around it?
>
> The same difficulty arises in many other cases, but this seems to me to be
> the most egregious.
>
> Thanks everyone.
>
> Jack
>
>