Re: Converting Rationals into Reals
- To: mathgroup at smc.vnet.net
- Subject: [mg62045] Re: Converting Rationals into Reals
- From: albert <awnl at arcor.de>
- Date: Thu, 10 Nov 2005 02:50:27 -0500 (EST)
- References: <dksdsr$ha8$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
kristoph wrote: > I would like to know how I can convert rationals into reals with four > digits. I know this sounds stange but I need the numbers for a diagram. > > If anyone knows how to covert a whole list of rationals into into four > digit reals I would be very happy. N[yourlist,4] will do what you want. Probably what you really want is to get formatted strings for your diagram, this can be done with: ToString[PaddedForm[#, {3, 4}]] & /@ N[yourlist] you can play around with the arguments and options of PaddedForm to achieve the exact output you want... albert