Tag Info

Hot answers tagged

11

As J.M. comments, but opts not to post as an answer, you can use Convert in the Units package to convert between types. Be sure to read the documentation on that package. Needs["Units`"] Convert[(32.5 Newton)/(7 Meter/Second^2), Kilogram] 4.64286 Kilogram You will also find use in the Automatic Units package described on the Wolfram Blog.


7

The units associated with physical constants do not play nicely with expressions that expect a numerical value. If you want only the numerical value of a constant, use Part. A motivating example: Needs["PhysicalConstants`"]; Plot[1/Sqrt[1 - v^2/SpeedOfLight^2], {v, 0, 0.9 SpeedOfLight}] (* Plot::plln: Limiting value (2.69813*10^8 Meter)/Second in ...


4

In v. 9, speed of light is a quantity. Try Quantity["SpeedOfLight"] The output will look like the following: 1 c However, its FullForm is actually Quantity[1, "SpeedOfLight"] You will find addition information about how to use physical constants as quantities in the Compatibility Tutorial and in the Units Overview.


2

You can use SetPrecision to set the interpreted precision of a numeric value, or Rationalize to convert it into an exact value. Be cautious about manufacturing false precision.



Only top voted, non community-wiki answers of a minimum length are eligible