17 return(
makeflt(1.0/(1.0+exp(-x))));}
23 {
double x,u,
s,th1,th2;
27 s=0.5*(1.0+tanh(x/u));
28 if (s<th1)
return(
makeflt(th1));
29 else if (s>th2)
return(
makeflt(th2));
42 while (--n>=0)
f[
n]+=x;
pointer OFFSET_VECTOR(context *ctx, int n, argv)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
pointer sigmoid(context *ctx, int n, argv)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer SIGMOIDX(context *ctx, int n, argv)
static pointer SIGMOID(context *ctx, int n, argv)