Issue#27: C interface implementation

following issue #27
Also hardly see any consistency in naming these variables. Why `t_res` when everywhere else it is `b`? Also just out of curiosity – why `b`?