MathGroup Archive 1995

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

Search the Archive

P:Re: FactorInteger Print Formatting

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg779] P:Re: [mg650] FactorInteger Print Formatting
  • From: Xah Y Lee <xyl10060 at fhda.edu>
  • Date: Tue, 18 Apr 1995 01:12:20 -0400

>Problem: How to write a function factorForm such that
> factorForm[FactorInteger[70200]] will print output as
> 2^3*3^3*5^2*13
>instead of
> {{2,3},{3,3},{5,2},{13,1}}

Levent Kitis and John M. Novak have 
give you solutions exactly the way 
you want them, but if all you need is legibility, how about

factorForm1[a:{{_Integer, _Integer}..}] := a /. {c_,d_}->HoldForm[c^d]

Xah Lee
 Quote of the day:
 Mathematics, when viewed from the right angle, can be as boring as you 
 could imagine.    --Mathematcian's lore

PS to all mathgroup readers: since the mma newsgroups started few days 
ago, the number of messages in mathgroup mailinglist doubled, and 
the contents starts to contain more opinion and less substance. I hope 
this group to be informative and organized. I suggest we classify our 
message contents before we post. my suggestions:

* Messages involving programming in mma 
  will start with the word PROGRAMMING:... or just P:...

* Message about using mma with it's kernal such as why mma can't do
  this integrating, or why mma act like this...will start with
  KERNEL:... or just K:...

* Messages involving a particular system such as problems in installing,
  why print doesnt work in Windows...etc will start with 
  FRONTEND:SUN, FRONTEND:MAC:..., or FRONTEND:NeXT...etc, or F:Mac...

* Messages that's not technical and do not fit the above categories will be
  OTHERS:...

Let's try to write our message as clear as possible. Formulate our 
questions and solutions into readible examples. Try not to inject any 
personal opinions (don't forget email). In short, before we write, assume 
that we are writing a text book to be read by thousands of mma users.

 Xah Lee     74631.731 at compuserve.com
 Mountain View, CA



  • Prev by Date: Re: FactorInteger Print Formatting
  • Next by Date: Extracting data points from Plot[]
  • Previous by thread: Re: - FFT and Mathematica
  • Next by thread: Extracting data points from Plot[]