softmath: Add initial softmath implementation by adding cosf