MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Accessing and using built-in constants in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86546] Re: [mg86463] Accessing and using built-in constants in Mathematica
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 13 Mar 2008 04:34:56 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Needs["PhysicalConstants`"];

SpeedOfLight

(299792458*Meter)/Second

PlanckConstant

6.62606896*^-34*Joule*Second

Needs["Units`"];

InputForm[elementatomicW = ElementData["C", "AtomicWeight"]]

12.0107`6.0000000000000036

It only knows the Atomic weight to 6 places. Asking it to display more is meaningless. However, use NumberForm to see more.

NumberForm[elementatomicWkg = Convert[elementatomicW AMU, Kilogram], 20]


Bob Hanlon

---- ratullochjk2 at gmail.com wrote: 
> Accessing and using built-in constants in Mathematica 6 / precision
> tia sal2
> 
> Greetings all
> 
> Sorry if this is a repeat post my last post didn't show up in the
> newsgroups
> 
> I can access the constants for the elements with no problem
> Example:
> In[1]:= ElementData["C", "AtomicWeight"]
> Out[2]:= 12.0107
> 
> 1) I'm trying to use the built in constants for
> speed of light, Plank's constant, etc.. but I'm having problems
> finding them / the proper syntax.
> 
> 2) Also How do I increase the amount of the decimal places?
> Example:
> elementatomicW := ElementData["C", "AtomicWeight"]
> << Units`
> Convert[elementatomicW AMU, Kilogram]
> The answer is 1.99443*10^-26 Kilogram
> 
> I add N like it says but the answer still comes out the same
> Example:
> << Units`
> N[Convert[elementatomicW AMU, Kilogram], 20]
> 
> tia sal2
> 



  • Prev by Date: Something To Dye For
  • Next by Date: Unexpected failures of FullSimplify on some Root elements
  • Previous by thread: Re: LevenbergMarquardt
  • Next by thread: Unexpected failures of FullSimplify on some Root elements