(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



(*   par Marcel D\[EAcute]l\[EGrave]ze   *)


BeginPackage["ComplexLitteral`"]


reLitt::usage=
	"reLitt[e] donne la partie r\[EAcute]elle de l'expression e\nen supposant que toutes les variables sont r\[EAcute]elles."


imLitt::usage=
	"reLitt[e] donne la partie imaginaire de l'expression e\nen supposant que toutes les variables sont r\[EAcute]elles."


moduleLitt::usage=
	"moduleLitt[e] donne le module de l'expression e\nen supposant que toutes les variables sont r\[EAcute]elles."


argLitt::usage=
	"argLitt[e] donne l'argument de l'expression e\nen supposant que toutes les variables sont r\[EAcute]elles."


cartLitt::usage=
	"cartLitt[e] r\[EAcute]crit l'expression e sous la forme cart\[EAcute]sienne\nen supposant que toutes les variables sont r\[EAcute]elles."


polLitt::usage=
	"polLitt[e] r\[EAcute]crit l'expression e sous la forme polaire\nen supposant que toutes les variables sont r\[EAcute]elles."


Begin["`Private`"]


reLitt[expr_]:=Simplify[ComplexExpand[Re[expr],TargetFunctions->{Re,Im} ],_Symbol \[Element] Reals && _Subscript \[Element] Reals]


imLitt[expr_]:=Simplify[ComplexExpand[Im[expr] ,TargetFunctions->{Re,Im} ],_Symbol \[Element] Reals && _Subscript \[Element] Reals]


moduleLitt[expr_]:=Simplify[ComplexExpand[Abs[expr] ,TargetFunctions->{Re,Im}],_Symbol \[Element] Reals && _Subscript \[Element] Reals]


argLitt[expr_]:=Simplify[ComplexExpand[Arg[expr] ,TargetFunctions->{Re,Im}],_Symbol \[Element] Reals && _Subscript \[Element] Reals]


cartLitt[expr_]:=reLitt[expr]+\[ImaginaryI] imLitt[expr]


polLitt[expr_]:=moduleLitt[expr] \[ExponentialE]^(\[ImaginaryI] argLitt[expr])


End[]


EndPackage[]
