Difference between revisions of "ApCoCoA-1:Num.FPart"

From ApCoCoAWiki
m (Bot: Category moved)
Line 46: Line 46:
 
<key>numerical.fpart</key>
 
<key>numerical.fpart</key>
  
<wiki-category>Package_numerical</wiki-category>
+
<wiki-category>ApCoCoA-1:Package_numerical</wiki-category>
 
</command>
 
</command>

Revision as of 16:34, 2 October 2020

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

Num.Ceil

Num.Floor

PrintLn