This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Aside from your courtesy, your wiki MONIKER and date as a signature and minimal good faith of any internet post are the rules of this TCL-WIKI. Its very hard to reply reasonably without some background of the correspondent on his WIKI bio page. Thanks, gold 12DEC2018

- Attributes
- Introduction and Greetings
- Revamped Projects under Nikit, actions post 1Dec2018
- Projects under old wiki
- Projects to be updated
- Use of Global Variables in TCL GUIS
- Broken images
- large number values from sumerian,babylon,cuneiform math from clay tablets
- kilometers,degrees etc are modern equivalents
- Special solar/lunar octagon table
- First Example
- Table of Sumerian Ship Coefficients etc.
- Sumerian coefficients at the trades
- Pseudocode and Equations
- Table 1 , UrIII Prices
- Table 2 , OB Prices
- Table 3 , Price and Exchange ratios
- Table 4 , Old babylonian coefficients , comparison metal density
- Testcases Section
- Schedule for the Gades brick piles, many assumptions
- Schedule for Gaes bricks, tentative and many assumptions
- Is Thales theorem easier to use ?
- Gaming solutions or false positions with eTCL calculator

- Following one liners need mathops and math libraries
- Pseudocode Section
- Appendix Code
- appendix TCL programs and scripts
- Pushbutton Operation
- console program for Newton's Method
- Version 2 Diagonal calculator with extended and modified Plimpton 322 dataset
- comma delimited spreadsheet of extended Plimpton 322
- comma delimited spreadsheet of TEST prime numbers <
>amp; Plimpton 322 - Draft and very unofficial Mission Statement
- Download
- Hosting
- References:
- Alternate subroutines under test
- Many Place Reciprocals have Similarity to Modern Logarithm steps
- Babylonian Multiplication Formulas
- Table 1: Tables
- Table 2: Probabilities in Texas Holdem
- References:
- Alternate Solution using Modern Terms
- Double Portion Inheritance from the Bible
- Trial Solution for Real Estate
- Formula Similar to Interest Problems
- Calculator Accuracy
- Conclusions
- Starter Wiki Page : Boilerplate edition
- Wiki Stater Page Above
- End Wiki Stater Page

- Hidden Comments Section

gold Hi, I'm an old Fortran programmer trying to retread. I actually served time on the IBM punch card machines. I collect old Fortran books as a hobby. A lot of guys leaving work would give me their old Fortran books. On active, i had a large Fortran collection, almost a library. Also I programmed a lot in Javascript. Mostly i work on TCL now because i am visually oriented and think that a gui can save a lot of time in engineering calculations.

gold 3Dec2018, pages i thought were gone are showing up, largely under Category Numerical Analysis. as s_ noted, i did not use underscores much in early titles. I must learn on to use the goose search engine better. thanks. i have some updates anyway. I will add self_help button. Revamped TCL programs will be listed as V2. The bulk of these files are being stored locally as OpenOffice file.odt files or rich field text files file.rtf, mainly for spellcheck and larger stored fonts for bad eyes. My understanding is that backup on older files are available through the Internet Archive. Like the example of the Wikipedia, i think that an automated PDF dump of the individual TCL/WIKI pages would be a useful storage item, especially if the PDF included a rack of end attachment of the original unix/ascii text data for the unique WIKI table format and the TCL programs. I am scared i will lose formatted tables copy and I have a bunch.

- Biological Mutation Rate and TCL demo example calculator, numerical analysis
- Babylonian_Brothers_Inheritance_Problems_Algorithm and TCL 8.6 demo example calculator, numerical analysis
- Texas Hold Dem Poker Cards, Game, and Probability, numerical analyis
- Ideal Rocket Performance and TCL demo example calculator, numerical analysis
- Old Babylonian Interest Rates and eTCL demo example calculator
- Simple Pulley Forces Tension and eTCL demo example calculator, numerical analysis
- Human Language Root Words & Lexicostatistics Calculator and eTCL Slot Calculator Demo Example, numerical analysis
- Random Walk Equation Slot Calculator Example
- Electronic Failure Rate FITS and eTCL Slot Calculator Demo Example
- Brahmagupta Area of Cyclic Quadrilateral and eTCL demo example calculator
- Babylonian Quarter Square Multiplication procedure algorithm and TCL 8.6 demo example calculator, numerical analysis
- General Tianji' Horse Race Strategy from China and eTCL demo example calculator, numerical analysis
- Sumerian Seeding Rates and eTCL Slot Calculator Demo Example , numerical analysis
- Stonehenge Circle Accuracy Slot Calculator Example
- Rectangular Radio Antenna and etcl Slot Calculator Demo Example

>>>>>> if can't find or link, look older files under category numerical analysis <<<<<<<< >>>>>> for some unk reason, wiki search engine does not push these files to top <<<<<<<<

- Sumerian Pottery Vessel Mass Calculator
- Babylonian Quarter Square Multiplication procedure algorithm and TCL 8.6 demo example calculator, numerical analysis
- Babylonian Cubic Equation Problem and eTCL demo example calculator, numerical analysis
- Babylonian Square rule for Trapezoid Area and eTCL demo example calculator, numerical analysis
- Characteristic lengths and between Biophoton sensors in the Ultraviolet Spectrum and TCL Slot Calculator, numerical analysis
- Stratographic Years Slot Calculator Example, Age of Earth
- Trig Procedures for degree measures as sind, cosd, tand,etc
- Indian Math Bhaskara (1) Sine formula and extensions, history of math
- Kahan compensated summation algorithm and Neumaier variant summation algorithm, numerical analysis
- Game kingdom of strategy
- Babylonian trailing edge algorithm and reverse sequence algorithm for reciprocals, eTCL demo example calculator, numerical analysis
- Sumerian Counting Boards, multiplication operation placement strategy, and eTCL demo example, numerical analysis
- Babylonian Combined Work Norm Algorithm and eTCL Slot Calculator Demo Example, numerical analysis
- Weighted Decision and example eTCL demo calculator, numerical analysis
- Division into Parts by Multiple Ratios and eTCL demo example calculator, numerical analysis
- Combined Availability and example eTCL demo calculator, numerical analysis
- Chinese Horse Race Problems from Suanshu, DFP, and example eTCL demo calculator, numerical analysis
- Ancient Egyptian Double False Position Algorithm, and example eTCL demo calculator, numerical analysis
- Babylonian Multiplicatiion Algorithm and example demo eTCL calculator, numerical analysis
- Babylonian Weight Riddle Problems and eTCL demo example calculator, numerical analysis
- Babylonian Babylonian Irregular Reciprocal Algorithm and eTCL demo example calculator, numerical analysis
- Babylonian Field Expansion Procedure Algorithm and example demo eTCL calculator, numerical analysis
- Babylonian Trapezoid Bisection Algorithm and eTCL demo example calculator, numerical analysis
- Babylonian False Position Algorithm and eTCL demo example calculator, numerical analysis
- Babylonian Combined Market Rates and eTCL demo example calculator, numerical analysis
- Babylonian Cubic Equation Problem and eTCL demo example calculator, numerical analysis
- Sumerian Base 60 conversion and eTCL demo example calculator, numerical analysis
- Aryabhat Sum of Squares and Cubes and eTCL demo example calculator, numerical analysis
- Sumerian Approximate Area Quadrilateral and eTCL Slot Calculator Demo Example , numerical analysis
- Capsule Surface Area & Volume and eTCL demo example calculator
- Babylonian Number Series and eTCL demo example calculator
- Brahmagupta Area of Cyclic Quadrilateral and eTCL demo example calculator
- Gauss Approximate Number of Primes and eTCL demo example calculator
- Old Babylonian Interest Rates and eTCL demo example calculator
- Twin Lead Folded Dipole Antenna and example demo eTCL calculator
- Refrigerator_Pinyin_Poetry
- Random Poetry Chalkboard
- Oneliner's Pie in the Sky
- Mahjong_Style_Deletion
- Example Linear Interpolation Calculator
- Fuel Cost Estimate Log Slot Calculator Example
- 2010-08-17 19:03:29 Seaching for Babylonian Triplets Slot Calculator Example
- 2010-08-17 15:24:36 Biruni Estimate of Earth Diameter Slot Calculator eample
- 2010-08-16 15:20:57 Fuel Cost Estimate Log Slot Calculator Example
- 2010-08-11 23:43:40 Stratographic Years Slot Calculator Example, Age of Earth
- 2010-08-01 21:11:58 Binomial Probability Slot Calculator Example
- 2010-06-27 21:33:56 Slot_Calculator_Demo
- Chinese Fortune Casting Example Demo
- 2010-08-16 20:04:34 Chinese Sun Stick Accuracy for Console Example
- 2010-08-01 01:15:15 Chinese Iching Hexagrams on Chou Bronzes : TCL Example
- 2010-07-29 01:12:32 Chinese Iching Random Weather Predictions
- 2010-07-18 01:53:25 Chinese Xiangqi Chessboard
- Iching_Fortunes
- application_runner_&_wrapper
- Testing Normality of Pi, Console Example
- horoscope pie plotter
- Stonehenge Circle Accuracy Slot Calculator Example
- Call Procedure Like Fortran Example
- Stonehenge Circle Accuracy Slot Calculator Example
- Drake Intelligent Life Equation Slot Calculator Example
- Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator
- Piece wise Profits and eTCL Slot Calculator Demo Example
- Drake Intelligent Life Equation Slot Calculator Example
- Stonehenge Circle Accuracy Slot Calculator Example
- Stonehenge Circle Accuracy Slot Calculator Example
- Babylonian Sexagesimal Notation for Math on Clay Tablets in Console Example
- Call Procedure Like Fortran Example
- Canvas Object Movement Example https://wiki.tcl-lang.org/26626
- Drake Intelligent Life Equation Slot Calculator Example
- Ellipse Properties Slot Calculator Example
- Sea Island Height Slot Calculator Example
- Captioning Photo Image under Pixane Example
- Timing Photo Image Loading under Pixane
- Poker Probability and Calculator Demo Example
- Canvas Object Movement Example
- Generic Calculator Namespace Package Example
- Sumerian Circular Segment Coefficients and Calculator Demo Example
- Tonnage of Ancient Sumerian Ships and Slot Calculator Demo Example
- Heat Engine Combustion and Calculator Demo Example
- Rectangular Radio Antenna and etcl Slot Calculator Demo Example
- Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator
- Sumerian Construction Rates and eTCL Slot Calculator Demo Example
- Piece wise Profits and eTCL Slot Calculator Demo Example
- Sumerian Coefficients in the Pottery Factory and Calculator Demo Example
- Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator
- Sumerian Coefficients at the Weavers Factory and eTCL Slot Calculator Demo Example
- Sumerian Coefficients at the Bitumen Works and eTCL Slot Calculator Demo Example edit
- Sumerian Beveled Bowl Volume and eTCL Slot Calculator Demo Example
- Sumerian Population Density and eTCL Slot Calculator Demo Example
- Babylonian Sexagesimal Notation for Math on Clay Tablets in Console Example
- Easy Eye Calculator and eTCL Slot Calculator Demo Example, Numerical Analysis
- Piece wise Profits and eTCL Slot Calculator Demo Example
- Paper & Felt Rolls and eTCL Slot Calculator Demo Example
- Human Language Root Words & Lexicostatistics Calculator and eTCL Slot Calculator Demo Example, numerical analysis
- Sumerian Workday Time & Account Calculator and eTCL Slot Calculator Demo Example, numerical analysis
- contribution to Counting Elements in a List
- contribution to A Program That Learns
- contribution to Simple Canvas Demo
- contribution to lremove
- added many pictures to other pages
- added pix to A fancier little calculator
- added pix to 3 Triangles
- Sumerian Sheep and Herd Animal Calculator and eTCL Slot Calculator Demo Example, numerical analysis
- Probability Exponential Density Calculator and eTCL Slot Calculator Demo Example, numerical analysis
- Electronic Failure Rate FITS and eTCL Slot Calculator Demo Example
- Sumerian Seeding Rates and eTCL Slot Calculator Demo Example , numerical analysis
- Sumerian Porters Pay Formula and eTCL Slot Calculator Demo Example, numerical analysis
- One Dimension Heat Flow Model and eTCL Slot Calculator Demo Example, numerical analysis
- Sumerian Surveyor Area Formula and eTCL Slot Calculator Demo Example, numerical analysis

- Babylonian Sexagesimal Notation for Math on Clay Tablets in Console Example
- Binomial Probability Slot Calculator Example
- Call Procedure Like Fortran Example
- canvas Object Movement Example
- Captioning Photo Image under Pixane Example
- Chinese Fortune Casting Example Demo
- Chinese Iching Hexagrams on Chou Bronzes : TCL Example
- Chinese Sun Stick Accuracy for Console Example
- Command Line Calculator in Namespace Package Example
- Crater Production Power Law Slot Calculator Example
- Drake Intelligent Life Equation Slot Calculator Example
- Ellipse Properties Slot Calculator Example
- Estimating Mountain Height Using Look Angles, Etcl Console Example
- Example Linear Interpolation Calculator
- Finding Seked Angles of Ancient Egypt, Console Example
- Fuel Cost Estimate Log Slot Calculator Example
- Generic Calculator Namespace Package Example
- Heat Engine Combustion and Calculator Demo Example
- Piece wise Profits and eTCL Slot Calculator Demo Example
- Poker Probability and Calculator Demo Example
- Random Walk Equation Slot Calculator Example
- Rectangular Radio Antenna and etcl Slot Calculator Demo Example
- Sanskrit Number Words Handling in Formulas and Demo Calculator Example
- Sea Island Height Slot Calculator Example
- Seaching for Babylonian Triplets Slot Calculator Example
- Simple Reliability Slot Calculator Example
- Stonehenge Circle Accuracy Slot Calculator Example
- Stratographic Years Slot Calculator Example, Age of Earth
- Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator
- Sumerian Beveled Bowl Volume and eTCL Slot Calculator Demo Example
- Sumerian Circular Segment Coefficients and Calculator Demo Example
- Sumerian Coefficients at the Bitumen Works and eTCL Slot Calculator Demo Example edit
- Sumerian Coefficients at the Weavers Factory and eTCL Slot Calculator Demo Example
- Sumerian Coefficients in the Pottery Factory and Calculator Demo Example
- Sumerian Construction Rates and eTCL Slot Calculator Demo Example
- Sumerian Population Density and eTCL Slot Calculator Demo Example
- Testing Normality of Pi, Console Example
- Tonnage of Ancient Sumerian Ships and Slot Calculator Demo Example
- Sumerian Bronze & Alloy Calculator with demo examples eTCL numerical analysis
- Population Density Rectangular City Calculator and eTCL Slot Calculator Demo Example
- Over-21 Game Shell and eTCL Slot Calculator Demo Example , numerical analysis
- Sales Optimal Lot Order Size and eTCL Slot Calculator Demo Example
- Over-21 Game Shell and eTCL Slot Calculator Demo Example , numerical analysis
- Sales Optimal Lot Order Size and eTCL Slot Calculator Demo Example
- Spare Parts from Normal Distribution and eTCL Slot Calculator Demo Example , numerical analysis
- Sumerian Beer Ingredients and eTCL Slot Calculator Demo Example , numerical analysis
- Sumerian Coefficients at the Dog Keepers and eTCL Slot Calculator Demo Example , numerical analysis
- Timing Photo Image Loading under Pixane
- Babylonian Shadow Length & Angles and eTCL Slot Calculator Demo Example, numerical analysis
- Sumerian Surveyor Area Formula and eTCL Slot Calculator Demo Example, numerical analysis

test below

Babylonian Sexagesimal Notation for Math on Clay Tablets in Console Example Binomial Probability Slot Calculator Example Biruni Estimate of Earth Diameter Slot Calculator eample Chinese Fortune Casting Example Demo Chinese Sun Stick Accuracy for Console Example Command Line Calculator in Namespace Package Example Crater Production Power Law Slot Calculator Example Drake Intelligent Life Equation Slot Calculator Example Easy Eye Calculator and eTCL Slot Calculator Demo Example, Numerical Analysis Ellipse Properties Slot Calculator Example Fuel Cost Estimate Log Slot Calculator Example Generic Calculator Namespace Package Example Heat Engine Combustion and Calculator Demo Example Human Language Root Words & Lexicostatistics Calculator and eTCL Slot Calculator Demo Example, numerical analysis Mahjong_Style_Deletion Oil Molecule Length Calculator and eTCL Slot Calculator Demo Example, numerical analysis Oneliner's Pie in the Sky Paper & Felt Rolls and eTCL Slot Calculator Demo Example Penny Packing Calculator and eTCL Slot Calculator Demo Example, numerical analysis Piece wise Profits and eTCL Slot Calculator Demo Example Planet Mass Calculator and eTCL Slot Calculator Demo Example, numerical analysis Poker Probability and Calculator Demo Example Random Walk Equation Slot Calculator Example Rectangular Radio Antenna and etcl Slot Calculator Demo Example Sanskrit Number Words Handling in Formulas and Demo Calculator Example Sea Island Height Slot Calculator Example Seaching for Babylonian Triplets Slot Calculator Example Simple Reliability Slot Calculator Example Slot_Calculator_Demo Stonehenge Circle Accuracy Slot Calculator Example Stratographic Years Slot Calculator Example, Age of Earth Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator Sumerian Beveled Bowl Volume and eTCL Slot Calculator Demo Example Sumerian Circular Segment Coefficients and Calculator Demo Example Sumerian Coefficients at the Bitumen Works and eTCL Slot Calculator Demo Example edit Sumerian Coefficients at the Weavers Factory and eTCL Slot Calculator Demo Example Sumerian Coefficients in the Pottery Factory and Calculator Demo Example Sumerian Construction Rates and eTCL Slot Calculator Demo Example Sumerian Paint & Bitumen Coating and eTCL Slot Calculator Demo Example Sumerian Population Density and eTCL Slot Calculator Demo Example Tonnage of Ancient Sumerian Ships and Slot Calculator Demo Example

Sumerian Pottery Vessel Mass Calculator, can not find in new wiki system Babylonian Square rule for Trapezoid Area and eTCL demo example calculator, numerical analysis Indian Math Bhaskara (1) Sine formula and extensions, history of math Kahan compensated summation algorithm and Neumaier variant summation algorithm, numerical analysis Sumerian Counting Boards, multiplication operation placement strategy, and eTCL demo example, numerical analysis Babylonian Combined Work Norm Algorithm and eTCL Slot Calculator Demo Example, numerical analysis Stonehenge Circle Accuracy Slot Calculator Example Drake Intelligent Life Equation Slot Calculator Example Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator Piece wise Profits and eTCL Slot Calculator Demo Example Sumerian Sheep and Herd Animal Calculator and eTCL Slot Calculator Demo Example, numerical analysis Electronic Failure Rate FITS and eTCL Slot Calculator Demo Example Sumerian Seeding Rates and eTCL Slot Calculator Demo Example , numerical analysis Command Line Calculator in Namespace Package Example Example Linear Interpolation Calculator Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator Sumerian Beveled Bowl Volume and eTCL Slot Calculator Demo Example Population Density Rectangular City Calculator and eTCL Slot Calculator Demo Example Sales Optimal Lot Order Size and eTCL Slot Calculator Demo Example Over-21 Game Shell and eTCL Slot Calculator Demo Example , numerical analysis Sumerian Beer Ingredients and eTCL Slot Calculator Demo Example , numerical analysis Easy Eye Calculator and eTCL Slot Calculator Demo Example, Numerical Analysis Paper & Felt Rolls and eTCL Slot Calculator Demo Example Human Language Root Words & Lexicostatistics Calculator and eTCL Slot Calculator Demo Example, numerical analysis Sumerian Workday Time & Account Calculator and eTCL Slot Calculator Demo Example, numerical analysis Old Babylonian Interest Rates and eTCL demo example calculator Capsule Surface Area & Volume and eTCL demo example calculator Babylonian Square rule for Trapezoid Area and eTCL demo example calculator, numerical analysis Sumerian Coefficients at the Weavers Factory and eTCL Slot Calculator Demo Example Sumerian Population Density and eTCL Slot Calculator Demo Example

gold 12Dec2018. Global variables, regular expressions, and namespaces are considered advanced features of the Tool Control Language (TCL), according to Brent Welch in Practical Programming in TCL and TK. If global variables are an advanced feature of TCL, as indexed and taught after the beginner TCL topics in most TCL textbooks, then reasonably the use of global variables should be explored and discussed on the wiki. After a number of searches on the wiki and reference books, the topics of regular expressions and namespaces are adequately explored on the wiki and available textbooks. In opinion, the use of global variables in TCL programs should not be restricted to a narrow viewpoint, and the use of global variables could be a very rich vein of interest for the advanced student of programming. As an engineer with 35 years experience in Fortran, Basic, Javascript, and other computer languages, the author is familiar with self-appointed gatekeepers and the other anonymous ad hominem methods of NDH. NDH means “not done here”, “not done here in our shop”, or “not done here in my programming style”. Global variables in TCL are equivalent to the common variable statements in Fortran and Basic. The use of global variables might be called “sideloading" for data subroutines. Ref Fortran77, the large number crunching programs with 2E5+ statements in Fortran used global variables or common variable declarations as an alternate way or “programming style” to transfer or sideload information between subroutines. The other data transfer method for subroutines was discussed by Brent Welch etc in the proc command arguments or top loading in the introductory or beginner TCL material.

gold 12Dec2018. Of course, each alternate way of data information transfer in toploading and sideloading data subroutines has its own advantages and disadvantages. As most TCL users know, TCL tends to be a more compact language than Fortran77. However, the global declarations in the small TCL graphical user interface guis written for numerical analysis on this wiki have exactly the same common variable structure and same program organization as the giant Fortran number crunchers.

gold 12Dec2018. There are two alternate methods of loading TCL subroutines, known as proc arguments (top loading) and global variables (side loading). In engineering terms, the TCL global variable methods and the Fortran common variables are an economy of scale for large programs. In other words, top loading a data subroutine for a small program with a limited number of variables and a limited number of subroutines is about as efficient as global variables (side loading). When a large program has the number of variables approaching 25 variables and the total number of subroutines approach 20 subroutines, then global variables or common variables become an more attractive alternative data transfer between subroutines and a more efficient use of the programmer's time. This principle is independent of language type, and equally true for the TCL, Fortran, and other computer languages. For example, many scientific Fortran programs had a specialized subroutine for constants, including the gravity constant, speed of light, etc. If the gravity constant was used in 15 subroutines, it was easier to declare the gravity constant as a common variable and make a one time change in the value of gravity constant in one subroutine of constants than making the same change in the gravity constant in 15 subroutines. If one knows than the sequence of slot variables {$side1,$side2,$side3...$side8...$side_N} and other constants are TCL global variables throughout the subroutines, one can easily refer to these global values in a specialized printout report subroutine. One can also load these global values in formulas for printout and separate calculations on the fly. For a side loading example in a new subroutine, proc newby {} {global side1 side2 side3; puts <* $side1 $side2 $side3>;return <+ $side1 $side2 $side3>}. The alternative top loading would be proc newby {side1 side2 side3} { puts <* $side1 $side2 $side3>;return <+ $side1 $side2 $side3>}. Both subroutine methods work for small TCL programs with the roughly same amount of typing. Remember in top loading, one would have to make other changes in the invoking statement or proc argument statement for the subroutine. One might point out that loading more than 25 variables in either an invoking statement or proc statement is not a trivial exercise to kept correct and cued properly. For another example, a specialized subroutine for printing out variables might use s set of global variables as proc printout {} { global side1 side2 side3; puts $side1; puts $side2; pouts <* side1 side2 side3>; puts "conversion to centimeters"; puts <* $side1_inches 2.54 >; }. A specialized printout subroutine with globals previously declared is faster in development and checking numeric formulas in experience, especially where conversion of units like inches and centimeters is useful for checking the results of the program in older textbook problems.

In opinion, a set of the same global statements in numerous routines are easier to keep organized. The condition of using global variables in method is that the user understands that not all variables are invoked over all the numerous subroutines. Therefore, in the case of multiple variables > 25 and multiple subroutines >20 in a large program, changing a constant variable in a large number of subroutines, little to do in the proc argument statements and invoking the subroutines, and the availability of the global variables throughout the program means less time spent on changes for the programmer. For terms of TCL presentation on the wiki, the slot variables could be changed inside the subroutine to recognizable names in variables for the calculations and quicker comprehension of the reader. In opinion, global variables are a more efficient use of the programmers time for a quick assembly of a working gui or installing a new working subroutine in a large TCL program.

gold 12Dec2018. The author is still learning TCL. These small TCL graphical user interface guis presented in the wiki have gone through an evolution of about twenty years, including numerous unpublished Javascript and TCL guis behind a firewall before joining the wiki. The suggestions from the wiki members have been of great help and these TCL guis have continued to improve. The guis are experimental numerical analysis in nature, and not every early TCL gui or program written over the twenty year period has the same global variable features, structured programming, or beauty spots of the TCL gui genre. The author keeps hearing that TCL is not a number crunching language or an outdated language from non-users. But in the instance of the TCL global variables, the TCL globals have the equivalence of the common statements and common variables in the data subroutines of giant Fortran number crunchers. ---

AMG: Please note that in this Wiki, spaces at the beginning of the line interfere with proper formatting.

14Apr2016. When I first came to the Tcl Wiki, images were required to stored off site to save storage space. I note some of the older image off_sites are powering down and I need help or explanation_how_to page on how to store images at this Tcl Wiki site. I stored some test images, but could not link to them from the wiki page. I spent a lot of time on this website and it seems a shame to lose the Tcl efforts. I'm sure other wiki voyagers are in the same boat. Thanks for any help in rescuing existing offsite images. APN Please see the section on Images in the Formatting Rules page for instructions on how to store and link images on the wiki.

gold later on 21apr. I'm going to cut many of my references to offsite images. Can't easily retrieve some images and not sure images add that much. I'll restore what I can. Would like some specifications or suggestions of image type (png etc) and usefull byte size, since have seen arguments on use of jpegs on TCL WIKI.

gold Oct_2017. About 1996, the PC on my desk, was replaced by a Sparc 20 workstation. I was an engineer and mainly programming in Fortran. I had learned QuickBasic, also. Since the Sparc 20 interface was command line Unix, I looked around for a gui or gui language as an interface to the Sparc 20. I found TCL fairly easy to mouse click and invoke executable icons on the Xwindows screen. I also wrote small slot calculators in TCL and Javascript, which were similar to my later wiki pages. Never forget the human brain evolved to hunt rabbits, not Unix critters and command lines. Your eyes and brain modeling/mapping of the outside stims are closer to a gui screen than one might think.

from ask 12 Ask, and it shall be given # 12

HJG 2015-05-20: There are a lot of wiki-pages with broken images,

because external links have expired (many of them from user gold). Does the wiki have a way to check for this, and make a list ?

gold1may2016,Thanks for your help in restoring offsite images. I'm going to cut many of my references to offsite images. Can't easily retrieve some images and not sure images add that much. I'll restore my offsites into onsite WIKI storage, what I can. Would like some posted (approved consensus) specifications or suggestions of image type (png or gif) and usefull byte size on the how_to page. Since have seen arguments on use of jpegs and fuzzies on TCL WIKI. There are some search key words that will pull the older images.

from Ask, and it shall be given # 12, treating extended lines with pretty print gold- 2017-01-20 I have been using ased editor for some code on my wiki pages. When the tcl lines with extended lines , the code is garbled/will not compile. Can someone direct me to a PC based editor that will handle extended lines or help me clean up some of my wiki pages in their own editor? Refrigerator_Pinyin_Poetry Random Poetry Chalkboard Chinese Xiangqi Chessboard has extended and empty lines. Can ASED delete empty lines? Maybe, I have an old version.Thanks in advance.

gold- 2017-12-9 filled ticket with Sourceforge.

subj. start-up, paste, and extra long comment lines. Recent dec 2017 errors 1.on initial startup 2. and also paste file 3. On my TCL WIKI files, I have some extra long comment lines, 4. which become corrupt when i use autoident. 4. thanks, i have been using ased editor on my wiki pages for 7 years or so. 5. But i really need to process these wiki scripts with extra long lines (> 200, start with #). screen log output can't read "start": no such variable can't read "start": no such variable while executing "$TxtWidget index $start" (procedure "editorWindows::paste" line 50) invoked from within "editorWindows::paste" (procedure "Editor::paste" line 4) invoked from within "Editor::paste" (menu invoke)

from Ask, and it shall be given # 12,

gold Many complex math programs have either initialize, refresh, or reset routines to force correct behavior. Most of my canvas programs on this wiki have this feature (on changing labels and resetting variables prior to calculations). Where the program defaults and canvas colors/features/clear displays are reset prior to (push button) calculation. This tactic should work across TCL versions, at least in the several versions I test (eTCL,TCL8.5, and TCL8.6).

::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 120. 12.0 15.0 1. 1. 1. 1. 104.0 } button .b3 -text "castle" -command {clrcanvas .cv;barley .cv 20; castle .cv; } button .b8 -text "S.board" -command { refreshgridx .cv }

What is the meaning of your "#start of deck" and "#end of deck" comments in your code examples? And why do you need a plural set of the comments at the start and end?

gold Like i said, I'm an old Fortran programmer. The multiple start and stop statements including subroutine stop and return statements were used in scanning big reams of Fortran code with 10E5+ lines. I can tell you that obvious stop,end,and return statements are helpful in that size of code. Come to think of it, I have seen lots of TCL wiki code with out end statements, obvious exit paths,obvious return statements, and graphic displays without exit buttons. The advantage of the wiki is that people can cut and paste what they want to use.

Ah, I see. Also, consider that maintaining a consistent code indentation and spacing can help immensely when scanning a block of code, and not just at the start and end of the chunk. Compare the before and after code look here: Example Linear Interpolation Calculator

Much of the wiki code is examples, and many times keeping an example focused on the example, without extras, makes for a clearer presentation. As well, modern GUI's provide out of band exit methods (the X in the mswin title bar, etc.) such that a lack of an exit path and/or exit button does not result in an unrecoverable situation. When the OS already provides a default "exit method" to every running program (and one or more out of band "kill" systems) there is less of a need to include an explicit exit in the code of each program.

aspect The amount of code you're pumping out in here is impressive, and I find some of the topics very interesting, but I'm finding the presentation less than useful. A few pointers, which I hope should be of value to yourself as well as anyone reading (and considering contributing) to your pages:

- Try to keep the wiki content example-focussed. Having multiple versions of the same long program in one page is distracting and confusing. If you need an online repository for your code I'd suggest using http://github.com/ keeping the wiki page for interesting extracts others can learn from or comment on.
**Please**be consistent with indentation and formatting! Your code will become much more readable to others and easier to maintain for yourself. The Tcl Style Guide (start with the linked PDF) is a good place to start.- Wherever you can, breaking out shared functions into a separate library script that can be loaded via source (or better yet package require), will make the library more solid and the main program more readable.
- If your explanatory commentary can be moved closer in the page to the code it concerns, that will also aid readability. Use inline comments (#) or the "if 0" trick -- an example is diff in tcl

Finally, going mostly by the screenshots (I admit I find the code hard to follow -- see point #2), many of your examples seem to have a common presentation, with a similar GUI consisting of:

- a set of labelled boxes for user input
- a "Solve" button which calls your main logic with the inputs as arguments
- a few "Testcase" buttons to illustrate examples and test the code
- "About", "Clear" and "Exit" buttons

I for one would love to see the GUI side of the code factored out into a common framework which each example could share. That way the wiki page for each calculator example could be focussed on the logic, looking something more like this:

namespace eval linear_interp { set name "Linear Interpolation Calculator" set inputs {"First X value" x1 "First Y value" y1 "Second X value" x2 "Second y value" y2 "Solve for x" xx} set about "This is Gold's linear interpolation calculator, © 2011 .. with some more information on how it works and is used, etc" set testcases { {10. 10. 200. 50. 123.} # etc } proc calculate {x1 x2 y1 y2 xx} { return [expr {some magic here to calculate the result}] } } load generic_calculator_gui.tcl generic_calculator_gui linear_interp

As a secondary advantage, your calculator could then without modification be used in other contexts, such as a command line or web tool or automatically invoking all the test cases. Of course, the GUI can also be easily re-skinned to the user's preferences without impacting the main code.

I hope you don't find the above overly critical or discouraging, that's certainly not my intention -- but I do think keeping the above points in mind will make your pages more appealing to other wiki'ers and encourage collaboration .. which is what we're all here for, after all!

gold pasted trial namespace at bottom of Drake Intelligent Life Equation Slot Calculator Example

gold Procedures for pretty print on tcl wiki. Found website for removing blank lines online etc(free).One can paste wiki text into the (free) rough-draft editor and get a spell-check. Ased is free editor that has pretty print for TCL scripts.

- http://www.salsbury.f2s.com/rd.htm
- http://www.boallen.com/remove-blank-lines.html
- http://www.tcl-home.de/ased/asedhome.htm
- http://imageshack.us/

Any decent programmer's editor should allow you to search and replace on any character in the file you are editing. To remove blank lines (provided they do not contain spaces) just search for two adjacent line ending characters and replace them with one line ending character. I choose to say "line ending character" on purpose, the "line ending character" differs between Unix, Mac, and Windows. If the editor supports regular expression search (many do) then you can also delete lines that contain white space by using a suitable regular expression.

decimal /logo | transliteration | nindan | modern kilometers | modern degrees latitude | museum tablet no. | |
---|---|---|---|---|---|---|

10 | danna | 18000 | 108 | 0.970 | A30211 | |

11 | danna | 19800 | 118.8 | 1.067 | A30211 | |

12 | danna | 21600 | 129.6 | 1.164 | A30211 | |

13 | danna | 23400 | 140.4 | 1.261 | A30211 | |

14 | danna | 25200 | 151.2 | 1.358 | A30211 | |

16 | danna | 28800 | 172.8 | 1.552 | A30211 | |

17 | danna | 30600 | 183.6 | 1.649 | A30211 | |

18 | danna | 32400 | 194.4 | 1.746 | A30211 | |

19 | danna | 34200 | 205.2 | 1.843 | A30211 | |

19 | danna | 34200 | 205.2 | 1.843 | A30211 | |

20 | danna | 36000 | 216 | 1.940 | A30211 | |

30 | danna | 54000 | 324 | 2.911 | A30211 | |

40 | danna | 72000 | 432 | 3.881 | A30211 | |

50 | danna | 90000 | 540 | 4.851 | A30211 | |

60 | danna | 108000 | 648 | 5.822 | A30211 | |

70 | danna | 126000 | 756 | 6.792 | A30211 | |

100 | danna | 1080 | 9.7 | 1924.1278 | ||

1 me lim gur | 1E5 | 300E5 liters | A1924.1278 | |||

9 me lim gur | 9E5 | 2700E5 liters | A1924.1278 | |||

1 lim lim gur | 1E6 | 300E6 liters | A1924.1278 | |||

12960000 | no_units | 60E4 x10 Greek feet= 40 046 400 meters | ||||

12960000 | no_units | british museum | ||||

(10 x 60**2) x 60 | no_units | 12960000 | 12960000 * 10 * .309 (reed gi) = 40046400 meters | Idlib Museum,Syria,C2 | ||

no_units | 12960000 | 12960000 * 10 * .303 (japanese jo) = 39 268 800 meters | http://en.wikipedia.org/wiki/Japanese_units_of_measurement | |||

70*(60**7) | no_units | 1.95955E14 | nippar text |

12 960 000 * 10 * .309 = 40 046 400 (greek feet)

(10 x 602) x 60

12960000 * 10 * .309 = 40 046 400 The ratio of a japanese rin to a ri is 10/12,960,000 The ratio of a japanese shaku to a ri is 6/12,960 The ratio of a japanese bu to a ri is 10/1,296,000 a shaku is effectively a japanese foot a ri is effectively 3.9 km 36*60=2160 30*60=1800 5/6 = 1800/2160 129600 * .309 * factor = 40046.4 sumerian foot 129600 * .333 = 129 600 * .333 = 43 156.8 12 960 000 * .333 * (11 / 12) = 3 956 040

Note that as you say above that you are using Tcl 8.5.6, then Tcl 8.5 already contains a built-in "lreverse" command, so your proc "lreverse5" above could be deleted, and calls to "lreverse5" can be replaced by calls to the built-in "lreverse" command.

gold Changes. Removed proc lreverse5 and using 8.5 lreverse command. Proc sexagesimalfraction not working right.

The change from lreverse5 to built in lreverse does not appear to be the cause:

% set list list 5 3 1 8 9 4 7 5 3 1 8 9 4 7 % proc lreverse5 {l} { # KPV set end llength $l foreach tmp $l { lset l incr end -1 $tmp } return $l } % lreverse5 $list 7 4 9 8 1 3 5 % lreverse $list 7 4 9 8 1 3 5 %

The result from lreverse5 and the built in lreverse are identical. Note that you did not change one call in sexagesimal to use the built in lreverse.

The stonehenge audrey holes seem to measure 0.5 degrees. At least some stone circles have a diameter of 32 meters and appear to measure 6/360 part of the sky. Some of medicine wheels in North America have divisions of 28.

quantity | |||||||
---|---|---|---|---|---|---|---|

stone circle/structure | azimuth | units | accuracy | units | angular delta(abs) | units | website |

Northern major standstill Moon rise | - 58 | degrees | 0.3 | degrees | 65.5 | degrees | http://en.wikipedia.org/wiki/Stone_Henge |

Southern major standstill Moon rise | - 123.5 | degrees | 0.3 | degrees | 65.5 | degrees | http://en.wikipedia.org/wiki/Stone_Henge |

Southern major standstill Moon set | - 236.5 | degrees | 0.3 | degrees | 65.5 | degrees | http://en.wikipedia.org/wiki/Stone_Henge |

Northern major standstill Moon set | - 302 | degrees | 0.3 | degrees | 65.5 | degrees | http://en.wikipedia.org/wiki/Stone_Henge |

Southern major standstill sun set | -133 | degrees | 0.3 | degrees | degrees | http://en.wikipedia.org/wiki/Stone_Henge | |

Northern major standstill sun rise | - 44.7 | degrees | 0.3 | degrees | degrees | http://en.wikipedia.org/wiki/Stone_Henge |

Calculator with big fonts for bad eyes and used on my computer windows desktop. Console show provides the console and a paper tape record of calculations, which can be cut and pasted to a word processor like notepad. Also, program is good example of namespace.

# autoindent from ased editor # program " 2 Line Calculator in Namespace" # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # TCL WIKI , 25may2011 namespace path {::tcl::mathop ::tcl::mathfunc} package provide calculatorliner 1.0 namespace eval liner { proc initdisplay {} { pack [entry .e -textvar e -width 50 ] bind .e <Return> {catch {expr [string map {/ *1./} $e]} res; set e $res} ;# RS & FR }} proc linershell {} { namespace import liner::* liner::initdisplay .e configure -bg palegreen .e configure -fg black .e configure -font {helvetica 50 bold} .e configure -highlightcolor tan -relief raised -border 30 focus .e button .b -text clear -command {set e ""} button .c -text exit -command {exit} pack .b .c -side left -padx 5 . configure -bg palegreen wm title . "Suchenwirth 2 Line Calculator" } console show linershell

In some of the Sumerian literature, the constants for gold are called tube of gold or kus of gold, which possibly refer to a wire or rod. The Sumerians were experts at gold wire jewelery and used wire etc for trade in the early days. For example, the gold constant was 1:48 or decimal 108 in unspecified units. From modern estimates of density, a gold rod of 1mm diameter about a cubit (50cm) would have 0.15158 modern grams per cubit or 0.904 gin per cubit. There were about 8.3 metric grams in a Sumerian shekel or gin. Prospective formula is alpha times circumference squared equals 2 sila. sexagesimal 4:48 or decimal 288 is reciprocal 0;0,12,30 or decimal 12/3600+30/216000. alpha*circumference squared eguals 2 sila. height is circumference * sqrt(thickness/alpha) 1mm diameter silver wire of one cubit length .7854 * 10.5 gm/cc = 0.08246 gm/cm 0.08246 gm/cm, mass/length 0.08246 gm/cm (1gin/8.33grams) (49.7 cm/cubit) = 0.491 gin/cubit or sexagesimal 0;30 gin/cubit 288/6300=0.04571 gin/nindan 12*288/6300 equals 0.548 gin/cubit constant has units nindan*nandin/( volume in sar) formula is area*density=mass/length

In some of the Sumerian literature, the constant for gold are called tube of gold or kus of gold, which possibly refer to a wire or rod. The Sumerians were experts at gold wire jewelry and used wire for trade in the early days. Several remaining tablets give coefficients for the metals and the thickness of coefficient. For example, the gold constant was 1:48 or decimal 108 in unspecified units. From modern estimates of density, a gold rod of 1mm diameter about a cubit (50cm) would have 745.75 modern grams per cubit or 82 Sumerian grains per cubit. Normally the Sumerians measured gold, silver, and electrum in shekels or gin. There were about 8.3 metric grams in a Sumerian shekel or gin. The thickness of log coefficient is sexagesimal 4:48 or decimal 288. The reciprocal thickness of log coefficient is 0;0,12,30 or fraction 12/3600+30/216000, or decimal 0.003472 . An ancient math problem ref. Thoureau Dangin helps define the log thickness coefficient on a cylinder as the thickness of log coefficient (alpha) times circumference squared ( 0;25 or fraction 25/3600) equals the answer ( 2 sila). From inference on the math problem, the units of alpha are sila/(nindan*nindan) or volume per length*length. This method sets up a reference unit on the cylinder such that one nindan of the cylinder length approximates 2 sila. For example, the ratios for a half nindan length would be 1/2 nindan/1 nindan is as 1 sila to 2 sila. This method would have a possible use in breweries, a nindan stick and the circumference of the vat could used to find volume in a vat of beer. Continuing further with other uses for the thickness of log coefficient, the volume per length times density or mass per volume gives mass per length. Dividing the thickness constant by the gold constant gives the gin per unit length or gin per nindian. Multiplying by twelve gives the gin per cubit.

Although subject to interpretation of Sanskrit text, the Sanskrit number words were used in Vedic formulas which are prologues to the atomic theory. #developed from instances of zero/error handling in the calculators on this TCLwiki.For example, an attempt to divide by zero will produce an error (1/0). In numerical analysis, erratic conditions can develop from subtracting a set of nearly equal numbers or very small numbers approaching precision limits (1.002-1.001 or 0.00002 - 0.00001 or 1.002-1.001/0.00002 - 0.00001 ). If divide by zero is a problem error, sets of numbers may contain zero values or numbers that approach zero value from the negative side (eg. 0.0001,0.0002,-0.0001,0.0003). Also, clipping,quantization, or reduction of real numbers may produce zero. values ( eg. 0.0001 at precision .02 clips to zero).Errors can be avoided using control ps for testing division by zero, offsetting numbers from zero, deleting zeros from sets of numbers, or atleast warning the operator that the calculations are approaching erratic conditions.

For the push buttons, the recommended procedure is push testcase and fill frame, change entries , push solve, and then push report. Report allows copy and paste from console, but takes away from computer "efficiency".

In planning any software, there is a need to develop testcases.

operation result 1/0 Inf, defined as error condition here 0/0 0/1 zero, defined as correct Testcase

The Indian astronomy texts of 620 CE. used multiple Sanskrit words for zero (and numbers 1-9). The Sanskrit aternate words for zero were kha,ambara,akasa,antariksa,gagana,abhra,viyat,nabhas,sunya,bindu.The Sanskirt word sunya (void) is more common in the online wordlists. In transliterated Sanskrit , the decimal number 1000 could be expressed as left to right (0001) viyad(sky or zero)/ambar(atmosphere or zero)/akasa(space or zero)/eka(1). #Trying to find some earlier estimates of atomic theory from other cultures. The Svetasvatara Upanisad of Vedic literature indicated an atman was one ten thousanth of the diameter of a human hair, expressed as (1/00)*(1/100). or 10-4 .A human hair averages 80 microns or 8E4 nanometers.An atman would be 8E4/1E-4 or 8 nanometers. Since an insulin molecule is 5 nanometers and a hemogoblin molecule is 6 nanometers, an atman of 8 nanometers compares to human molecules within an order of magnitude.Possibly, the Sanskrit word atman (soul) was derived from atman (breath) and in some texts the root word ama (mother) seems associated or used as meaning soul. The Sumerians used oil films in bowls for divination purposes under tutoring of gods Enhil, Enki, and Ea, ref WG. Lambert (Enmeduranki,pg115). Early reference to atomic theory in English.It is as easy to count atomies as to resolve the propositions of a lover. Shakespear,As You Like It " 1590 CE. This Shakespear quote is believed to be derived from the Roman Lucretius, 20 CE.

set sanskritword "1 2 3 4 5 6 7 8 9 0 , . / +"

eka dvi tri catur panca sat sapta asta nava sunya , . / + 1% dvinavaambarasatambarapancanavaastaasta 1%

Oil Molecule Length, Slot Calculator Example \

This page is under development. Comments are welcome, but please load any comments in the comments section at the middle of the page. Thanks,gold

20 drops = 1 milliliter 1 drop = 0.05 milliliter gold Here is an eTCL script to estimate the length of an oil molecule.

# pretty print from autoindent and ased editor # oil molecule equation # written on Windowws XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI , 20jan2012 package require Tk frame .frame -relief flat -bg aquamarine4 pack .frame -side top -fill y -anchor center set names {{} {initial drop volume mm3} } lappend names {diameter oil slick millimeters:} lappend names {number of atoms} lappend names {answer nanometers:} lappend names {answer nanometers:} foreach i {1 2 3 4 5 } { label .frame.label$i -text [lindex $names $i] -anchor e entry .frame.entry$i -width 35 -textvariable side$i grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 } proc about {} { set msg "Calculator for Oil Molecule Dimension . from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc pi {} {expr acos(-1)} proc calculate { } { global answer2 global side1 side2 side3 side4 side5 set term1 0 set term2 0 set term3 0 set height [ expr { (4.*$side1*1E6)/([pi]*$side2*$side2) } ] set side4 $height set side5 [ expr { ($side4/$side3)} ] return $side5 } proc fillup {aa bb cc dd ee } { .frame.entry1 insert 0 "$aa" .frame.entry2 insert 0 "$bb" .frame.entry3 insert 0 "$cc" .frame.entry4 insert 0 "$dd" .frame.entry5 insert 0 "$ee" } proc clearx {} { foreach i {1 2 3 4 5 } { .frame.entry$i delete 0 end } } proc reportx {} { global side1 side2 side3 side4 side5 console show; puts " $side1 " puts " $side2 " puts " $side3 " puts " $side4 " puts " $side5 " puts "answer $side5 " } frame .buttons -bg aquamarine4 ::ttk::button .calculator -text "Solve" -command { calculate } ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup .005 60. 12. 1.76 .17 } ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup .065 220. 12. 2. .17 } ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup .125 280. 12. 2. .17 } ::ttk::button .clearallx -text clear -command {clearx } ::ttk::button .about -text about -command about ::ttk::button .cons -text report -command { reportx } ::ttk::button .exit -text exit -command {exit} pack .calculator -in .buttons -side top -padx 10 -pady 5 pack .clearallx .cons .about .exit .test4 .test3 .test2 -side bottom -in .buttons grid .frame .buttons -sticky ns -pady {0 10} . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30 wm title . "Oil Molecule Dimension Calculator "

There are coefficients for concave square figures, which are of uncertain shape. These coefficients of transverse length 1 and area coefficient 0;26:26 or 0.43988. For a unit circle inscribed inside a unit square, the total area of the bits in the four corners is (area of square) - (area of circle), 1*1-.5*pi*.25*.25, 1-0.78539, decimal 0.2146. For a possible area formula, area is constant*transverse*transverse, 0.43988*1*1 or 0.43988 area units. Hence, eight of the corner bits or 2*0.2146 or 0.4292 would be closer to the formula result. Other coefficients and possible other geometric figures refer to short transverse of 0;33,20 (decimal 0.5555) and long transverse of 0;48 (decimal 0.8) with an area constant of 0;53,20 (decimal 0.8888) and a concave triangle of 0;15. For a possible area formula, area is constant*transverse*transverse, 0.8888*.8*.8 or 0.5688 area units. If a generic formula for is N1 * s. transverse * l. transverse equals area units, then rearranging terms gives N1 equals s. transverse * l. transverse / area units. N1 = 0.5555*0.8/0.5688 or 0.78. The simple shapes such as triangles, rhombus, and trapezoids usually have a factor of 1/2 involved. One can factor out 0.78 as 1.56 * 0.5 or even (pi/2) * 0.5 for a semicircle. What about an hourglass figure with 2 back to back concave?

Some of the ship constants range from sexagesimal 0:05 to 0:12 or decimal fractions 5/60 to 13/60. The reciprocal constant for the Akkadian long ship (elippi or elonga type) was listed as 0;07:13.The ship constant times ship length cubed gives ship volume. The ship constant times ship length cubed times density gives ship mass (eg. cargo mass).

In planning any software, it is advisable to gather a number of testcases to check the results of the program.

pseudocode: enter ship length,ship constant,density pseudocode: ship constants of 5/60, 6/60, & 7/60 fractions pseudocode: answers are ship volume, cargo mass pseudocode: go/ no_go condition (7/60)* [(ship length)**3] = 0.1166 cubic units (7/60) *[ 1 cubit**3] * 740 kg/[cubits**3] = 74 kilograms If cargo mass is greater than ship b., flag go/no go .

The trading ship hull has a length of 18.3 meters, beam of 3.96 meters, and a body height of 1.82 meters. With normal loading, the draw is 0.914 meters and the freeboard is 0.914 meters. The displacement is 30,000 kilograms with a hull weight estimated at 10,000 kilograms. The float or potential cargo is 20,000 kilograms. The surface area of the deck was estimated to be 46.4 square meters. The perimeter of the entire deck was estimated to be 44 meters. The arclength on one side of the deckship arclength is 22.65 meters or 45.57 kus, which was used in Sumerian calculations. Allowing for crew, spare consumables, and equipment at 8,000 kilograms, this is believed to be a "20 gir ship" with a cargo of 12,000 kilograms, 6000 liters (= 20 gir units), or 12,000 rations of grain. The normal ship crew is 30 rowers, 4 steermen, and 3 officers for a forty day cruise. Two rowers each are assigned to a 20 foot oar. Also, there are 2 steering oars at the back of the ship. Under oars alone, the trading ship has a speed of 6000 meters per hour. Under sail alone and ideal conditions, the speed is 160 kilometers per day or average 6600 meters per hour. However, the trading ship is rarely under power at night.

0.5*18.3*3.98=36.4 sq meters deck area 36.4 sq. meters radius figure 12.727922 meters ship arclength is 22.65 meters or 45.57 kus. trading ship is 64 gurs by modern rating formula. liter wheat = 0.78 kg liter barley = 0.62 kg constant*sq. deck area = silas? 7/60 * 371 * 371 = 16058 silas, 16058 silas * 1 gur/300 sila = 53 gur 95 sq.cubits*95 liters sq cubit/300 liters/gur =30 gurs

The grain storage ship has a length of 29.2 meters, beam of 9.7 meters, and body height of 3.96 meters. The deck area of the grain ship approximates 0.5*29.5*9.7 or 143 sq meters. The grain ship arclength is 36.14 meters or 72.7 kus. The displacement is 245,000 kilograms with a hull weight estimated at 82,000 kilograms. The float or cargo is 163,000 kilograms. The storage ship allows for crew at 6,000 kilograms, spare consumables at 73,000 kilograms, and equipment at 48,000 kilograms. The storage ship is believed to be a "60 gir ship" with a cargo of 36,000 kilograms, 18,000 liters (= 60 gir units), or 36,000 rations of grain. The normal ship crew is 50 rowers, 5 steermen, and 5 officers for a ninety day cruise. Under oars alone, the storage ship has a speed of 4000 meters per hour. Under sail alone and ideal conditions, the speed is 160 kilometers per day or average 6600 meters per hour. There are 2 steering oars at the back of the ship. The grain ship hull has a length of 25 meters, beam of 6 meters, and a body height of 4 meters. With normal loading, the draw is 2 meters and the freeboard is 2 meters.

grain ship: 58.4 cubits 935 sq cubits. 59.1 cubits long grain ship arclength is 36.14 meters or 72.7 kus. grain ship is 585 gur, by modern formula deck area of grain ship approximates 0.5*29.5*9.7 or 143 sq meters constant*sq. deck area = silas? sq cubits deck area 996.8*95literspergur*/300=315.4 gurs 88/.3 92.4690 sq. meters 25 meters =35 cubits deck area = 349 square cubits

trading ship 1 | meters | feet | grain ship 2 | meters | feet | ||
---|---|---|---|---|---|---|---|

length | 18.3 | 60.024 | length | 29.2 | 94.608 | ||

beam | 3.96 | 12.9888 | beam | 9.7 | 31.428 | ||

body depth | 1.82 | 5.9696 | body depth | 3.96 | 12.8304 | ||

draw | 0.914 | 2.99792 | draw | 2 | 6.48 | ||

freeboard | 0.914 | 2.99792 | freeboard | 2 | 6.48 | ||

deck perimeter | 40 | 131.2 | |||||

deck arclength | 20 | 65.6 | |||||

Estimates,other units | < | < | < | < | < | ||

tonnage formula | 82.4447185831527 | Eng.tons | |||||

cargo deadweight | 53.8648113862264 | Eng.tons | |||||

hull weight | 10 | 1000* kg | hullweight | 82 | 1000*kg | ||

deck surface area | 92.5 | sq meters | deck surface area | 243.3 | sq meters | ||

crew mass | 8 | 1000*kg | crew mass | 6 | 1000*kg | ||

equipment | 8 | 1000*kg | equipment | 48 | 1000*kg | ||

officers | 5 | men | officers | 3 | men | ||

rowers | 50 | men | rowers | 30 | men | ||

steersmen | 5 | men | steersmen | 4 | men | ||

sailing (alone) speed | 6600 | meters/hour | sailing (alone) speed | 6600 | meters/hour | ||

rowing speed | 6000 | meters/hour | rowing speed | 4000 | meters/hour | ||

sailing only travel | 160 | km/day | sailing only travel | 160 | km/day | ||

Sumerian coefficients at the basket factory | |||
---|---|---|---|

coefficients | english | decimal | comment |

in base 60 | name | /fraction | |

6 | coefficient reed bundle | 6 | constant of a reed-bundle, may be used as reciprocal (1/6) |

7;12 | bundles in pack of reeds | 432 | constant of a reed bundle. 432 units, bundles of reeds |

04:58:00 | reeds conv to baskets | 298 | possibly 298 baskets from 432 bundles of reeds |

40 | portion of basket | (40/60) | 40/60 portion of basket from one reed bundle |

24 | poss. haystack | (24/60) | possibly 24/60 onto floor/roof, possible haystack to dry reeds |

20 | poss. price of reeds | 20 | possibly 20 manas of reeds cost a silver shekel |

0;3:45 | coverage area for mat | 0.0625 | reed bundle into reed mat covering 0.0625 portion of surface sar |

0;03:36 | straw constant | 0.06 | straw bundle into straw mat .06 portion of surface sar |

12 | hours of workday | 12 | common to several accounts and math problems |

1;39 | basket surface equiv. | 0.02777 | reed bundle equivalent to a mat of 0.02777 surface sar |

5;20 | reed bundle basket conv. | 320 | 320 baskets equivalent to 480 bundles of reeds |

1 | indiv. basket to reed conv. | 1 | one big pannum basket (60 silas) per reed bundle |

10 | daily pay for skilled worker | 10 | 10 pieces per day, common to several accounts and math problems |

3 | 3 baskets a day | 3 | expected output of one worker a day, 3 big pannum baskets |

3 | 3 day, mat for 40 gur boat | 3 | maybe a sail or tarred deck mat,poss. equivalent to 9 sq. meters |

4.5 | 4.5 day, mat for 60 gur boat | 4.5 | maybe a sail or tarred deck mat, poss. equivalent to 13.5 sq. meters |

Note: Some of the equivalents at the bottom are not in coefficient tables, but are taken from accounts or | Note: Possible large reed units (480 bundles) are a wagonload or | ||

math problems, alternate info needed to solve some problems. | water dory load. Possibly 20 manas of reeds was a manload from the swampy coast. |

Sumerian ship name | Sumerian rated capacity | displacement volume | hull & equipment vol. | proportional hiring fee | proportional hiring fee | length | beam | depth | side arclength | L/B ratio | modern tonnage rating | modern cargo rating |
---|---|---|---|---|---|---|---|---|---|---|---|---|

plus comparisons | ship capacity, gur units | gur units, (5/3)*capacity | gur units, (2/5)*displacement | liters of barley per day | silver shekels per day | meters estimated | meters estimated | meters estimated | meters estimated | estimated | tonnage volume m**3 | cargo vol. m**3 |

gis magur 120 | 120 | 200 | 80 | 240 | 20 | 40 | 13.33 | 4 | 49.50 | 3 | 568.70 | 341.22 |

gis magur 60 | 60 | 100 | 40 | 120 | 10 | 20 | 6.66 | 2 | 24.75 | 3 | 66.27 | 39.76 |

gis magur 50 | 50 | 83.33 | 33.33 | 100 | 8.33 | 16.66 | 5.55 | 1.66 | 20.62 | 3 | 37.61 | 22.57 |

gis magur 40 | 40 | 66.66 | 26.66 | 80 | 6.66 | 13.33 | 4.44 | 1.33 | 16.50 | 3 | 18.80 | 11.28 |

gis magur 30 | 30 | 50 | 20 | 60 | 5 | 10 | 3.33 | 1 | 12.37 | 3 | 7.68 | 4.60 |

gis magur 20 | 20 | 33.33 | 13.33 | 40 | 3.33 | 6.66 | 3 | 1 | 8.25 | 2.22 | 4.52 | 2.71 |

gis magur 10 | 10 | 16.66 | 6.66 | 20 | 1.66 | 3.33 | 3 | 1 | 4.12 | 1.11 | 2.2 | 1.32 |

gis magur 5 | 5 | 8.33 | 3.33 | 10 | 0.83 | 1.66 | 1.7 | 1 | 2.06 | 0.98 | 0.59 | 0.35 |

comparisons below | < | < | < | < | < | < | < | < | < | < | < | |

Phoenician trading ship | 5.8 | 9.66 | 3.86 | 11.6 | 0.96 | 18.3 | 3.98 | 1.82 | 22.64 | 4.59 | 32.13 | 19.28 |

Cyprus trading ship | 6.5 | 10.83 | 4.33 | 13 | 1.08 | 15 | 5 | 2 | 18.56 | 3 | 36.52 | 21.91 |

Egyptian punt | 8.8 | 14.66 | 5.86 | 17.6 | 1.46 | 20.3 | 4.9 | 2 | 25.12 | 4.14 | 48.93 | 29.36 |

Greek trireme | 12.19 | 20.31 | 8.12 | 24.38 | 2.03 | 39.6 | 5.5 | 1.25 | 49.00 | 7.2 | 67.70 | 40.62 |

Roman grain ship | 52.9 | 88.16 | 35.26 | 105.8 | 8.81 | 29.2 | 9.7 | 3.96 | 36.13 | 3.01 | 292.74 | 175.64 |

Viking Raider | 3.89 | 6.48 | 2.59 | 7.78 | 0.64 | 17.4 | 2.6 | 2 | 21.54 | 6.69 | 21.63 | 12.98 |

American Schooner | 87.9 | 146.5 | 58.6 | 175.8 | 14.65 | 44.5 | 10.66 | 3.88 | 55.07 | 4.17 | 488.29 | 292.978512690728 |

English Brig | 55.6 | 92.66 | 37.06 | 111.2 | 9.26 | 38.3 | 7.93 | 3.89 | 47.40 | 4.82 | 308.89 | 185.33 |

American Clipper (giant) | 1428 | 2380 | 952 | 2856 | 238 | 92.96 | 16.15 | 18.3 | 115.04 | 5.75 | 7933.85 | 4760.31 |

Liberty cargo (1944 & steel) | 1146 | 1910 | 764 | 2292 | 191 | 133.05 | 19.203 | 8.69 | 164.66 | 6.92 | 6370.54 | 3822.32 |

coefficient | transliterated | english | possible decimal /fraction |
---|---|---|---|

15 | igi.gub.esiri.e | coefficient refined pitch | 15/60 |

16 | igi.gub.esiri | coefficient raw pitch | 16/60 |

15 | ssa esiri | coefficient pitch | 15/60 |

12 | ssa esiri | coefficient (refined?) pitch | 12/60 |

10 45 06 | ssa ina ki-ri-im | coefficient (refined?) pitch | 0.1794 |

15 | ssa esiri ? | coefficient (raw?) pitch | 15/60 |

15 | ssa esiri-e-aIt | coefficient refined pitch | 15/60 |

2.5 | barig (of) esir-e-a | price wet pitch | 2.5 barig for 1 shekel , URIII |

10 | gu (of) esir-had | price dry pitch | 10 gu for 1 shekel , URIII |

12 | gu (of) esir-had | price dry pitch | 12 gu for 1 shekel, URIII |

4 | ban (of) esir-had | price dry pitch | 4 ban for 1 shekel, Babylon 1900 BC |

Note: esir-e-a (bitumen watery) measured by barrels ( or jars) of 60 liters eq. esir-had (bitumen dry) measured by weights of 30 kilogram (manload). Any coefficient calculation would have to account for units of wet (ŠE system Š* for wet capacity) or dry (EN system E)

In crude oil, the tar fraction from 10-14 %, 5.25 kg to 7.3 kg out of 52.5 kilograms of converted barig 60 liter unit. Babylon sold 40 liters of dry pitch (esir had) for 1 silver piece and 60 liters of construction and waterproofing pitch for 1 silver piece. If price is measure of petroleum fractions for heavy (esir a) fraction and tar fraction, the tar fraction was 40 liters (for a shekel)/ 60 liters (for a shekel) , 2/3, or 40/60 of the heavy esir a fraction. The texts mention both boiling/cooking and (implied) sun dry. Suppose that the Babylon products were derived from successive boiling or sun-dry processes, then a crude production line or process could be outlined: 100 liters crude oil > 85 liter lamp oil > 60 liters construction & waterproofing pitch > 40 liters dry pitch. Starting with 100 per cent, boiling would remove spare water impurities, ( straining) plant matter,gasoline, and naphtha, leaving about 85 percent for lamp fuel (eg. kerosene) and medicine. Further boiilg would remove kerosene and some mineral oil leaving 30 percent of the original crude oil for a heavy oil/pitch fraction (esir a) for waterproofing woven products and construction of floors, walls, and waterproofing bricks. The next stage would boiling or drying the heavy oil/pitch into the 20 percent residue called esir had. The conjecture here is that esir a was the feedstock for esir had. Esir had was used in crafts as a cement or mixed with stone powder as a sort of moldable plastic. Possibly, esir had was used as fuel in brick kilns, smelters, and other industrial processes.

*mathematical coefficients of bitumen, Paul BRY (01-2002)7

possible fractions left at boiling or sun dry processes. | |||||
---|---|---|---|---|---|

100 liters crude oil > 85 liter lamp oil > 60 liters construction & waterproofing pitch > 40 liters dry |

modern fractions, no cracking | |||||

product | fraction % | starting 100% | Babylon 100-% | Cuneiforn name | Bablylon use or comment |

gasoline | 1.7 | 98.3 | no reported use | ||

naptha | 14. | 84.3 | 85 | naptum (fire oil) | |

kerosene | 34 | 50 | 60 | naptum (fire oil) | lamp oil, medicine |

bunker oil | 18 | 32.3 | 30 | esir a (wet pitch | waterproofing,construction |

tar,pitch,wax | 15 | 17.23 | 20 | esir had | dry pitch |

losses | 12 | 5 | 5 | ||

total | 100 |

coefficient in base 60 | transliterated | english | possible decimal /fraction | comment |
---|---|---|---|---|

0;13:15 | ma-gur | coefficient ship (for) area | 13/60+15/3600 | for geometric area of barge figure, derived from 90 degree c. sector |

0;13:20 | ma-gur | coefficient ship (for) area | 13/60+20/3600 | for geometric area of barge figure, derived from 90 degree c. sector |

0;13:20 | se (barley grain) | coefficient (for) seed area (barge equal?) | 13/60+20/3600 | for geometric area of seed figure, derived from 90 degree c. sector, most advanced math from Susa & iron age Sumeria |

45 | ma-gur | coefficient ship (for) area ratio? | 13/60+20/3600 | for geometric (barge area/sector area) of barge figure, derived from 90 degree c. sector |

16 | in alpim | coefficient ox-eye (for) area | 16/60 | for geometric area of barge figure , derived from 120 degree c. sector |

0;16:52:30 | in alpim | coefficient ox-eye (for) area | 16/60+52/3600+30/21600 | for geometric area of ox-eye figure , derived from 120 degree c. sector, most advanced math from Susa & iron age Sumeria |

5 | sa gis magur (wood boat) | conversion coefficient (for) ship capacity | 5 | coefficient*nindan*nindan=volume gur, early? age math |

6 | sa gis-ma-la | conversion coefficient (for) ship capacity in gur/sar | 6? | coefficient*nindan*nindan=volume gar, middle? age math |

7:12 | elepuum (long ship) | conversion coefficient (for) ship capacity in gur/sar | 7+12/60? | coefficient*nindan*nindan=volume gur, most advanced math from Susa & iron age Sumeria |

0;4:48 | e-kisib-se | coefficient (for) thickness of log (cylinder capacity) | 4/60+48/3600 | possibly coefficient*cubit*cubit=volume silas |

45 | a-bal | coefficient for bucket | 45/60 | possibly area or volume of irrigation bucket |

30? | nus (egg)? | conceptual coefficient for egg volume,not seen on tablets | 30/60? | thinking point for sphere volume,not seen on tablets, (pi/6)*D**3 approx. (30/60)*D**3, found one Egyptian statement that cylinder volume oc egg? |

the other hand quotas which must have been set in a more esoteric fashion, such as the 15 workdays expended per gur capacity in barge construction (a barge of 30 gur capacity shoud be built with 450 workdays) attested in TCL 5, 5673 (MVN 2, 3 seems to record a quota of ca. 10 days per gur capacity). 4·3) KWU p. 132 c. F. Thureau

daily work of one man | |||||
---|---|---|---|---|---|

in base 60 | translitered name | english | decimal /fraction | reciprocal | comment |

0:12 | sa has-as-bi | coefficient it's | 12/60 | 5 | possibly making 5 ration bowls a day , pottery |

4 | sa dug bi | coefficient rate | 60/15 | 15/60 | making 4 ration bowls a day , pottery |

3:45 | sa pi-ti-iq-ti | coefficient wall high | 3/60+45/3600 | 16 | raising mud wall, 3/60+45/3600 surface a day |

20/60 | sa sag | coefficient making bricks | 20/60 | 60/20 | making 240 bricks a day or 20/60 sar |

1:30? | igi.gub gis | coefficient wood funiture | 1+30/60 | 90/60 | 1.5 days on task, pegging planks, making door, bed or chair a day |

40/60 | sa gis-ig | coefficient wood door | 40/60 | 60/40 | 2/3 door a day, planing wood and pegging planks |

3 | sa gis pannum | coefficient wood crates | 3 | 20/60 | 3 crates a day, pegging planks, pannum measure crates |

7:26 | sa gis | coefficient making wood plank surface | ~7/60 | ~ 60/7 | planks & crates ,daily 3crates*6sides*.497*.497= 4.44 sq.m., 4.44/36 = decimal 0.123 sar or 7/60+ 23/3600 sar daily |

(under proofreading) The research made some trial calculations with density of bronze from 1 )modern density values and 2) ancient density values from the Old Babylonian coefficients. For the modern density values in kilograms per cubic meters, the values were tin (7176),bronze (8189), and copper (8890). Using r1:1 as the copper:tin ratio, the generic formula was tin_density*(1/(r1+1))+copper_density*(r1/(r1+1)=bronze_density. Multipling (ri+1) term and substituting, 7176+r1*8890=8169+r1*8169, and combining r1*99.3=721. The alloy ratio r1 for the modern bronze density value was 721/99.3, 7.26. (under proofreading)

In the eTCL calculator, kilograms are used with the price ratios of copper (1/90) and tin (1/20) for UrIII. From the trial calculations, these price ratios were transferred correctly to kilograms of silver. The price table contains redundant entries from different texts. However, the trade values or price ratios were undoubtedly different in different eras, countries, and texts.

Sumerian price in silver = [/ liters 300.] Sumerian price in liters grain = [* silver 300.] # 1 silver piece = 1 gur = 300 liters of grain liters = [* volume_in_cubic_cm .001] original copper mass + original tin mass - product mass = smelter loss original metal mass - product mass = smelter loss original metal mass * average refining loss in percent= refining loss original metal mass - refining loss = product mass 30 to 40 kg of charcoal for 1 kg of copper, rule of thumb (for smelting copper in raw ore) original metal mass * price ratio in silver 1/N = price in silver 6 bundles or 60 kgs of reeds for 1/2 mana of copper, rule of thumb 120 manas or 60 kgs of reeds for 1/2 mana of copper, rule of thumb bundle of reeds was 20 manas or 10 kg price? = raw materials + labor + profit price? = raw materials + heat process price? = raw materials + labor average price per unit = revenue / units sold

UrIII Metal prices | per silver shekel etc | country, era |
---|---|---|

quantity | value | comment, if any |

copper | 3 minas= 180 shekels | Babylon, Esnunna Code prices, 1900 BCE, for comparison |

copper | 1.5 minas= 90 shekels | NeoSumerian, UrIII, circa 2300 BCE |

copper | 80 shekels | NeoSumerian, UrIII, circa 2300 BCE |

tin | 12 shekels | NeoSumerian, UrIII, circa 2300 BCE |

tin | 20 shekels | NeoSumerian, UrIII, circa 2300 BCE |

red gold | 15 shekels | NeoSumerian, UrIII, circa 2300 BCE |

gold | 7 shekels | NeoSumerian, UrIII, circa 2300 BCE |

gold | 20 shekels | NeoSumerian, UrIII, circa 2300 BCE |

O.B. Metal prices | per silver shekel etc | country, era |
---|---|---|

quantity | value | comment, if any |

iron | 8 shekels | Southern Mesopotamia, Old Babylonian period |

iron | 12 shekels | Mari, Old Babylonian period |

iron | 40 shekels | Assur, Old Babylonian period |

gold | 3-6 shekels | Southern Mesopotamia, Old Babylonian period |

gold | 4-6 shekels | Mari, Old Babylonian period |

gold | 4-8 shekels | Assur, Old Babylonian period |

Metal price ratios | for comparison | country, era |
---|---|---|

quantity | value | comment, if any |

silver/gold price | 10:1 | NBC6641,NeoSumerian, UrIII, circa 2200BCE |

silver/gold price | 10.2:1 | Yale YBC13418A,NeoSumerian, UrIII, circa 2200BCE |

copper/silver price | 9:1 | Ancient Egypt, New Kingdom |

tin/copper price | 6.6:1 | Athens, Greece, circa 500BCE |

silver/gold exchange ratio | 12:1 | Ancient Rome, Augustus reign, 30BCE |

metal etc | old babylonian coefficients | talents/sar | manas/sar | kg/sar | OB. coefficient | modern,kg/m**3 | comment |
---|---|---|---|---|---|---|---|

metal etc | 3600 60 1 | talents/sar | manas/sar | kg/sar | kg/cubic meters | kg/cubic meters | comments |

gold (electrum?) | 1_48_0 | 6481 | 388860 | 193535.622 | 10751.979 | 19302 | gold and silver alloy |

gold | 2_15_0 | 8100 | 486000 | 241882.2 | 13437.9 | 19302 | |

lead | 1_52_30 | 6720 | 403200 | 200672.64 | 11148.48 | 10989 | |

silver | 1_36_0 | 5790 | 347400 | 172900.98 | 9605.61 | 10492 | |

iron | 1_12_0 | 4320 | 259200 | 129003.84 | 7166.88 | 7208 | |

copper | 1_12_0 | 4320 | 259200 | 129003.84 | 7166.88 | 8890 | |

tin | 1_20_21 | 4821 | 289200 | 143934.8 | 7996.4 | 7176 | |

bronze | 1_20_0 | 4800 | 288000 | 143964.702 | 7998.039 | 8169 | |

brick | 0_12_0 | 741 | 44460 | 22127.742 | 1229.319 | 1600 | possibly light adobe |

alulutum-mineral: | 0_20_24 | 1200 | 72000 | 35834.4 | 1990.8 | 2000 |

In planning any software, it

# pretty print from autoindent and ased editor # Ship length from arclength and ship beam # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI , 17jul2013 package require Tk console show proc shiplengthx { a b } { set length [expr { sqrt($a*$a - (16./3.) *$b*$b*.5*.5 )}] return $length } lappend shiplist [ shiplengthx 3 .68 ] lappend shiplist [ shiplengthx 6 1.35 ] lappend shiplist [ shiplengthx 9 2.03 ] lappend shiplist [ shiplengthx 12 2.7 ] lappend shiplist [ shiplengthx 15 3.38 ] lappend shiplist [ shiplengthx 18 4.05 ] lappend shiplist [ shiplengthx 21 4.73 ] lappend shiplist [ shiplengthx 30 6.75 ] lappend shiplist [ shiplengthx 18 5.12 ] puts " $shiplist"

# pseudocode can be developed from rules of thumb. pseudocode: enter triangle height ,triangle width , penny or coin diameter pseudocode: rules of thumb can be 3 to 15 percent off, partly since g..in g..out. pseudocode: packing pennies in equilateral triangle, pseudocode: base of triangle 10 pennies wide. pseudocode: height of triangle 20 pennies tall pseudocode: pennies will be paced in layers equal to width of diameters, non optimal spacing layers diameter of coin, initially 10 coins wide find width of every stack for each stack layers foreach layer {1 2 3 ... N coins high} {calc. coins} pack number of circles in each layer, short of sides, add circles to total, when finished print result need console show set addlayer 0 set level 0 set numberpennies 0 incr $addlayer set level [ expr { $level +$addlayer } ] set width [ expr { 2.* 10.* asin($level/$width) } ] set numberpennies [ expr { $numberpennies+ int($width) } ] pseudocode: need test cases > small,medium, giant within range of expected operation. pseudocode: are there any cases too small or large to be solved? pseudocode: Could this be problem similar to grains on chessboard?

# counting pennies in equilateral triangle # eTCL console example program # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI , 18jul2013 package require Tk console show set addlayer 0 set level 1 set numberpennies 0 set width 10 # height is 20 pennies foreach layer {1 2 3 4 5 6 7 8 9 10 11 12 14 16 17 18 19 20} { incr $addlayer 1 set level [ expr { $level +$addlayer } ] set sintarget [ expr { 1.*$level/$width } ] set width [ expr { 2.* 10.* asin($sintarget) } ] set numberpennies [ expr { $numberpennies+ int ($width) } ] } puts " $numberpennies "

# pretty print from autoindent and ased editor # Ship beam from 1/4 ship length # accepts multiplication factor N*list # example as list of Sumerian ship lengths # and dividing by 4 for poss. ship beam # (max width) # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI , 24jul2013 package require Tk namespace path {::tcl::mathop ::tcl::mathfunc} console show proc multiplylist { factorx args } { set factor_x " is constant or expression " set args_x " targeted list of numbers " set icount -1 foreach item $args { incr icount lappend result_list [* $factorx $item 1. ] } return $result_list } proc shiplengthx { a b } { set ship_arc_length "a" set ship_beam "b" set ship_length 1 set ship_length [sqrt([* $a $a ]-[* [/ 16. 3.][* $b $b .5 .5 ]])] return $ship_length } puts " ship arc conv to arc meters as 6*N >> [ multiplylist 6 .5 1. 1.5 2. 2.5 3 3.5 5.0 ] " puts " ship beam as .25*L meters >> [ multiplylist .25 2.89 5.79 8.68 11.58 14.48 17.38 20.27 28.96 ]" set ships {2.89 5.79 8.68 11.58 14.48 17.38 20.27 28.96} puts " test of math ops, mean >> set mean [/ [+ {*}$ships] [double [llength $ships]]]"

In some Sumerian contexts, the Giparu or sacred precinct was the residence of the en-priestess of the Moon god (Nanna or Ninnar), effectively a state cult for enthroning the king. The Giparu was the site of the Sacred Marriage Rite, probably conducted every year at various major cities. "pa4" is a Sumerian root word meaning priest; "gi6" is a Sumerian root word meaning earth or dark place. Sometimes, the en-priestess was the daughter or other kin of the king. In Sumerian, "en" means the king or shepherd. Also, successive en-priestesses or other offerings were buried under the floor of the Giparu. A later era calcite medallion of Enheduanna shows the Akkadian en-priestess conducting a threshold sacrifice. The medallion shows a triangular wall of 15 degrees face which would be called a buttress wall in modern terms.

Locally in the Umma tablets , the local temple was called the Shara or Sara. The Sumerian word “Sar,Sa, or Sagina” is a root word meaning king, general, or royal officer in some contexts (ref. sag means head). The temple at Umma is sometimes referred as Sara on the quay, house of Sara, Sara of Umma. The temple was supported by the province of Umma and further received revenues and products locally. While not all the Umma tablets can be dated to the reign of King Amar-suen ( 2046-2038 BCE ), many tablets can be correlated by the local calendar of Umma, seals/names of the project personnel, and by personal names such as Ur-Sara (steward of Sara), Lu-Sara (man servant of Sara), Sara-mutum (woman servant of Sara. There was even a common beer called Sarazi (Sara Beer) and a common ration cereal called Sara-emmer (Sara Wheat).

There was an Inanna temple near Zabalum. Men were normally forbidden in the temple (after consecration). Aside from the priestess there were about 60 women singers who served in the temple rites, but probably were housed on the dower estate of Girsana.

The brick piles at Gaes can be placed in a tentative association with the events in the reign of King Amar-Suen. The associations are not really a formal history, but are culled from clay tablets on receipts, chits, and legal documents from the Ur III period. King Amar-suen came to the throne in 2046 BCE and the reign numbers refer to this date. The following individuals received a staff of high office:Akhuni, Ue-Enlilla son of the Elamite(?), Lu-Shara son of Urzu, Lu-ibgal son of Lugal-massu, the military governor, and Ur-Lisi, the governor of Umma province (no dates given). One tablet cites Lu-Shara as a scribe and another tablet as a hazannu official (mayor ). Lu-Shara was probably the mayor or administrative scribe under Ur-Lisi, in the reign of Amar-Suen. In Amar-Suen 1, Ur-Shara the scribe paid a credit for 19 copper sickles and 8 copper pickaxes. In Amar-Suen 1, the governor of Umma paid a credit for 170 male workers or about 5 workcrews for one day. Three promissory notes and two receipts on the Gades bricks were dated to the month of Akiti of Amar-Suen 4, mostly similar descriptions of the brick piles. Lu-sin accepts 33 sar of brick for the (moon?) temple and 10 sar of bricks for the military depot (marsa) storage house (no dates or specific location given). While not all the bricks can be established as fired, the fired bricks were probably intended as foundation bricks, underground dedication shrine boxes ,and high use floors/thresholds (ref. the Nimintabba temple at Ur and the Inanna temple at Nippur. Some of the fired bricks were probably used in rebuilding the Karzida quay in front of the moon temple. By custom, the buttressed walls of the en-priestess residence were exceptionally thick and the foundation under the walls was extra strong. In Amar Suen 7, The en-priestess En-Nanna-Amar-Sin-kiagra was installed at Gades/Karzida (for the first time). In Amar Suen 9, the en-priestess En-Nanna-Amar-Sin-kiagra was installed at Gades/Karzida (third time). The project was believed to be completed in the ninth and last year of the reign of Amar-Suen. The available data suggests the building or restoration on the moon temple was completed in 4 to 6 years.

event | year of reign | year BCE | comment | comment |
---|---|---|---|---|

King Amar-suen begins reign in third dynasty of Ur | Amar suen 1 | 2046 | clay tablet, king list | |

King Amar-suen directs restoring temples of Sumeria at Ur, Eridu, and Gades | Amar suen 1 | 2046 | building inscriptions & assumptions | |

Ur-Shara buys 19 copper sickles and 8 pickaxes | Amar-Suen 1 | . 2045 | food and economic preparations | |

Year King Amar-Suen raided Urbilum | Amar-Suen 2 | . 2045 |

Year King Amar-Sin made a silver throne for Enlil | Amar-Sin 3 | 2043 | |

bricks ordered?? | Amar suen 3?? | 2043 | assumption |

bricks on site at Umma | Amar suen 4 | 2042 | 5 clay tablets |

Umma province ships bricks to Gaes, remaining mudbricks cured , building and repairing enpriestess residence (temple) begins at Gaes >> | Amar suen 5? | 2041 | many assumptions |

Year Shashrum was raided for the second time | Amar suen 6? | 2040 | clay tablet |

enprestess En-Nanna-Amar-Sin-kiagra installed at Gaes/Karzida (first time) | Amar suen 7 | 2040 | clay tablet |

Year Khukhnuri was raided | Amar-Sin 7 | 2040. | clay tablet |

enprestess En-Nanna-Amar-Sin-kiagra installed at Gades/Karzida | Amar suen 8? | 2039 | clay tablet |

Year the priest of Eridu was installed | Amar-Sin 8. | 2039 | clay tablet |

enprestess En-Nanna-Amar-Sin-kiagra installed at Gaes/Karzida (third time) | Amar suen 9? | 2038 | clay tablet |

possible project completed at Gades/Karzida | Amar suen 9? | 2038 | many assumptions |

King Amar-suen dies, trampled by hooves of oxen in battle??? | Amar suen 9 | 2038 | clay tablet, king list |

quarters of Umma province, URIII kingdom | number of plow teams | arable land kmsq |
---|---|---|

Da-Umma | 60 | 233.28 |

Apisala | 20 | 77.77 |

Guedina | 10 | 38.8 |

Musbiana | 10 | 38.8 |

Zalabam-Gasana | 5?? | 19.4 |

each team assigned 6 bur, 6*64800 sqmeters =3888000 | ||

3888000 sq meters is 3.88 square kilometer |

canal regulators and (hence substantial burnt brick yards) were located at Umma,Girsu,Lagash,Shurruppak,Larsa,and Isin.

1.3E6 bricks were used at Isin. 68.6E3 bricks were estimated at Girsu 4.46E5 bricks used at Lagash Rebuild (second reg) 4.325E5 bricks used at Lagash (first reg.)

Wages at the Girsu Resthouse and Prison.

English title | Sumerian title | grain | beer if any | meat portions if any | other gifts, comments | |
---|---|---|---|---|---|---|

messenger | sagkakdu | 5 | 5 | 1/2 sheep | ||

guard for messenger | lu-gis.tukul | 2 liters | 1/2 sheep, 1 leg | |||

cupbearer | zabardab | 5 | +mutton | |||

overseer | ugalug | 5 | ||||

captain or overseer of prison tow boat | 5 | |||||

ship builder craftsman | ma-gin Ma-[gan.sup.ki | 5? | ||||

tow gang | sa-bar-e dab.sub.5-ba | 2 | ||||

bird keeper | sa-musen? | 2 | 2 | |||

ox driver | sa-gu.sub.4 | 2 | 2 | |||

woodshed sheephouse | e udu ga-nun gis | 2 | reed fodder, smoked meat etc | |||

apprentice scribe | dub-sar-tur-tur | 2 | ||||

prison guard, trooper | 2 | |||||

dog keeper | 2 | |||||

carrier, porter | UN-il | 2 | ||||

elderly worker of good status | lu su-gi.sub.4 | 2 | ||||

invalid of good status | lu HU.KU.BU | 2 | ||||

Invalids under intermediary foremen | lu HU.KU.BU | 1 | hot soup | |||

women prisoners of war | lu HU.KU.BU | 1 or 4/3 | ||||

prisoners of state | ganab | 1 | carried reeds etc | |||

male war captive | nam-ra-aka | 1/2 | ||||

children of the mule keeper | dumu sipa ansekunga-me) are | 1 | ||||

children of rope towers | TUR.TUR kir-dab.sub.5 | 1/2 | ||||

children of grass carriers | 1/2 | |||||

children of carriers | UN-il-TUR.TUR | 1/2 | ||||

ocasionally 30 or 50 prisoners assigned to carry reeds | ||||||

canal regulators and (hence substantial burnt brick yards) were | ||||||

located at Umma,Girsu,Lagash,Shurruppak,Larsa,and Isin. | ||||||

wife of governor had allotment of 2 gur of grain and 30 sheep carcasses | ||||||

high status individuals and foremen were intermediaries | ||||||

intermediaries doled grain mush, beer, hot soup, and clothing to retainers |

History of Cuneiform Math | years | artifact | comment | active cultures |
---|---|---|---|---|

YEARS BCE Nippur/Jewish count | ||||

BCE | fm 3760 BCE | artifact | comment | |

3500 | 240 | Proto-literate | Uruk | Sumeria |

3500 | 240 | calendar | Nippur lunisolar | Nippur,Sumeria |

3200 | 540 | writing notable | Uruk IV writing notable | Sumeria |

2550 | 1190 | Scribal profession | temple administers and scribes separate caste from priests | Sumeria |

2350 | 1390 | Sargonic math | King Sargon of Akkad, effectively creates needs for imperial math | Sumeria |

2100 | 1640 | sexagesimal place value notation | UrIII or Neosumeria | Sumeria |

2075 | 1665 | place value | place value notation introduced, probablt king shulgi's reforms | Sumeria |

1792 | 1948 | Conquests of King Hammurabi | Hammurabi removes many players from board | Old Babylon period |

1775 | 1965 | Eshnunna“algebraic” problems | Eshnunna math texts | Old Babylon period |

1758 | 1982 | Mari math, place-value techniques | possible math texts spread to Mari, 1800 to 1758 | Old Babylon period |

1749 | 1991 | Larsa math | tables of squares,inverse squares, and cubes | Old Babylon period |

1600 | 2140 | Venus observations | Nippur lunisolar | Old Babylon period |

1595 | 2145 | collapse of Old Babylon and state sponsers | Hittite raid on Babylon | Old Babylon period |

1400 | 2340 | star list | Ea, Anu, and Enlil | Nippur,Sumeria |

1200 | 2540 | star list | stars of Elam, Akkad, Amurru | Sumeria |

1150 | 2590 | astrolab | stars Ea,Enhil,Anu | Sumeria |

1000 | 2740 | star table | stars Ea,Enhil,Anu | Sumeria |

1000 | 2740 | star table | more stars for Ea,Enhil,Anu | Sumeria |

700 | 3040 | star table | heptagon tablet, related to star lists? | Neo-Assyrian Empire |

600 | 3140 | lunar eclipse compilations | partly based on star lists | Persian Empire |

575 | 3165 | Saros lunar calc. in use | partly based on star lists | Persian Empire |

500 | 3240 | year goal texts, Bablyon | partly based on star lists | Persian Empire |

350 | 3390 | Susa geometry & incipient zero | Susa geometry & rare use of checkmarks for placeholder and incipient zero | Susa, Old Elamite kingdom, Persian Empire |

350 | 3390 | use of incipient zero in Astronomy | rare use of checkmarks for placeholder and incipient zero | Bablyon, Seleucid Empire |

315 | 3425 | end of lunar eclipse tables | partly based on star lists | Bablyon, Seleucid Empire |

In one coefficient list, there was a coefficient for wool (igigubbum-hi-a) as 48 in a base 60 fraction (48/60). The term igigubbum is Akkadian, apparently borrowed from Su, igi-gub-ba ( I see fraction (used as reciprocal)). The term hi-a appears in URIII texts associated with wool and textiles, and means processed wool or processed fleece. In the Nippur lexical lists, the term siki al-hi-a was translated as processed wool (work). A math problem using the wool coefficient is not available, but will try to convert 48 in base 60 into modern decimal units and proportions. In modern terms, the equation is coverage area * reciprocal coefficient equals material. Starting with Sumerian units, the coverage area in sar units times reciprocal coefficient (60/48) equals weight of wool in gu units, simply sar*(60/48)=gur. Rearranging terms, the proportion is gu units/ sar units = 60/48 or sar units / gu units = 48/60. The proportions hold true if 60 /48 is reduced to 5/4, meaning 5 gus of wool equals 4 sar of woven cloth. 5 gu/4 sar equals (5*60*0.4977) kg/4*32 sqm, 1.166 kg/sqm, 1166 grams/sqm for wool cloth. This figure of 1166 grams/sqm is probably one weight of wool cloth and probably the Sumerians used other cloth weights also.

For the clothing, its easier to use square cubits than sars. A sar equals 144 square cubits, and a gu equals 60 manas. So the 5/4 ration above would equal (5*60)/(4*144), 0.521, rounding 0.5 manas per square cubit. Or the reciprocal was equivalent to 2 square cubits per mana. The 2 mana ration to low status men would be equivalent to 2*2 or 4 sq cubits of woolen cloth. The 3 mana ration to craftswomen would be equivalent to 3*2 or 6 sq. cubits. The 4 mana payment to project overseers would be 4*2 or 8 sq. cubits. The child's garment above would be 3*2 or 6 sq. cubits. The high status female full skirt would be 3.5*2 or 7 sq. cubits. The tug-guz-za long shirt for the high statue male weighed 5.474 manas and was 5.5*2 or 11 sq. cubits. In general, the wool ration and the weight of clothing was a measure of status.

Dear uniquename, I noticed you referred to Thales Theorem in one of your posts. I have a question on the use of Thales Theorem by Old Babylonian mathematicians (circa 1900 BCE). By remainders and artifacts in base 60 problems and math coefficients, there appears to be one tradition of Babylonian mathematicians that derived formulas from Thales Theorem and one tradition of Babylonian mathematicians that derived formulas using Pythagoras or sqrt(sum squares). Apparently, the Greek Thales was of the former persuasion in a different era. Especially the dual use of Thales Theorem and sqrt(sum squares) is seen in the Old Babylonian coefficient lists (base 60), ref. Eleanor Robson paper on coefficient lists at Oxford. Supposing no computers or slide rules, is the Thales Theorem easier to use than sqrt(sum squares)? Does the Thales Theorem produce numbers that are easier to factor in simple primes (2,3,5),use in pi multiplication, use in base 10, or surveying land (with equilateral triangles)? Old Babylonians are known to have avoided division and usually numbers 7 and 9 in math problems, as producing numbers difficult to factor in the base 60 system. My email service is erratic lately, please post your reply at the end of my tcl wiki homepage, thanks gold

It is possible to find solutions to equations using the method of false positions (regula falsi) or gaming with the eTCL calculator. Suppose a coating of some known thickness is applied on known surface area and one wished to estimate the coating coefficient. From an initial solution either from the testcases already loaded into the calculator or from order of magnitude calculations, the coating coefficient can be estimated from a series of guesses or false positions in incremented steps. The accuracy of the coefficient solution depends on step size and is usually given as half step size (0.5*step). For example, the solution if found in the series <1, 1000, 2000, 3000, 4000,5000> would have a accuracy of plus or minus 1000/2 or 500. Loosely speaking, this is operating the eTCL calculator in reverse. Finding the coefficient that gives a solution of specified input (2 sides of a surface area) and specified output (volume).

This is the gist of an Old Babylonian (OB.) math problem for water irrigation, converted to metric units from clay tablet YBC4186. A cubic water cistern of L/W/H 60/60/60 meters was used to irrigate a square field to a depth of 0.015 meters. The volume of the cistern would be L*W*H, 60*60*60, 2.16E5 cubic meters. What are the dimensions of the field, assuming square field? In terms of a modern algebraic equation, the answer was field area equals L*W*H/D, 60*60*60/0.015, 14.4E6 square meters, or 14.4 square km. Each side of the field would be sqrt(14.4) or 3.8 km. To initialize the eTCL calculator, press testcase 1 and push solve, returning the first test case solution. In the length and width fields, enter 3.8E3 meters and solve should return the correct surface area (14.4E6).

Continuing with the OB. water irrigation problem, it is possible to game on a eTCL solution for the coefficient (not in the OB. solution or outside the OB. text). Loading and solving for possible test solutions (regula falsi) as (coefficient = 1000, 2000, 3000, 3500, 4000), the coefficient in the test problem is close to 3400.

RLE (2014-05-20):

You have the following statement in almost all of your pages:

- Report allows copy and paste from console, but takes away from computer "efficiency".

What do you mean by "takes away from computer 'efficiency'" in the context of allowing copy/paste?

How do you see allowing copy/paste as "taking away computer efficiency"?

gold On one of my early posts to tcl-wiki, I received a gripe about using puts in my calculating programs, which might take away from computing speed in an algorithm subroutine. I guess we were assuming number crunching was the main job of the computer. I still use the puts, but the caution seemed valid.

Thanks for the feedback.

RLE (2014-05-23): Ah, I see. Ok, the advise was valid, but not for the reasons your words on your pages state. Copy and paste from console has nothing to do with "taking away from computer efficiency".

Given what you have said above, the "gripe" would likely have been directed at performing a puts inside of a numerical computation loop, i.e., doing this:

for {set i 0} {$i < 10000} {incr i} { for {set j 0} {$j < 10000} {incr j} { lset matrix $i $j [ expr { [lindex $matrix $i $j] * [lindex $matris $j $i] } ] puts "$i $j [ lindex $matrix $i $j]" } }

This (made up) numerical computation loop above iterates 100,000,000 times. The result is it runs puts 100,000,000 times, which will slow down the loop because puts has to do output (lots of other code to execute to ultimately achieve the "output" operation). Removing that puts (or commenting it out) would speed up that loop by quite a large amount.

Also, note that while debugging, sometimes running a puts inside the inner loop to see intermediate results can help you locate a bug or a math error.

But there is a difference when it comes to output of results to a human (or another machine). At that point, you have little choice but to perform at least one puts (assuming you appended your result together beforehand). For an "output of results" routine, the point is to perform **output**, so running puts is not reducing "efficiency", rather it is the whole point of the output routine.

With that said, if you were doing something like outputting one character at a time of the result, with a puts per character, then yes, that would have been inefficient.

So the "gripe" was most likely not a blanket "this applies to everything" statement, it was much more likely a "given what you have here, you are being inefficient" "gripe". The difference is important. It seems you may have over-generalized the "gripe". gold Text on console puts and efficiency mostly pulled from my wiki pages, 22may2014

Here is some eTCL starter code for cleaning TCL lists of empty, blank, or small length elements. This eTCL code is a compilation of various posts or ideas on this wiki. Sometimes, bare statements and variables in context were swapped and wrapped inside a consistent subroutine for testing. For testing the procs, lists of words or numbers can be generated , screen grabbed, or dumped into a TCL list with many empty, blank, or small elements. The orignal target list is multiple decks of 52 cards with added jokers as {}(empty element) { }(one blank space) {.} {} {;}.

original {2 3 4 5 6 7 8 9 ...{} { } {.} {} {;} {} { } {.}...} routine #2 {2 3 4 5 6 7 8 9 ... { } {.} {;} { } {.} ...} , empty elements removed routine #1 13.0177 microseconds per iteration routine #2 172.884 microseconds per iteration routine #3 8.0467 microseconds per iteration routine #4 6.9682 microseconds per iteration routine #5 1.8228 microseconds per iteration routine #6 4.7997 microseconds per iteration

# written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI, 15oct2014 # Console program for list of Unicode cards, values, multiple N1 decks # N1*decks one liner from FW # cleanup from RS, working for small lists <25 e., problem with medium >500 e. # idea using regsub statements for blanks from RL # routine5 using statement from H package require Tk namespace path {::tcl::mathop ::tcl::mathfunc} console show global counter set cards { 2 3 4 5 6 7 8 9 10 J Q K A } set list_values { 2 3 4 5 6 7 8 9 10 10 10 10 11 } set jokers { {} { } {.} {} {;} {} { } {.} {} {;} {@} { } {.} {} {;} } set list_cards [ concat $cards $cards $cards $cards $jokers] proc lrepeat_FW {count args} {string repeat "$args " $count} set list_cards [ lrepeat_FW 10 $list_cards ] proc empty_elements_in_list1 {lister} { set new_lister {} foreach item $lister { if { $item != "" } {lappend new_lister $item} } return $new_lister} proc empty_elements_in_list2 {lister} { regsub -all "{}" $lister "" new_lister5 return $new_lister5 } proc empty_elements_in_list3 {lister} { set take_out2 {} foreach item $lister { if { [string length $item ] > 0 } {lappend take_out2 $item}} return $take_out2 } proc empty_elements_in_list4 {lister} { set take_out5 {} foreach item $lister { if { {expr {[string length $item]}} > 0 } {lappend take_out5 $item}} return $take_out5 } proc empty_elements_in_list5 {lister} { set take_out6 {} while {[lsearch $lister {}] >= 0} { set lister [lreplace $lister [lsearch $lister {}] [lsearch $lister {}]] } set take_out6 $lister return $take_out6 } proc cleaner {target args} { set res $target foreach unwant [split $args ] { set res [lsearch -all -inline -not -exact $res $unwant ]} # suchenworth idea return $res } puts " original $list_cards " puts " routine #1 [ empty_elements_in_list1 $list_cards ] " puts " routine #2 [ empty_elements_in_list2 $list_cards ] " puts " routine #3 [ empty_elements_in_list3 $list_cards ] " puts " routine #4 [ empty_elements_in_list4 $list_cards ] " puts " routine #5 [ empty_elements_in_list5 $list_cards ] " puts " routine #6 [ cleaner $list_cards A ] " puts " routine #1 [ time { empty_elements_in_list1 $list_cards} 10000 ] " puts " routine #2 [ time { empty_elements_in_list2 $list_cards } 10000 ] " puts " routine #3 [ time {empty_elements_in_list3 $list_cards } 10000 ] " puts " routine #4 [ time {empty_elements_in_list4 $list_cards } 10000] " puts " routine #5 [ time {empty_elements_in_list5 $list_cards } 10000] " puts " routine #6 [ time {cleaner $list_cards A } 10000] "

Bypublic nameon October 13, 2013 Format: Paperback “Life Giving Sword” or Yagyu Family Memorial by Yagyu Munenori has some interest in study of katana, kendo, taichi sword, or taji jian. Alternate English translations by William Scott Wilson in “Life Giving Sword” and Thomas Cleary in “Book of Five Rings” desparately need a glossary for common definition of terms. I have supplied a starter glossary for “Life Giving Sword”. As a common ground between east and west, a Romanji equilvalent text on shujishuriken (paraphrased) terms would be useful. I hope others can make contribution to meaning of shujishuriken and other terms in Life Giving Sword. If we can not build the whole bridge, we can add a few blocks.

Glossary of Yagyu-Ryu terms and words in Yagyu Family Memorial text (c. 1632 CE) . Terms below are from 17th century text, not necessarily same as Modern Japanese usage. Takuan Soho, Yagyu Munenori, and Miyamoto Musashi used homonyms, puns, or specialized terms, which are not found in conventional Romanji dictionaries. Romanji dictionaries contain homonyms, which are words that sound the same but have different meanings. Special combined terms in martial arts (Buddhist traditions) are noted by capitals, hyphens, or quotes. bo: wooden staff bocuto: wooden sword bokken: wooden sword, usually heavy wood for exercise. chi: vital energy, or broadly energy from earth and sky. Sometimes in Japanese texts by extension, chi or ki refers to manifested chi or force. The manifested chi in Chinese texts is called jing (muscular power), jinli (martial power), or jin ( combination of emitted chi and muscular power applied to a specific target spot). daiki taiyu: divine transformation. Usually, transformation from potential or resting energy to active motion and force. human, or heaven in Chinese philosophy. chudan: sword held in middle position gedan: sword held tilted down ha: attack hachimaki: headband hakarigoto: "strategy" hakama: pleatted skirt or culottes, usually worn for exercise. hara: navel or belly heihou : “strategy”, literal “dark hidden deception” hiro: color ho:martial art hyori: deception inka: martial arts diploma isshin, “One Mind” isshin itto, “One Heart, One Sword” kan: listening with mind and contemplative insight. ken: sword or used as homonym for “plain sight or ordinary sight” as opposed to contemplative insight (kan). kendo:way of the sword kenjutsu : swordsmanship. kannen:mind should see through one’s emotions or mind should be clear of emotions. kizen:”take initiative” jo: preliminary attack jodan:sword held above forehead kage-ryu: shadow sword style, sometimes refers to following, reacting, and basing actions on opponent’s shadow. Especially, staying outside opponent’s cast shadow until closing for attack. kami: shinto diety or dieties kanshin: seeing with mind or insight. katana: long sword. katsu: refers to attainment of essential nature or “Life-Giving” katsujinken: “Life-Giving-Sword”, sometimes refers to resolution of problems without force. ken: sword kenshogodo: seeing into essential nature. ki: vital energy kiai: focused shouts, loud scream used to disturb opponent. koku: empty space kyusho: vital point kuji: 9 hand signs or mudras used in kendo training. kyu: counter strike majutsu, techniques of invisibility mondo: question and answer in Zen dialogue. mu: “Non-existence”, sometimes refers to Yin side (left) of opponent or hidden side (shadow) of object. mu-kyu: “Non-existence counterstrike”, sometimes refers to circling counterclockwise (in Yin direction) around opponent for one or more paces and attacking the “Non-Existence” (left,Yin) side of the opponent. Here, “Existence” may refer to sword held by right handed swordsman and “Non-Existence” may either refer to empty hand on left side or the palm of the right sword hand viewed from the left (by the opponent). munen muso: (literal) No-Desires, No-Thought muto: “No-Sword”, sometimes refers to resolution of problems without force. Also techniques of unarmed combat. munen: “No-Thought” or refers to actions under suspension of consciousness. mushin, "No-Mind", suspension of consciousness, usually during meditation. mushinjo: suspension of consciousness, usually during meditation. myo (na) : strange, odd, without reason naginata, long spear with heavy blade. nakazumi: “mysterious-sword” is holding sword around navel or hara. nitto ryu: “two-swords-style” ryu: sword style or school satori: "enlightenment" setsuninken: “death-dealing-sword”, sometimes refers to solving problems by force only as opposed to solving problems without force. satsuninto: “death-dealing-sword”, sometimes refers to solving problems by force only as opposed to solving problems without force. seiza:kneeling position for meditation practice sensei:teacher shin: mind shinken: “Real-Sword”. shinken sho-bu: contests with “Real-Sword”. shinku: emptiness of mind shinmyo: “Mysterious”, refers to the combination of mind (shin) and strange outside action (myo). Usually found in combination as “Mysterious-Sword” or implied sword. shinmyoken: “Mysterious-Sword” , refers to the combination of mind (shin) and strange outside action (myo) holding the sword (ken) around navel, just as hara is considered center of being/energy. suigetsu, literally moon on water, refers to keeping 3 pace distance from opponent or out of opponent’s cast shadow. Note: sun and moon both cast shadows. shuji: crosspattern sword block (literal from Sino. characters, hand ji (noun suffix)). Sometimes refers to crosscounterpoint target on body of opponent. shujishuriken: (literal from Sino. characters, hand ji (noun suffix) hand inside see) perception of abilities and intentions. By extension, see inside technique of opponent. Sometimes refers to the 9 healing sounds and ideographs (mudras) used to increase alertness, warmup shoulders, and loosen hands prior to combat. tachi: great sword tsumeru: deflection or block leading to counterstrike. not a hard block. yang: positive energy or active principle . heavenly energy. clockwise movement. yin: negative energy or inactive principle. earthly energy, counterclockwise movement. tai: substance or fundamental property of all things tao: way of philosophy wakizashi: sidearm sword or short sword yari: spear zazen: meditation practice zen: meditation practice towards Self-Realization Katsujinken, “life-giving-sword by Yagyu Munori,C. 1632 CE”.Heiho Kadensho of Yagyu Munenori.Also known as Yagyu Family Memorial text in paraphrased Romanji terms, kk kk k lll jjj kkk bbb bb nn nnn mmm mmm mmm mmm

From a clay tablet, internal and external volumes of a hollow cylinder is equated to squared ratio of radius1*radius1 over radius2*radius2. Not sure about the accurate math derivation and maybe numerical coincidence, but the tablet appears to be using inner volume equals outer volume times radius1*radius1 over radius2*radius2. Hereafter, the paragraph will use the modern decimal notation, PI (3.14...), and carry extra decimal points from the eTCL calculator, whereas the Sumerians used 3 and round numbers. radius1 would be the radius of the hollow and radius2 would be the radius of the outer cylinder. In the tablet, the circumference of the outer cylinder was 1.5 units and the ratio of the inner radius to outer radius would be 1:4. The diameter of the outer cylinder would be 1.5/PI or 0.4774, and radius2 would be 0.4774/2 or .2387. radius1 would be .2387/4 or 0.0597. The height of the cylinder would be 1 unit. Using conventional formulas the volume of the outer cylinder would be 2*PI*radius2*radius2*height, substituting 2*3.14*.2387*.2387*1, 0.3578. The conventional volume of the inner cylinder would be 2*PI*radius2*radius2*height, substituting 2*3.14*.0597*.0597*1, 0.0224. The volume of the hollow cylinder would be outer cylinder minus inner cylinder, 0.3578-0.0224, 0,3354. In squared proportions, the radius1*radius1 over radius2*radius2 would be (1*1)/(4*4),1/16,0.0625. The Sumerians found the inner cylinder vol (hollow) as (1/16) * outer cylinder vol, (1/16) * 0.3578, 0.0224 in modern notation. Not on the tablet, but it follows that the hollow or outer cylinder volume would be (1-1/16)* outer cylinder vol, (15/16)* 0.3578, 0.3354.

In Sumerian base60, the factor would be 1/16 or 3/60+45/3600.

set inner_cylinder_a=b*(c*c/d*d)_ [* 0.3578 [/ [* 1. 1. ] [* 4. 4. ] ]] # 0.0223625 set hollow_cylinder_a=b*(c*c/d*d)_ [* 0.3578 [- 1. [/ [* 1. 1. ] [* 4. 4. ]] ]] # 0.3354375 set inner_cylinder_ [ eval expr 2*[pi]*.0597*.0597*1 ] # 0.0224 set outer_cylinder_ [ eval expr 2*[pi]*.2387*.2387*1 ] # 0.3578

derivation setup

barge_area =2*((pi*r*r/4)-r*r/2) # 2 times segment of circle for quarter section. barge_area = coefficient * circumference * circumference coefficient = barge_area / ( circumference * circumference) coefficient = ((2*pi*r*r/4)-2*(r*r/2) ) / ( 2*pi*r * 2*pi*r ) coefficient = (1/(4*PI*PI*r*r)*(2*pi*r*r/4) - (1/(4*PI*PI*r*r)* (2*r*r/2) reduction >> coefficient = 1/(8*PI)- 1/( 4*PI*PI ) Sumerian 3 for PI, coefficient = 1/24-1/36 ??? Sumerian text = 2/9 , 2/9 = 0.2222 decimal, base60 value = 13/60+ 20/3600

# derivation or problem of concave square, r=.5, d=1.0, ref Robson and Friberg # square of unit one on side minus 4 quarter circles of radius = 0.5,sumerian pi = 3. set concave_square_coefficient_modern_notation [ eval expr 1. - 4.* (1./4.)*[pi]*.5*.5 ] # decimal answer= 0.21460183660255172 set concave_square_coefficient_babylonian_notation [ eval expr 1. - 4.*(1./4.)* 3.*.5*.5 ] # decimal answer= 0.25, conv .25*60 ??? # above was defining bound for radius=.5, but problem wants quarter circle arc equal one. # coefficient is 4 times area of inscribed quarter_circle with arc of quarter_circle set to 1. set concave_square_coeff [ eval expr (2.*[pi] )**2. - (2.*[pi] )**2. ] Sumerian text = concave_square_coefficient = base60 26_40, 4/9

Uses of even powers (eg 2**2 and 3**2). Several Babylonian tables of powers have been published. Some of these tables are equivalent to even powers of prime numbers. For example the table of nines would give numbers, equivalent to even powers of 3. The table of 16 would give equivalent numbers based on even powers of 2. Conjecture is that these tables could have been used to generate Babylonian triplets. Ref, Babylonian Pythagorean Triplets by Michael Fowler.

# following statements can be pasted into eTCL console set aside [expr 3**4-2**6] # 17 set cside [expr 3**4+2**6] # 145 set bside [expr 2*(3**2)*(2**3)] # 144 # 3**4 => 9**2 # 2**6 => 16**1 set aside [expr 3**6-2**12] # 3367 set cside [expr 3**6+2**12] # 4825 set bside [expr 2*(3**3)*(2**6)] # 3456 #3**6 => 9**3 #2**12 => 4093 +> 16**3 # The next even power of 3 would be 3**8 and next step? might be 16**4? # 12709,13500,18548, 2 2 • 3 3 • 5 3 set bside [expr 2*( ** )*( ** )]# set bside [expr 2*(3**3)*(2**8)] # 13500 set cside [expr 125**2+54**2] # 18541 set aside [expr 125**2-54**2] # 12709 #12709 71 179 13500 2 2 3 3 3 5 5 5 18548 2 2 4637

proc list_squares { aa bb} { for {set i 1} {$i<=$bb} {incr i} {lappend booboo [ * $i $i 1. ] };return $booboo} (tclprograms) 14 % list_squares 1 5 1.0 4.0 9.0 16.0 25.0 proc listnumbers { aa bb} { for {set i 1} {$i<=$bb} {incr i} {lappend booboo [ expr 1.* $i] };return $booboo} #returns list of integer numbers from aa to bb as reals with decimals,usage [listnumbers 1 5] , answer is 1.0 2.0 3.0 4.0 5.0 proc listfib { aa bb} { for {set i 1} {$i<=$bb} {incr i} {lappend booboo [ int [ binet $i] ] };return $booboo} proc binet { n} {set n [int $n ]; return [int [* [/ 1 [sqrt 5]] [- [** [/ [+ 1 [sqrt 5]] 2 ] $n ] [** [/ [- 1 [sqrt 5]] 2 ] $n ] ] ] ] } # usage, set binet1 [ binet 8],answer 21, removing int's will return real numbers # usage, set fibno [ listfib 1 8 ], answer 1 1 2 3 5 8 13 21 proc fibonacci_approx_for_large_N {n} { set phi [/ [+ 1 [sqrt 5]] 2 ] ; return [/ [** $phi $n ] [sqrt 5 ]] } % proc fibonacci_approx_for_large_N {n} { set phi [/ [+ 1 [sqrt 5]] 2 ] ; return [int [/ [** $phi $n ] [sqrt 5 ]]] } (tclprograms) 8 % [fibonacci_approx_for_large_N 1] invalid command name "0.7236067977499789" (tclprograms) 9 % [fibonacci_approx_for_large_N 2] invalid command name "1.1708203932499368" (tclprograms) 10 % [fibonacci_approx_for_large_N 3] invalid command name "1.8944271909999157" (tclprograms) 11 % [fibonacci_approx_for_large_N 4] invalid command name "3.065247584249853" proc add {args} {return [ ::tcl::mathop::+ 0. {*}$args]}; (tclprograms) 2 % add 12 11 10 9 8 7 6 5 4 3 2 1 78.0 console show package require math::numtheory #namespace path {math::numtheory} namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 proc square_root_function { number_for_root } { set counter 0 set epsilon .0001 while { $counter < 50. } { if { [* $counter $counter 1. ] > [* $number_for_root 1.] } {break} incr counter } set square_root_estimate $counter while {1} { set keeper $square_root_estimate set starter $square_root_estimate set remainder [* $starter $starter 1. ] set remainder [- $number_for_root [* $starter $starter 1. ] ] set square_root_estimate [+ $starter [/ $remainder [* 2. $starter ]]] if {abs($keeper - $square_root_estimate) < $epsilon} break } return $square_root_estimate }

gold Here is some eTCL starter code for Babylonian Square Side Rule & Diagonal Algorithm in calculator shell.

The Babylonian Square Side Rule from clay tablets was loaded into an eTCL calculator shell. The Babylonian Square Side Rule is of historical interest, but the rule is not very accurate and dependent on an initial input or guess. The square side rule with a single trial input becomes less accurate with increasing N. In some math problems, the Babylonians used the Square Side Rule for calculating the diagonals of squares and rectangles. The Babylonians did not use algebra notation, so the reader will have to bear some anachronisms in the eTCL pseudocode. Succesive or iterated math solutions are called algorithms and the Square Side Rule procedure is one of the earliest algorithms documented. The TCL procedures are descendants of this idea.

In the Babylonian problem texts on clay tablets, there are numbers and coefficients which were used in determining geometric dimensions, the amount of materials, and the daily work rates of the workers. One difficulty is determining the effective power of the numbers in base 60. For example, 20 could represent either 20*3600, 20*60, 20, 20/60, 20/3600, or even 1/20. The basic dimensions of geometric figures and final tallies were presented in the Babylonian accounts on clay tablets, but sometimes the calculations were left off the tablet, broken off, or garbled. At least one approach for the modern reader and using modern terminology is to develop the implied algebraic equations from the Babylonian numbers. Then the eTCL calculator can be run over a number of testcases to validate the algebraic equations. In the eTCL code, extra significant digits are retained to check the function errors, but not to imply greater precision in the algorithm.

For the first testcase of sqrt 2, the initial trial_square_root entry of 2 gave an error of 6.06 percent. For the second testcase of sqrt 10, the initial trial_square_root entry of 3 gave an error of 0.138 percent. For the third testcase, the initial trial_square_root entry of 9 gave an error of 0.555 percent. An iterative solution with successive trial_square_root entries loaded as 9, 10.05555, and 10.000153437 showed 1.177E-8 percent error in three interations.

In a previous wiki page, an eTCL calculator was used to generate Babylonian triplets which are examples from the tablet Plimpton 322 and many other papers. Mansfield and Wildberger have postulated that the Babylonian triplet listings in Plimpton 322 and auxiliary triplets were used in determining the diagonals and side ratios of right triangles, ref below. Not sure I comprehend all the Mansfield and Wildberger efforts, but an eTCL calculator could be adapted to generate the Babylonian triplet table and calculate the diagonals and side ratios of right triangles from a subset of numbers, compatible with the standard reciprocal table. There is a infinite set of right triangles, but a finite subset of right triangle and side ratios that can be manipulated with the sexagesimal positive integer subset in Babylonian standard reciprocal table.

Model problem for tablet Plimpton 322 ) Setting up model problem with a priori knowledge. A right triangle has known sides of diagonal 15, base 12, and unknown short side (9). Pythagorean theorem is given in TCL format below. Alternate method if a similar triangle can be found, the sides of similar triangles can be solved by ratios. The numbers for diagonal 15 and base 12 can be factored as 3*5 and 2*2*3. The factor of 3 is found in diagonal and base, reduction to sides 5 and 4. If triangle is similar to 5:4:3, then unknown side is 3*3 or 9.

set solution [sqrt [- [* 15. 15.] [* 12. 12. ]] ] # answer 9. # using pseudocode on similar triangles 2 quantities needed and lookup table entries for diagonal_side and long_side posit solution exists between 2 similar triangles in look up table factor sides 15 and 12 as 3*5 and 2*2*3 TCL procedure can factor diagonal and long side here in trial code, all factors are low primes solution of short_side as large single prime is possible apparently, infinite numbers of primes exist as possible short_sude, >> if not limited in table << if beyond table, solution will not be found find common factor of 3 unknown side from similar 5:4:3 triangle is 3 times 3 for B. ss. solution, short_side = diagonal * (1/(3*5) & long_side *(1/(2*2*3) trial_square_root, w.a. guess formula factor , usually 2 or 3 quantity "rooty? lacking one" from 322 tablet Babylonian trial formula from square side rule set approximate_rooty [* [/ 1. $formula_factor ] [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] ] set function(diagonal) = (1/2)*(diagonal*(1/guess) + guess) set function(diagonal) = (1/2)*(diagonal*(1/long_side) + long_side) set function(diagonal) = (1/2)*(3*5*(1/(2*2*3)) +2*2*3) set function(diagonal) = (1/2)*(5*(1/(2*2)) +2*2*3), (1/2)*(5/4+12) or 6 iteration > set function(diagonal) = (1/2)*(5*(1/(6)) +6), (1/2)*(5/6+6) or 3+5/12 possible reduction of formula by either small prime factors or other large prime factors set side5 $trial_square_root set side6 [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] set side7 [* [/ 1. $formula_factor ]] check approx. rooty with sqrt function in TCL

By inspection in modern terms and decimal notation, the numbers on the remaining part of the Plimpton tablet ranged in magnitude from 3 to 18548 and fitted into a right triangles give acute angles from 44.8 to 31.3 degrees. In the translations and this page, the term diagonal is preferred to hypotenuse of a right triangle. On the Plimpton tablet, there are many prime numbers in the extant triplets, as noticed in several papers. A triangle with common factors on the diagonal and the other two sides can be reduced into a similar triangle. A triangle with a prime number on any side (and the prime number not a common factor) cannot be reduced further.

# using pseudocode for Babylonian procedure algorithm. 3 quantities needed target number trial_square_root, w.a. guess formula factor , usually 2 or 3 set approximate_root [* [/ 1. $formula_factor ] [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] ] set side5 $trial_square_root set side6 [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] set side7 [* [/ 1. $formula_factor ]] check approx. root from square side rule with sqrt function in TCL ref. errorx procedure check_answer new area =? desired goal , desired goal reached (yes/no) set answers and printout with resulting values

In planning any software, it is advisable to gather a number of testcases to check the results of the program. The math for the testcases can be checked by pasting statements in the TCL console. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the capacity functions (subroutines).

table 1 | printed in | tcl wiki format |
---|---|---|

quantity | value | comment, if any |

1: | testcase_number | |

2.0 : | target number N | |

2.0 : | trial square root | |

2.0 : | function factor | |

3.0 : | answers: intermediate term in formula | |

4.0 : | trial square | |

1.4142135623730951 : | square root from TCL sqrt function | |

6.0660171779821193 : | percentage error | |

1.5 : | approximate square root from square side rule |

table 2 | printed in | tcl wiki format |
---|---|---|

quantity | value | comment, if any |

2: | testcase_number | |

10.0 : | target number N | |

3.0 : | trial square root | |

2.0 : | function factor | |

6.333333333333333 : | answers: intermediate term in formula | |

9.0 : | trial square | |

3.1622776601683795 : | square root from TCL sqrt function | |

0.13879257199866935 : | percentage error | |

3.1666666666666665 : | approximate square root from square side rule |

table 3 | printed in | tcl wiki format |
---|---|---|

quantity | value | comment, if any |

3: | testcase_number | |

100.0 : | target number N | |

9.0 : | trial square root | |

2.0 : | function factor | |

20.111111111111111 : | answers: intermediate term in formula | |

81.0 : | trial square | |

10.0 : | square root from TCL sqrt function | |

0.55555555555555358 : | percentage error | |

10.055555555555555 : | approximate square root from square side rule |

- Daniel F. Mansfield , N.J. Wildberger.
- Plimpton 322 is Babylonian exact sexagesimal trigonometry.
- Ref. square side rule
- Historia Mathematica, August 2017 DOI: 10.1016/j.hm.2017.08.001
- Newsweek, Babylonian Tablet Could Hold Mathematical
- Secrets For Today's Researchers, Josh Lowe , 8/25/17
- Plimpton 322 Tablet and the Babylonian Method of
- Generating Pythagorean Triples,
- Abdulrahman A. Abdulaziz, University of Balamand, 2010
- Seaching for Babylonian Triplets Slot Calculator Example
- Babylonian trailing edge algorithm and reverse sequence algorithm for reciprocals, eTCL demo example calculator, numerical analysis
- Babylonian Field Expansion Procedure Algorithm and eTCL demo example calculator, numerical analysis
- Babylonian False Position Algorithm and eTCL demo example calculator, numerical analysis
- A Geometric Algorithm with Solutions to Quadratic Equations
- in a Sumerian Juridical Document from Ur III Umma
- Joran Friberg, Chalmers University of Technology, Gothenburg, Sweden
- google search engine <Trapezoid area bisection>
- Wikipedia search engine <Trapezoid area >
- mathworld.wolfram.com, Trapezoid and right trapezoid
- Mathematical Treasure: Old Babylonian Area Calculation, uses ancient method
- Frank J. Swetz , Pennsylvania State University
- Wikipedia, see temple of Edfu, area method used as late as 200 BC in Egypt.
- Wikipedia, Methods of computing square roots,
- Ref. square side rule also known as Babylonian method or Heron's method
- Another simple database
- Richard Suchenwirth
- editRecord
- Oneliner's Pie in the Sky, ref. errorx procedure
- One Liners
- Category Algorithm
- Square Root
- Babylonian Number Series and eTCL demo example calculator
- Brahmagupta Area of Cyclic Quadrilateral and eTCL demo example calculator
- Gauss Approximate Number of Primes and eTCL demo example calculator
- Land surveying in ancient Mesopotamia, M. A. R. Cooper
- Sumerian Approximate Area Quadrilateral and eTCL Slot Calculator Demo Example , numerical analysis
- Thomas G. Edwards, Using the Ancient Method of False Position to Find Solutions
- Joy B. Easton, rule of double false position
- Vera Sanford, rule of false position
- www.britannica.com, topic, mathematics trapezoid
- Sumerian Equivalency Values, Ratios, and the Law of Proportions with Demo Example Calculator
- Babylonian Sexagesimal Notation for Math on Clay Tablets in Console Example
- Late Babylonian Field Plans in the British Museum, books.google.com/books
- Karen Rhea Nemet-Nejat
- Late Babylonian Surface Mensuration Author(s): Marvin A. Powell Source: jstor
- Poles and walls in Mesopotamia and Egypt , Melville,
- www.sciencedirect.com/science/article
- Pythagorean ‘Rule’ and ‘Theorem’ – Mirror of the Relation Between Babylonian and Greek Mathematics,
- Jens Høyrup, Roskilde University
- On Plimpton 322. Pythagorean numbers in Babylonian mathematics, E. M. Bruins
- PLIMPTON 322: A UNIVERSAL CUNEIFORM TABLE FOR OLD BABYLONIAN
- MATHEMATICIANS, BUILDERS, SURVEYORS AND TEACHERS
- Rudolf Hajossy

# pretty print from autoindent and ased editor # Babylonian Square Side Rule calculator # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI, 2oct2017 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief flat -bg aquamarine4 pack .frame -side top -fill y -anchor center set names {{} {target number N :} } lappend names {trial square root:} lappend names {formula factor: } lappend names {answers: intermediate term in formula } lappend names {trial square :} lappend names {square root from TCL sqrt function : } lappend names {percentage error: } lappend names {approximate square root from square side rule :} foreach i {1 2 3 4 5 6 7 8} { label .frame.label$i -text [lindex $names $i] -anchor e entry .frame.entry$i -width 35 -textvariable side$i grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 } proc about {} { set msg "Calculator for Square Side Rule from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc ::tcl::mathfunc::precision {precision float} { # tcl:wiki:Floating-point formatting, [AM] set x [ format "%#.5g" $float ] return $x } #proc errorx always returns a positive error. #Normally assume $aa is human estimate, #assume $bb is divinely exact. proc errorx {aa bb} {expr { $aa > $bb ? (($aa*1.)/$bb -1.)*100. : (($bb*1.)/$aa -1.)*100.}} proc calculate { } { global answer2 global side1 side2 side3 side4 side5 global side6 side7 side8 global testcase_number incr testcase_number set side1 [* $side1 1. ] set side2 [* $side2 1. ] set side3 [* $side3 1. ] set side4 [* $side4 1. ] set side5 [* $side5 1. ] set side6 [* $side6 1. ] set side7 [* $side7 1. ] set side8 [* $side8 1. ] set target_number $side1 set trial_square_root $side2 set formula_factor $side3 set approximate_root [* [/ 1. $formula_factor ] [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] ] set side4 [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] set side5 [* $trial_square_root $trial_square_root] set side6 [sqrt $target_number ] set side7 [ errorx $approximate_root [sqrt $target_number ] ] set side8 $approximate_root } proc fillup {aa bb cc dd ee ff gg hh} { .frame.entry1 insert 0 "$aa" .frame.entry2 insert 0 "$bb" .frame.entry3 insert 0 "$cc" .frame.entry4 insert 0 "$dd" .frame.entry5 insert 0 "$ee" .frame.entry6 insert 0 "$ff" .frame.entry7 insert 0 "$gg" .frame.entry8 insert 0 "$hh" } proc clearx {} { foreach i {1 2 3 4 5 6 7 8 } { .frame.entry$i delete 0 end } } proc reportx {} { global answer2 global side1 side2 side3 side4 side5 global side6 side7 side8 global testcase_number console show; puts "%|table $testcase_number|printed in| tcl wiki format|% " puts "&| quantity| value| comment, if any|& " puts "&| $testcase_number:|testcase_number | |&" puts "&| $side1 :|target number N | |&" puts "&| $side2 :|trial square root | |& " puts "&| $side3 :|function factor | |& " puts "&| $side4 :|answers: intermediate term in formula| |&" puts "&| $side5 :|trial square | |&" puts "&| $side6 :|square root from TCL sqrt function | |&" puts "&| $side7 :|percentage error | |&" puts "&| $side8 :|approximate square root from square side rule | |&" } frame .buttons -bg aquamarine4 ::ttk::button .calculator -text "Solve" -command { set side8 0 ; calculate } ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 2. 2.0 2.0 3.0 4.0 1.414 6.066 1.5} ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 10.0 3.0 2.0 6.333 9.0 3.162 0.138 3.166} ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 100.0 9.0 2.0 20.111 81.0 10.0 0.5555 10.0555} ::ttk::button .clearallx -text clear -command {clearx } ::ttk::button .about -text about -command {about} ::ttk::button .cons -text report -command { reportx } ::ttk::button .exit -text exit -command {exit} pack .calculator -in .buttons -side top -padx 10 -pady 5 pack .clearallx .cons .about .exit .test4 .test3 .test2 -side bottom -in .buttons grid .frame .buttons -sticky ns -pady {0 10} . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30 wm title . "Babylonian Square Side Rule Calculator"

For the push buttons, the recommended procedure is push testcase and fill frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console.

For testcases in a computer session, the eTCL calculator increments a new testcase number internally, eg. TC(1), TC(2) , TC(3) , TC(N). The testcase number is internal to the calculator and will not be printed until the report button is pushed for the current result numbers. The current result numbers will be cleared on the next solve button. The command { calculate; reportx } or { calculate ; reportx; clearx } can be added or changed to report automatically. Another wrinkle would be to print out the current text, delimiters, and numbers in a TCL wiki style table as

puts " %| testcase $testcase_number | value| units |comment |%" puts " &| volume| $volume| cubic meters |based on length $side1 and width $side2 |&"

# gold on TCL WIKI, 2oct2017 # console program for square root # additional verbose Newton's Method package require Tk package require math::numtheory set tcl_precision 17 console show namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } proc square_root_function { number_for_root } { set counter 0 set epsilon .0001 while { $counter < 50. } { if { [* $counter $counter 1. ] > [* $number_for_root 1.] } {break} incr counter } set square_root_estimate $counter while {1} { set keeper $square_root_estimate set starter $square_root_estimate set remainder [* $starter $starter 1. ] set remainder [- $number_for_root [* $starter $starter 1. ] ] set square_root_estimate [+ $starter [/ $remainder [* 2. $starter ]]] if {abs($keeper - $square_root_estimate) < $epsilon} break } return $square_root_estimate } puts " [ square_root_function 10. ] "

# pretty print from autoindent and ased editor # Babylonian Square Side Rule & Diagonal calculator, Version 2 # Version 2 tests database invoke # from modified and extended Plimpton 322 dataset # dataset includes numbers not on original tablet # Using Suchenworth code from Another Database, TCL WIKI # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI, 2oct2017 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief flat -bg aquamarine4 pack .frame -side top -fill y -anchor center set names {{} {target number N :} } lappend names {trial square root:} lappend names {formula factor: } lappend names {answers: intermediate term in formula } lappend names {trial square :} lappend names {square root from TCL sqrt function : } lappend names {percentage error: } lappend names {approximate square root from square side rule :} foreach i {1 2 3 4 5 6 7 8} { label .frame.label$i -text [lindex $names $i] -anchor e entry .frame.entry$i -width 35 -textvariable side$i grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 } proc about {} { set msg "Calculator for Square Side Rule from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc ::tcl::mathfunc::precision {precision float} { # tcl:wiki:Floating-point formatting, [AM] set x [ format "%#.5g" $float ] return $x } #proc errorx always returns a positive error. #Normally assume $aa is human estimate, #assume $bb is divinely exact. proc errorx {aa bb} {expr { $aa > $bb ? (($aa*1.)/$bb -1.)*100. : (($bb*1.)/$aa -1.)*100.}} proc calculate { } { global answer2 global side1 side2 side3 side4 side5 global side6 side7 side8 global testcase_number incr testcase_number set side1 [* $side1 1. ] set side2 [* $side2 1. ] set side3 [* $side3 1. ] set side4 [* $side4 1. ] set side5 [* $side5 1. ] set side6 [* $side6 1. ] set side7 [* $side7 1. ] set side8 [* $side8 1. ] set target_number $side1 set trial_square_root $side2 set formula_factor $side3 set approximate_root [* [/ 1. $formula_factor ] [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] ] set side4 [+ [* [/ 1. $trial_square_root ] $target_number] $trial_square_root ] set side5 [* $trial_square_root $trial_square_root] set side6 [sqrt $target_number ] set side7 [ errorx $approximate_root [sqrt $target_number ] ] set side8 $approximate_root } proc fillup {aa bb cc dd ee ff gg hh} { .frame.entry1 insert 0 "$aa" .frame.entry2 insert 0 "$bb" .frame.entry3 insert 0 "$cc" .frame.entry4 insert 0 "$dd" .frame.entry5 insert 0 "$ee" .frame.entry6 insert 0 "$ff" .frame.entry7 insert 0 "$gg" .frame.entry8 insert 0 "$hh" } proc clearx {} { foreach i {1 2 3 4 5 6 7 8 } { .frame.entry$i delete 0 end } } proc reportx {} { global answer2 global side1 side2 side3 side4 side5 global side6 side7 side8 global testcase_number console show; puts "%|table $testcase_number|printed in| tcl wiki format|% " puts "&| quantity| value| comment, if any|& " puts "&| $testcase_number:|testcase_number | |&" puts "&| $side1 :|target number N | |&" puts "&| $side2 :|trial square root | |& " puts "&| $side3 :|function factor | |& " puts "&| $side4 :|answers: intermediate term in formula| |&" puts "&| $side5 :|trial square | |&" puts "&| $side6 :|square root from TCL sqrt function | |&" puts "&| $side7 :|percentage error | |&" puts "&| $side8 :|approximate square root from square side rule | |&" } frame .buttons -bg aquamarine4 ::ttk::button .calculator -text "Solve" -command { set side8 0 ; calculate } ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 2. 2.0 2.0 3.0 4.0 1.414 6.066 1.5} ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 10.0 3.0 2.0 6.333 9.0 3.162 0.138 3.166} ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 100.0 9.0 2.0 20.111 81.0 10.0 0.5555 10.0555} ::ttk::button .clearallx -text clear -command {clearx } ::ttk::button .about -text about -command {about} ::ttk::button .cons -text report -command { reportx } ::ttk::button .exit -text exit -command {exit} pack .calculator -in .buttons -side top -padx 10 -pady 5 pack .clearallx .cons .about .exit .test4 .test3 .test2 -side bottom -in .buttons grid .frame .buttons -sticky ns -pady {0 10} . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30 wm title . "Babylonian Square Side Rule Calculator" # Start diagonal solver code proc select {fields "from" tbl "where" condition} { #Suchenworth subroutine code from Another Database, TCL WIKI set infields [lindex $tbl 0] if {$fields eq "*"} {set fields $infields} set res [list $fields] foreach inrow [lrange $tbl 1 end] { foreach $infields $inrow break if $condition { set row {} foreach field $fields {lappend row [set $field]} lappend res $row } } set res } set table { {number fraction_squares long_side short_side diagonal_side suppose_angle line } { 1 .9834028 120 119 169 44.76 1 } { 2 .9491586 3456 3367 4825 44.25 2 } { 3 .9188021 4800 4601 6649 43.79 3 } { 4 .8862479 13500 12709 18541 43.27 4 } { 5 .8150077 72 65 97 42.08 5 } { 6 .7851929 360 319 481 41.54 6 } { 7 .7199837 2700 2291 3541 40.32 7 } { 8 .6927094 960 799 1249 39.77 8 } { 9 .6426694 600 481 769 38.72 9 } { 10 .5861226 6480 4961 8161 37.44 10 } { 11 .5625 60 45 75 36.87 11 } { 12 .4894168 2400 1679 2929 34.98 12 } { 13 .4500174 240 161 289 33.86 13 } { 14 .4302388 2700 1771 3229 33.26 14 } { 15 .3871605 90 56 106 31.89 15 } { 16 .1 1 175 337 1 16 } { 17 .1 1 473 985 1 17 } { 18 .1 1 1679 2929 1 18 } { 19 .1 1 161 289 1 19 } { 20 .1 1 1771 3229 1 20 } { 21 .1 1 56 106 1 21 } { 22 .1 1 4961 8161 1 22 } { 23 .1 1 1 75 1 23 } { 24 .1 1 1679 2929 1 24 } { 25 .1 1 161 289 1 25 } { 26 .1 1 1771 3049 1 26 } { 27 .1 1 301 949 1 27 } { 28 .1 1 329 1129 1 28 } { 29 .1 1 7 25 1 29 } { 30 .1 1 399 1649 1 30 } { 31 .1 1 9 41 1 31 } { 32 .1 1 11 61 1 32 } { 33 .1 1 295 1753 1 33 } { 34 .1 1 17 145 1 34 } { 35 .1 1 19 181 1 35 } { 36 .1 1 52 677 1 36 } { 37 .1 1 31 481 1 37 } { 38 .1 1 49 1201 1 38 } } puts [ select * from $table where {$line < 100} ] puts [ select {diagonal_side short_side } from $table where {$line != 15} ]

number,fraction_squares,long_side,short_side,diagonal_side,suppose_angle,line 1,0.9834028,120,119,169,44.76,1 2,0.9491586,3456,3367,4825,44.25,2 3,0.9188021,4800,4601,6649,43.79,3 4,0.8862479,13500,12709,18541,43.27,4 5,0.8150077,72,65,97,42.08,5 6,0.7851929,360,319,481,41.54,6 7,0.7199837,2700,2291,3541,40.32,7 8,0.6927094,960,799,1249,39.77,8 9,0.6426694,600,481,769,38.72,9 10,0.5861226,6480,4961,8161,37.44,10 11,0.5625,60,45,75,36.87,11 12,0.4894168,2400,1679,2929,34.98,12 13,0.4500174,240,161,289,33.86,13 14,0.4302388,2700,1771,3229,33.26,14 15,0.3871605,90,56,106,31.89,15 16,0.369225019290123,288,175,337,1,16 17,0.299705557698903,864,473,985,1,17 18,0.489416840277778,2400,1679,2929,1,18 19,0.450017361111111,240,161,289,1,19 20,0.430238820301783,2700,1771,3229,1,20 21,0.387160493827161,90,56,106,1,21 22,0.586122566110349,6480,4961,8161,1,22 23,0.000177777777777778,75,1,75,1,23 24,0.489416840277778,2400,1679,2929,1,24 25,0.450017361111111,240,161,289,1,25 26,0.509135720783517,2482,1771,3049,1,26 27,0.111853086419753,900,301,949,1,27 28,0.0927992112482853,1080,329,1129,1,28 29,0.0850694444444444,24,7,25,1,29 30,0.062187890625,1600,399,1649,1,30 31,0.050625,40,9,41,1,31 32,0.0336111111111111,60,11,61,1,32 33,0.0291444964206104,1728,295,1753,1,33 34,0.0139371141975309,144,17,145,1,34 35,0.011141975308642,180,19,181,1,35 36,0.00593470507544582,675,52,677,1,36 37,0.00417100694444444,480,31,481,1,37 38,0.00166736111111111,1200,49,1201,1,38

number,fraction_squares,delta**2,long_side,is_prime,short_side,is_prime,diagonal_side,is_prime,side_ratio,acute_angle,complement_angle,line 1,0.9834028,1.9834028,120,FALSE,119,FALSE,169,FALSE,1.00840336134454,44.7602701039192,45.2397298960808,1 2,0.9491586,1.9491586,3456,FALSE,3367,FALSE,4825,FALSE,1.02643302643303,44.2526696187466,45.7473303812534,2 3,0.9188021,1.9188021,4800,FALSE,4601,FALSE,6649,FALSE,1.04325146707238,43.7873462834569,46.2126537165431,3 4,0.8862479,1.8862479,13500,FALSE,12709,FALSE,18541,TRUE,1.06223935793532,43.2713110478808,46.7286889521192,4 5,0.8150077,1.8150077,72,FALSE,65,FALSE,97,TRUE,1.10769230769231,42.0750220508436,47.9249779491564,5 6,0.7851929,1.7851929,360,FALSE,319,FALSE,481,FALSE,1.12852664576803,41.5445093640917,48.4554906359083,6 7,0.7199837,1.7199837,2700,FALSE,2291,FALSE,3541,TRUE,1.17852466171977,40.3152217890896,49.6847782109104,7 8,0.6927094,1.6927094,960,FALSE,799,FALSE,1249,TRUE,1.20150187734668,39.7703302277109,50.2296697722891,8 9,0.6426694,1.6426694,600,FALSE,481,FALSE,769,TRUE,1.24740124740125,38.7179883513894,51.2820116486106,9 10,0.5861226,1.5861226,6480,FALSE,4961,FALSE,8161,TRUE,1.30618826849426,37.4371779573597,52.5628220426403,10 11,0.5625,1.5625,60,FALSE,45,FALSE,75,FALSE,1.33333333333333,36.869897645844,53.130102354156,11 12,0.4894168,1.4894168,2400,FALSE,1679,FALSE,2929,FALSE,1.42942227516379,34.9759947522971,55.0240052477029,12 13,0.4500174,1.4500174,240,FALSE,161,FALSE,289,FALSE,1.49068322981366,33.8550261282941,56.1449738717059,13 14,0.4302388,1.4302388,2700,FALSE,1771,FALSE,3229,TRUE,1.52456239412761,33.2619074134428,56.7380925865572,14 15,0.3871605,1.3871605,90,FALSE,56,FALSE,106,FALSE,1.60714285714286,31.8907918018457,58.1092081981543,15 16,0.369225019290123,1.36922501929012,288,FALSE,175,FALSE,337,TRUE,1.64571428571429,31.2844929144175,58.7155070855825,16 17,0.299705557698903,1.2997055576989,864,FALSE,473,FALSE,985,FALSE,1.82663847780127,28.6986640858943,61.3013359141057,17 18,0.489416840277778,1.48941684027778,2400,FALSE,1679,FALSE,2929,FALSE,1.42942227516379,34.9759947522971,55.0240052477029,18 19,0.450017361111111,1.45001736111111,240,FALSE,161,FALSE,289,FALSE,1.49068322981366,33.8550261282941,56.1449738717059,19 20,0.430238820301783,1.43023882030178,2700,FALSE,1771,FALSE,3229,TRUE,1.52456239412761,33.2619074134428,56.7380925865572,20 21,0.387160493827161,1.38716049382716,90,FALSE,56,FALSE,106,FALSE,1.60714285714286,31.8907918018457,58.1092081981543,21 22,0.586122566110349,1.58612256611035,12,FALSE,5,TRUE,13,TRUE,2.4,22.619,67.381,22 23,0.000177777777777778,1.00017777777778,75,FALSE,871,FALSE,2329,FALSE,0.0861079219288175,21.9613,68.0387,23 24,0.489416840277778,1.48941684027778,2400,FALSE,1679,FALSE,2929,FALSE,1.42942227516379,34.9759947522971,55.0240052477029,24 25,0.450017361111111,1.45001736111111,240,FALSE,161,FALSE,289,FALSE,1.49068322981366,33.8550261282941,56.1449738717059,25 26,0.509135720783517,1.50913572078352,2482,FALSE,1771,FALSE,3049,TRUE,1.40146809712027,35.5100803990245,54.4899196009755,26 27,0.111853086419753,1.11185308641975,900,FALSE,301,FALSE,949,FALSE,2.99003322259136,18.4922254911265,71.5077745088735,27 28,0.0927992112482853,1.09279921124829,1080,FALSE,329,FALSE,1129,TRUE,3.28267477203647,16.9422892660297,73.0577107339703,28 29,0.0850694444444444,1.08506944444444,24,FALSE,7,TRUE,25,FALSE,3.42857142857143,16.260204708312,73.739795291688,29 30,0.062187890625,1.062187890625,1600,FALSE,399,FALSE,1649,FALSE,4.01002506265664,14.0025351149907,75.9974648850093,30 31,0.050625,1.050625,40,FALSE,9,FALSE,41,TRUE,4.44444444444444,12.6803834918198,77.3196165081802,31 32,0.0336111111111111,1.03361111111111,60,FALSE,11,TRUE,61,TRUE,5.45454545454545,10.3888578154696,79.6111421845304,32 33,0.0291444964206104,1.02914449642061,1728,FALSE,295,FALSE,1753,TRUE,5.85762711864407,9.68800075016136,80.3119992498386,33 34,0.0139371141975309,1.01393711419753,144,FALSE,17,TRUE,145,FALSE,8.47058823529412,6.7329213268596,83.2670786731404,34 35,0.011141975308642,1.01114197530864,180,FALSE,19,TRUE,181,TRUE,9.47368421052632,6.02557500836668,83.9744249916333,35 36,0.00593470507544582,1.00593470507545,675,FALSE,52,FALSE,677,TRUE,12.9807692307692,4.40519632353161,85.5948036764684,36 37,0.00417100694444444,1.00417100694444,480,FALSE,31,TRUE,481,FALSE,15.4838709677419,3.69522053198919,86.3047794680108,37 38,0.00166736111111111,1.00166736111111,1200,FALSE,49,FALSE,1201,TRUE,24.4897959183673,2.33827865581484,87.6617213441852,38 ,,delta**2-1,,equals,,(l/d)**2,or,(b/d)**2,,,,

What would low number reciprocals of high precision be used for? Late Babylonian tablets (300-400 C.E.) have tables of reciprocal numbers from 1 to 2 evaluated up to 8 powers of 60, (eg. decimal 1.066,1.2,1.25,1.3, and 1.35, not all repeating decimals in base 10 or 60). In decimal notation, the reciprocal pairs would be (1.0666,56.25), (1.2,50) (1.25,48) (1.3, 45)(1.35,44.4444). At least some Babylonian algorithms involve reduction of terms by factorization. Following the factorization task, 45=3*3*5, 48=2*2*2*2*2, 50=2*5*5. I can only suggest some kind of generating function for large squares or logarithms (meaning squares of 8 digits in base 60). The Babylonian square side rule is the sqrt(a) approximates (1/2) * ( target_number / trial_number_reciprocal + 1/ trial_number_reciprocal ). The Babylonian square side rule with a single trial input becomes less accurate with increasing trial_number, much greater than one and above 1000. The converse is probably true; The Babylonian square side rule with a single trial input becomes more accurate with decreasing trial_number, approaching one from above 1000. Ref. The powers of 9 and related mathematical tables from Babylon, Mathieu Ossendrijver (Humboldt University, Berlin)

Note. square side rule, sqrt 4 =~(1/2)* (4 *(1/1)+1), (1/2)*5 or 2.5

sqrt 10 =~ (1/2)* (10*(1/3)+3)= (1./2.)*(10*(1./3.)+3) =3.1666666666666665 eval sqrt 10 = 3.1622776601683795

The mission of the TCL wiki is to provide an open and community-driven venue for documenting and discussing all aspects of the Tool Control Language (TCL), from interpreter, standards, and best practices. Among other things, the TCL Wiki shall collect:

- Small examples of TCL code.
- Best practices.
- Questions and answers regarding TCL code and style.
- Information and usage examples for various TCL libraries.
- Comparison of interpreter features and usage.
- References to books, articles, and other TCL resources on the web.

pyk 2019-01-26: This information could be folded into The purpose of this Wiki. Also, thanks for contributing all the cool math. I'd like to dive into your pages someday. Feel free to delete this comment once it has served its purpose.

The full content of the TCL Wiki <not sure about wording here>. The Tool Control Language (TCL) is copyrighted under the Tcl/Tk Licensing Terms to ensure that the content remains free and open.

The TCL Wiki is located at https://wiki.tcl-lang.org/ and is hosted by The Wiki is now hosted by the Tcl Association on behalf of the Tcl Community, and maintained by a team of volunteers. It is powered by a wiki engine written using a network interface and Tcl Database Connectivity

LV : Users have to date adding several kinds of info to this site.

- Technical information relating to Tcl and extensions.
- Questions (which hopefully are being answered).
- Small examples of Tcl code.
- Pointers (URLs) to other sites.

If someone has a package, paper, etc. they wish to publicize, this site is best used by pointing to your distribution. If a distribution site for the source code, word processing files, etc. is needed, one might take a look at ftp://ftp.procplace.com/pub/tcl/ , http://www.sourceforge.net/ , other other similar sites which have facilities for managing source code, bug reports, downloads, etc. This wiki isn't really designed for uploading binary files, or even massive amounts of source code.

End Draft

- Mission statement, article From Wikipedia,
- Void Mission statement, article From Wikipedia
- What is a Mission Statement?,Jennifer Post, Business News Daily Contributing Writer
- How to Write a Mission Statement in 5 Easy Steps, Tim Berry
- 50 mission statements selected from the top 100 non-profits
- Mission statement, Python Software Foundation
- Mission statement, Fortran Wiki

math:geometry. ::math::geometry::degToRad angle ::math::geometry::radToDeg angle math::geometry(n) 1.2.2 tcllib "Tcl Math Library" list of proposed 13 trig functions. sind(x)=Sine of argument in degrees, cosd(x)=Cosine of argument in degrees, tand(x)=Tangent of argument in degrees, cotd(x)=Cotangent of argument in degrees, asind(x)=returns the inverse sine (sin-1) of the elements of X in degrees, acosd(x)=returns the inverse cosine (cosin-1) of the elements of X in degrees,, atand(x)=Inverse tangent in degrees, acotd(x)=Inverse cotangent in degrees, secd(x)=Secant of argument in degrees, cscd(x)=Cosecant of argument in degrees, asecd(x)=Inverse secant in degrees, acscd(x)=Inverse cosecant in degrees, atan2d(x1, x2)=Four-quadrant inverse tangent in degrees

# pretty print from autoindent and ased editor # Sind Functions calculator # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI, 5nov2017 package require Tk package require math::numtheory package require math::geometry package require math::constants namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory math::geometry math::constants} set tcl_precision 17 frame .frame -relief flat -bg aquamarine4 pack .frame -side top -fill y -anchor center set names {{} {degrees :} } lappend names {answers: radians:} lappend names {cosd function: } lappend names {tand function: } lappend names {cotd function:} lappend names {secd function: } lappend names {cscd function: } lappend names {sind function:} foreach i {1 2 3 4 5 6 7 8} { label .frame.label$i -text [lindex $names $i] -anchor e entry .frame.entry$i -width 35 -textvariable side$i grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 } proc about {} { set msg "Calculator for Sind Functions from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc ::tcl::mathfunc::precision {precision float} { # tcl:wiki:Floating-point formatting, [AM] set x [ format "%#.5g" $float ] return $x } #proc errorx always returns a positive error. #Normally assume $aa is human estimate, #assume $bb is divinely exact. proc errorx {aa bb} {expr { $aa > $bb ? (($aa*1.)/$bb -1.)*100. : (($bb*1.)/$aa -1.)*100.}} # start sind procedures proc division_check {x y} { # ref. rossetta code for division by zero try { if { [ / $x $y ] == Inf } { puts " strange Inf value generated " } if {"Inf" == "Inf" || "Inf" == "Inf"} {puts " strange Inf value generated "} puts "valid division: $x/$y=[expr {$x/$y}] checkit" } trap {ARITH DIVZERO} msg { puts "caught division by zero: $x/$y -> $msg" } trap {ARITH DOMAIN} msg { puts "caught bad division: $x/$y -> $msg" } on error msg { puts "caught another error: $x/$y -> $msg" } } # problems if $aa is pi/2 or 90 degs, if $aa is 3*pi/2 or 270 degs #if { [ catch {[ $aa ] } ] == 0 } { #return -code error "opps tan 90/270 degs" -errorinfo "undefined for tan 90/270 degs" -errorcode {ARITH DOMAIN} # ref. rossetta code for division by zero proc tangent_check {xx} { # ref. rossetta code for division by zero try { if { $xx == Inf } { puts " strange Inf value generated " } if {$xx == 90. || $xx == 270.} {puts " strange tan value generated "} #return -code error "opps tan 90/270 degs" -errorinfo "undefined for tan 90/270 degs" -errorcode {ARITH DOMAIN} puts "tan opps tan 90/270 degs error called" puts "valid tangent? : $xx=90. checkit" } trap {ARITH } msg { puts "caught bad tangent: $xx -> $msg" } trap {ARITH DOMAIN} msg { puts "caught bad tangent: $xx -> $msg" } on error msg { puts "caught another error: $xx -> $msg" #return -code error "opps tan 90/270 degs" -errorinfo "undefined for tan 90/270 degs" -errorcode {ARITH DOMAIN} } } proc cotdx {aa} {set aa [* $aa $math::constants::degtorad ];division_check [cos $aa] [sin $aa ] ; return [/ [cos $aa] [sin $aa ]]} proc secdx {aa} {set aa [* $aa $math::constants::degtorad ];division_check [1.] [sin $aa ] ;return [/ 1. [sin $aa ]]} proc cscdx {aa} {set aa [* $aa $math::constants::degtorad ];division_check [1.] [cos $aa ] ; return [/ 1. [cos $aa ]]} proc acotd {aa} {set aa [/ [acos $aa] [asin $aa ]];set aa [* $aa $math::constants::radtodeg ];return $aa} proc asecd {aa} {set aa [/ 1. [asin $aa ]];set aa [* $aa $math::constants::radtodeg ];return $aa} proc acscd {aa} {set aa [/ 1. [acos $aa ]];set aa [* $aa $math::constants::radtodeg ];return $aa} proc sind {aa} {set aa [* $aa $math::constants::degtorad ];return [sin $aa ]} proc cosd {aa} {set aa [* $aa $math::constants::degtorad ];return [cos $aa ]} proc tand {aa} {tangent_check $aa ;set aa [* $aa $math::constants::degtorad ];return [tan $aa ]} proc cotd {aa} {set aa [* $aa $math::constants::degtorad ];return [cot $aa ]} proc secd {aa} {set aa [* $aa $math::constants::degtorad ];return [sec $aa ]} proc cscd {aa} {set aa [* $aa $math::constants::degtorad ];return [csc $aa ]} proc asind {aa} {set aa [asin $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc acosd {aa} {set aa [acos $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc atand {aa} {set aa [atan $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc acotd {aa} {set aa [acot $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc asecd {aa} {set aa [asec $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc acscd {aa} {set aa [acsc $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc pade_asind_good {aa} { set term2 [ expr { $aa*$aa*$aa*$aa*$aa*61.+1080.*$aa*$aa*$aa-2520.*$aa } ] ; set term3 [ expr { 1500.*$aa*$aa-2520. } ] ; set result [ expr { $term2/$term3 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_acosd_check_it {aa} { set term2 [ expr { 12. - 5.*$aa*$aa } ] ; set term3 [ expr { 12. + $aa*$aa } ] ; set result [ expr { $term2/$term3 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_cosd_g {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { 1080.-480.*$aa*$aa+$aa*$aa*$aa*$aa*17. } ] ; set term3 [ expr { 1080.+60.*$aa*$aa+2.*$aa*$aa*$aa*$aa} ] ; set result [ expr { $term2/$term3 } ]} proc pade_tand_gtest {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { 15.*$aa-$aa*$aa*$aa } ] ; set term3 [ expr { 15.-6.*$aa*$aa} ] ; set result [ expr { $term2/$term3 } ]} proc pade_cottand_gtest {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { 15.*$aa-$aa*$aa*$aa } ] ; set term3 [ expr { 15.-6.*$aa*$aa} ] ; set result [ expr { $term3/$term2 } ]} proc pade_cscd_g {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { 1080.-480.*$aa*$aa+$aa*$aa*$aa*$aa*17. } ] ; set term3 [ expr { 1080.+60.*$aa*$aa+2.*$aa*$aa*$aa*$aa} ] ; set result [ expr { $term3/$term2 } ]} proc pade_secd_g {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { 1080.-480.*$aa*$aa+$aa*$aa*$aa*$aa*17. } ] ; set term3 [ expr { 1080.+60.*$aa*$aa+2.*$aa*$aa*$aa*$aa} ] ; set result [ expr { $term3/$term2 } ] } proc pade_acscd_check {aa} { set term2 [ expr { $aa*$aa*$aa*$aa*$aa*61.+1080.*$aa*$aa*$aa-2520.*$aa } ] ; set term3 [ expr { 1500.*$aa*$aa-2520. } ] ; set result [ expr { $term3/$term2 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_atand_good {aa} { set term2 [ expr { $aa*$aa*$aa*55.+105.*$aa } ] ; set term3 [ expr { $aa*$aa*$aa*$aa*9.+$aa*$aa*90.+105. } ] ; set result [ expr { $term2/$term3 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_acotd_check {aa} { set term2 [ expr { $aa*$aa*$aa*55.+105.*$aa } ] ; set term3 [ expr { $aa*$aa*$aa*$aa*9.+$aa*$aa*90.+105. } ] ; set result [ expr { $term3/$term2 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_acscd_check {aa} { set term2 [ expr { $aa*$aa*$aa*$aa*$aa*61.+1080.*$aa*$aa*$aa-2520.*$aa } ] ; set term3 [ expr { 1500.*$aa*$aa-2520. } ] ; set result [ expr { $term3/$term2 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_atand_good {aa} { set term2 [ expr { $aa*$aa*$aa*55.+105.*$aa } ] ; set term3 [ expr { $aa*$aa*$aa*$aa*9.+$aa*$aa*90.+105. } ] ; set result [ expr { $term2/$term3 } ] set aa [* $aa $math::constants::radtodeg ];} # end sind procedures proc calculate { } { global answer2 global side1 side2 side3 side4 side5 global side6 side7 side8 global testcase_number incr testcase_number set side1 [* $side1 1. ] set side2 [* $side2 1. ] set side3 [* $side3 1. ] set side4 [* $side4 1. ] set side5 [* $side5 1. ] set side6 [* $side6 1. ] set side7 [* $side7 1. ] set side8 [* $side8 1. ] set side2 [* $side1 $math::constants::degtorad ] set side3 [ pade_cosd_g $side1 ] set side4 [ pade_tand_gtest $side1 ] #set side5 [ cotdx $side1 ] #set side6 [ secdx $side1 ] #set side7 [ cscdx $side1 ] set side8 [ sind $side1 ] catch { set side5 [ pade_cottand_gtest $side1 ] } catch { set side6 [ pade_secd_g $side1 ] } catch { set side7 [ pade_cscd_g $side1 ] } } proc fillup {aa bb cc dd ee ff gg hh} { .frame.entry1 insert 0 "$aa" .frame.entry2 insert 0 "$bb" .frame.entry3 insert 0 "$cc" .frame.entry4 insert 0 "$dd" .frame.entry5 insert 0 "$ee" .frame.entry6 insert 0 "$ff" .frame.entry7 insert 0 "$gg" .frame.entry8 insert 0 "$hh" } proc clearx {} { foreach i {1 2 3 4 5 6 7 8 } { .frame.entry$i delete 0 end } } proc reportx {} { global answer2 global side1 side2 side3 side4 side5 global side6 side7 side8 global testcase_number console show; puts "%|table $testcase_number|printed in| tcl wiki format|% " puts "&| quantity| value| comment, if any|& " puts "&| $testcase_number:|testcase_number | |&" puts "&| $side1 :|degrees | |&" puts "&| $side2 :|answers : conv. radians, used in arc functions | |& " puts "&| $side3 :|cosd function| |& " puts "&| $side4 :|tand function| |&" puts "&| $side5 :|cotd function | |&" puts "&| $side6 :|secd function | |&" puts "&| $side7 :|cscd function | |&" puts "&| $side8 :|sind function | |&" puts "&|[ pade_asind_good $side2 ] :|asind function | |&" puts "&| [ pade_acosd_check_it $side2 ] :|acosd function | |&" puts "&|[ pade_atand_good $side2 ]:|atand function | |&" puts "&|[ pade_acotd_check $side2 ]:|acotd function | |&" puts "&|[ pade_secd_g $side2 ]:|asecd function | |&" puts "&| [ pade_acscd_check $side2 ] :|acscd function | |&" math::constants::print-constants puts " $math::constants::radtodeg " puts " $math::constants::degtorad " # math::geometry::print-geometry } frame .buttons -bg aquamarine4 ::ttk::button .calculator -text "Solve" -command { set side8 0 ; calculate } ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 0.0 0.0 0.1 1.0 0.0 0.0 0.00 0.0} ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 180.0 3.14 -1. 0.0 0.0 0.0 0.00 1.0} ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 360.0 6.28 1.0 0.0 0.0 -1.0 10000.00 0.001} ::ttk::button .clearallx -text clear -command {clearx } ::ttk::button .about -text about -command {about} ::ttk::button .cons -text report -command { reportx } ::ttk::button .exit -text exit -command {exit} pack .calculator -in .buttons -side top -padx 10 -pady 5 pack .clearallx .cons .about .exit .test4 .test3 .test2 -side bottom -in .buttons grid .frame .buttons -sticky ns -pady {0 10} . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30 wm title . "Sind Functions Calculator"

using psuedocode to set up problem angle a in radians. Multiply by pi/180 to convert degrees to radians. starting sind procedure a in radians package require math::constants radtodeg = 57.295779513100001 = Conversion from radians to degrees degtorad = 0.017453292519943001 = Conversion from degrees to radians set con5 $math::constants::degtorad set con6 $math::constants::radtodeg invoke 0.017453292519943001 set a [* $a (3.14/180) ] , 3.14/180~0.01744 set a [sin $a ] return $a proc sind {aa} {set aa [* $aa $math::constants::degtorad ];return [sin $aa ]} starting asind procedure take asin and return answer in degrees , changing set a [asin $a ] set a [* $a (180/3.14) ] , 180/3.14~57.32 proc asind {aa} {set aa [asin $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa}

proc degree_reduction {aa} { if { $aa > 0 } { while {$aa > 360.} { set aa [- $aa 360.} return $aa } if { $aa < 0 } { while {$aa < 360.} { set aa [+ $aa 360.} return $aa }}

# written on Windows XP # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI, 25nov2017 package require Tk package require math::numtheory package require math::geometry package require math::constants namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory math::geometry math::constants} set tcl_precision 17 # need TCLLIB invoke # start sind procedures proc sind {aa} {set aa [* $aa $math::constants::degtorad ];return [sin $aa ]} proc cosd {aa} {set aa [* $aa $math::constants::degtorad ];return [cos $aa ]} proc tand {aa} {set aa [* $aa $math::constants::degtorad ];return [tan $aa ]} proc cotd {aa} {set aa [* $aa $math::constants::degtorad ];return [cot $aa ]} proc secd {aa} {set aa [* $aa $math::constants::degtorad ];return [sec $aa ]} proc cscd {aa} {set aa [* $aa $math::constants::degtorad ];return [csc $aa ]} proc asind {aa} {set aa [asin $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc acosd {aa} {set aa [acos $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc atand {aa} {set aa [atan $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc acotd {aa} {set aa [acot $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc asecd {aa} {set aa [asec $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} proc acscd {aa} {set aa [acsc $aa ];set aa [* $aa $math::constants::radtodeg ];return $aa} # end sind procedures # note: may have to invoke cot, sec, csc from some other library # extrafuncs.tcl # pade_trig functions # need angle reduction proc to pi/4 # start higher order terms proc pade_asind_good {aa} { set term2 [ expr { $aa*$aa*$aa*$aa*$aa*61.+1080.*$aa*$aa*$aa-2520.*$aa } ] ; set term3 [ expr { 1500.*$aa*$aa-2520. } ] ; set result [ expr { $term2/$term3 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_cosd_g {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { 1080.-480.*$aa*$aa+$aa*$aa*$aa*$aa*17. } ] ; set term3 [ expr { 1080.+60.*$aa*$aa+2.*$aa*$aa*$aa*$aa} ] ; set result [ expr { $term2/$term3 } ]} proc pade_secd_g {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { 1080.-480.*$aa*$aa+$aa*$aa*$aa*$aa*17. } ] ; set term3 [ expr { 1080.+60.*$aa*$aa+2.*$aa*$aa*$aa*$aa} ] ; set result [ expr { $term3/$term2 } ] } proc pade_acscd_check {aa} { set term2 [ expr { $aa*$aa*$aa*$aa*$aa*61.+1080.*$aa*$aa*$aa-2520.*$aa } ] ; set term3 [ expr { 1500.*$aa*$aa-2520. } ] ; set result [ expr { $term3/$term2 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_atand_good {aa} { set term2 [ expr { $aa*$aa*$aa*55.+105.*$aa } ] ; set term3 [ expr { $aa*$aa*$aa*$aa*9.+$aa*$aa*90.+105. } ] ; set result [ expr { $term2/$term3 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_acotd_check {aa} { set term2 [ expr { $aa*$aa*$aa*55.+105.*$aa } ] ; set term3 [ expr { $aa*$aa*$aa*$aa*9.+$aa*$aa*90.+105. } ] ; set result [ expr { $term3/$term2 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_acscd_check {aa} { set term2 [ expr { $aa*$aa*$aa*$aa*$aa*61.+1080.*$aa*$aa*$aa-2520.*$aa } ] ; set term3 [ expr { 1500.*$aa*$aa-2520. } ] ; set result [ expr { $term3/$term2 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_atand_good {aa} { set term2 [ expr { $aa*$aa*$aa*55.+105.*$aa } ] ; set term3 [ expr { $aa*$aa*$aa*$aa*9.+$aa*$aa*90.+105. } ] ; set result [ expr { $term2/$term3 } ] set aa [* $aa $math::constants::radtodeg ];} proc pade_acotd_check {aa} { set term2 [ expr { $aa*$aa*$aa*55.+105.*$aa } ] ; set term3 [ expr { $aa*$aa*$aa*$aa*9.+$aa*$aa*90.+105. } ] ; set result [ expr { $term3/$term2 } ] # end higher order terms # start lower order terms proc pade_cosd {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { $aa*$aa*(60.+3.*$aa*$aa) } ] ; set term3 [ expr { 120.+4.*$aa*$aa } ] ; set result [ expr { 1. - $term2/$term3 } ] } proc pade_atand {aa} { set term2 [ expr { $aa*$aa*$aa*(35.+4.*$aa*$aa) } ] ; set term3 [ expr { 105.+75.*$aa*$aa } ] ; set result [ expr { $aa - $term2/$term3 } ] set result [* $result $math::constants::radtodeg ]; } set aa [* $aa $math::constants::radtodeg ];} proc pade_cosd {aa} { set aa [* $aa $math::constants::degtorad ]; return [- 1. [* [* $aa $aa ] [/ [+ 60. [* 3. $aa $aa ] [+ 120. [* 4. $aa $aa ]]]} proc pade_tand {aa} { set aa [* $aa $math::constants::degtorad ]; return [- $aa [* [* $aa $aa $aa ] [/ [- 210. [* $aa $aa ] [- 630. [* 255. $aa $aa ]]]} proc pade_asind {aa} { set aa [* $aa $math::constants::degtorad ]; return [* $aa [/ [- 60. [* 17. $aa $aa ] [- 60. [* 27. $aa $aa ]]]} proc pade_tand {aa} { set aa [* $aa $math::constants::degtorad ]; return [- $aa [/ [* [* $aa $aa $aa ] [+ 35. [* 4. $aa $aa ]] [+ 105. [* 75. $aa $aa ]]]]} proc pade_sind {aa} { set aa [* $aa $math::constants::degtorad ]; #return [- $aa [/ [* [* $aa $aa $aa ] [+ 420. [* 11. $aa $aa ] [+ 2520. [* 60. $aa $aa ]]]} proc pade_sind_expr {aa} { set aa [* $aa $math::constants::degtorad ]; set term2 [ expr { $aa*$aa*$aa*(420.+11.*$aa*$aa) } ] set term3 [ expr { 2520. + 60.*$aa*$aa } ] set result [ expr { $aa - $term2/$term3 } ] return $result # something wrong in expression, lower order terms? } # end lower order terms # Pade test on e**x # ## Pade approximant for e**x of order [5 / 5], starts at x**0 around x=0 # $Px = [1] 1.000000e+00 5.000000e-01 1.111111e-01 1.388889e-02 9.920635e-04 [6] 3.306878e-05 # $Qx [1] 1.000000e+00 -5.000000e-01 1.111111e-01 -1.388889e-02 9.920635e-04[6] -3.306878e-05 # note. coeff's have same magnitude but some different signs. proc pade_e**x_check {aa} { set term2 [ expr {1.000000e+00*[** $aa 0 ] +5.000000e-01*[** $aa 1 ] +1.111111e-01*[** $aa 2 ] +1.388889e-02*[** $aa 3 ] +9.920635e-04*[** $aa 4 ] +3.306878e-05*[** $aa 5 ] } ] ; set term3 [ expr {1.000000e+00*[** $aa 0 ] -5.000000e-01*[** $aa 1 ] -1.111111e-01*[** $aa 2 ] -1.388889e-02*[** $aa 3 ] +9.920635e-04*[** $aa 4 ] -3.306878e-05*[** $aa 5 ]} ] ; set result [ expr { $term2/$term3 } ] return $result;} # e**1 from approximant formula = 2.718281828735696, ac 9 places. # vis wolfram=e=2.718281828459045235360287471352662497757... proc ln_1_plus_x {x} { # pade expression for ln(1+x) # natural log of 1+x, eg. ln 1+1 (2) tcl_evaled as 0.6931471805599453 # ln_1_plus_x 1 reported 0.693121693121693, acc. 4 places set term2 [ expr { $x + $x**2 + 0.1833333333333333*($x**3)} ] ; set term3 [ expr { 1 + 1.5*$x + .6*($x**2) + 0.05*($x**3) } ] ; set result [ expr { $term2 / $term3 } ] return $result;}

Historical interest. This formula was the basis of sine tables of the Indian mathematician Bhaskara 1 in the seventh century. Believed that formula was derived from parabolic curve. for positive x < pi. Bhaskara used integers in the seventh century, but post on Math Exchange suggested constants could be gamed or normalized to fit sine curve better. Often wondered whether the parabolic curve could be fudged into a sine or cosine curve.

Pure speculation but in the inner urban core of Umma City, there was about 8000 to 10,000 citizens or about half the population were skilled craftsmen, merchants, skilled weavers, overseers, priests, and city officers living above the subsistence level. The key point here is that the Sumerian inventions of the seed drill, irrigation canals, animal husbandry, yoked oxen, and organized plow teams increased the barley harvest about 1/3 and other available agricultural foods over the former structure of subsistence farmers. There are limits on these simple formulas and a single rate of inhabitants per hectare over the Umma Province and Umma City (tell) is probably not the best model. But the adjustment of the 6 for 6 rule for the Sumerian 1/3 barley harvest increase would give expr { (1.552E4/6.) *(4./3.)*6. }, 20693, or 20500 population rounded to nearest 500. Possible error would be plus or minus 2000 from modified 6 for 6 rule. The population density would be expr { 20500./176.} or 116 inhabitants per hectare rounded.

Pseudocode and Equations | ||
---|---|---|

TCL expressions pastable into console | answer | comment. if any |

expr { 2*2*1800} | 7200 meters extent or reach back from canal | city of Umma,Sumeria of UrIII era |

expr { 40*3.88 } | 155.2 square km of state arable land. | city of Umma,Sumeria of UrIII era |

expr { 155.5/7.2 } | 21.6 km, state land along canal | city of Umma,Sumeria of UrIII era |

expr { 21.6/2. } | 10.8 km from city, considering one side of canal | city of Umma,Sumeria of UrIII era |

expr { 425*155.5} | 6.6E4 gurs, maximum barley harvest | city of Umma,Sumeria of UrIII era |

expr { 6.6E4*300} | liters of barley from maximum harvest | city of Umma,Sumeria of UrIII era |

expr { (6.6E4*300/(2*365)*(1/2)} | barley supportable population, low ball | city of Umma,Sumeria of UrIII era |

expr { 6.6E4*300/(2*365))*(9/12)} | barley supportable population, high ball | city of Umma,Sumeria of UrIII era |

expr { 1.552E4/6 } | 2586 families from 6 for 6 rule | city of Umma,Sumeria of UrIII era |

expr { 2*1.552E4/6 } | 5172 adults from 6 for 6 rule | city of Umma,Sumeria of UrIII era |

expr { 4*1.552E4/6 } | 10300 children from 6 for 6 rule | city of Umma,Sumeria of UrIII era |

expr { (1.552E4/6.) *(4./3.)*6. } | answer 20693 inhabitants, modified 6 for 6 | city of Umma,Sumeria of UrIII era |

expr { 20500./176.} | high ball, answer 116 inhabitants/hectare rounded | city of Umma,Sumeria of UrIII era |

expr { 13500./176.} | low ball, answer 78 inhabitants/hectare rounded | city of Umma,Sumeria of UrIII era |

rectangle 4:3 side ratio, Length width in classic ratio. 1_15 or 1+1/4 in table of coefficient of the diagonal of length and width a 3:4:5 rule with constant differences. average=( L+W)/2 , deviation= (L-W)/2

trapezoidal area = (l**2-s**2)/(2.*f) trapezoidal area = w*h = (l**2-s**2)/2.

2**2 4 log 4= 2

log 6 = 2.584

2**3 8 log 8 = 3

log 12 = 3.5849

2**4 16 log 16 = 4

log 24 = 4.584

2**5 32 log 32 = 5

The Babylonian trapezoid_area_square_law gives trapezoidal area = (l**2-s**2)/(2.*f), where l= long,s=short side, h=height, w=width, and f=feed is (l-s)/h. Based on the cuneiform terms and extant math problems, the trapezoid formula(s) were developed first for possibly land surveys, ditches , and irrigation canals, then extended to the vertical plane, walls, and vertical 3d structures. If the long and short sides of the trapezoid are parallel ( and l over s) to the horizontal, the term height h can be used in the feed formula. If the long and short sides are parallel to the vertical, the term width w can be sensibly interchanged with height h in the formula.

Every regular number in Babylonian base_60 notation is product of the mixed powers of 2, 3, and 5. The discussion will include modern notation and expressions in discussion on Babylonian notation of relative places in base_60, known as regular sexagesimal notation. The cases of prime numbers under 60 like 7,11,13, &17 are not considered regular numbers in the Babylonian notation. The standard list of reciprocals includes only regular numbers, excluding the cited primes that do not evenly divide into 60. In the Babylonian notation of relative places, a power of N1 is equivalent to corresponding power of its reciprocal, R(N1). Here R( ) is a operator that means take the base_60 reciprocals of all numbers and return a list of those reciprocals. The number N1 is equivalent to R( R(N1 )), which evals as N1 itself. The product of factors N1*N2*N3 equals 1/( R(N1)*R(N2)*R(N3)).

N1*(1/R(N1))= Area (N-1)/N approximate natural log, 1-1/N, first term in series

Yvonne Dold-Samplonius et al (eds), From China to Paris: 2000 Years

Transmission of Mathematical Ideas. (Boethius, 46). Stuttgart: Steiner, 2002.

c=a+b take squares of c,a,b expr {.5*((a+b)**2-a**2-b**2)} is a*b expr {.5*((10+20)**2-10**2-20**2)} = 200.0

The sum of the base_60 reciprocals is <expr 20+20+15> as 55/60. Further, the base_60 reciprocal of the sum is 60/55, used a multiplying factor. Share a is 20*(60/55) or 21.818.

New-Mathematical-Cuneiform-Texts, by Joran Friberg and Farouk N.H. Al-Rawi

The average of the original three entries is expr { (21.818 +21.818 +16.36) /3.} or 19.998 expr (4+3+3.)/3. = 3.333 0.9833

The Babylonian Market Rate Algorithm is taking 1) base_60 reciprocals of several numbers, 2) summing the reciprocals, and 3) using the sum as a multiplication factor. The Market Rate Algorithm has initial steps and similarity to multiplication of several terms using modern logarithms. For example, take the base_60 logarithms of several numbers { 50 40 30 }, resulting in the set { 6/5 6/4 2 }, summing the base_60 reciprocals for a factor expr { 6./5+6./4+2. }, which equals 4.7 decimal. The return reciprocal or anti-reciprocal in base_60 is expr { 60/4.7 } is 12.76 decimal and with a factor approximating average is expr { 3.*60/4.7 } is 38.29787. The average of the original three numbers is expr { (50+40+30.)/3. } or decimal 40.0 For a modern example using natural logarithms, take the problem 50*40*30 = 60000. Take the sum of natural logs as expr { log(50)+log(40)+log(30) } = 11.0020998 decimal. The answer is the antilog expr { 2.718281828**11.0020998 } = 60000. Note: The reciprocal formulas in base_60 are N*R=60, N=60/R, and R=60/N. In the Late Babylonian period, there were numerous tablets and fragments showing many place reciprocals and factoring other numbers in base_60. The many place reciprocals are reciprocals with 5 to 10 places in base_60. The most unusual tables were many place reciprocals between 1 and 2, ref Friberg and Al-Rawi. Although less common or less extant, there are tables of many place reciprocals between 2 and 4. The square root of sixty is decimal 7.74, so continuing the tables beyond integer 8 would be redundant and not be useful. The tablets with many place reciprocals between 1 and 2 are generated for numbers between 60 and 30. The tablets with many place reciprocals between 2 and 4 are generated for numbers between 30 and 15. Because the Babylonians used relative place notation like a modern slide rule, remember that the calculated many place reciprocals between 60 and 15 could been used in relative base_60 places like 20,20*60,20*3600,20*216000 , and so on. In addition, there are rare LB. fragments or tables that have numbers in reciprocal pairs in base_60 with the added glyph ibsi, which means either square or square root, ref Friberg and Al-Rawi. In a general sense on other tablets, the term ibsi is associated with square roots, raising a number in exponent, or the reverse, but the term ibsi linked with reciprocals is curious. The minmal conclusion is that the Late Babylonian mathematicians considered the regular base_60 reciprocals involved with squares, square roots, or powers. A complete explanation of the many place reciprocal tables is not available, but it has been proven that the many place reciprocals and square tables were used in school copying exercises, school multiplication assignments, and factoring algorithms. There are two multiplication formulas from the Old Babylonian tablets that used differences, sums, and squares. With a squint eye of the amateur, the Old Babylonian tables with many place reciprocals in base_60 look somewhat like the many place numbers (meaning digits) in the modern tables for decimal and natural logarithms.

The Old Babylonian multiplication formula requires three math operations as opposed to one math operation in modern logarithms, per two numbers. Considering hand calculations and omitting the table lookups, the Old Babylonian multiplication formula is about three times the work of the modern logarithm method. In using the Babylonian multiplication formula in taking base_60 squares, using many place numbers in a hand multiplication array, there must be breakpoints where the effort of the multiplication formula is less than taking the square by hand calculation. Given the amount of Babylonian effort that developed the many place reciprocals in base_60 on the clay tablets, is it possible that the known Babylonian multiplication formulas and terms could be manipulated into an algorithm, formula, or even modern logarithm of fewer operations? Another possibility or impossibility is the multiplication algorithm of Martin Furer, which approximates N1*log(N1)*kay. The natural log N1 approximates ( N1-1) / N1 or kay*(( N1-1) / N1), as the first term in series. The natural log of 2 is expr log(2) = 0.6931 decimal. The approximate natural log of 2 equals expr (2.-1.)/2.= 0.5 decimal. Returning to the original problem of 50*40*30 using modern base_60 logarithms, the sum of logs is expr { 0.95546+0.90096+0.830706} , 2.687126. The antilog in base_60 is expr 60**2.687126= 59995.193. The approximate natural logs are expr (50-1.)/50.=0.98, expr (40-1.)/40.=.975, expr (30-1.)/30.=0.9666. expr .98+.975+.9666=2.9216. Kind of hokey math, but the base_60 logarithms are not that far off scale from the natural logarithms, about 8 percent off. expr 2.92-2.92*.08=2.6864, expr 60**2.6864= 59817.122. Another peg point is that the approximate natural log of 60 is expr {(60.-1)/60.} = .9833, which is the same as expr {1.-1./60}=0.9833

expr log(5) 1.6094379124341003 approxed by expr [ int [expr 5**.3] *log(5) 1.6094379124341003

The challenge would be to find out if the Babylonian mathematicians used many place reciprocals, many place squares, or factors with the two known Babylonian multiplication formulas. It would not be surprising if some odd notations or glyphs are associated with possible use of the multiplication formulas, especially with the Late Babylonian Astronomers. For example, there was a unique “three wedge” glyph (<<<) for multiplication in some Late Babylonian multiplication tables. The “three wedge” glyph for multiplication may be a sort of brand name or associated quality signature for the modern student or readers. Maybe coincidence, but the Late Babylonian symbol for the “Astronomy zero” was either two wedges (<<) or three wedges (<<<) . Also, a rare variant glyph for nine (9 decimal) was the “three wedge” glyph (<<<). While the “Astronomy zero” is very rare on the Late Babylonian clay tablets, the understanding here is that “Astronomy zero” is indicative of extreme care in error free calculations by the Late Babylonian Astronomers, which would track with the advanced and remarkable many place reciprocals or squares. Another reference is tablet W23281, which has many place reciprocals at regular intervals, N1, N1+1, N1+2. The tablet W23281 does not have logarithms, but like the modern logarithms evaluated at regular intervals, regular intervals are needed for useful logarithm work. In opinion, the many place reciprocals or factors were associated with the “Astronomy Group” of the Late Babylonian mathematicians. But almost all professional and cuneiform linguists have cited a lack of evidence on the association of many place reciprocals or factors with the “Astronomy Group”. W 23281

** Rules of Thumb from Babylonian Tablets” Here are some rules of thumb from Babylonian brick constants and Babylonian math problems. A sun dried brick has water content and also as hidden water. Some sun dried bricks have straw content. Straw content should not be a factor in fired bricks. Sun dried brick weight over wet and heavy brick weight equals 40/60 or second try equals 48/60. Sun dried brick weight over baked brick weight equals 50/60. Fraction 1/6 is mortar for clay wall. Weights of wet and sun dried bricks in table BM36776 have factors 3/2 and 6/5, per Friberg and Robson. Second and third section of factor equals 3/2. Fourth section has factor equals 6/5. Water approximates 12/60 weight of wet brick. Weight loss (water) is 10/60 of dried brick to baked brick. { 1 kus ba.an.gi4 } means 1 cubit returned or 1 cubit back, used in brickwork. The daily cartage quota is 37_30 talents per us per day equals expr {(37+30./60.)*30.} or 1125 kg per 60*6 meters per day. The daily cartage quota is 1_15 talent per danna per day equals expr {(1.+15./60.)*30} or 37.5 kg per 10.8 kilometers per day.

(37+30./60.)*30. 1125.0 (1.+15./60.)*30 37.5

2/3 rectangle, common in many texts

1/3 20 “ ib-si” 1/3 20 “ ib-si”

20* sqrt(20)

N*sqrt(N) (N+1)*sqrt(N+1) sqrt(N+1)*sqrt(N+1)*sqrt(N+1) sqrt(N+1)**3

ib-si is found on some tables. expr 26/33. 0.7878787878787878 (Desktop) 2 % expr .78*60 46.800000000000004 dry brick /wet brick

(14.+24/60.)/18. 0.8 0.8*60 48.0

water approximates 12/60 weight of wet brick dried /wet= 48/60. dried /baked= 50/60

On the Babylonian clay tablet and proposed scheme for generating a new reciprocal table, the reciprocal compensation algorithm was applied to the set of powers of 2 from 2**1 to 2**14, ref Friberg and Al-Rawi. In modern notation, modern terminology, and considerable added assumptions, the initial line and derivation for {2, 4, 15 } has effectively 3 propositions that 1) log2 4 = 2.0, 2) the base_60 reciprocal is 15, and 3) the known reciprocal pair is {4, 15 }. The check answer is that expr {(4*15)} = 60. While logarithms are not terms that the Babylonian mathematicians used, the reciprocal compensation algorithm was applied to the known reciprocal pair {4, 15 } to produce the compensated reciprocal pair { (4/3), 45 }. In the results with modern logarithm rules and many assumptions, the compensation changed reciprocal pair has effectively 3 propositions that 1) log2 4 - (log2 3?) =? 2.0 – 1.584962? , 2) the base_60 reciprocal = 45, and 3) the compensation changed reciprocal pair is {(4/3), 45 }. Numbers with question marks were not on tablet. The check answer is that expr {(4/3)*45} = 60. From this clay tablet and numerous other tablets, the Babylonian mathematicians seem concerned with producing new reciprocal pairs from table of powers, or tables of special reciprocal pairs for reciprocal factoring algorithms.

Is there some built-in relationship between reciprocals and modern logarithms that would imply some knowledge of the Babylonian mathematicians about logarithms? The Babylonian reciprocal compensation algorithm produced new reciprocal pairs and new reciprocal pairs intervals, but apparently did not produce new logarithm intervals. However, the base_60 in the Babylonian tables is different enough from base_10 that any possible log relationships do not automatically pop out to eye. There are tables of powers based on numbers 2,9,16,100, and 225, which were apparently used either on reciprocal algorithm(s) factoring a reciprocal or generating tables of reciprocals, including the Late Babylonian many place reciprocal tables.

One problem in math history is dating the invention of math formulas, the use and duration in society, and the interaction between the cuneiform math and other cultures. Evidence for the surveyors formula has been found carved on the Edfu Temple in ancient Egypt.

In modern terms and inverted, the interest rate was 12 shekels over 60 shekels per year and would be expr 12./60, 0.2 decimal, 20 percent. The Babylonians did not use percent, but the interest in percent is the most convenient for the modern reader. The hand calculation in decimals is P&I = expr / 60. [* $principal [** [+ 1. $interest $year ]], expr { / 60. [* 1. [** [+ 1. .2 3. ]] }, 34.7222 decimal, converts to 34_43_20 base60. The term 60 is a units conversion. The numbers on the tablet are given in relative place value in base60 notation, so some problem boundaries are useful for checking absolute values of the base60 notation. The check on the boundaries of problem would be that the principal must be less than one shekel and the rule of thumb is that silver doubles is two years. If 2*P equals 1 shekel in two years (ad absurdam), then the answer for the interest problem for over three years must in range of a half shekel, 30/60 shekel. While the method was not on the tablet, the formula term (1+12/60)**year is a probable expression for the silver P&I and is considered a use for the Babylonian square and cube tables. ===== proc modern_formula_lump {principal interest year } {return * $principal [** [+ 1. $interest $year ]} modern_formula_lumpx {principal interest year } {return / 60. [* $principal [** [+ 1. $interest $year ]]} # usage is modern_formula_lumpx 1. .2 3 # answer 34.7222 decimal , equivalent base_60 is 34_43_20 ===== The clay tablet YBC-4669-rev was translated by Neugebauer and further discussed by Friberg and Al-Rawi. The interest rate problem is outlined in the text and the Babylonian answer is given as 34_43_20 base60. No method is given in the text, but a oneliner procedure was written in TCL. Asking for the silver principal, the givens are total Principal and Interest P&I was one shekel or one gin of silver. The term of loan was 3 years. In Babylonian terms, the interest payment were given 1 mina / 12 shekels.

table. Four styles of Texas Holdem odds | comment if any | |||
---|---|---|---|---|

preflop odds | ||||

flop odds | ||||

turn odds | ||||

river odds |

quantity | P_probability, S_space etc | 100X, alternate percent, if applicable | formula TCL | comments if any |
---|---|---|---|---|

texas_pocket_pair_space | 1326 | expr { math::choose 52 2 } | ||

texas_pocket_pair | 0.004524886 | 0.4524886 | expr { (1.*math::choose 4 2 )/ math::choose 52 2 } | odds 220:1 |

any_texas_pocket_pair | 0.0588 | 5.88 | expr { 78/1326 } | odds 16:1 |

specific_texas_suited combination | 4 | expr { math::choose 4 1 } | ||

specific_texas_suited_hand | 0.003 | 0.3 | expr { 4/1326 } | odds 331:1 |

any_texas_suited combination | 312 | expr { 4*78 } | ||

any_texas_suited_hand | 0.2352 | 23.52 | expr { 312/1326 } | odds 3.25:1 |

- google < Texas Poker Wikipedia >
- Wikipedia search engine < Texas Poker algorithm >
- Wikipedia search engine < multiplication algorithm >
- Wikipedia search engine < Texas Poker Math >
- Wikipedia search engine < Texas Poker lograrithms >
- Wikipedia search engine <Texas Poker >
- Wolfram Alpha search engine < Texas Poker >
- precision math procedure used in TCL calculator Arjen Markus AM
- Computers and real numbers
- Floating-point formatting
- Texas Hold ’em poker solved by computer Science, AAAS.
- Sklansky, David (2005). The Theory of Poker (Fourth ed.). Las Vegas: Two plus two.
- Harrington, Dan and Bill Robertie (2004). Harrington on Hold'em:
- Expert Strategy For No-Limit T ournaments; Volume I: Strategic Play. Two Plus Two Publications.
- D. Purdy, The Illustrated Guide to Texas Hold’em, Sourcebooks, Inc., 2005.
- pokerproj
- Wikipedia, Poker_probability.pdf
- Wikipedia, Texas_hold_'em.pdf
- Poker probability (Texas hold 'em)
- Estimating Winning Probability for Texas Hold'em Poker,
- Wenkai Li and Lin Shang
- Probabilities in Texas Hold'em,
- The mathematics of Texas Hold'em Poker Probability-based analyses on concrete hands.
- Alspach's Mathematics and Poker Page
- Probabilities in Texas Hold'em, Brian Alspach, 22 August 2001
- Probabilities in Texas Hold'em
- Hold'Em Solitaire , on wiki, Keith Vetter 2005-10-26

There are differences between the TCL calculator and the Babylonian solutions. The TCL calculator has room for only 5 slots of brothers on the existing displays. Solutions for beyond 5 brothers will have to loaded on a printout. The TCL calculator seeks base_10 solutions with modern decimal fractions. It is supposed that th calculator could force an integer solution in base_10, but that might be another constraint on the solution, if solvable. The Babylonians were seeking integer solutions or integer & fraction solutions that were most compatible with base_60 fractions. The Neugebauer solution for dividing 60 among 5 brothers is the sequence of integers 4,8,12,16,20 with constant delta of integer 4. As an original translator, Neugebauer probably had the best sense of the typical solution in base_60, that the Babylonians were shooting for. However, the Neugebauer solution is believed an arithmetic sequence, rather than a geometric solution found in most of the other problems, that we know of. The relevant TCL expressions are expr {4+8+12+16+20} = 60 and expr {4./60+8./60+12./60+16./60+20./60} = 60/60 or 1.

Lets try an alternate solution to the brothers inheritance problem with modern algebra with modern decimal and percent notation. The Babylonian judge has three brothers in an estate of 60 shekels. This alternate solution starts with the elder brother. In setting up the problem, the share of the first brother is called X1 and the share of the second brother would be (1-1/N) or (1-1/3). The share of the second brother would be (1-1/3), expr { 2./3} , or factor 0.666*X1. The share of the third brother would be (1-1/N)*(1-1/N), (1-1/3)*(1-1/3), expr { (2./3)*(2./3)} , or factor 0.4444*X1. Adding the shares in X1, the equation is X1+0.6666*X1+0.4444*X1 = 60 shekels. Reduction is expr { 1+.6666+.4444} = 2.11099 , 2.11099*X = 60. So X1 = expr { 60/2.11099 } and X1 = 28.4226 for first brother share. Second brother share would be expr { 28.4226*0.6666 } or 18.9461. The third brother share would be expr { 28.4226*0.4444} or 12.6307. The percents of brothers 1,2,&3 was 47, 32, & 21 percent. The check answer was expr { 28.4226+18.9461+12.6307 } or 59.9994, rounding to 60. The average share for three brothers was expr { 60./3 } or 20, somewhat close to second brother share. The TCL calculator solution for brothers 1,2,&3 sharing 60 was entered as +60/+5/+5. Starting with the elder brother, the resulting shares were returned {list 28.4211 18.9474 12.6316}, reasonably close to the hand calculation.

An alternate solution starting with the younger brother is possible. Once again, the Babylonian judge has three brothers in an estate of 60 shekels. The younger brother share is called X3. The second brothers factor is expr { (1+1./3)}. The second brothers share is factor 1.3333*X3. The elder brothers factor is expr { (1+1./3)*(1+1./3)}. The second brothers share is factor 1.7777*X3. Adding the shares in X3, the equation is (1.+1.3333+1.7777)*X3 = 60 shekels. From expr { 1+1.3333+1.7777 } equals 4.11099, the youngest brother share is X3 = expr { 60/4.1109} or 14.5953. The second brother share is expr { 14.5953*1.3333 } equals 19.4595. The elder brother share is expr { 14.5953*1.7777 } equals 25.9465. The check answer is expr { 14.5953+19.4595+ 25.9465 } equals 60.0013. The TCL calculator solution for brothers 1,2,&3 sharing 60 was entered as +60/+5/-5. The TCL shares were returned {list 14.5945 19.4594 25.9459 }, reasonably close to the hand calculations.

For an alternate inheritance solution, lets try the “double portion inheritance” method for the elder brother, mentioned in the Bible. The patriarch wishes to portion out 60 shekels to 3 brothers with the elder brother receiving a double portion. The generic formula for a portion or single share would be 1/(N+1), where N is the number of brothers. As understood here, the elder brother would receive 2/(N+1) and the younger brothers would receive 1/(N+1). Also, the formula works for one brother as the only and eldest brother would receive 2/(1+1). (2/2) reduces to one and the whole inheritance. For the three brothers, one would divide 60 by N+1, expr { 60./4 } = 15 shekels for a single share. Elder brother gets a portion of 2X or expr { 2*15 } or 30. So brothers 1,2,&3 get shares of 30,15,&15. The check answer is expr { 30+15+15} = 60. The shares of the brothers 1,2&3 are 50,25,&25 percent. In opinion, while elder brother still gets the lion's share, the Hebrew solution is more fair to the younger brothers. In the Babylonian inheritance rules, the youngest brother of a large family would get next to nothing … even if the youngest brother could figure out the math!

As a trial solution, looking at using the TCL calculator for developing an estate or field division solution could be expected in a sequence of brother inheritance shares in real estate. In rounded numbers, the sequence for seven brothers was { list W = 235, 210,175,140,105,70,35} as field widths dividing a triangular field using a set of constant lengths { L = kay} and dividing the front of an inheritance, ref Friberg. In other words, the seven brothers would each receive a trapezoidal or other triangular surface area bounded by W(N),W(N-1), and L. The elder and middle brothers would receive trapezoidal fields bounded by W(N),W(N-1), and L. The youngest brother would receive a triangular field bounded by W(N-6) and L. The sum of widths approximates expr { 235+210+175+140+105+70+35} = 970 units. But the total field area was not a hard number given in the original tablet, but probably 900-1200 units and compatible with common area unit of one bur.

Getting into the weeds of Babylonian units, a bur was 1800 square nindas or 64800 square cubits. A ninda was 12 cubits or 6 meters. In Babylonian math problems, the classic rectangle was 4:3 side ratio and would hold two classic triangles, which used the 3:4:5 rule for sides. For the conceptual study, a rectangular field of 2 burs could be divided into 2 triangular fields of 1 bur or 64800 square cubits. A triangular field of one bur using the classic triangle rule of 3:4:5 would be approximated by width of 312 cubits and length of 416 cubits. The initial or total estate would be triangular area equals expr { .5*312*416 } square cubits.

Continuing with the problem set up, the length or front portion of each brother would be expr { 416./7}, 59.4, or rounding to 60 cubits. Maybe a mismatch, but the calculator solution for 900 units is { list Width = 208.06 173.38, 144.49, 120.409, 100.341, 83.61, 69.68 }. Another computer run for expr {64800./60 } or 1080 units was { list Width = 233.7, 200.3, 171.7, 147.19, 126.1, 108.1, 92.69} . Remember the last width is for a right triangle (Area= 0.5*L*W) and not quite figured out how to treat a triangle in the false shares algorithm. But the Babylonian solution on the tablet is maybe 0.5*L?

The formulas in the brothers inheritance problems have some similarity to the formulas in Babylonian interest rate problems. In other words, the Babylonian formulas and TCL code could be set or morphed to generate an increase crease curve or interest rate table. Usually, the Nth share in decreasing shares is { elder brother share } * (1-1/b)**(N-1). With a different constant c, the Nth share is { elder brother share } * (1-1/c)**(N-1). For example, starting with the youngest brothers share and calculating the increase for the successive brothers in a stairstep, the Nth share in increasing shares is { youngest brother share } * (1+1/c)**(N-1). Resetting the variables for an interest rate problem, the Principal and Interest (P&I) would increase every year in the formula P&I =(1+1/c)**(N+1), where 1/c is interest factor and N is the year. For example, the Babylonian rule that silver would double in 5 years works out as expr (1+1./5)**4 = 2.0735, as P&I past the fourth year.

The TCL calculator solution in base_10 is about +- 3 percent absolute error. That is, 3 percent difference could be expected from the available Babylonian solutions in base_60 on the clay tablets. On one Babylonian inheritance problem with a method and answers in clear cuneiform, the TCL calculator showed about 0.03 percent error from the “textbook solution.” So far, the majority of the problems do not show the worked methods or Babylonian answers. But the internal algorithm in the TCL calculator is on the right track. In both base_10 and base_60, there is going to be some calculation slop and rounding on multiple brothers. Remember the student is generally working either from eldest brother down or youngest brother up, so any error propagation should be in a consistent directions. From the problem setups and available problem method, the Babylonian mathematicians and students are working out solutions to four base_60 relative places. The TCL calculator solution is kept in { TCL precision 17 } to study the Babylonian algorithms, not to imply accuracy beyond 3 decimal places or accuracy beyond the numbers on the clay tablets.

Modern mathematicians recognize three types of sequences as 1) arithmetic sequences of terms with a common and constant difference (a+N, b+N,c+N,d+N...), 2) geometric progression with any two terms in a constant ratio (a,a*r,a*r**2,a*r**3,a*r**4...), and 3) other sequences defined in simple or complex formulas (t(N)=(N**2)+1 or s(N)=(N**3)-1). Some math sequences are neither arithmetic sequences nor geometric progression in strict definition, but the available cuneiform tablets suggest the Late Babylonian mathematicians were familiar with all three sequence types. The brother inheritance problems are believed to represent geometric progression to solve for silver pieces or land parcels. Some terminology in the early brother inheritance problems suggest that geometric progression methods was first and early applied to land inheritances and graphical survey of triangular fields and geometric figures. Also, there are some geometry problems where brothers or soldiers were given equal portions or ladders of land from triangles, trapezoids, or other geometric figures. Possibly, the later arithmetic problems were developed or demonstrate solutions for silver pieces and unitless numbers. The exact relationship of the brother inheritance problems to Babylonian law is uncertain, but the available brother inheritance problems are recognized as more a tour de force in sequence mathematics than the law courts.

# pretty print from autoindent and ased editor # easy eye calculator, large black type on green # working under TCL version 8.5.6 # dated 20Jul2018 package require Tk package provide calculatorliner 1.0 namespace path {::tcl::mathop ::tcl::mathfunc} set tclprecision 17 namespace eval liner { console show proc initdisplay {} { pack entry .e -textvar e -width 50 bind .e <Return> {puts $e;catch {expr string map {/ *1./} $e } res; set e $res;puts $res} ;# RS & FR } } proc linershell {} { namespace import liner::* liner::initdisplay .e configure -bg palegreen .e configure -fg black .e configure -font {helvetica 50 bold} .e configure -highlightcolor tan -relief raised -border 30 focus .e wm title . "Easy Eye Calculator" proc pi {} { expr acos(-1) } proc > {args} { global e set e $args} proc e> {args} { global e set e ""} proc q> {args} { exit} } bind Label <1> {focus %W}

bind Label <FocusIn> { %W configure -background SystemHighlight -foreground SystemHighlightText } bind Label <FocusOut> { %W configure -background SystemButtonFace -foreground SystemButtonText } bind Label <Control-c> { clipboard clear clipboard append %W cget -text } bind Label <Control-p> { #clipboard clear clipboard append %W cget -text } bind Label <Control-q> { #clipboard exit clipboard append %W exit } console show console eval {.console config -bg palegreen} console eval {.console config -font {fixed 20 bold}} console eval {wm geometry . 40x20} linershell package require math::trig #namespace path {::tcl::mathop ::tcl::mathfunc} namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory math::trig}proc report {n} { set count 1 set lister {} set lister {5 10 100 1000 1E4 1E5 1E6 1E7 1E8 1E9 1E10 1E11 1E12 1E13 1E14 1E15} puts "%|table testcases number|printed in| tcl table format|% " puts "%|testcase | degree |TCL proc trig expressions | index number| comment, if any|% " foreach item { 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 } { puts " &| testcase $count | expr ( 100.* $count) | [::math::trig::sind [expr (100.*$item)] | $count||&" incr count 1 }} report 2 #This page, screenshots, and TCL source code is #copyrighted under the TCL/TK license terms. #Editorial rights retained under the TCL/TK license terms # and will be defended as necessary in court. Suggest you get the original script working first (without trig.tcl ). Then add the invokes to math:trig.tcl .####))))) add in for TCLLIB library (math) pkgIndex.tcl , invoked on individual machine. package ifneeded math::trig 1.0 [list source [file join $dir trig.tcl] pkgIndex.tcl in TCLLIB:math

https://core.tcl.tk/tcllib/info/7538200f88f56f53 https://core.tcl.tk/tcllib/brlist https://core.tcl.tk/tcllib/timeline?n=100&r=trunk

This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Aside from your courtesy, your wiki MONIKER and date as a signature and minimal good faith of any internet post are the rules of this TCL-WIKI. Its very hard to reply reasonably without some background of the correspondent on his WIKI bio page. Thanks, [gold] 12DEC2018 ---- Title: Equation_V2_into_TCL <<TOC>> ***Preface*** [gold] Here are some calculations using TCL expressions. ---- ***Introduction*** Here are TCL calculations on the equation for stock market yields over years. ---- *** Calculator Usage As as alternate way of using the calculator *** Expressions into TCL. *** ---- ***Testcases are important in development of TCL programs. *** ---- ***Conclusions*** By inspection ---- *** Table 1: Tables*** ---- *** Table 2: Tables *** ---- ---- ***Testcases Section*** **** Testcase 1 **** ---- **** Testcase 2 **** ---- **** Testcase 3 **** ---- ---- ***Screenshots Section*** **** figure 1. Calculator Screenshot **** **** figure 2. Console Screenshot **** ---- ***References:*** * google search engine < Random Walk Down Wall Street by Burton G. Malkiel > * Wikipedia search engine < random generator > * Wikipedia search engine < Wall Street stock market Burton G. Malkiel > * startpage search engine < basic random > * TCL-WIKI search engine < random generator > * Book: Random Walk Down Wall Street ---- ***Pseudocode & Equations Section***

more than one formula for 1) tables and 2) calculator shell Pseudocode Section pseudocode:Random walk equation year rate = good year rate * term chance(1 in n) plus normal year rate * term chance(1 in n) plus bad year rate * term chance(1 in n) plus place holder to keep from all zeroed terms pseudocode: set chance terms initially to zero until activated. pseudocode: if rand() < $side2 , set term1 1 pseudocode: if no chance terms fire, year of zero interest will result. pseudocode: if chance<(1 in n) terms fire, year of calc. interest will result. pseudocode: not all terms will fire on every period of time. pseudocode: good/norm/bad years loaded as $side1,$side2,$side3 from form. current = .01*$side1*$term1+.01*$side3*$term2+.01*$side5*$term3+.00000000001 } ] pseudocode: add $current sum of terms for 1 to N years in for loop pseudocode: and divide by N years from $side7 in form pseudocode: load results into answer fields

---- **Appendix Code** *** Trial Code ***

# TCL source code follows # pretty print from autoindent and ased editor # calculator V2 # written on Windows XP on TCL # working under TCL version 8.6 # gold on TCL Club, 25nov2018

---- ---- ---- [gold] This page is copyrighted under the TCL/TK license terms, [https://www.tcl-lang.org/software/tcltk/license.html%|%this license]. Disclaimers: This page, screenshots, and TCL source code is copyrighted under the TCL/TK license terms. Editorial rights and disclaimers retained under the TCL/TK license terms and will be defended as necessary in court. **Hidden Comments Section** <<discussion>> Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Thanks, [gold] 12Dec2018 ---- <<categories>> Numerical Analysis | Toys | Calculator | Mathematics| Example| Toys and Games | Games | Application | GUI ---- <<categories>> Development | Concept| Algorithm ----

gold This page is copyrighted under the TCL/TK license terms, this license .

If urgent matter, leave comment out in plain sight, here at bottom of page. As I am more likely to see it. If the issue is resolved, I may sweep under rug later.

Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Thanks, gold 12Dec2018

Category Numerical Analysis | Category Toys | Category Calculator | Category Mathematics | Category Example | Toys and Games | Category Games | Category Application | Category GUI |