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

• To: mathgroup at smc.vnet.net
• Subject: [mg92975] Re: [mg92968] Is there a simple way to transform 1.1 to 11/10?
• From: Murray Eisenberg <murray at math.umass.edu>
• Date: Wed, 22 Oct 2008 05:35:31 -0400 (EDT)
• Organization: Mathematics & Statistics, Univ. of Mass./Amherst
• References: <200810211024.GAA04964@smc.vnet.net>

```But Rationalize IS a correct solution:

fraction = Rationalize[1.1, 0];
10 fraction === 11               (* SameQ *)
True

That seems to be proof that the result of Rationalize is exactly 11/10,
with no issue of rounding or precision whatsoever.

Of course once you convert the result of Rationalize back to decimal,
you encounter the usual limitations involving precision as well as the
usual issue of decimal vs. binary.

Alain Cochard wrote:
> The obvious
>
>     In:= x=1.1`Infinity
>
> is not syntactically correct.
>
> I understand that SetPrecision[1.1,Infinity] does not work either:
>
>     In:= SetPrecision[1.1,Infinity]
>
>             2476979795053773
>     Out= ----------------
>             2251799813685248
>
>     In:= N[%,20]
>
>     Out= 1.1000000000000000888
>
> I searched the newsgroup and thought I had the solution with Rationalize:
>
>     In:= Rationalize[1.1,0]
>
>             11
>     Out= --
>             10
>
> But
>
>     In:= Rationalize[1.000000001,0]
>
>             999999918
>     Out= ---------
>             999999917
>
>     In:= N[%,20]
>
>     Out= 1.0000000010000000830
>
> So any simple way?
>
> Thanks,
> Alain
>

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

```

• Prev by Date: Re: Speeding up a list construction
• Next by Date: Re: partial Dividers?
• Previous by thread: Re: Is there a simple way to transform 1.1 to 11/10?
• Next by thread: Re: Is there a simple way to transform 1.1 to 11/10?
{"ft_lang_label":"__label__en","ft_lang_prob":0.68245935,"math_prob":0.637571,"size":1894,"snap":"2019-43-2019-47","text_gpt3_token_len":610,"char_repetition_ratio":0.12804233,"word_repetition_ratio":0.08754209,"special_character_ratio":0.4223865,"punctuation_ratio":0.19680852,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9574512,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-22T19:29:45Z\",\"WARC-Record-ID\":\"<urn:uuid:dbd3c618-0a30-4031-a4a8-f7092a4d440f>\",\"Content-Length\":\"45984\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:082f2d7d-5211-4af2-9e55-6830be6647f7>\",\"WARC-Concurrent-To\":\"<urn:uuid:805224fb-b2b0-41ec-a158-f68d52bbd1db>\",\"WARC-IP-Address\":\"140.177.205.73\",\"WARC-Target-URI\":\"http://forums.wolfram.com/mathgroup/archive/2008/Oct/msg00514.html\",\"WARC-Payload-Digest\":\"sha1:X7ZR7MPBUYJBWP2KBOZB4TNB7ZA3PNOT\",\"WARC-Block-Digest\":\"sha1:Y7QVH77OM76FP2GHWK46LOSECSI2RQOH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496671411.14_warc_CC-MAIN-20191122171140-20191122200140-00250.warc.gz\"}"}