Re: How to define a constant in mathematica like Pi
- To: mathgroup at smc.vnet.net
- Subject: [mg63979] Re: How to define a constant in mathematica like Pi
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Thu, 26 Jan 2006 03:43:01 -0500 (EST)
- Organization: Uni Leipzig
- References: <dr7vuo$pdp$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, N[\[DoubleStruckC], prec_:16] := N[300000, prec] $Assumptions = {\[DoubleStruckC] > 0}; and Integrate[Exp[-\[DoubleStruckC]*x^2], {x, -Infinity, Infinity}] does what you want. Regards Jens "José Carlos Santos" <jcsantos at fc.up.pt> schrieb im Newsbeitrag news:dr7vuo$pdp$1 at smc.vnet.net... | Hi all, | | I'm posting a question asked by someone who is currently unable to post | here. Here's the problem: | | I would like to define a constant in mathematica for example c=1.2345 | in such a way that it behaves exactly like Pi or E. That is when I | type c then I get the output c and not 1.2345. | | If I do integration[Exp[-c*x^2],{x,-oo,oo}] then I should get | sqrt[Pi/c] and not If[c<0...] | | Best regards, | | Jose Carlos Santos |