Difference between revisions of "ApCoCoA-1:Num.FPart"
From ApCoCoAWiki
(Added FPart command) |
m (insert version info) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Version|1}} | ||
<command> | <command> | ||
− | <title>FPart</title> | + | <title>Num.FPart</title> |
<short_description>Returns the fractional part of a rational number.</short_description> | <short_description>Returns the fractional part of a rational number.</short_description> | ||
Line 8: | Line 9: | ||
<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 37: | Line 38: | ||
<seealso> | <seealso> | ||
− | <see>Ceil</see> | + | <see>ApCoCoA-1:Num.Ceil|Num.Ceil</see> |
− | <see>Floor</see> | + | <see>ApCoCoA-1:Num.Floor|Num.Floor</see> |
− | <see>PrintLn</see> | + | <see>ApCoCoA-1:PrintLn|PrintLn</see> |
</seealso> | </seealso> | ||
− | <key> | + | <key>fpart</key> |
+ | <key>num.fpart</key> | ||
+ | <key>numerical.fpart</key> | ||
− | <wiki-category>Package_numerical</wiki-category> | + | <wiki-category>ApCoCoA-1:Package_numerical</wiki-category> |
</command> | </command> |
Latest revision as of 10:28, 7 October 2020
This article is about a function from ApCoCoA-1. |
Num.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