Difference between revisions of "Documentation/How Tos/Calc: CONVERT ADD function"
From Apache OpenOffice Wiki
< Documentation | How Tos
OOoWikiBot (talk | contribs) m (Robot: Automated text replacement %s) |
m |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | __NOTOC__ | + | {{DISPLAYTITLE:CONVERT_ADD function}} |
+ | {{Documentation/CalcFunc MathematicalTOC | ||
+ | |ShowPrevNext=block | ||
+ | |PrevPage=Documentation/How_Tos/Calc:_CONVERT_function | ||
+ | |NextPage=Documentation/How_Tos/Calc:_COUNTBLANK_function | ||
+ | }}__NOTOC__ | ||
== CONVERT_ADD == | == CONVERT_ADD == | ||
Line 10: | Line 15: | ||
: <tt>'''number'''</tt> is the number to be converted. | : <tt>'''number'''</tt> is the number to be converted. | ||
− | : <tt>'''originalunits'''</tt> and <tt>'''newunits'''</tt> are text representing the original and new measurement systems. These are case-sensitive, and must be selected from the table below. | + | : <tt>'''originalunits'''</tt> and <tt>'''newunits'''</tt> are text representing the original and new measurement systems. These are case-sensitive, and must be selected from the table below. Units in '''bold''' accept an optional prefix as a decimal multiplier from the table below that. |
{| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto" | {| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto" | ||
Line 16: | Line 21: | ||
|'''property'''||'''units''' | |'''property'''||'''units''' | ||
|- | |- | ||
− | |Weight||g, sg, lbm, u, ozm, stone, ton, grain, pweight, hweight, shweight | + | |Weight||'''g''', sg, lbm, '''u''', ozm, stone, ton, grain, pweight, hweight, shweight, brton |
|- | |- | ||
− | |length||m, mi, Nmi, in, ft, yd, ang, Pica, ell, parsec | + | |length||'''m''', mi, Nmi, in, ft, yd, ang, Pica, ell, '''parsec''', '''lightyear''', survey_mi |
|- | |- | ||
− | |time||yr, day, hr, mn, sec | + | |time||yr, day, hr, mn, '''sec''', '''s''' |
|- | |- | ||
− | |pressure||Pa, atm, mmHg, Torr, psi | + | |pressure||'''Pa''', '''atm''', '''at''', '''mmHg''', Torr, psi |
|- | |- | ||
− | |force||N, dyn, pond | + | |force||'''N''', '''dyn''', '''dy''', lbf, '''pond''' |
|- | |- | ||
− | |energy||J, e, c, cal, eV, HPh, Wh, BTU | + | |energy||'''J''', '''e''', '''c''', '''cal''', '''eV''', '''ev''', HPh, '''Wh''', '''wh''', flb, BTU, btu |
|- | |- | ||
− | |power||W, HP, PS | + | |power||'''W''', '''w''', HP, PS |
|- | |- | ||
− | |field strength||T, ga | + | |field strength||'''T''', '''ga''' |
|- | |- | ||
− | |temperature||C, F, K, Reau, Rank | + | |temperature||C, F, '''K''', '''kel''', Reau, Rank |
|- | |- | ||
− | |volume||l, tsp, tbs, oz, cup, pt, qt, gal, m3, mi3, Nmi3, in3, ft3, yd3, ang3, Pica3 | + | |volume||'''l''', '''L''', '''lt''', tsp, tbs, oz, cup, pt, us_pt, qt, gal, '''m3''', mi3, Nmi3, in3, ft3, yd3, ang3, Pica3, |
− | Middy, Glass | + | barrel, bushel, regton, Schooner, Middy, Glass |
|- | |- | ||
− | |area||m2, mi2, Nmi2, in2, ft2, yd2, ang2, Pica2, Morgen, ar, acre, ha | + | |area||'''m2''', mi2, Nmi2, in2, ft2, yd2, '''ang2''', Pica2, Morgen, '''ar''', acre, ha |
|- | |- | ||
− | |speed||m/s, m/h, mph, kn, admkn | + | |speed||'''m/s''', '''m/sec''', m/h, mph, kn, admkn |
+ | |- | ||
+ | |information||'''bit''', '''byte''' | ||
|} | |} | ||
− | : The above units may be preceded by a decimal multiplier. For example <tt>'''k'''</tt> (<i>kilo</i>) is the prefix for 10<sup>3</sup> - so <tt>'''km'''</tt> means <i> | + | : The above units may be preceded by a decimal multiplier. For example <tt>'''k'''</tt> (<i>kilo</i>) is the prefix for 10<sup>3</sup> - so <tt>'''km'''</tt> means <i>kilometers</i>. If the unit is a measure of area the multiplier is squared, and if it is a measure of volume the multiplier is cubed. For example <tt>'''km2'''</tt> means <i>square kilometers</i>, that is <i>10<sup>6</sup> square meters</i>. The following table lists the prefixes: |
{| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto" | {| border="1" cellpadding="5" cellspacing="0" style="margin: 1em auto 1em auto" | ||
Line 57: | Line 64: | ||
<tt>'''CONVERT_ADD(10;"yd";"cm")'''</tt> | <tt>'''CONVERT_ADD(10;"yd";"cm")'''</tt> | ||
− | : returns <tt>'''914.4'''</tt>, that is 10 yards expressed in | + | : returns <tt>'''914.4'''</tt>, that is 10 yards expressed in centimeters. |
+ | |||
+ | === Issues: === | ||
+ | * For historical reasons, many of the units do not use international standard abbreviations. | ||
+ | * This function is not generally compatible with other spreadsheets. | ||
+ | |||
− | {{ | + | {{SeeAlso|EN| |
* [[Documentation/How_Tos/Calc: CONVERT function|CONVERT]] | * [[Documentation/How_Tos/Calc: CONVERT function|CONVERT]] | ||
Line 66: | Line 78: | ||
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
− | + | [[Category: Documentation/Reference/Calc/Mathematical functions]] | |
− | |||
− | |||
− |
Latest revision as of 15:11, 31 January 2024
Trigonometric
Hyperbolic
Rounding and remainders
Logarithm/Powers
Bessel functions
Miscellaneous
CONVERT_ADD
Converts a number from one measurement system to another.
This function is only available if the Analysis AddIn is installed.
Syntax:
CONVERT_ADD(number; originalunits; newunits)
- number is the number to be converted.
- originalunits and newunits are text representing the original and new measurement systems. These are case-sensitive, and must be selected from the table below. Units in bold accept an optional prefix as a decimal multiplier from the table below that.
property | units |
Weight | g, sg, lbm, u, ozm, stone, ton, grain, pweight, hweight, shweight, brton |
length | m, mi, Nmi, in, ft, yd, ang, Pica, ell, parsec, lightyear, survey_mi |
time | yr, day, hr, mn, sec, s |
pressure | Pa, atm, at, mmHg, Torr, psi |
force | N, dyn, dy, lbf, pond |
energy | J, e, c, cal, eV, ev, HPh, Wh, wh, flb, BTU, btu |
power | W, w, HP, PS |
field strength | T, ga |
temperature | C, F, K, kel, Reau, Rank |
volume | l, L, lt, tsp, tbs, oz, cup, pt, us_pt, qt, gal, m3, mi3, Nmi3, in3, ft3, yd3, ang3, Pica3,
barrel, bushel, regton, Schooner, Middy, Glass |
area | m2, mi2, Nmi2, in2, ft2, yd2, ang2, Pica2, Morgen, ar, acre, ha |
speed | m/s, m/sec, m/h, mph, kn, admkn |
information | bit, byte |
- The above units may be preceded by a decimal multiplier. For example k (kilo) is the prefix for 103 - so km means kilometers. If the unit is a measure of area the multiplier is squared, and if it is a measure of volume the multiplier is cubed. For example km2 means square kilometers, that is 106 square meters. The following table lists the prefixes:
prefix < 1 | y (10-24), z (10-21), a (10-18), f (10-15), p (10-12), n (10-9), u (10-6), m (10-3), c (10-2), d (10-1) |
prefix > 1 | e (101), h (102), k (103), M 106), G (109), T (1012), P (1015), E (1018), Z (1021), Y (1024) |
Example:
CONVERT_ADD(120;"in";"ft")
- returns 10, the number of feet in 120 inches.
CONVERT_ADD(10;"yd";"cm")
- returns 914.4, that is 10 yards expressed in centimeters.
Issues:
- For historical reasons, many of the units do not use international standard abbreviations.
- This function is not generally compatible with other spreadsheets.
See Also