UPD: Fixed haar calculation at boundaries and updated some tests. Added derivative calculation based on CDF.