Metric prefixes

MathParser.org - mXparser - logo - Tutorial

*** If you found the software useful donation is something you might consider 🙂 ***

If you found the software useful donation is something you might consider :-)

JAVA code

Case 1: 10 Millions / Kilo

import org.mariuszgromada.math.mxparser.*;
...
Expression e = new Expression("10*[M] / [k]");
mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate() );
[mXparser-v.4.0.0] Res: 10*[M] / [k] = 10000.0

Case 2: List of supported metric prefixes

import org.mariuszgromada.math.mxparser.*;
...
mXparser.consolePrintHelp("metric prefix");
[mXparser-v.4.0.0] Help content: 

  309. [Y]                 <Unit>                  (4.0) <Metric prefix> Septillion / Yotta = 10^24
  310. [sept]              <Unit>                  (4.0) <Metric prefix> Septillion / Yotta = 10^24
  311. [Z]                 <Unit>                  (4.0) <Metric prefix> Sextillion / Zetta = 10^21
  312. [sext]              <Unit>                  (4.0) <Metric prefix> Sextillion / Zetta = 10^21
  313. [E]                 <Unit>                  (4.0) <Metric prefix> Quintillion / Exa = 10^18
  314. [quint]             <Unit>                  (4.0) <Metric prefix> Quintillion / Exa = 10^18
  315. [P]                 <Unit>                  (4.0) <Metric prefix> Quadrillion / Peta = 10^15
  316. [quad]              <Unit>                  (4.0) <Metric prefix> Quadrillion / Peta = 10^15
  317. [T]                 <Unit>                  (4.0) <Metric prefix> Trillion / Tera = 10^12
  318. [tril]              <Unit>                  (4.0) <Metric prefix> Trillion / Tera = 10^12
  319. [G]                 <Unit>                  (4.0) <Metric prefix> Billion / Giga = 10^9
  320. [bil]               <Unit>                  (4.0) <Metric prefix> Billion / Giga = 10^9
  321. [M]                 <Unit>                  (4.0) <Metric prefix> Million / Mega = 10^6
  322. [mil]               <Unit>                  (4.0) <Metric prefix> Million / Mega = 10^6
  323. [k]                 <Unit>                  (4.0) <Metric prefix> Thousand / Kilo = 10^3
  324. [th]                <Unit>                  (4.0) <Metric prefix> Thousand / Kilo = 10^3
  325. [hecto]             <Unit>                  (4.0) <Metric prefix> Hundred / Hecto = 10^2
  326. [hund]              <Unit>                  (4.0) <Metric prefix> Hundred / Hecto = 10^2
  327. [deca]              <Unit>                  (4.0) <Metric prefix> Ten / Deca = 10
  328. [ten]               <Unit>                  (4.0) <Metric prefix> Ten / Deca = 10
  329. [deci]              <Unit>                  (4.0) <Metric prefix> Tenth / Deci = 0.1
  330. [centi]             <Unit>                  (4.0) <Metric prefix> Hundredth / Centi = 0.01
  331. [milli]             <Unit>                  (4.0) <Metric prefix> Thousandth / Milli = 0.001
  332. [mic]               <Unit>                  (4.0) <Metric prefix> Millionth / Micro = 10^-6
  333. [n]                 <Unit>                  (4.0) <Metric prefix> Billionth / Nano = 10^-9
  334. [p]                 <Unit>                  (4.0) <Metric prefix> Trillionth / Pico = 10^-12
  335. [f]                 <Unit>                  (4.0) <Metric prefix> Quadrillionth / Femto = 10^-15
  336. [a]                 <Unit>                  (4.0) <Metric prefix> Quintillionth / Atoo = 10^-18
  337. [z]                 <Unit>                  (4.0) <Metric prefix> Sextillionth / Zepto = 10^-21
  338. [y]                 <Unit>                  (4.0) <Metric prefix> Septillionth / Yocto = 10^-24

*** If you found the software useful donation is something you might consider 🙂 ***

If you found the software useful donation is something you might consider :-)

Enjoy! 🙂

 

Best regards,

Mariusz Gromada

Download latest release – v.4.0.0.2: bin + doc + src (.zip 10.7 MB)

Download latest release – v.4.0.0.2: bin only (.zip 3.04 MB) – separate binaries for java: 1.5, 1.6, 1.7, 1.8; .NET: 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS

Source code .zipSource code .tar.gz View on GitHubMathSpace.pl