Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2.glorb.com!postnews.google.com!g1g2000pra.googlegroups.com!not-for-mail
From: aralimaradsir@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: regarding increasing precision value
Date: Thu, 29 Jan 2009 21:01:35 -0800 (PST)
Organization: http://groups.google.com
Lines: 66
Message-ID: <2878105e-a9d3-45ce-8cab-37ac3234c1e9@g1g2000pra.googlegroups.com>
References: <18642ed7-fb80-4875-a7db-a79a15a12c4a@r37g2000prr.googlegroups.com> 
	<glmm6i$2on$1@fred.mathworks.com>
NNTP-Posting-Host: 210.212.197.162
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1233291695 14166 127.0.0.1 (30 Jan 2009 05:01:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 30 Jan 2009 05:01:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g1g2000pra.googlegroups.com; posting-host=210.212.197.162; 
	posting-account=n5XdswoAAABwvo0dMWxBsOKUpPSvJHxg
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 
	5.1),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:514883


On Jan 27, 3:04=A0pm, "Roger Stafford"
<ellieandrogerxy...@mindspring.com.invalid> wrote:
> aralimarad...@gmail.com wrote in message <18642ed7-fb80-4875-a7db-a79a15a=
12...@r37g2000prr.googlegroups.com>...
> > Hello friends, i have written a program below which can generate 64
> > bit double precision hex value but i require a value of more than 128
> > bits can anyone of you help me in this matter thank you
> > clc;
> > clear all;
> > format long
>
> > N=3D1000;
> > x=3D[.197];
> > Y=3D0;
> > y1=3D0;
> > for n=3D1:1:N
> > =A0 =A0Y=3D4.*x.*(1-x);
> > =A0 =A0y1=3Dy1+Y;
> > =A0 =A0x=3Dy1;
> > =A0 =A0y1=3D0;
>
> > =A0 end
> > disp (Y)
> > key=3Dnum2hex(Y)
>
> =A0 There are only 53 bits of precision in matlab's double format signifi=
cand, the other 11 bits being used for exponent and sign. =A0If you really =
need 128 bits you might consider the Symbolic Toolbox with decimal number p=
recision set to some very high level in an endeavor to achieve 128 bits acc=
uracy. =A0However you must realize that decimal precision is not precisely =
equivalent to binary accuracy. =A0You might make a single bit error in the =
128th bit even though decimal accuracy is set far above 128*log(10)/log(2) =
=3D 38 decimal place accuracy. =A0You should also realize that even if you =
had a machine using binary floating point numbers with 128 bit precision, y=
our algorithm would still be making rounding errors down at that 128-th pla=
ce in its multiplications. =A0Why do you feel the need of just 128 bit prec=
ision in particular, as opposed to some other value, higher or lower?
>
> =A0 Your code is puzzling. =A0The quantity y1 is always equal to zero whe=
n you do y1=3Dy1+Y, so you are just copying Y into y1 and then on into the =
next x. =A0Why are you doing things in this round-about way, as opposed to =
just
>
> =A0x =3D 4*x*(1-x);
>
> at each step?
>
> =A0 The iteration is interesting. =A0If you plot the x values as a functi=
on of the number of steps, it makes an almost random distribution of values=
 which seem to fill up the screen area in a rectangle in a nearly uniform m=
anner except of course in the vicinity of x =3D 0.75 where one would expect=
 an anomaly, since an exact x =3D 0.75 would stay constant. =A0Where did yo=
u encounter this peculiar iteration? =A0It looks like a good example of the=
 fractals in chaos theory.
>
> Roger Stafford- Hide quoted text -
>
> - Show quoted text -
sir,actually i am working on Advanced encryption standard algoritham
where it uses fixed key for encryption so by using logistic map
equation i want to generate that key.key size varies from 128bits,....
so on sir.wheather it is possibleto get that key length from my
progrmme what i have written sir ?.of course if i write like this
x=3D4*x*(1-x) then also it genrates the value.but i need the required
size of bits sir.can you please help in this matter sir ? thanking you