Difference between revisions of "FractionalPart Function"

From GeoGebra Manual
Jump to: navigation, search
(Created page with "<noinclude>{{Manual Page|version=4.2}}</noinclude>{{betamanual|version=4.2}} {{function|fractionalPart}} ;fractionalPart[ <Expression> ] :Returns the fractional part of the ex...")
 
Line 6: Line 6:
 
*<code><nowiki>fractionalPart( 1/5 + 3/2 + 2 )</nowiki></code> yields <math>\frac{7}{10}</math>.
 
*<code><nowiki>fractionalPart( 1/5 + 3/2 + 2 )</nowiki></code> yields <math>\frac{7}{10}</math>.
 
</div>}}
 
</div>}}
{{note| 1=<div>See also [[IntegerPart Command]].</div>}}
+
{{note| 1=<div>For fractional part there are two possible conventions as seen on the graphs below. GeoGebra uses the second one (also used by Mathematica). To obtain the first one you may use <code>f(x)=x-floor(x)</code>, see  [[Predefined Functions and Operators]].</div>}}

Revision as of 13:12, 18 September 2012

fractionalPart[ <Expression> ]
Returns the fractional part of the expression.
Example:
  • fractionalPart( 6 / 5 ) yields \frac{1}{5},
  • fractionalPart( 1/5 + 3/2 + 2 ) yields \frac{7}{10}.
Note:
For fractional part there are two possible conventions as seen on the graphs below. GeoGebra uses the second one (also used by Mathematica). To obtain the first one you may use f(x)=x-floor(x), see Predefined Functions and Operators.

Comments

The following picture shows the two possible definitions of fractional part function, the lower one is used in GeoGebra. Fractionalpart.png

© 2024 International GeoGebra Institute