Mi sono informato e non mi ero sbagliato di molto...
Il prototipo di pow() è sì
ma il secondo parametro deve essere necessariamente INTERO, atrimenti viene lanciato un errore di dominio.codice:double pow( double base, double exp );
Fonte:
www.cppreference.com
quindi niente cubica per orapow
Syntax:
#include <math.h>
double pow( double base, double exp );
The pow() function returns base raised to the exp power. There's a domain error if base is zero and exp is less than or equal to zero. There's also a domain error if base is negative and exp is not an integer. There's a range error if there's an overflow.![]()

Rispondi quotando