Difference between revisions of "ApCoCoA-1:Num.FPart"
From ApCoCoAWiki
Line 8: | Line 8: | ||
<description> | <description> | ||
− | Returns the fractional part of a rational number <tt>Num</tt>. It is defined as Num - Floor(Num). | + | Returns the fractional part of a rational number <tt>Num</tt>. It is defined as <tt>Num - Floor(Num)</tt>. |
<itemize> | <itemize> | ||
Line 43: | Line 43: | ||
<key>Floor</key> | <key>Floor</key> | ||
+ | <key>num.floor</key> | ||
+ | <key>numerical.floor</key> | ||
<wiki-category>Package_numerical</wiki-category> | <wiki-category>Package_numerical</wiki-category> | ||
</command> | </command> |
Revision as of 11:30, 15 October 2009
FPart
Returns the fractional part of a rational number.
Syntax
Num.FPart(Num:RAT):INT
Description
Returns the fractional part of a rational number Num. It is defined as Num - Floor(Num).
@param Num A rational number.
@return The fractional part.
Example
Num.FPart(8.1); Num.FPart(-8.1); Num.FPart(8); 1/10 ------------------------------- 9/10 ------------------------------- 0 -------------------------------
See also