package provide extrafuncs 1.0
namespace eval ::tcl::mathfunc {
    variable log2constant [expr {log(2)}]
}
proc ::tcl::mathfunc::sec x  {expr {1.0 / cos($x)}}
proc ::tcl::mathfunc::asec x {expr {acos(1.0 / $x)}}
proc ::tcl::mathfunc::csc x  {expr {1.0 / sin($x)}}
proc ::tcl::mathfunc::acsc x {expr {asin(1.0 / $x)}}
proc ::tcl::mathfunc::cot x  {expr {1.0 / tan($x)}}
proc ::tcl::mathfunc::acot x {expr {atan(1.0 / $x)}}
proc ::tcl::mathfunc::sech x {expr {1.0 / cosh($x)}}
proc ::tcl::mathfunc::csch x {expr {1.0 / sinh($x)}}
proc ::tcl::mathfunc::coth x {expr {1.0 / tanh($x)}}
proc ::tcl::mathfunc::log2 x {expr {log($x) / $::tcl::mathfunc::log2constant}}
