Added almost equal function and found bug in parser for sin/cos