Metric prefixes

TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!

Tutorial Math Collection API spec Download

Below is the code for JAVA, the code for C# is almost identical.

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.5.0.0] Res: 10*[M] / [k] = 10000.0

Case 2: List of supported metric prefixes

import org.mariuszgromada.math.mxparser.*;
...
mXparser.consolePrintHelp("metric prefix");
Help content: 

    #  key word            type                    syntax                                        since description
    -  --------            ----                    ------                                        ----- -----------
  411. [Y]                 <Unit>                  [Y]                                           4.0   <Metric prefix> Septillion / Yotta = 10^24
  412. [sept]              <Unit>                  [sept]                                        4.0   <Metric prefix> Septillion / Yotta = 10^24
  413. [Z]                 <Unit>                  [Z]                                           4.0   <Metric prefix> Sextillion / Zetta = 10^21
  414. [sext]              <Unit>                  [sext]                                        4.0   <Metric prefix> Sextillion / Zetta = 10^21
  415. [E]                 <Unit>                  [E]                                           4.0   <Metric prefix> Quintillion / Exa = 10^18
  416. [quint]             <Unit>                  [quint]                                       4.0   <Metric prefix> Quintillion / Exa = 10^18
  417. [P]                 <Unit>                  [P]                                           4.0   <Metric prefix> Quadrillion / Peta = 10^15
  418. [quad]              <Unit>                  [quad]                                        4.0   <Metric prefix> Quadrillion / Peta = 10^15
  419. [T]                 <Unit>                  [T]                                           4.0   <Metric prefix> Trillion / Tera = 10^12
  420. [tril]              <Unit>                  [tril]                                        4.0   <Metric prefix> Trillion / Tera = 10^12
  421. [G]                 <Unit>                  [G]                                           4.0   <Metric prefix> Billion / Giga = 10^9
  422. [bil]               <Unit>                  [bil]                                         4.0   <Metric prefix> Billion / Giga = 10^9
  423. [M]                 <Unit>                  [M]                                           4.0   <Metric prefix> Million / Mega = 10^6
  424. [mil]               <Unit>                  [mil]                                         4.0   <Metric prefix> Million / Mega = 10^6
  425. [k]                 <Unit>                  [k]                                           4.0   <Metric prefix> Thousand / Kilo = 10^3
  426. [th]                <Unit>                  [th]                                          4.0   <Metric prefix> Thousand / Kilo = 10^3
  427. [hund]              <Unit>                  [hund]                                        4.0   <Metric prefix> Hundred / Hecto = 10^2
  428. [hecto]             <Unit>                  [hecto]                                       4.0   <Metric prefix> Hundred / Hecto = 10^2
  429. [ten]               <Unit>                  [ten]                                         4.0   <Metric prefix> Ten / Deca = 10
  430. [deca]              <Unit>                  [deca]                                        4.0   <Metric prefix> Ten / Deca = 10
  431. [deci]              <Unit>                  [deci]                                        4.0   <Metric prefix> Tenth / Deci = 0.1
  432. [centi]             <Unit>                  [centi]                                       4.0   <Metric prefix> Hundredth / Centi = 0.01
  433. [milli]             <Unit>                  [milli]                                       4.0   <Metric prefix> Thousandth / Milli = 0.001
  434. [mic]               <Unit>                  [mic]                                         4.0   <Metric prefix> Millionth / Micro = 10^-6
  435. [n]                 <Unit>                  [n]                                           4.0   <Metric prefix> Billionth / Nano = 10^-9
  436. [p]                 <Unit>                  [p]                                           4.0   <Metric prefix> Trillionth / Pico = 10^-12
  437. [f]                 <Unit>                  [f]                                           4.0   <Metric prefix> Quadrillionth / Femto = 10^-15
  438. [a]                 <Unit>                  [a]                                           4.0   <Metric prefix> Quintillionth / Atoo = 10^-18
  439. [z]                 <Unit>                  [z]                                           4.0   <Metric prefix> Sextillionth / Zepto = 10^-21
  440. [y]                 <Unit>                  [y]                                           4.0   <Metric prefix> Septillionth / Yocto = 10^-24
Nuget
Install-Package MathParser.org-mXparser -Version 5.0.2
Maven
<dependency>
<groupid>org.mariuszgromada.math</groupid>
<artifactid>MathParser.org-mXparser</artifactid>
<version>5.0.2</version>
</dependency>
Gradle
implementation 'org.mariuszgromada.math:MathParser.org-mXparser:5.0.2'
Gradle (Kotlin)
implementation("org.mariuszgromada.math:MathParser.org-mXparser:5.0.2")
GitHub
git clone https://github.com/mariuszgromada/MathParser.org-mXparser
OTHER DOWNLOAD OPTIONS

Download latest release – v.5.0.2 Leonis: bin + docDownload latest release – v.5.0.2 Leonis: bin only, includes separate binaries for various .NET platforms and Java versions

NEWS FROM MATHPARSER.ORG
SOURCE CODE

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

DONATION
Did you find the software useful?
Please consider donation 🙂
DONATE