{{fbdoc item="title" value="FRAC"}}----
Returns the decimal part of a number

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Frac** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgDouble|double]] ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Frac** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Frac** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]] ) [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]]
##
{{fbdoc item="usage"}}##
	//result// = **Frac**( //number// )
##
{{fbdoc item="param"}}
	##//number//##
		the number or expression to get the fraction part of.

{{fbdoc item="ret"}}
	Returns the fractional part of a number or expression.

{{fbdoc item="desc"}}
	Equivalent to: ##(//number// - [[KeyPgFix|Fix]](//number//))##.
	For example, ##**Frac**(4.25)## will return ##0.25##, and ##**Frac**(-1.75)## will return ##-0.75##.  For integer types, the value ##0## is always returned.
	
	The ##**Frac**## unary ##[[KeyPgOperator|operator]]## can be overloaded with user defined types.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/math/frac.bas"}}%%(freebasic)
Print frac(10.625)  '' will print  0.625
Print frac(-10.625) '' will print -0.625 
%%

{{fbdoc item="lang"}}
	- In the //[[CompilerOptlang|-lang qb]]// dialect, this operator cannot be overloaded.

{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	- ##[[KeyPgFix|Fix]]##
	- ##[[KeyPgOperator|Operator]]##

{{fbdoc item="back" value="CatPgMath|Math"}}