replace double with long double in algo_c