the return sentence
return cached_sigmoid[int((x + MAX_SIGMOID) * SIGMOID_TABLE_SIZE / MAX_SIGMOID / 2)];
lead to Segmentation Fault (core dumped)
after I change the sentence to
return cached_sigmoid[int(int(x + MAX_SIGMOID) * SIGMOID_TABLE_SIZE / MAX_SIGMOID / 2)];
it run correctly.