general Constants hoc_ac_ hoc_cross_y_ float_epsilon hoc_cross_x_ hoc_obj_
predeclared-variables
float_epsilon = 1e-11
Allows somewhat safer logical comparisons and integer truncation for floating point numbers. Most comparisons are treated as true if they are within float_epsilon of being true. eg.
for (i = 0; i < 1; i += .1) { print i, int(10*i) } float_epsilon = 0 // two bugs due to roundoff for (i = 0; i < 1; i += .1) { print i, int(10*i) }
predeclared-variablesA variable used by the graphical interface to communicate with the interpreter. It is very volatile. It sometimes holds a value on a function call. If this value is needed by the user it should be copied to another variable prior to any other function call.
predeclared-variables
hoc_obj_[0]
hoc_obj_[1]
predeclared-variables
hoc_cross_x_
predeclared-variables
predeclared-variablesThe following mathematical and physical constants are built-in:
"PI", 3.14159265358979323846, "E", 2.71828182845904523536, "GAMMA",0.57721566490153286060, /* Euler */ "DEG", 57.29577951308232087680, /* deg/radian */ "PHI", 1.61803398874989484820, /* golden ratio */ "FARADAY", 96484.56, /*coulombs/mole*/ "R", 8.31441, /*molar gas constant, joules/mole/deg-K*/
The FARADAY is a bit different than the faraday of the units database. The faraday in a .mod mechanism is 96520.