[alg.std_functions] debug cos