UNIVERSITY OF BUCHAREST
FACULTY OF PHYSICS

Guest
2024-11-23 18:30

 HOME     CONFERENCES     SEARCH            LOGIN     NEW USER     IMAGES   


Conference: Bucharest University Faculty of Physics 2022 Meeting


Section: Theoretical Physics and Applied Mathematics


Title:
dimensional-aware scalar and vectorial operations in c++


Authors:
Eduard George Stan(1,2), Michele Renda(1), Călin Alexa(1)


Affiliation:
1)IFIN-HH, Particles Physics Department, Măgurele, Romania

2)University of Bucharest, Faculty of Physics, Măgurele, Romania


E-mail
calin.alexa@nipne.ro


Keywords:
units of measurement C++ Vectors


Abstract:
We review the problem of a dimensional check as a language feature for most of the high-level programming languages and the possible solutions of this issue. We introduce our C++ library designed to make 2D and 3D vectorial operations using units of measurement. Eventually, we present our plans for future improvements of the current implementation


References:

1) T. Mayerhofer, M. Wimmer, A. Vallecillo, Adding uncertainty

and units to quantity types in software models, in: Proceedings of the 2016 ACM SIGPLAN International Conference on

Software Language Engineering, SLE 2016, Association for

Computing Machinery, New York, NY, USA, 2016, pp. 118–

131. URL: https://doi.org/10.1145/2997364.2997376.

doi:10.1145/2997364.2997376.



2) S. McKeever, O. Bennich-Bjorkman, O.-A. Salah, Unit of mea- ¨

surement libraries, their popularity and suitability, Software:

Practice and Experience 51 (2021) 711–734.



3) G. M. Preussner, Dimensional Analysis in Programming Languages, 2018. URL: https://gmpreussner.com/research/

dimensional-analysis-in-programming-languages.



4) Apple Inc, Swift Language, 2022. URL: https://swift.org



5) A. Kennedy, Types for Units-of-Measure: Theory and Practice, in: Z. Horvath, R. Plasmeijer, V. Zs ´ ok (Eds.), Central Eu- ´

ropean Functional Programming School: Third Summer School,

CEFP 2009, Budapest, Hungary, May 21-23, 2009 and Komarno, ´

Slovakia, May 25-30, 2009, Revised Selected Lectures, Lecture Notes in Computer Science, Springer, Berlin, Heidelberg,

2010, pp. 268–305. URL: https://doi.org/10.1007/978-

3-642-17685-2_8. doi:10.1007/978-3-642-17685-2_8.



6) M. C. Schabel, S. Watanabe, Chapter 44. Boost.Units 1.1.0 -

1.77.0, 2020. URL: https://www.boost.org/doc/libs/1_

77_0/doc/html/boost_units.html.



7) G. W. Petty, Automated computation and consistency checking

of physical dimensions and units in scientific programs, Software: Practice and Experience 31 (2001) 1067–1076. eprint:

https://onlinelibrary.wiley.com/doi/pdf/10.1002/spe.401.



8) H. Grecco, Pint, 2022. URL: https://github.com/

hgrecco/pint, original-date: 2012-07-13T16:27:11Z.



9) L. Lonnblad, CLHEP—a project for designing a C ¨ ++ class library for high energy physics, Computer Physics Communications 84 (1994) 307–316.



10) G. Guennebaud, B. Jacob, et al., Eigen v3, 2010. URL: http:

//eigen.tuxfamily.org



11) M. Pusz, A c++ approach to physical units, 2019. URL:

https://isocpp.org/blog/2021/09/cppcon-2019-acpp-approach-to-physical-units-mateusz-pusz.



12) M. Renda, D. Ciubotaru, C. Banu, Betaboltz: A Monte-Carlo

simulation tool for gas scattering processes, Computer Physics

Communications 267 (2021) 108057.

Acknowledgement:
This study was supported by PN19060104 and ATLAS CERN-RO grants.