[ CCode ( feature_test_macro = "_GNU_SOURCE" ) ]
public double pow10 (double x)
Returns the value of 10 raised to the power of x
.
Remember to link the math library: valac -X -lm ...
Example: Calculate 10^x (double):
public static int main (string[] args) {
// Output: ``10^2 = pow10 (2.0) = 100.000000``
double res = Math.pow10 (2.0);
print ("10^2 = pow10 (2.0) = %lf\n", res);
return 0;
}
valac --pkg glib-2.0 -X -lm GLib.Math.pow10.vala
x |
A numeric value. |