to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
You may select the license of your choice.
Maxima src code
/* batch file = script for Maxima */
/* ---------------- definition of functions -------------------- */
/* boolean escape time */
bEscapeTime(x):=
block
(
[i:0],
while (abs(x)<ER) and (i<iMax) do
(x:x*x,
i:i+1),
if i=iMax
then return(1)
else return(0)
);
/* integer escape time */
iEscapeTime(x):=
block(
[i:0],
while (abs(x)<ER) and (i<iMax) do
(x:x*x,
i:i+1),
return(i)
);
/* log2(x)=log(x)/log(2)
input should be x>0 !!!!!!!
*/
log2(x):= float(log(x)/log(2));
/* real escape time */
rEscapeTime(x):=
block
(
[i:0],
while (abs(x)<ER) and (i<iMax) do
(x:x*x,
i:i+1),
if (i=iMax) then return(i) /* prevent log(0) error */
elseif (i=0) then return(0) /* prevent negative output */
else return(i-log2(log2(x)))
);
/* ------------------- global variables ------------------------------*/
xMin:0.5;
xMax:2.5; /* */
iMax:10;
ER:2.0;
/* ----------------------- drawing ------------------------------------*/
my_preamble: "set xzeroaxis; set ytics (0,1,2,3,4,5,'iMax' 10); set xtics (0,1,'ER' 2,3); set title 'Escape Time for X(n+1)=X(n)*X(n) for iMax=10 ER=2'";
plot2d([bEscapeTime,iEscapeTime,rEscapeTime],[x,xMin,xMax],[y,-1,iMax+1],[ylabel, "EscapeTime"],[gnuplot_preamble, my_preamble]);
Captions
Add a one-line explanation of what this file represents