modf#

Split a number into integer and fractional parts, both as doubles.

Σύνοψη#

my ($frac, $int) = POSIX::modf(3.75);   # (0.75, 3.0)

Τι επιστρέφεται#

A two-element list ($frac, $int). Both parts carry the sign of the input.

Διαφορές από το upstream#

Fully compatible with upstream POSIX.

Δείτε επίσης#

  • frexp - split into mantissa and exponent instead.