MathGroup Archive 2008

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

Search the Archive

Re: Re: Is there a simple way to transform 1.1 to 11/10

  • To: mathgroup at
  • Subject: [mg93137] Re: [mg93125] Re: Is there a simple way to transform 1.1 to 11/10
  • From: Andrzej Kozlowski <akoz at>
  • Date: Tue, 28 Oct 2008 04:54:18 -0500 (EST)
  • References: <> <> <> <> <> <> <> <gdug9p$jp0$> <>

On 27 Oct 2008, at 17:14, Alain Cochard wrote:

>> Is this entire discussion motivated by your desire to avoid pressing
>> keys on your keyboard?
> That's one way to put it.  I'd rather say that I like elegant
> solutions.  Anyway, transforming a lot of such numbers is error prone
> and way too time consuming, to the extent that it simply cannot be
> done.
> a.

If what you really want is an "key-stroke efficient" way to input  
fraction than probably you should think of a completely different  
approach. Forget about Mathematica's "decimals", which are actually  
approximate ("inexact") numbers, completely different entities from  
decimals in ordinary arithmetic, and define your own input. For  
example, you could define a function ff like this:

ff[n_Integer, a_Integer] := FromDigits[{IntegerDigits[a], n}]

You simply enter an integer which specifies how many digits there are  
before the decimal point and then type in your decimal fraction  
omitting the dot. So

  ff[1, 10000000000000001]

ff[2, 10000000000000001]

ff[0, 10000000000000001]

ff[-1, 10000000000000001]

seems to me more convenient than typing in strings.

Andrzej Kozlowski

  • Prev by Date: Re: Contourplot3d of a list of expressions
  • Next by Date: Re: Looking for Stop
  • Previous by thread: Re: Is there a simple way to transform 1.1 to 11/10
  • Next by thread: Contourplot3d of a list of expressions