Wolfram Researchfunctions.wolfram.comOther Wolfram Sites
Search Site
Function CategoriesGraphics GalleryNotationsGeneral IdentitiesAbout This Site ContributeEmail CommentsSign the Guestbook

View Related Information In
The Documentation Center
MathWorld

Download All Formulas For This Function
Mathematica Notebook
PDF File

Download All Introductions For This Function
Mathematica Notebook
PDF File

 

Developed with Mathematica -- Download a Free Trial Version
 











Mod






Mathematica Notation

Traditional Notation









Integer Functions > Mod[m,n] > Complex characteristics > Absolute value





http://functions.wolfram.com/04.06.19.0003.01









  


  










Input Form





Abs[Mod[m, n]] == Sqrt[(Im[m] - Floor[(Im[m] Im[n] + Re[m] Re[n])/(Im[n]^2 + Re[n]^2)] Im[n] - Floor[((-Im[n]) Re[m] + Im[m] Re[n])/(Im[n]^2 + Re[n]^2)] Re[n])^2 + (Floor[((-Im[n]) Re[m] + Im[m] Re[n])/(Im[n]^2 + Re[n]^2)] Im[n] + Re[m] - Floor[(Im[m] Im[n] + Re[m] Re[n])/(Im[n]^2 + Re[n]^2)] Re[n])^2]










Standard Form





Cell[BoxData[RowBox[List[RowBox[List["Abs", "[", RowBox[List["Mod", "[", RowBox[List["m", ",", "n"]], "]"]], "]"]], "\[Equal]", RowBox[List["\[Sqrt]", RowBox[List["(", RowBox[List[SuperscriptBox[RowBox[List["(", RowBox[List[RowBox[List["Im", "[", "m", "]"]], "-", RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "+", RowBox[List[RowBox[List["Re", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "-", RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["-", RowBox[List["Im", "[", "n", "]"]]]], " ", RowBox[List["Re", "[", "m", "]"]]]], "+", RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], ")"]], "2"], "+", SuperscriptBox[RowBox[List["(", RowBox[List[RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["-", RowBox[List["Im", "[", "n", "]"]]]], " ", RowBox[List["Re", "[", "m", "]"]]]], "+", RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "+", RowBox[List["Re", "[", "m", "]"]], "-", RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "+", RowBox[List[RowBox[List["Re", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], ")"]], "2"]]], ")"]]]]]]]]










MathML Form







<math xmlns='http://www.w3.org/1998/Math/MathML' mathematica:form='TraditionalForm' xmlns:mathematica='http://www.wolfram.com/XML/'> <semantics> <mrow> <mrow> <semantics> <mo> &#10072; </mo> <annotation encoding='Mathematica'> &quot;\[LeftBracketingBar]&quot; </annotation> </semantics> <semantics> <mrow> <mi> m </mi> <mo> &#8290; </mo> <mi> mod </mi> <mo> &#8290; </mo> <mi> n </mi> </mrow> <annotation-xml encoding='MathML-Content'> <apply> <rem /> <ci> $CellContext`m </ci> <ci> FE`Conversion`Private`n </ci> </apply> </annotation-xml> </semantics> <semantics> <mo> &#10072; </mo> <annotation encoding='Mathematica'> &quot;\[RightBracketingBar]&quot; </annotation> </semantics> </mrow> <mo> &#10869; </mo> <mrow> <mo> &#8730; </mo> <mrow> <mo> ( </mo> <mrow> <msup> <mrow> <mo> ( </mo> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> - </mo> <mrow> <mrow> <mo> &#8970; </mo> <mfrac> <mrow> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> <mo> + </mo> <mrow> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> </mrow> <mrow> <msup> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> <mo> + </mo> <msup> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> </mrow> </mfrac> <mo> &#8971; </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> <mo> - </mo> <mrow> <mrow> <mo> &#8970; </mo> <mfrac> <mrow> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> <mo> - </mo> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> </mrow> </mrow> <mrow> <msup> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> <mo> + </mo> <msup> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> </mrow> </mfrac> <mo> &#8971; </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> </mrow> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> <mo> + </mo> <msup> <mrow> <mo> ( </mo> <mrow> <mrow> <mrow> <mo> &#8970; </mo> <mfrac> <mrow> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> <mo> - </mo> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> </mrow> </mrow> <mrow> <msup> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> <mo> + </mo> <msup> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> </mrow> </mfrac> <mo> &#8971; </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> <mo> + </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> - </mo> <mrow> <mrow> <mo> &#8970; </mo> <mfrac> <mrow> <mrow> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> <mo> + </mo> <mrow> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> m </mi> <mo> ) </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> </mrow> <mrow> <msup> <mrow> <mi> Im </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> <mo> + </mo> <msup> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> </mrow> </mfrac> <mo> &#8971; </mo> </mrow> <mo> &#8290; </mo> <mrow> <mi> Re </mi> <mo> &#8289; </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> </mrow> </mrow> <mo> ) </mo> </mrow> <mn> 2 </mn> </msup> </mrow> <mo> ) </mo> </mrow> </mrow> </mrow> <annotation-xml encoding='MathML-Content'> <apply> <eq /> <apply> <abs /> <apply> <rem /> <ci> $CellContext`m </ci> <ci> FE`Conversion`Private`n </ci> </apply> </apply> <apply> <root /> <apply> <plus /> <apply> <power /> <apply> <plus /> <apply> <imaginary /> <ci> m </ci> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <times /> <apply> <floor /> <apply> <times /> <apply> <plus /> <apply> <times /> <apply> <imaginary /> <ci> m </ci> </apply> <apply> <imaginary /> <ci> n </ci> </apply> </apply> <apply> <times /> <apply> <real /> <ci> m </ci> </apply> <apply> <real /> <ci> n </ci> </apply> </apply> </apply> <apply> <power /> <apply> <plus /> <apply> <power /> <apply> <imaginary /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> <apply> <power /> <apply> <real /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> </apply> <cn type='integer'> -1 </cn> </apply> </apply> </apply> <apply> <imaginary /> <ci> n </ci> </apply> </apply> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <times /> <apply> <floor /> <apply> <times /> <apply> <plus /> <apply> <times /> <apply> <imaginary /> <ci> m </ci> </apply> <apply> <real /> <ci> n </ci> </apply> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <times /> <apply> <imaginary /> <ci> n </ci> </apply> <apply> <real /> <ci> m </ci> </apply> </apply> </apply> </apply> <apply> <power /> <apply> <plus /> <apply> <power /> <apply> <imaginary /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> <apply> <power /> <apply> <real /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> </apply> <cn type='integer'> -1 </cn> </apply> </apply> </apply> <apply> <real /> <ci> n </ci> </apply> </apply> </apply> </apply> <cn type='integer'> 2 </cn> </apply> <apply> <power /> <apply> <plus /> <apply> <times /> <apply> <floor /> <apply> <times /> <apply> <plus /> <apply> <times /> <apply> <imaginary /> <ci> m </ci> </apply> <apply> <real /> <ci> n </ci> </apply> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <times /> <apply> <imaginary /> <ci> n </ci> </apply> <apply> <real /> <ci> m </ci> </apply> </apply> </apply> </apply> <apply> <power /> <apply> <plus /> <apply> <power /> <apply> <imaginary /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> <apply> <power /> <apply> <real /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> </apply> <cn type='integer'> -1 </cn> </apply> </apply> </apply> <apply> <imaginary /> <ci> n </ci> </apply> </apply> <apply> <real /> <ci> m </ci> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <times /> <apply> <floor /> <apply> <times /> <apply> <plus /> <apply> <times /> <apply> <imaginary /> <ci> m </ci> </apply> <apply> <imaginary /> <ci> n </ci> </apply> </apply> <apply> <times /> <apply> <real /> <ci> m </ci> </apply> <apply> <real /> <ci> n </ci> </apply> </apply> </apply> <apply> <power /> <apply> <plus /> <apply> <power /> <apply> <imaginary /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> <apply> <power /> <apply> <real /> <ci> n </ci> </apply> <cn type='integer'> 2 </cn> </apply> </apply> <cn type='integer'> -1 </cn> </apply> </apply> </apply> <apply> <real /> <ci> n </ci> </apply> </apply> </apply> </apply> <cn type='integer'> 2 </cn> </apply> </apply> </apply> </apply> </annotation-xml> </semantics> </math>










Rule Form





Cell[BoxData[RowBox[List[RowBox[List["HoldPattern", "[", RowBox[List["Abs", "[", RowBox[List["Mod", "[", RowBox[List["m_", ",", "n_"]], "]"]], "]"]], "]"]], "\[RuleDelayed]", SqrtBox[RowBox[List[SuperscriptBox[RowBox[List["(", RowBox[List[RowBox[List["Im", "[", "m", "]"]], "-", RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "+", RowBox[List[RowBox[List["Re", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "-", RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["-", RowBox[List["Im", "[", "n", "]"]]]], " ", RowBox[List["Re", "[", "m", "]"]]]], "+", RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], ")"]], "2"], "+", SuperscriptBox[RowBox[List["(", RowBox[List[RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["-", RowBox[List["Im", "[", "n", "]"]]]], " ", RowBox[List["Re", "[", "m", "]"]]]], "+", RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "+", RowBox[List["Re", "[", "m", "]"]], "-", RowBox[List[RowBox[List["Floor", "[", FractionBox[RowBox[List[RowBox[List[RowBox[List["Im", "[", "m", "]"]], " ", RowBox[List["Im", "[", "n", "]"]]]], "+", RowBox[List[RowBox[List["Re", "[", "m", "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], RowBox[List[SuperscriptBox[RowBox[List["Im", "[", "n", "]"]], "2"], "+", SuperscriptBox[RowBox[List["Re", "[", "n", "]"]], "2"]]]], "]"]], " ", RowBox[List["Re", "[", "n", "]"]]]]]], ")"]], "2"]]]]]]]]










Date Added to functions.wolfram.com (modification date)





2001-10-29





© 1998-2014 Wolfram Research, Inc.