MathGroup Archive 2005

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

Search the Archive

Re: Looking for Window Version of "Factorization.m" program

  • To: mathgroup at
  • Subject: [mg53514] Re: [mg53500] Looking for Window Version of "Factorization.m" program
  • From: DrBob <drbob at>
  • Date: Sat, 15 Jan 2005 01:44:14 -0500 (EST)
  • References: <>
  • Reply-to: drbob at
  • Sender: owner-wri-mathgroup at

I think it's a version 2.2 problem, not a Mac problem -- but anyway, I can send a version of the package without all the embedded font garbage... unless I accidentally deleted something important!

HOWEVER... you're getting all those error messages because the author apparently forgot to Unprotect a lot of things he needed to unprotect, including ComplexExpand, D, Delete, Cos, Sin, Sec, Csc, Tan, Cot, Makeboxes, et cetera. When you Unprotect and Protect all those things, things MAY begin to work.

HOWEVER... I doubt this is the way to go. Modifying built-ins slows everything down and risks getting into all sorts of trouble--unless the package is really well thought out--and maybe, given the missing Unprotections, it isn't. And besides, this is a very old message, so there's no telling how much of the code should change because of updates. The author may have a newer version somewhere, of course.

SO... could this do what you need?

Random[Integer, 100000]
Times @@ Power @@@ (% /. x_Integer -> HoldForm[x])


factorForm[i_Integer] := Times @@ Power @@@
  (FactorInteger@i /. x_Integer -> HoldForm[x])
Array[Random[Integer, 100000] &, {3, 4}]
TableForm[% /. x_Integer -> factorForm@x]


TableForm[Array[Random[Integer, 100000] &, {3, 2}]
       /. x_Integer -> x == factorForm@x]


TableForm@Array[# == factorForm@# &@Random[Integer, 100000] &, {3, 2}]


On Fri, 14 Jan 2005 08:55:02 -0500 (EST), Gilmar <gilmar.rodriguez at> wrote:

> I'm attempting to use the program "Factorization" available at:
> After copying the file "Factorization.m" into the directory:
> "C:\Program Files\Wolfram
> Research\Mathematica\5.1\AddOns\StandardPackages\NumberTheory"
> and calling the program via:
> <<NumberTheory`Factorization`
> Mathematica gives me a string of messages:
> "SetDelayed::Write : Tag  Cos in Cos[Pix_Factorization]
> is Protected".
> When I inspect the code in Factorization.m, I find that
> this program is built for the Macinstosh.  The author
> is no longer available at his e-mail address.
> Does anyone have a Windows version of this program?
> The program gives the prime decomposition of an integer
> in terms of powers of primes in the attractive form:
> Factorization[n] =(p1^a1)*(p2^a2)*...(pn^an)
> rather than the form given by "FactorInteger[n]"; namely,
> n ={{p1,a1},{p2,a2},...{pn,an}}.  Factorization[n] is also
> capable of producing a similar factorization for a Complex
> number.
> Thank you for your help!

DrBob at

  • Prev by Date: Re: [Admin] Moderated newsgroup forged posts
  • Next by Date: Colored Surface
  • Previous by thread: Looking for Window Version of "Factorization.m" program
  • Next by thread: Re: Looking for Window Version of "Factorization.m" program