## Introduction

gold Here is some starter code for calculating tonnage of ancient ships. The impetus for this calculator was checking rated ship capacity and ship coefficients in some clay texts and some historical novels. Although there are modern tonnage rating formulas and computer programs based on ship dimensions, the ancient Sumerians and other cultures rated their ships in terms of cargo capacity volume units (gurs). Its easy enough to plug in formulas into the calculating subroutine. Most of the checked testcases involve replicas or models, using assumptions and rules of thumb .

In the Sumerian coefficient lists, there are ship coefficients which were used in determining the capacity of a Sumerian ship. One coefficient is called sa magur (coefficient ship deep) which has a value of 6. Culled from different lists, the ship coefficients range 5,6,7,7:12,and 13:20 in base 60 and possibly represent different style ships. The math problem is how this ship coefficient was used in estimating ship capacity. One difficulty is determining the effective power of the coefficient in base 60. For example, 5 could represent either 5*3600,5,5/60, 5/3600, or even 1/5. The ancient Sumerians rated their ships in terms of cargo capacity volume units (gurs), based on numerous texts including vocabulary lists of 10,20, ...120 gur ships, legal decrees, and merchant accounts. A complete math problem or explanation on ship dimensions (L,B,D) is lacking.

However, the Sumerian coefficient lists show the Sumerians busy with coefficients for computing the area of ship figures or the ship deck area. The modern sailors, rating formulas, and computers do not use deck area for estimating ship capacity. The ship coefficient was used to convert a surface area sar (eg. square nindans in Sumerian usage) into a volume sar with units of gurs. A nindan equals 6 meters, a surface area sar about 36 square meters, and a volume gar about 0.3 cubic meters. The generic formula would be surface sars in nindan*nindan times coefficient equals volume sar in units of gurs. After a considerable amount of scratch paper, the Sumerians appear to be using formula ship capacity in volume gars equals coefficient (eg 5.0 ) times (ship arclength) *(ship arclength) in nindans. A complete and period text available on the dimensions of the various Sumerian ships is lacking, but we have manipulated a spreadsheet to estimate various ship arclengths, based on modeling the few ship wrecks and scaling available sailing ships.The 10 magur, 20 magur, and 60 magur ships are more frequent in the texts, eg better known. The Cyprus trading ship, Egyptian punt, Phoenician trading ship, the 60 magur, and the 120 magur are a pretty fair match. The other ships out of that 60-120 gur range are not so good.a match. Although taken from a volcabulary text, the series of gur units <5,10,20,30,40,50,60,120> appears to be based on intervals of arclength in half nindans. So that a series of ship arclengths can be created as N nindans*6 meters per nindan, < .5*6, 1.*6, 1.5*6. 2*6, 2.5*6, 3*6,3. 5*6, 5.0*6 > which reduces to arclengths <3, 6, 9, 12, 15, 18, 21, 30> in meters. The arclength series is equivalent to ship lengths of <2.89 5.79 8.68 11.58 14.48 17.38 20.27 28.96 > in meters.The ship length to beam ratio from the best known merchant ships was 4:1. Using the 4:1 proportion, the ship beam series would be 1/4 * <ship length series> or < 0.7225 1.4475 2.17 2.895 3.62 4.345 5.0675 7.24>. A ship depth series would be very tricky as that depends on the ship draft, lading, and waterline.

How could the ship coefficients like 5,6,7:12 (in base 60) be derived? It may be as simple as how many tubs can be placed on a mat of 1 square meter. Much of the Sumerian economy was based on raising large amounts of barley and wheat and transporting the grain in woven straw baskets or tubs in river boats. There were baskets rated at 30, 60, and 90 liters for porters, burro loads, and other transport. The standard large cylindrical tub ( hal-gur-dub) was 1 cubit in diameter and 1 cubit high. The tub was about 0.3 gur volume measure, 90 modern liters, or 0.09 cubic meters. Since a cubit is 0.497 meter, just short of a half meter, only 4 baskets of 1 cubit diameter could fit onto a mat of 1 square meter. So, one possible relationship is 4 tubs per meters squared, which can be converted into volume gurs per unit of ship horizontal area.

While the Sumerians usually measured horizontal areas in square nindans for the ships and grain bins, the problem is essentially the same: fitting circles into a fixed area or geometric figure. In modern terms, this is called a circle packing problem. One nindan equals 6 meters and a square nindan equals 36 square meters, called a surface sar in the texts. One estimate of the 60 gur ship was length 17 meters, arclength 2.99 nindans, beam 5.12 meters with a depth of 6.4 meters. The ship had a length to beam ratio of 17/5.12 (3.3) and hull shaped like a lima bean or face to face crescents. The surface area can be approximated by 60 square meters. As a first approach, the number of tubs would be 4 tubs per square meters times surface area, 4*60 tubs or roughly 240 tubs. The ship would have 240 tubs *.3 gurs per tub or 72 gurs. The ship capacity coefficient would equal gur volume/(arclength*arclength), 70.8 gurs/ (2.99*2.99) nindans*nindans, or 8 gurs/nindans*nindans. The estimated ship coefficient 8 g/n*n is within range of the 5,6,7:12 (in base 60) numbers on the clay tablets. There are several math problems about fitting 4 or more circles into a unit square, so the Sumerian scribes were interested in these circle packing problems.

There is a math problem in BM85194 that sets up a metrological problem about a ship that carries one surface sar of bricks (total 720 bricks). The math problem asks the equivalent amount of grain and gives the answer of 8 volume gurs and 1+40/60 volume silas, ref. Mathematical Cuneiform Texts. The math problem does not specify the L/B/D dimensions of the ship or the bricks. While the given solution is difficult to follow, the textbook gives the rounded answer of 8 volume gurs of barley as equivalent of one surface sar of bricks. Setting up the ratio of 8 gurs/sar or 8 gurs/nindan*nindan as before, this gives some confidence on the approach of estimating the ship coefficients as 5/6/7:12 g/n*n in base 60.

### Summary

Alternate Gist. The Sumerians used ship coefficient formulas for computing ship area or deck area, which modern sailors and computers do not use. They converted surface area sar (in nindans) into volume sar with units of gurs. The formula used was ship capacity in volume gars equals coefficient times (ship arclength) * (ship arclength) in nindans. Various Sumerian ships, such as the 10 magur, 20 magur, and 60 magur, were more frequent in texts. The ship length to beam ratio was 4:1, and the ship beam series was derived from the ship length series. However, estimating the ship depth series was tricky due to factors like ship draft and lading.

```ship length meters: 17.
ship beam meters: 5.2
ship depth meters: 6.4
answer segment (bow area): 30.01, half ship horizontal area
double segment (seed area): 60.02, total ship horizontal area    ```

### Table of Sumerian Ship Coefficients etc.

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? 45/60 ? 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/60 ? coefficient*nindan*nindan=volume gur, early? age math
6 sa gis-ma-la conversion coefficient (for) ship capacity in gur/sar 6/60 ? coefficient*nindan*nindan=volume gar, middle? age math
7:12 elepuum (long ship) conversion coefficient (for) ship capacity in gur/sar 7/60+12/3600 ? 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

### Table of Sumerian Ship Capacities and Ratings

Sumerian ship name Sumerian rated capacity ship length ship arclength ship arclength .5*nindan*nindan=
plus comparisons ship capacity, gur units meters estimated meters estimated nindans converted gurs
gis magur 120 120 27.01 29.08 5. 125.1
gis magur 60 60 17.00 21.04 3.51 61.48
gis magur 50 50 14.17 17.53 2.92 42.70
gis magur 40 40 11.33 14.03 2.34 27.32
gis magur 30 30 11.20 13.86 2.31 26.69
gis magur 20 20 9.80 12.13 2.02 20.43
gis magur 10 10 7.10 8.79 1.46 10.72
gis magur 5 5 5.00 6.19 1.03 5.32
comparisons below < < < < <
Phoenician trading ship 71.24 18.30 22.65 3.77 71.24
Cyprus trading ship 59.52 16.73 20.70 3.45 59.52
Egyptian punt 87.67 20.30 25.12 4.19 87.67
Greek trireme 333.61 39.60 49.01 8.17 333.61
Roman grain ship 181.39 29.20 36.14 6.02 181.39

### Testcases Section

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 ship capacity functions (subroutines).

#### Testcase 1

The trading ship hull has a length of 18.3 meters, beam of 3.96 meters, and a body depth of 1.82 meters. Most of these TCL expressions can be pasted into the console window, but need to be posted in sequence if a \$variable has been started and referenced in the console.

```  #  pseudocode can be developed from rules of thumb.
pseudocode: enter ship length,ship beam,ship depth
modern tonnage rating = (0.2+0.02*log(L*B*D))*L*B*D
cargo =  3/5 * modern tonnage rating
hull & equipment  =  2/5 * modern tonnage rating
displacement = (5/3) * cargo
pseudocode: rules of thumb can be 3 to 15 percent off, partly since waterline varies & g..in g..out.
pseudocode: set ship_length_beam_ratio =  evaluate ( ship_length / ship_beam )
pseudocode: sumerian ship coefficients  of 5/60, 6/60, & 7/60 fractions
pseudocode: answers are ship tonnage volume, cargo volume, in metric tons
pseudocode: go/ no_go condition ```
```   set modern_tonnage  [ expr { (0.2+0.02*log(18.3*3.96*1.82))*(18.3*3.96*1.82)} ] ;# generic TCL
answer% 39.256:     # ship tonnage volume in metric tons
set modern_cargo_rating [ expr {(3./5.) * 39.256} ]
answer%   23.5537     # cargo volume in metric tons
set   hull&equipment  [ expr {(2./5.) * 39.256} ]
answer%   15.7024     # hull&equipment volume in metric tons, based on rule of thumb
set possible_ship_displacement [ expr {(5./3.) *\$modern_tonnage } ]
answer%  65.426       # ship displacement volume in metric tons, rule of thumb used
# when dimensions are uncertain like ancient ships
set ship_length_beam_ratio  [ expr { 18.3/3.96} ]   ;# answer is 4.62, units cancel out
Report from calculator for testcase 1
ship length meters: 18.3
ship beam meters: 3.96
ship depth meters: 1.82
tonnage cubic meters: 39.25
cargo cubic meters: 23.55
ship length / beam ratio: 4.62   ```

#### Testcase 2

The Egyptian punt has a length of 18.3 meters, beam of 4.9 meters, and a body depth of 2 meters at the waterline.

```  set modern_tonnage  [ expr { (0.2+0.02*log(18.3*4.9*2.))*(18.3*4.9*2.)} ]  ;# answer is  54.48
set modern_cargo_rating [ expr {(3./5.) * \$modern_tonnage} ] ; # answer is 32.68 metric tons, rule of thumb
set   hull&equipment  [ expr {(2./5.) * \$modern_tonnage} ]   ;# answer is 21.79 metric tons, rule of thumb
set possible_ship_displacement [ expr {(5./3.) *\$modern_cargo_rating  } ]  ;# answer is 54.4 metric tons, rule of  thumb
set ship_length_beam_ratio  [ expr { 18.3/4.9} ]   ;# answer is 3.734, units cancel out

Report from calculator for testcase 2
ship length meters: 18.3
ship beam meters: 4.9
ship depth meters: 2.
tonnage cubic meters: 54.48
cargo cubic meters: 32.68
ship length /beam  ratio: 3.73 ```

#### Testcase 3

The English brig has a length of 38.3 meters, beam of 7.93 meters, and a body depth of 3.89 meters. The reported tonnage was 297 English long tons. Note: Ship cargo ratings from 1650 to 1850 CE used UK Builder's Old Measurement, BOM is not metric and old books may differ from metric tonnage.

```    set modern_tonnage  [ expr { (0.2+0.02*log(38.3*7.93*3.89))*(38.3*7.93*3.89)} ] ; # answer is 403.45
set modern_cargo_rating [ expr {(3./5.) * \$modern_tonnage} ] ; # answer is 242.075  metric tons, rule of thumb
set   hull&equipment  [ expr {(2./5.) * \$modern_tonnage} ]   ;# answer is 161.38 metric tons, rule of thumb
set possible_ship_displacement [ expr {(5./3.) *\$modern_cargo_rating  } ]   ;# answer is 403.45 metric tons, rule of  thumb
set ship_length_beam_ratio  [ expr { 38.3/7.93  } ]    ;# answer is 4.829, units cancel out
Report tape from calculator for testcase 3
ship length meters: 38.3
ship beam meters: 7.93
ship depth meters: 3.89
tonnage cubic meters: 403.4
cargo cubic meters: 242.0
ship length /beam ratio: 4.82    ```

#### Testcase 4

The Roman grain ship has a length of 29.2 meters, beam of 9.7 meters, and a body height of 3.96 meters.

```   set modern_tonnage  [ expr { (0.2+0.02*log(29.2*9.7*3.96))*(29.2*9.7*3.96)} ] ; # answer is 381.859
set modern_cargo_rating [ expr {(3./5.) * \$modern_tonnage} ] ; # answer is 229.115  metric tons, rule of thumb
set possible_ship_displacement [ expr {(5./3.) *\$modern_cargo_rating  } ]   ;# answer is 381.859 metric tons, rule of  thumb
set ship_length_beam_ratio  [ expr { 29.2/9.7} ]    ;# answer is 3.01, units cancel out```

#### Testcase 5

The Liberty ship had a length of 133.05 meters, beam of 19.2 meters, and a draft of 8.68 meters at the waterline. The ship burden (OBM) was 8540 long tons.

``` set modern_tonnage  [ expr { (0.2+0.02*log(133.5*19.2*8.68))*(133.5*19.2*8.68)} ] ; # answer is 8903.8
set modern_cargo_rating [ expr {(3./5.) * \$modern_tonnage} ] ; # answer is 5342.3  metric tons, rule of thumb

set possible_ship_displacement [ expr {(5./3.) *\$modern_tonnage  } ]   ;# answer is 14839.82 metric tons, rule of  thumb                                                                                                                                                                          ;# about 3 percent short of textbook
set ship_length_beam_ratio  [ expr { 133.5/19.2} ]    ;# answer is 6.9, units cancel out```

#### Testcase 6

A Sumerian ship called a gis-ma-la (wood ship carry load) or freight ship was reported to have a length of 1 nindan, beam of half nindan plus 2 cubits,and 6 cubits depth. A nindan equals 12 cubits or 5.964 meters and a cubit equals 0.497 meters. Note that the standard practise of the Sumerians was to measure horizontal distances and square areas in nindans, the vertical dimensions were measured in cubits (kus or 0.497 meters). The Sumerian usage was to horizontal areas as nindan * nindan or surface area sars. For practical volumes, the Sumerians would calculate a horizontal surface area in nindans*nindans and multiply by a vertical distance in cubits, obtaining a volume sar, essentially horizontal units times vertical units as nindan*nindan*kus. Converting into metric units, the ship was L/B/D of <5.964, 2.485, 2.982> meters, carrying extra decimals (4 place) from the spreadsheet for comparison with the eTCL calculator. The ship arclength was 5.964*(.785/.707), or 6.55 meters. Converting the ship arclength to nindans as 6.55/(0.497*12) or 1.098 nindans, the Sumerian capacity formula was coefficient*arclength*arclength, 5*1.098*1.098, 6.028 volume gurs or 1.808 cubic meters. The calculator results are very sensitive to the ship depth, and seems to give the most reasonable results when the ship draft is used as 1/4 the ship depth or 2/3 maximum load draft. The ship draft is usually estimated about 0.5 to 1.5 meters in the ancient wooden ships. From the eTCL calculator, tonnage rating was 2.73 metric tons and cargo rating was 1.64 cubic meters, 1.64/.3 gurs, or 5.46 gurs.The 5.46 gur rating was close to the ship type the Sumerians called a 5 magur ship. The exact dictionary line in mixed Sumerian-Akkadian was "ges ma-5-gur, min ha-mil-ti min" (wood ship 5 gur (volume), equal "group of five (Akkadian number 5, masc. gender) equal ).

ship length meters 5.964 overall length
ship beam meters 2.485 maximum width of curved ship
ship draft meters 0.745 (2.982 ship depth)/4 rule of thumb
tonnage cubic meters 2.73 compares to (5/3) * Sumerian 1.808 or 3 m**3 from formula and rule of thumb
cargo cubic meters 1.64 compares to 1.8 m**3 from arclength formula
ship length /beam ratio 2.4 L/B ratio of 2.4:1 seems a slow boat

#### Testcase 7

The ancient ship has dimensions for L/B/D of <20.212, 4.892, 1.75> meters. The ship arclength is 20.2*(.785/.707), 22.428 meters, 22.428/(0.497*12), or 3.760 nindans. The Sumerian capacity formula was coefficient*arclength*arclength, 5*3.760 *3.760, 70.688 volume gurs or 21.206 cubic meters. The 70.6 gur capacity is very close to a regular 60 magur ship. Ship draft is estimated as (1.75 ship depth)*(2/3) or 1.16 meters, rule of thumb.

ship length meters 20.212 overall length
ship beam meters 4.892 maximum width of curved ship
ship draft meters 1.16 (1.75 ship depth)*(2/3) rule of thumb
tonnage cubic meters 33.78 compares to (5/3) * Sumerian 21.2 or 35.83 m**3 from formula and rule of thumb
cargo cubic meters 20.2 compares to 21.2 m**3 from arclength formula
ship length /beam ratio 4. 4:1 L/B ratio common for warships

### References:

• Canadian Transport Publication,ship tonnage [L1 ]
• Builder's Old Measurement, Wikipedia[L2 ]
• Tonnage Measurement of Ships,Steamship Mutual[L3 ]
• Ancient Greek Trireme [L4 ][L5 ]
• William Falconer's Dictionary of the Marine[L6 ]
• Thames Yacht Tonnage, 1855, Royal Thames Yacht Club,[L7 ]
• Basic Ship Theory,Rawson and Tupper[L8 ]
• Liberty Ship[L9 ]
• Cargo Ship, Liberty Ship in non metric units[L10 ]
• Software for Circle_packing [L11 ]
• Circle_packing in a Square [L12 ]
• Circle_packing [L13 ]
• BU!,Robert K. Englund, UCLA. really good paper on tow barges

#### appendix TCL programs and scripts

```        # TCL source code follows
# pretty print from autoindent and ased editor
# Ship Tonnage and Cargo Volume V2
# written on Windows XP on TCL
# working under TCL version 8.6
# gold on TCL Club, 12Dec2018
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 {{} {ship length meters:} }
lappend names {ship beam meters:}
lappend names {ship depth meters:}
lappend names {approximate hull_&_equipment metric tons: }
lappend names {approximate ship_draft meters:}
lappend names {modern tonnage metric tons}
lappend names {modern cargo rating cubic meters: }
lappend names {length to beam ratio , no units: }
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
proc pi {} {expr acos(-1)}
set msg "Calculator for Ship Tonnage and Cargo Volume V2
from TCL
# gold on TCL Club, 12Dec2018 "
tk_messageBox -title "About" -message \$msg }
proc self_help {} {
set msg " Ship Tonnage and Cargo Volume V2
from TCL ,
# self help listing
# problem, Ship Tonnage and Cargo Volume V2
# 3 givens follow.
1) ship length meters:
2) ship beam meters:
3) ship depth meters:
# modern tonnage is specific formula fm intl. std.
# ship_length_beam_ratio has no units
# following rules of thumb can
# be 3 to 15 percent off,
# depending on waterline,hull,superstructure etc.
# rules of thumb mostly from modern metal hulls.
# m_cargo_rating is (3./5.)*modern_tonnage,m. tons
# hull&equipment=(2./5.)*modern_tonnage,m. tons
# ship_displacement is (2./5.)*modern_tonnage,m. tons
# Sumerian gur = 300 liters = 0.3 cubic meters
# gur_cargo_rating is m_cargo_rating c.m./0.3
# 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 to conventional texteditor.
# For testcases, testcase number is internal
# to the calculator and will not be printed
# until the report button is pushed
# for the current result numbers.
# This posting, screenshots, and TCL source code is
# Editorial rights and disclaimers
# retained under the TCL/TK license terms
# and will be defended as necessary in court.
Conventional text editor formulas
or  formulas grabbed from internet
screens can be pasted into green console.
# gold on  TCL Club, 12Dec2018 "
tk_messageBox -title "Self_Help" -message \$msg }
proc tonnage_formula { l  b  d } {
set t1 [ expr { 1.*\$l*\$b*\$d } ]
set modern_tonnage [ expr { (0.2+0.02*log(\$t1))*(\$t1)}]
return \$modern_tonnage
}
proc calculate {     } {
global side1 side2 side3 side4 side5
global side6 side7 side8
global testcase_number
global possible_ship_displacement gur_cargo_rating
global ship_length_nindas ship_beam_nindas ship_depth_nindas
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 ship_length \$side1
set ship_beam \$side2
set ship_depth \$side3
set ship_tonnage [ tonnage_formula \$ship_length \$ship_beam \$ship_depth ]
set ship_cargo [ expr { (3./5.)*\$ship_tonnage} ]
# following rules of thumb possibly 3 t0 15 percent off.
set length_beam_ratio [ expr { (1.*\$ship_length)/\$ship_beam } ]
set modern_cargo_rating [ expr {(3./5.) * \$ship_tonnage} ]
set hull_equipment  [ expr {(2./5.) * \$ship_tonnage} ]
set ship_length_nindas [ expr { \$side1 / 6.} ]
set ship_beam_nindas [ expr { \$side2 / 6. } ]
set ship_depth_nindas [ expr { \$side3 / 6. } ]
# approximate ship_draft formula for full loaded ship, normal working
set ship_draft [ expr {(2./3.) * \$ship_depth } ]
set gur_cargo_rating [ expr {\$modern_cargo_rating / .3} ]
# redundant formulas , used for check and comparison cases
set possible_ship_displacement [ expr {(5./3.) *\$modern_cargo_rating  } ]
set side4 \$hull_equipment
set side5 \$ship_draft
set side6 \$ship_tonnage
set side7 \$ship_cargo
set side8 \$length_beam_ratio
}
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 side1 side2 side3 side4 side5
global side6 side7 side8
global testcase_number
global possible_ship_displacement gur_cargo_rating
global ship_length_nindas ship_beam_nindas ship_depth_nindas
console eval {.console config -bg palegreen}
console eval {.console config -font {fixed 20 bold}}
console eval {wm geometry . 40x20}
console eval {wm title . " Ship Tonnage and Cargo Volume V2, screen grab and paste from console 2 to texteditor"}
console eval {. configure -background orange -highlightcolor brown -relief raised -border 30}
console show;
puts "%|table \$testcase_number |printed in| tcl format|% "
puts "&| quantity| value| comment, if any|& "
puts "&| \$testcase_number :|testcase_number | |&"
puts "&| \$side1 :|ship length meters:  |   |&"
puts "&| \$side2 :|ship beam meters:   | |& "
puts "&| \$side3 :|ship depth meters: | |& "
puts "&| \$ship_length_nindas :|ship_length_nindas: | |& "
puts "&| \$ship_beam_nindas :|ship_beam_nindas: | |& "
puts "&| \$ship_depth_nindas :|ship_depth_nindas: | |& "
puts "&| \$side4 :|approximate hull_&_equipment metric tons: | |&"
puts "&| \$possible_ship_displacement :|check on possible_ship_displacement: metric tons | |&"
puts "&| \$gur_cargo_rating :|gur_cargo_rating: Sumerian gur volume units  | |&"
puts "&| \$side5 :|approximate ship_draft meters:  | |&"
puts "&| \$side6 :|answer: modern tonnage metric tons:|  |&"
puts "&| \$side7 :|modern cargo rating cubic meters: |  |&"
puts "&| \$side8 :|length to beam ratio , no units: |  |&"
}
frame .buttons -bg aquamarine4
::ttk::button .calculator -text "Solve" -command { set side8 0 ; calculate   }
#::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 18.3 3.96 1.82 39.2  23.5 4.6 }
#::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 18.3 4.9 2. 54.5  32.68 3.7 }
#::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 38.3 7.93 3.89 403.  242. 4.8 }
::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 18.3 3.96 1.82  15.7 1.2  39.2  23.5 4.6 }
::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 18.3 4.9 2. 21.8 1.3 54.5  32.68 3.7  }
::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 38.3 7.93 3.89 161. 2.6 403.  242. 4.8}
::ttk::button .clearallx -text clear -command {clearx }
::ttk::button .self_help -text self_help -command { self_help }
::ttk::button .cons -text report -command { reportx }
::ttk::button .exit -text exit -command {exit}
pack  .clearallx .cons  .self_help .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 . "Ship Tonnage and Cargo Volume V2"
```

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. While the testcases are in meters, the units either cancel out or are carried through in the calculator equations. So the units could be entered as English feet, Egyptian royal cubits, Sumerian gars, or Chinese inches and the outputs of tonnage/cargo volume will in the same (cubic) units. This is an advantage since the units in the ancient Sumerian, Indian, and Chinese texts are open to question. In some benign quarters of the globe, feet and cubic feet were still being used for design in the 1970's.

For multiple ships and 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 (which 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 " &| ship tonnage| \$ship_tonnage| meters |based on length \$side1 and width \$side2   |&"  ```