This is a file from the Wikimedia Commons

File:Escape time computed with 3 methods.png

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Original file(1,072 × 621 pixels, file size: 20 KB, MIME type: image/png)

Summary

Description
English: Escape time computed with 3 methods
Polski: Czas ucieczki obliczony 3 metodami
Date
Source Own work
Author Adam majewski

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • 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.
GNU head 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.
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

Items portrayed in this file

depicts

5 January 2010

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current22:54, 5 January 2010Thumbnail for version as of 22:54, 5 January 20101,072 × 621 (20 KB)Soul windsurfer{{Information |Description={{en|1=Escape time coputed using 3 methods}} {{pl|1=Czas ucieczki obliczony 3 metodami}} |Source={{own}} |Author=Adam majewski |Date=2010-01-05 |Permission= |other_versions= }}

The following page uses this file: