# Something wrong with the way units are handled in V10

(This applies only to version 10)

I obtain these two properties of silicon:

a = ElementData[14, "CrustAbundance"]
b = ElementData[14, "MeteoriteAbundance"]


both are given in units of g/g. Then I divide these two values

a/b


and get an odd result, which with I cannot further reasonably calculate with or plot.

(Quantity[0.000034, ("Grams")/("Grams")]) Quantity[3.6*10^6, (1/#1 &)[("Grams")/("Grams")]]

• both in V9 and WolframAlpha, I get a dimensionless number. Commented Oct 23, 2014 at 11:49
• Yep, you only get units in V10. I should have added this: only in V10. Commented Oct 23, 2014 at 11:56
• @MockupDungeon Well, just click the edit link and add it than (you can also add the correct tag). Commented Oct 23, 2014 at 11:57
• OK, done, incl. tag. Commented Oct 23, 2014 at 12:00
• As a workaround, since you know that the "Grams"/"Grams" should provide a dimensionless value, use QuantityMagnitude. a = ElementData[14, "CrustAbundance"] // QuantityMagnitude; b = ElementData[14, "MeteoriteAbundance"] // QuantityMagnitude; a/b gives 1.9. Commented Oct 23, 2014 at 14:28

This is definitely bad behavior in the units code; here's the simpler version:

In[12]:= Power[Quantity[2, "Grams"/"Grams"], -1]
Out[12]= Quantity[1/2, (1/#1 &)[("Grams")/("Grams")]]


I've already sent a report to developers about this, but as an additional work-around you can use UnitSimplify on the results from ElementData to get the simpler(nondimensional) form:

In[17]:= UnitSimplify[ElementData[14, "CrustAbundance"]]
Out[17]= 0.27


and UnitSimplify won't remove quantity expressions if the units still belong:

In[19]:= UnitSimplify[ElementData[14, "VickersHardness"]]
Out[19]= Quantity[9.63*10^3, "Megapascals"]


In my opinion, units provided by the curated data sets aren't quite ready prime time, and therefore I use this answer to shut them off.

SetSystemOptions[SystemOptions["DataOptions"] /. True -> False]

a = ElementData[14, "CrustAbundance"]
b = ElementData[14, "MeteoriteAbundance"]
a/b
(* 0.27, 0.14, 2 *)