Example: Square root (double)

public static int main (string[] args) {
// /----
// sqrt (4) = \/ 4 = 2
//

// Output: ``sqrt (4.0) = 2.000000``
double res = Math.sqrt (4.0);
print ("sqrt (4.0) = %lf\n", res);
return 0;
}

 valac --pkg glib-2.0 -X -lm GLib.Math.sqrt.vala

See: