Skip to main content

modf

Syntax Format

modf(value)

Overview

The modf function returns the integral and fractional parts of the given value. This function can be used in scripts, where it is necessary to decompose the initial value to receive either integral or fractional part of it to take in further calculations.

Parameters

ParameterTypePurpose
valuenumeric or seriesInput value, taken into calculation

Returns: series if value is seriesnumeric otherwise.

Example

i_f_value = modf(15.5) -- integral part = 15, fractional part = 0.5