Difference between revisions of "FractionalPart Function"
From GeoGebra Manual
m (Bot: Automated text replacement (-{{betamanual|version=4.2}} + )) |
m (formatting) |
||
Line 12: | Line 12: | ||
:<math>sgn(x)(\mid x\mid-\lfloor \mid x\mid\rfloor) </math>. <br> | :<math>sgn(x)(\mid x\mid-\lfloor \mid x\mid\rfloor) </math>. <br> | ||
'''''GeoGebra''''' uses the second definition (also used by Mathematica).<br> | '''''GeoGebra''''' uses the second definition (also used by Mathematica).<br> | ||
− | To obtain the first function you may use '''<code>f(x)=x-floor(x)</code>'''<br> | + | To obtain the first function you may use '''<code>f(x) = x - floor(x)</code>'''<br> |
; | ; | ||
See also [[Predefined Functions and Operators]].}} | See also [[Predefined Functions and Operators]].}} |
Revision as of 10:15, 8 September 2014
- 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:
In Mathematics fractional part function is defined sometimes as
- x-\lfloor x\rfloor
In other cases as
- sgn(x)(\mid x\mid-\lfloor \mid x\mid\rfloor) .
GeoGebra uses the second definition (also used by Mathematica).
To obtain the first function you may use f(x) = x - floor(x)