bidirectional_subtract with tests