Actually, this is what I should have done
double cuberoot (double x)
{
if (! x) return 0.;
return (x / fabs (x)) * pow ( fabs(x), 1/3. );
}
Then I can keep my name
Actually, this is what I should have done
double cuberoot (double x)
{
if (! x) return 0.;
return (x / fabs (x)) * pow ( fabs(x), 1/3. );
}
Then I can keep my name