In problems of mathematical physics, to study the structures of spaces using the Cayley-Klein models in theoretical calculations, the use of generalized complex numbers is required. In the case of computational experiments, such tasks require their high-quality implementation in a programming language. The proposed small implementation of generalized complex numbers in modern programming languages have several disadvantages. In this article, we propose using the Julia language as the language for implementing generalized complex numbers, not least because it supports the multiple dispatch mechanism. The paper demonstrates the approach to the implementation of one of the types of generalized complex numbers, namely dual numbers. We place particular emphasis on the description of the use of the multiple dispatch mechanism to implement a new numerical type. The resulting implementation of dual numbers can be considered as a prototype for a complete software module for supporting generalized complex numbers.
University of Bristol(布里斯托大学);National Energy Research Scientific Computing Center, Lawrence Berkeley National Laboratory(美国能源部先进科学计算国家研究中心,劳伦斯伯克利国家实验室);Intel(英特尔)
Efficient Solvers for SLOPE in R, Python, Julia, and C++
University of Copenhagen(哥本哈根大学);University of Wrocław(弗罗茨瓦夫大学);Inria ENS de Lyon(法国国家信息与自动化研究所里昂高等师范学院分部;法国国家科学研究中心里昂);CNRS Lyon(隆德大学);Lund University
AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia
University of Basel(巴塞尔大学);Pumas-AI Inc.(普马斯人工智能公司);UNSW Canberra(新南威尔士大学堪培拉分校);Invenia Labs(因维尼亚实验室);Massachusetts Institute of Technology(麻省理工学院);Julia Computing Inc.(朱莉娅计算公司)