Support cond

Add abs with cond test code.
Refactoring substract function

Use only reduce.