is_normal


Description:

[ CCode ( cname = "isnormal" ) ]
public bool is_normal ()

Determines if the given double is normal, i.e. is neither zero, subnormal, infinite, nor NaN.

Example: Determines if the given double is normal:

public static int main (string[] args) {
// Output: ``false``
double val = double.INFINITY;
print ("%s\n", val.is_normal ().to_string ());

// Output: ``false``
val = double.NAN;
print ("%s\n", val.is_normal ().to_string ());

// Output: ``true``
val = 0.3f;
print ("%s\n", val.is_normal ().to_string ());

// Output: ``true``
val = 0.3f;
print ("%s\n", val.is_normal ().to_string ());

// Output: ``true``
val = 1.0f;
print ("%s\n", val.is_normal ().to_string ());

return 0;
}

valac --pkg glib-2.0 double.is_normal.vala -X -lm