ContentFrames and objects
Mathematical accuracyFor mathematical calculations beside basic arithmetics don't forget to set mathematical precission by
If you donīt do it, you will lose significant digits. Here is a calculation with normal precission for the energy of a proton depending on it's velocity. On the graphs below the same calculations with a Tcl script and a C program are shown. The output of the Tcl calculation (red) has an error (1%) which can't be used in computational calculations. The C program that makes one side of the calculations and also writes and starts execution of the Tcl side is available for UNIX. The program executes the Tcl script with a tclsh. For the creation of the following graph there was a shell script used. The script executes gcc for making the C program and gnuplot for plotting the graph. ![]() The problem in this calculation is the usage of the square root function sqrt (see following graph). ![]() Usage of multiple Tcl/Tk versionsIf more than one version of Tcl/Tk is used, some files have to be managed. For Tcl there are the following files for each version :
If there are only one version is used, there is no need for storing Tcl in the local/ path. The graphical toolkit Tk is located in the path of the X Window system. For Tk there are the following files used for each version :
To handle the different versions of Tcl/Tk I suggest to rename the files above in the following way :
For access to the highest or general used version, make symbolic links to this version. While renaming the files, don't forget to copy the changes into the tclConfig.sh and tkConfig.sh files. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||