One Line Procedures Follow-up and Templates V2 and TCL 8.6 demo examples calculator, numerical analysis

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 20Aug2020


Trial Edit


Preface

gold 1sep2021 Here are some calculations.


Introduction



References:


  • Wikipedia search engine < diabetes insulin resistance >
  • Wikipedia search engine < Richard K. Bernstein >
  • Wikipedia search engine < Programming Examples >
  • Google search engine < vaporware >
  • One Liners Programs Pie in the Sky
  • One Liners
  • One Liners Programs Compendium [L1 ]
  • WIKI BOOKS, Programming_Examples pdf
  • WIKI BOOKS, Tcl_Programming_Introduction pdf

Testcases Section

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


Testcase 1,





Testcase 2,


Example calculation


Testcase 3,


Example calculation



Testcase 4, Protocol



Screenshots Section


figure 1. Screenshot,





Appendix TCL programs and scripts *

Pretty Print Version


        #  pretty print from autoindent and ased editor
 


Conversion unit formulas in one line TCL procs



    #  conversion unit formulas in one line TCL procs
    #  HOMA-IR standing for Homeostatic Model Assessment of Insulin Resistance 
    #  HOMA_IR = expr { $insulin * $glucose * $scale_factor}
    #  fasting blood insulin in units  uIU/mL
    #  fasting blood glucose in units mg/dL
    proc HOMA_IR2 { insulin  glucose }  {
            set scale_factor [ expr { 1. / 405. } ]
            return [expr { $insulin * $glucose * $scale_factor}]}
    #  HOMA-IR calculations here requires U.S. standard units.
    #  European SI units as best understood. 
    #  To convert component terms of  HOMA-IR ( $insulin & $glucose)
    #  from international S.I. units:
    #  Insulin: pmol/L to uIU/mL, divide by (÷) 6
    #  Glucose: mmol/L to mg/dL, multiply by (x) 18
    #  hbA1c_convert_to_average_blood_glucose mg/dl  HbA1c
    #  HbA1c test is a simple blood test that measures your 
    #  average blood sugar levels over the past 3 months.
    #  As a peg point, 5 HbA1c units converts to 100 mg/dl,
    #  mg/dl is abbreviation for milligrams per deciliter.
    proc a1c hbA1c {  expr { 35.6*$hbA1c -77.3} }
    #  convert mg/dl to mmol/L average blood glucose
    #   European SI units conversion on blood glucose
    #  some papers round off 18.016 to mgdl/18.
    proc mgdl_to_mmoll mgdl {  expr { $mgdl/18.0 } }
    #  convert  mmol/L to mg/dl average blood glucose
    proc mmoll_to_mgdl mmoll {  expr { $mmoll*18.0 } }
    #  formula QUICKI_index insulin resistance = 1/(log(insulin) + log(glucose)), decimal logs 
    proc QUICKI_INDEX_IR { insulin  glucose } { return [ expr { 1./(log10($insulin) + log10($glucose))} ] }
    #  Usage set answer [  QUICKI_INDEX_IR 4. 100. ] #  eval 0.38


Hidden Comments Section

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