scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
Loading...
Searching...
No Matches
unit_abbreviation.cpp
Go to the documentation of this file.
2
3using namespace std;
4
5scifir::length operator"" _Å(unsigned long long int x)
6{
8}
9
10scifir::volume operator"" _QL(unsigned long long int x)
11{
13}
14
15scifir::volume operator"" _RL(unsigned long long int x)
16{
18}
19
20scifir::volume operator"" _YL(unsigned long long int x)
21{
23}
24
25scifir::volume operator"" _ZL(unsigned long long int x)
26{
28}
29
30scifir::volume operator"" _EL(unsigned long long int x)
31{
33}
34
35scifir::volume operator"" _PL(unsigned long long int x)
36{
38}
39
40scifir::volume operator"" _TL(unsigned long long int x)
41{
43}
44
45scifir::volume operator"" _GL(unsigned long long int x)
46{
48}
49
50scifir::volume operator"" _ML(unsigned long long int x)
51{
53}
54
55scifir::volume operator"" _kL(unsigned long long int x)
56{
58}
59
60scifir::volume operator"" _hL(unsigned long long int x)
61{
63}
64
65scifir::volume operator"" _daL(unsigned long long int x)
66{
68}
69
70scifir::volume operator"" _L(unsigned long long int x)
71{
73}
74
75scifir::volume operator"" _dL(unsigned long long int x)
76{
78}
79
80scifir::volume operator"" _cL(unsigned long long int x)
81{
83}
84
85scifir::volume operator"" _mL(unsigned long long int x)
86{
88}
89
90scifir::volume operator"" _µL(unsigned long long int x)
91{
93}
94
95scifir::volume operator"" _nL(unsigned long long int x)
96{
98}
99
100scifir::volume operator"" _pL(unsigned long long int x)
101{
103}
104
105scifir::volume operator"" _fL(unsigned long long int x)
106{
108}
109
110scifir::volume operator"" _aL(unsigned long long int x)
111{
113}
114
115scifir::volume operator"" _zL(unsigned long long int x)
116{
118}
119
120scifir::volume operator"" _yL(unsigned long long int x)
121{
123}
124
125scifir::volume operator"" _rL(unsigned long long int x)
126{
128}
129
130scifir::volume operator"" _qL(unsigned long long int x)
131{
133}
134
135scifir::time_duration operator"" _min(unsigned long long int x)
136{
138}
139
140scifir::time_duration operator"" _hour(unsigned long long int x)
141{
143}
144
145scifir::time_duration operator"" _day(unsigned long long int x)
146{
148}
149
150scifir::length operator"" _QAU(unsigned long long int x)
151{
153}
154
155scifir::length operator"" _RAU(unsigned long long int x)
156{
158}
159
160scifir::length operator"" _YAU(unsigned long long int x)
161{
163}
164
165scifir::length operator"" _ZAU(unsigned long long int x)
166{
168}
169
170scifir::length operator"" _EAU(unsigned long long int x)
171{
173}
174
175scifir::length operator"" _PAU(unsigned long long int x)
176{
178}
179
180scifir::length operator"" _TAU(unsigned long long int x)
181{
183}
184
185scifir::length operator"" _GAU(unsigned long long int x)
186{
188}
189
190scifir::length operator"" _MAU(unsigned long long int x)
191{
193}
194
195scifir::length operator"" _kAU(unsigned long long int x)
196{
198}
199
200scifir::length operator"" _hAU(unsigned long long int x)
201{
203}
204
205scifir::length operator"" _daAU(unsigned long long int x)
206{
208}
209
210scifir::length operator"" _AU(unsigned long long int x)
211{
213}
214
215scifir::length operator"" _dAU(unsigned long long int x)
216{
218}
219
220scifir::length operator"" _cAU(unsigned long long int x)
221{
223}
224
225scifir::length operator"" _mAU(unsigned long long int x)
226{
228}
229
230scifir::length operator"" _µAU(unsigned long long int x)
231{
233}
234
235scifir::length operator"" _nAU(unsigned long long int x)
236{
238}
239
240scifir::length operator"" _pAU(unsigned long long int x)
241{
243}
244
245scifir::length operator"" _fAU(unsigned long long int x)
246{
248}
249
250scifir::length operator"" _aAU(unsigned long long int x)
251{
253}
254
255scifir::length operator"" _zAU(unsigned long long int x)
256{
258}
259
260scifir::length operator"" _yAU(unsigned long long int x)
261{
263}
264
265scifir::length operator"" _rAU(unsigned long long int x)
266{
268}
269
270scifir::length operator"" _qAU(unsigned long long int x)
271{
273}
274
275scifir::length operator"" _Qpc(unsigned long long int x)
276{
278}
279
280scifir::length operator"" _Rpc(unsigned long long int x)
281{
283}
284
285scifir::length operator"" _Ypc(unsigned long long int x)
286{
288}
289
290scifir::length operator"" _Zpc(unsigned long long int x)
291{
293}
294
295scifir::length operator"" _Epc(unsigned long long int x)
296{
298}
299
300scifir::length operator"" _Ppc(unsigned long long int x)
301{
303}
304
305scifir::length operator"" _Tpc(unsigned long long int x)
306{
308}
309
310scifir::length operator"" _Gpc(unsigned long long int x)
311{
313}
314
315scifir::length operator"" _Mpc(unsigned long long int x)
316{
318}
319
320scifir::length operator"" _kpc(unsigned long long int x)
321{
323}
324
325scifir::length operator"" _hpc(unsigned long long int x)
326{
328}
329
330scifir::length operator"" _dapc(unsigned long long int x)
331{
333}
334
335scifir::length operator"" _pc(unsigned long long int x)
336{
338}
339
340scifir::length operator"" _dpc(unsigned long long int x)
341{
343}
344
345scifir::length operator"" _cpc(unsigned long long int x)
346{
348}
349
350scifir::length operator"" _mpc(unsigned long long int x)
351{
353}
354
355scifir::length operator"" _µpc(unsigned long long int x)
356{
358}
359
360scifir::length operator"" _npc(unsigned long long int x)
361{
363}
364
365scifir::length operator"" _ppc(unsigned long long int x)
366{
368}
369
370scifir::length operator"" _fpc(unsigned long long int x)
371{
373}
374
375scifir::length operator"" _apc(unsigned long long int x)
376{
378}
379
380scifir::length operator"" _zpc(unsigned long long int x)
381{
383}
384
385scifir::length operator"" _ypc(unsigned long long int x)
386{
388}
389
390scifir::length operator"" _rpc(unsigned long long int x)
391{
393}
394
395scifir::length operator"" _qpc(unsigned long long int x)
396{
398}
399
400scifir::energy operator"" _QeV(unsigned long long int x)
401{
403}
404
405scifir::energy operator"" _ReV(unsigned long long int x)
406{
408}
409
410scifir::energy operator"" _YeV(unsigned long long int x)
411{
413}
414
415scifir::energy operator"" _ZeV(unsigned long long int x)
416{
418}
419
420scifir::energy operator"" _EeV(unsigned long long int x)
421{
423}
424
425scifir::energy operator"" _PeV(unsigned long long int x)
426{
428}
429
430scifir::energy operator"" _TeV(unsigned long long int x)
431{
433}
434
435scifir::energy operator"" _GeV(unsigned long long int x)
436{
438}
439
440scifir::energy operator"" _MeV(unsigned long long int x)
441{
443}
444
445scifir::energy operator"" _keV(unsigned long long int x)
446{
448}
449
450scifir::energy operator"" _heV(unsigned long long int x)
451{
453}
454
455scifir::energy operator"" _daeV(unsigned long long int x)
456{
458}
459
460scifir::energy operator"" _eV(unsigned long long int x)
461{
463}
464
465scifir::energy operator"" _deV(unsigned long long int x)
466{
468}
469
470scifir::energy operator"" _ceV(unsigned long long int x)
471{
473}
474
475scifir::energy operator"" _meV(unsigned long long int x)
476{
478}
479
480scifir::energy operator"" _µeV(unsigned long long int x)
481{
483}
484
485scifir::energy operator"" _neV(unsigned long long int x)
486{
488}
489
490scifir::energy operator"" _peV(unsigned long long int x)
491{
493}
494
495scifir::energy operator"" _feV(unsigned long long int x)
496{
498}
499
500scifir::energy operator"" _aeV(unsigned long long int x)
501{
503}
504
505scifir::energy operator"" _zeV(unsigned long long int x)
506{
508}
509
510scifir::energy operator"" _yeV(unsigned long long int x)
511{
513}
514
515scifir::energy operator"" _reV(unsigned long long int x)
516{
518}
519
520scifir::energy operator"" _qeV(unsigned long long int x)
521{
523}
524
525scifir::mass operator"" _Da(unsigned long long int x)
526{
528}
529
530scifir::mass operator"" _amu(unsigned long long int x)
531{
533}
534
535scifir::area operator"" _Qbarn(unsigned long long int x)
536{
538}
539
540scifir::area operator"" _Rbarn(unsigned long long int x)
541{
543}
544
545scifir::area operator"" _Ybarn(unsigned long long int x)
546{
548}
549
550scifir::area operator"" _Zbarn(unsigned long long int x)
551{
553}
554
555scifir::area operator"" _Ebarn(unsigned long long int x)
556{
558}
559
560scifir::area operator"" _Pbarn(unsigned long long int x)
561{
563}
564
565scifir::area operator"" _Tbarn(unsigned long long int x)
566{
568}
569
570scifir::area operator"" _Gbarn(unsigned long long int x)
571{
573}
574
575scifir::area operator"" _Mbarn(unsigned long long int x)
576{
578}
579
580scifir::area operator"" _kbarn(unsigned long long int x)
581{
583}
584
585scifir::area operator"" _hbarn(unsigned long long int x)
586{
588}
589
590scifir::area operator"" _dabarn(unsigned long long int x)
591{
593}
594
595scifir::area operator"" _barn(unsigned long long int x)
596{
598}
599
600scifir::area operator"" _dbarn(unsigned long long int x)
601{
603}
604
605scifir::area operator"" _cbarn(unsigned long long int x)
606{
608}
609
610scifir::area operator"" _mbarn(unsigned long long int x)
611{
613}
614
615scifir::area operator"" _µbarn(unsigned long long int x)
616{
618}
619
620scifir::area operator"" _nbarn(unsigned long long int x)
621{
623}
624
625scifir::area operator"" _pbarn(unsigned long long int x)
626{
628}
629
630scifir::area operator"" _fbarn(unsigned long long int x)
631{
633}
634
635scifir::area operator"" _abarn(unsigned long long int x)
636{
638}
639
640scifir::area operator"" _zbarn(unsigned long long int x)
641{
643}
644
645scifir::area operator"" _ybarn(unsigned long long int x)
646{
648}
649
650scifir::area operator"" _rbarn(unsigned long long int x)
651{
653}
654
655scifir::area operator"" _qbarn(unsigned long long int x)
656{
658}
659
660scifir::molarity operator"" _QM(unsigned long long int x)
661{
663}
664
665scifir::molarity operator"" _RM(unsigned long long int x)
666{
668}
669
670scifir::molarity operator"" _YM(unsigned long long int x)
671{
673}
674
675scifir::molarity operator"" _ZM(unsigned long long int x)
676{
678}
679
680scifir::molarity operator"" _EM(unsigned long long int x)
681{
683}
684
685scifir::molarity operator"" _PM(unsigned long long int x)
686{
688}
689
690scifir::molarity operator"" _TM(unsigned long long int x)
691{
693}
694
695scifir::molarity operator"" _GM(unsigned long long int x)
696{
698}
699
700scifir::molarity operator"" _MM(unsigned long long int x)
701{
703}
704
705scifir::molarity operator"" _kM(unsigned long long int x)
706{
708}
709
710scifir::molarity operator"" _hM(unsigned long long int x)
711{
713}
714
715scifir::molarity operator"" _daM(unsigned long long int x)
716{
718}
719
720scifir::molarity operator"" _M(unsigned long long int x)
721{
723}
724
725scifir::molarity operator"" _dM(unsigned long long int x)
726{
728}
729
730scifir::molarity operator"" _cM(unsigned long long int x)
731{
733}
734
735scifir::molarity operator"" _mM(unsigned long long int x)
736{
738}
739
740scifir::molarity operator"" _µM(unsigned long long int x)
741{
743}
744
745scifir::molarity operator"" _nM(unsigned long long int x)
746{
748}
749
750scifir::molarity operator"" _pM(unsigned long long int x)
751{
753}
754
755scifir::molarity operator"" _fM(unsigned long long int x)
756{
758}
759
760scifir::molarity operator"" _aM(unsigned long long int x)
761{
763}
764
765scifir::molarity operator"" _zM(unsigned long long int x)
766{
768}
769
770scifir::molarity operator"" _yM(unsigned long long int x)
771{
773}
774
775scifir::molarity operator"" _rM(unsigned long long int x)
776{
778}
779
780scifir::molarity operator"" _qM(unsigned long long int x)
781{
783}
784
789
794
799
804
809
814
819
824
829
834
839
844
849
854
859
864
869
874
879
884
889
894
899
904
909
914
915scifir::mole operator"" _particles(unsigned long long int x)
916{
918}
919
920scifir::brain_memory operator"" _memo(unsigned long long int x)
921{
923}
924
925scifir::angle operator"" _deg(unsigned long long int x)
926{
927 return scifir::angle((long double)x, scifir::angle::DEGREE);
928}
929
930scifir::angle operator"" _rad(unsigned long long int x)
931{
932 return scifir::angle((long double)x, scifir::angle::RADIAN);
933}
934
935scifir::percentage operator"" _percentage(unsigned long long int x)
936{
938}
939
940scifir::percentage operator"" _ppm(unsigned long long int x)
941{
943}
944
945/*scifir::percentage operator"" _ppb(unsigned long long int x)
946{
947 return scifir::percentage((long double)x, scifir::percentage::PARTS_PER_BILLION);
948}
949
950scifir::percentage operator"" _ppt(unsigned long long int x)
951{
952 return scifir::percentage((long double)x, scifir::percentage::PARTS_PER_TRILLION);
953}
954
955scifir::percentage operator"" _ppq(unsigned long long int x)
956{
957 return scifir::percentage((long double)x, scifir::percentage::PARTS_PER_QUATRILLION);
958}*/
959
960scifir::pixel operator"" _px(unsigned long long int x)
961{
962 return scifir::pixel((long double)x);
963}
964
965scifir::abv operator"" _abv(unsigned long long int x)
966{
967 return scifir::abv((long double)x,scifir::abv::PERCENTAGE);
968}
969
970scifir::sound_power operator"" _dB(unsigned long long int x)
971{
973}
974
979
984
989
994
999
1004
1009
1014
1019
1024
1029
1034
1039
1044
1049
1054
1059
1064
1069
1074
1079
1084
1089
1094
1099
1104
1109
1114
1119
1124
1129
1134
1139
1144
1149
1154
1159
1164
1169
1174
1179
1184
1189
1194
1199
1204
1209
1214
1219
1224
1229
1234
1239
1244
1249
1254
1259
1264
1269
1274
1279
1284
1289
1294
1299
1304
1309
1314
1319
1324
1329
1334
1339
1344
1349
1354
1359
1364
1369
1374
1379
1384
1389
1394
1399
1404
1409
1414
1419
1424
1429
1434
1439
1444
1449
1454
1459
1464
1469
1474
1479
1484
1489
1494
1499
1504
1509
1514
1519
1524
1529
1534
1539
1544
1549
1554
1559
1564
1569
1574
1579
1584
1589
1594
1599
1604
1609
1614
1619
1624
1629
1634
1639
1644
1649
1654
1659
1664
1669
1674
1679
1684
1689
1694
1699
1704
1709
1714
1719
1724
1729
1734
1739
1744
1749
1754
1759
1764
1769
1774
1779
1784
1789
1794
1799
1804
1809
1814
1819
1824
1829
1834
1839
1844
1849
1854
1859
1864
1869
1874
1879
1884
1889
1890scifir::angle operator"" _deg(long double x)
1891{
1893}
1894
1895scifir::angle operator"" _rad(long double x)
1896{
1898}
1899
1900scifir::percentage operator"" _percentage(long double x)
1901{
1903}
1904
1905scifir::percentage operator"" _ppm(long double x)
1906{
1908}
1909
1910/*scifir::percentage operator"" _ppb(long double x)
1911{
1912 return scifir::percentage(x, scifir::percentage::PARTS_PER_BILLION);
1913}
1914
1915scifir::percentage operator"" _ppt(long double x)
1916{
1917 return scifir::percentage(x, scifir::percentage::PARTS_PER_TRILLION);
1918}
1919
1920scifir::percentage operator"" _ppq(long double x)
1921{
1922 return scifir::percentage(x, scifir::percentage::PARTS_PER_QUATRILLION);
1923}*/
1924
1925scifir::pixel operator"" _px(long double x)
1926{
1927 return scifir::pixel(x);
1928}
1929
1930scifir::abv operator"" _abv(long double x)
1931{
1932 return scifir::abv(x,scifir::abv::PERCENTAGE);
1933}
1934
Class that allows to work with angles. Each angle sizes 4 bytes. Initialization string example: "20°"...
Definition angle.hpp:77
@ DEGREE
The angle is in DEGREE. A degree is defined as a 1/360 part of a circle. The entire circle correspond...
Definition angle.hpp:79
@ RADIAN
The angle is in RADIAN. A radian is defined as the length of the perimeter of the circle that conform...
Definition angle.hpp:79
Class that represents dimensions of the SI system of units. Each dimension sizes 6 bytes,...
Definition dimension.hpp:31
@ NUMERATOR
The dimension is at the numerator.
Definition dimension.hpp:38
@ MOLARITY
Molarity, plural molarities. The derived dimensions are mol / L. Dimension of concentration of a chem...
Definition dimension.hpp:35
@ LITRE
Litre, plural litres. The derived dimensions are dm3. Dimension of volume. Symbol L.
Definition dimension.hpp:35
@ MEMO
Memo, plural memos. Invented unit inside Scifir, it's not part of the SI system of units....
Definition dimension.hpp:35
@ INTERNATIONAL_UNIT
International unit, plural international units. It measures the amount of effect or biological activi...
Definition dimension.hpp:35
@ BARN
Barn, plural barns. Dimension of area. The derived dimensions are 10^-28 m2. It's used inside nuclear...
Definition dimension.hpp:35
@ ANGSTROM
Ángstrom, plural angstroms. The derived dimensions are 10^-10 m. Dimension of length,...
Definition dimension.hpp:35
@ ELECTRON_VOLT
Electron volt, plural electron volts. The derived dimensions are 1.602176634 * 10^−19 J....
Definition dimension.hpp:35
@ DALTON
Dalton, plural daltons. The derived dimensions are 1,66053886 * 10^-24. Dimension of mass....
Definition dimension.hpp:35
@ MILLIEQUIVALENT
Milliequivalent, plural Milliequivalents. Amount of moles in a given chemical reaction needed to reac...
Definition dimension.hpp:35
@ ATOMIC_MASS_UNIT
Atomic mass unit, plural atomic mass units. The derived dimensions are Da. Equivalent to the Dalton....
Definition dimension.hpp:35
@ ASTRONOMICAL_UNIT
Astronomical unit, plural astronomical units. Dimension of length. The derived dimensions are 149,...
Definition dimension.hpp:35
@ DAY
Day, plural days. The derived dimensions are 86,400 s. Dimension of time. Symbol day,...
Definition dimension.hpp:35
@ HOUR
Hour, plural hours. The derived dimensions are 3,600 s. Dimension of time. Symbol hour,...
Definition dimension.hpp:35
@ PARTICLES
Total of particles, the total amount that the mole represents. It's not exactly a dimension,...
Definition dimension.hpp:35
@ MINUTE
Minute, plural minutes. The derived dimensions are 60 s. Dimension of time. Symbol min.
Definition dimension.hpp:35
@ PARSEC
Parsec, plural parsecs. Dimension of length. The derived dimensions are 3.2616 ly....
Definition dimension.hpp:35
Class that allows to handle percentages and do calculations with it easy. It supports normal percenta...
@ PARTS_PER_MILLION
Percentage, with the ppm symbol. Commonly used in chemistry, it represents 1 in 10^6.
@ PERCENTAGE
Normal percentage, with the % symbol.
@ ATTO
Prefix of a factor of 10^-18.
Definition prefix.hpp:16
@ YOCTO
Prefix of a factor of 10^-24.
Definition prefix.hpp:16
@ RONNA
Prefix of a factor of 10^27.
Definition prefix.hpp:16
@ NANO
Prefix of a factor of 10^-9.
Definition prefix.hpp:16
@ MILLI
Prefix of a factor of 10^-3.
Definition prefix.hpp:16
@ NONE
There is no prefix. Then, the dimension is not increased or decreased by some factor.
Definition prefix.hpp:16
@ EXA
Prefix of a factor of 10^18.
Definition prefix.hpp:16
@ QUETTA
Prefix of a factor of 10^30.
Definition prefix.hpp:16
@ KILO
Prefix of a factor of 10^3.
Definition prefix.hpp:16
@ MEGA
Prefix of a factor of 10^6.
Definition prefix.hpp:16
@ HECTO
Prefix of a factor of 10^2.
Definition prefix.hpp:16
@ CENTI
Prefix of a factor of 10^-2.
Definition prefix.hpp:16
@ PETA
Prefix of a factor of 10^15.
Definition prefix.hpp:16
@ RONTO
Prefix of a factor of 10^-27.
Definition prefix.hpp:16
@ DECA
Prefix of a factor of 10^1.
Definition prefix.hpp:16
@ ZEPTO
Prefix of a factor of 10^-21.
Definition prefix.hpp:16
@ YOTTA
Prefix of a factor of 10^24.
Definition prefix.hpp:16
@ FEMTO
Prefix of a factor of 10^-15.
Definition prefix.hpp:16
@ DECI
Prefix of a factor of 10^-1.
Definition prefix.hpp:16
@ MICRO
Prefix of a factor of 10^-6.
Definition prefix.hpp:16
@ GIGA
Prefix of a factor of 10^9.
Definition prefix.hpp:16
@ QUECTO
Prefix of a factor of 10^-30.
Definition prefix.hpp:16
@ PICO
Prefix of a factor of 10^-12.
Definition prefix.hpp:16
@ ZETTA
Prefix of a factor of 10^21.
Definition prefix.hpp:16
@ TERA
Prefix of a factor of 10^12.
Definition prefix.hpp:16
Class that allows to create scalar units, which are composed of a value (as a float) and dimensions....
volume(const size_3d< length > &)
area(const size_2d< length > &)
mole(const percentage &new_percentage, const mole &new_mole)
mass(const percentage &new_percentage, const mass &new_mass)