Updated 2016-04-18 20:20:44 by gold

Sumerian Coefficients, Semicircle Properties, and eTCL Slot Calculator Demo Example , numerical analysis  edit

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 in your comment with the same courtesy that I will give you. Its very hard to reply understandably without some background of the correspondent. Thanks,gold

gold Here is some eTCL starter code for calculating the semicircle properties in reference to the Sumerian coefficients. Recent papers and older cuneiform translations have identified numerous semicircle coefficients in the Sumerian coefficient lists and problems. This report will use less strict definitions and not consider confidence levels, since the main interest is developing a simple and quick slot calculator. Most of the testcases involve replicas or models, using assumptions and rules of thumb.

Software Planning  edit

In planning any software, it is advisable to gather a number of testcases to check the results of the program. The results of the testcases are estimated using the hand calculator and then checked in the eTCL slot calculator. Pseudocode and equations are developed from the hand calculations and theory. Small console programs are written to check or proof the alternate subroutines or procedures, rather than keeping the unblessed code and comment lines in the main slot calculator. Finally the improved or alternate subroutines are loaded into the slot calculator. The eTCL slot calculator is effectively a shell program to input entries, host calculation routines, and display results. Additional significant figures are used to check the eTCL calculator, not to infer the accuracy of inputs and product reports.

In the Sumerian coefficient lists, there are coefficients for semicircles. One coefficient has a value of ~10. Culled from different lists, the kiln coefficients range 10/20 in base 60, and possibly represent different math traditions or uses. The math problem is how this coefficient was used in estimating area or capacity. One difficulty is determining the effective power of the coefficient in base 60. For example, 20 could represent either 20*3600,20,20/60, 20/3600, or even 1/20. However, the Sumerian coefficient lists and problems show the Sumerians busy with coefficients for computing the horizontal area of semicircles and semicirular volumes.

Estimation standard  edit

Here are some model numbers and terms for developing the software.

There are several forms of the rearranging terms, delta = exp<{( (17E3/8.314)*(.00347))-((17E3/8.314)*(1/t1))} and so on.

Testcases edit

Testcase 1: Each site has selected measurements. Testcase 1 uses constant.

Push Button Operation edit

For the push buttons in the eTCL slot calculator, the recommended procedure is push testcase to fill entry 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 calculator display has a caution flag subroutine for negative numbers, unrecognizable text characters, and operation outside expected operation range. On a degrading scale, the calculator will post warning flags to the console report, issue degraded accuracy notices, and may reset some negative and offscale numbers to positive defaults. Errors pass through the warning flag routine once on the same testcase and multiple error calls on the same fault are possible. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the functions (subroutines).

Pseudocode and Equations

     #pseudocode can be developed from rules of thumb.
     #pseudocode: some problems can be solved by proportions (rule of three), to some order of magnitude
     #pseudocode: enter quantity1,  quantity2, quantity3 and expected output (quantity4) for testcases.
     #pseudocode: enter time in years, number of remaining items
     #pseudocode: output fraction of (remaining items) over (items at time zero)
     #pseudocode: ouput remaining items as fraction or percent
     #pseudocode: output fraction of (quantity4 ) over ( quantity1 at time zero)
     #pseudocode: output fraction of (quantity2) * (quantity3 ) over (quantity1 at time zero)
     #pseudocode: outputs should be in compatible units.
     #pseudocode: rules of thumb can be 3 to 15 percent off, partly since g..in g..out.
     #pseudocode: need test cases > small,medium, giant
     #pseudocode: need testcases within range of expected operation.
     #pseudocode: are there any cases too small or large to be solved?

Testcases Section

Testcase 1

table 1printed in tcl wiki format
quantity value comment, if any
testcase number:1
site number :1.0
julian date start day :42.0


Testcase 2


Testcase 3


References:

  • Transport Publication
  • Builder's Old Measurement

image test.

Appendix Code edit

appendix TCL programs and scripts

        # pretty print from autoindent and ased editor
        # semicircle properties Equations calculator
        # written on Windows XP on eTCL
        # working under TCL version 8.5.6 and eTCL 1.0.1
        # gold on TCL WIKI, 15apr2016
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        set names {{} {diameter meters :} }
        lappend names {semicircle perimeter (arclength) meters :}
        lappend names {radius meters (optional) :}
        lappend names {semicircle area square meters (optional) :}
        lappend names {answers: area of full circle square meters :}
        lappend names {semicircle area square meters: }
        lappend names {internal constant : }
        lappend names {semicircle area square meters::}
        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 Semicircle Properties Equation             
            from TCL WIKI,
            written on eTCL "
            tk_messageBox -title "About" -message $msg }
        proc errorx  {aa bb} {
            expr { $aa > $bb ?   (($aa*1.)/$bb -1.)*100. : (($bb*1.)/$aa -1.)*100.}
            } 
        proc pi {} {
        expr acos(-1)
        }  
        proc degtoradiansconst {} {
        return [ expr {180./[pi]}  ]
        }
        proc degz {} {
        return [ expr {180./[pi]}  ]
        }
        proc degx {aa} {
        return [ expr { [degz]*atan($aa) }  ]
        }
        proc break_flag_routine {     } {
            global side1 side2 side3 side4 side5
            global side6 side7 side8
            global spares 
            global testcase_number
            set t9 $testcase_number
            set product_entries [* $side1 $side2 $side3 $side4 $side5 $side6 $side7 $side8] 
            if { $product_entries < 0.0 } { puts " warning flag! negative numbers detected in product entries ref. tc$t9" }
            foreach item { 1 2 3 4 5 6 7 8 9 10 } {
            set error$item 0 }
            if { $side1 < 0.0 } { set side1 .000001 ; set error1 1 ; set error2 1 }
            if { $side2 < 0.0 } { set side2 .000001 ; set error1 1 ; set error3 1 }
            if { $side3 < 0.0 } { set side3 .000001 ; set error1 1 ; set error4 1}
            if { $side4 < 0.0 } { set side4 .000001 ; set error1 1 ; set error5 1} 
            if { $side5 < 0.0 } { set side5 .000001 ; set error1 1 ; set error6 1}
            if { $side6 < 0.0 } { set side6 .000001 ; set error1 1 ; set error7 1}
            if { $side7 < 0.0 } { set side7 .000001 ; set error1 1 ; set error8 1}
            if { $side8 < 0.0 } { set side8 .000001 ; set error1 1 ; set error9 1}
            if { $side8 > 400.0 } {set error9 1}
            if { $side8 > 1000.0 } {set error10 1}      
            if { $error1 == 1 } { puts " warning flag! negative numbers detected in entries ref. tc$t9" }
            if { $error2 == 1 } { puts " warning flag! setting program default entries to positive ref. tc$t9" }
            if { $error3 == 1 } { puts " lower limit side2! setting program default entry ref. tc$t9" }
            if { $error4 == 1 } { puts " lower limit side3! setting program default entry ref. tc$t9" }
            if { $error5 == 1 } { puts " lower limit side4! defaults set but degrading accuracy ref. tc$t9" }
            if { $error6 == 1 } { puts " lower limit side5! outside expected range ref. tc$t9" }
            if { $error7 == 1 } { puts " lower limit side6! outside expected range ref. tc$t9" }
            if { $error8 == 1 } { puts " lower limit side7! outside expected range ref. tc$t9" }
            if { $error9 == 1 } { puts " upper limit side8! days outside expected range ref. tc$t9" }
            if { $error10 == 1 } { puts " upper limit side8! days far expected range ref. tc$t9" }
            foreach item { 1 2 3 4 5 6 7 8 9 10 } {
            set error$item 0 }
            return 1 } 
        proc calculate {     } {
            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. ]
            break_flag_routine
            set diameter $side1 
            set circle_area [* [pi] $diameter $diameter 0.25 ]
            set semicircle_area [* [pi] $diameter $diameter 0.25 .5 ]
            set side2  [* [pi] $diameter 0.5 ]
            set side3  [* $diameter 0.5 ]
            set side4 $semicircle_area
            set side5 $circle_area
            set side6 $semicircle_area
            set side8 $semicircle_area
            set sumerian_semicircle_pi_eq_3 [* 3. $diameter $diameter 0.25 ]
            set side7 $sumerian_semicircle_pi_eq_3 
            set error_pi [ errorx   $semicircle_area $sumerian_semicircle_pi_eq_3   ] 
            set side7 $error_pi               
                  }
        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
            console show;
            puts "%|table $testcase_number|printed in| tcl wiki format|% "
            puts "&| quantity | value| comment, if any|& "
            puts "&| testcase number:|$testcase_number | |&"
            puts "&| diameter meters :|$side1|   |&"
            puts "&| perimeter arclength meters  :|$side2| |& "
            puts "&| radius meters (optional):|$side3| |& "
            puts "&| area semicircle area square meters (optional) :|$side4|  |&"
            puts "&| internal constant (optional) :|$side5|  |&"
            puts "&| semicircle area square meters    :|$side6|  |&"  
            puts "&| internal constant  :| $side7 |  |&"
            puts "&| semicircle area square meters: | $side8 |  |&"
            puts "&| semicircle area square meters:| $side8 |  |&"
         }
        frame .buttons -bg aquamarine4
        ::ttk::button .calculator -text "Solve" -command { calculate   }
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 1. 2.0 2.0 2.2   1. .1 .2 7. }
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 2. 2.0 2.0 2.2   1. .1 .2 7. }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 3. 2.0 2.0 2.2   1. .1 .2 7. }
        ::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 . "Semicircle Properties Calculator"

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

Comments Section edit

Please place any comments here, Thanks.