[Date Index]
[Thread Index]
[Author Index]
Re: Baffling behavior of Factor[] in versions 5 and 6 --
*To*: mathgroup at smc.vnet.net
*Subject*: [mg82396] Re: [mg82375] Baffling behavior of Factor[] in versions 5 and 6 --
*From*: Daniel Lichtblau <danl at wolfram.com>
*Date*: Fri, 19 Oct 2007 05:00:09 -0400 (EDT)
*References*: <200710180905.FAA24131@smc.vnet.net>
sbonano at inp.demokritos.gr wrote:
> Hello,
>
> I have encountered the following strange behavior in applying Factor to
> expressions that are already factored:
>
> expr[n_]:=(1 + CC(t^2 - x^2 - y^2))^n(1 - CC(u^2 + v^2 + w^2))^n
>
> timeTest[n_]:= Transpose[{Factor[expr[n]]// Timing,
> Factor[expr[-n]]//Timing}][[1]]
>
>
> timeTest[3]
> {0. Second, 1.15 Second}
>
> timeTest[4]
> {0.01 Second, 14.64 Second}
>
> Factor takes an unacceptably long time when n is negative (try
> timeTest[5]!). This behavior did not exist in versions <5. I consider it a
> bug.
>
> The following modification of Factor behaves as one would expect
>
> myFactor[x_]:=If[Head[x] === Times, Times@@Factor[List@@x], Factor[x]]
>
> Shouldn't such a line be part of the definition of Factor, when no
> Extensions have been specified?
>
> S. Bonanos
> http://www.inp.demokritos.gr/~sbonano/
>
> PS The factors in expr are the conformal factors of two constant-curvature
> 3-dimensional spaces (coordinates {t,x,y} and {u,v,w} respectively). I
> discovered this bug when my RGTC program
> (http://www.inp.demokritos.gr/~sbonano/RGTC/) was unable to calculate the
> inverse of the 6-dimensional metric which is the direct sum of these two
> 3-d metrics -- it got stuck factoring expr[-6]!
Oops.
This was from an expansion of the denominator that was used even after
noticing things had blown up. Will be fixed.
Thanks for pointing out the problem and version history, and apologies
for the slowdown.
Daniel Lichtblau
Wolfram Research
Prev by Date:
**Re: GraphicsGrid**
Next by Date:
**Re: GraphicsGrid**
Previous by thread:
**Baffling behavior of Factor[] in versions 5 and 6 -- a bug?**
Next by thread:
**Fw: Re:align on equal signs with automatic equation numbering**
| |