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

From ApCoCoAWiki
m (fixed links to namespace ApCoCoA)
m (insert version info)
 
Line 1: Line 1:
 +
{{Version|1}}
 
<command>
 
<command>
 
<title>Num.FPart</title>
 
<title>Num.FPart</title>

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

Num.Ceil

Num.Floor

PrintLn