Ev3: a Library for Symbolic Computation in C++ Using N-Ary Trees

Total Page:16

File Type:pdf, Size:1020Kb

Ev3: a Library for Symbolic Computation in C++ Using N-Ary Trees Ev3: A Library for Symbolic Computation in C++ using n-ary Trees Leo Liberti LIX, Ecole´ Polytechnique, 91128 Palaiseau, France ([email protected]) 3 october 2003 Abstract Ev3 is a callable C++ library for performing symbolic computation (calculation of symbolic derivatives and various expression simplification). The purpose of this library is to furnish a fast means to use symbolic derivatives to third-party scientific software (e.g. nonlinear optimization, solution of nonlinear equations). It is small, easy to interface, even reasonably easy to change; it is written in C++ and the source code is available. One feature that makes Ev3 very efficient in algebraic manipulation is that the data structures are based on n-ary trees. 1 Introduction Computer Algebra Systems (CAS) have helped mathematicians, physicists, engineers and other scientists enormously since their appearance. CASes are extremely useful in performing complex symbolic calcu- lations quickly. They do not generally require particular programming skills, yet they manage to carry out numerical analysis, symbolic manipulation and graph plotting in 2 and 3 dimensions. The range of existing CASes is impressive, both commercially available (e.g. Mathematica, Maple, Matlab, Mathcad, Reduce, Mupad etc.) and as free software (e.g. Maxima, GAP, yacas, Singular, GiNaC etc.); however most of them (with the notable exception of GiNaC, see below) fall short on the external Application Programming Interface (API), i.e. it is difficult, or impossible in many cases, to create a program in a compiled language, say in C/C++ or Fortran, which can use the external CAS facilities. This is a serious hindrance for user applications with programming requirements that go beyond those offered by the CAS proprietary language, or for those applications that need to be coded in a compiled language for efficiency, but would still benefit from the CAS facilities. The need for CAS-type libraries designed to be used from an API arises as the complexity or the commercial viability of the application gets higher. Thus, having experienced the benefits of CASes from the command line, so to speak, users now want to incorporate these functionalities in their own programs. This paper presents Ev3, a callable C++ library designed to perform simple symbolic manipulation. “Simple” in this context means symbolic differentiation and various expression simplifications. Thus, Ev3 is very useful for those scientific applications that need to compute derivatives, like for example continuous nonlinear programming or nonlinear equation solving. The reason why we have chosen to keep Ev3 “simple”, i.e. to limit the range of symbolic algorithms included in Ev3, is that we expect advanced users to take the source code and modify it to suit their own needs. For example, if an application needs a symbolic integration routine, Ev3’s data structures and basic methods can be used as a starting point. We did our best in keeping Ev3’s source code small, readable, well structured and easily extendable. Ev3 can be downloaded from http://www.lix.polytechnique.fr/ liberti/Ev3-1.0.tar.gz. Ev3 records mathematical expressions in a tree-like data structure (called n-ary tree) where each node has an arbitrary number of direct subnodes. Monomials of all degrees (including constants) are represented by the leaf nodes of the tree, and mathematical operators by the intermediate nodes. Entire subexpressions can be easily changed, substituted or deleted. New expressions can be formed in a number of different ways. A “standard form” for expressions is defined in order to make simplification more effective. These are some of Ev3’s features: • based on n-ary trees; • every node in a tree can have a numeric multiplicative coefficient; • every leaf node in a tree can have a numeric exponent; • basic form of garbage collection via reference counter; • basic parser transforms strings in n-ary trees; • basic functionality: function evaluation, expression simplification, symbolic differentiation. The rest of this paper is organized as follows. In section 2 we review the current situation as regards some existing CASes and their ability to be used as a callable library for external applications. In section 3 we describe the most common data structures used for symbolic computation (namely, lists and binary and n-ary trees). In section 4 we describe Ev3’s object-oriented software architecture and implementation of the abstract data structure describing the n-ary tree. Finally, section 5 is a tutorial on the use of Ev3. 2 Review of Current Situation As has been mentioned in the introduction, it is difficult, or impossible in many cases, to use CAS functionality within a C++ program. In this section we describe the current situation with some existing symbolic computation packages. 2.1 Commercial CASes This list encompasses some of the most widespread commercial CASes. Although some of these CASes are distributed for free for non-commercial purposes (e.g. MuPad), they appear in this list because they do not abide by the “free software” rules involving distribution of the source code and copyrighting via the GNU Public License (GPL). • Mathematica. Mathematica offers some support for external programs wanting to use its features via the MathLink [Mathematica(2001)] mechanism. However, a kernel needs to be running on the local machine in order to use it. This has a number of disadvantages: – the produced executables are not portable, for they need to find a running Mathematica kernel in order to run; – there is some computational overhead involved in runtime linking with a running Mathematica kernel; – there is no significant computational speed to be gained from this exercise, as all the Mathe- matica instructions are carried out by the Mathematica kernel, not by the user executable. • Maple. Maple [Maple(2001)] is capable of translating its procedures and functions in C or Fortran, however it is not possible to export symbolic manipulation code, and there is no way to call a Maple library from C/C++/Fortran. 2 • Mathlab. Strictly speaking, MatLab does not do symbolic computation. However there are some symbolic computation extensions available for MatLab [Matlab(2001)] so it makes sense to include it in this list. MatLab external API works in much the same was as Mathematica’s does: on initialization, the external C/C++/Fortran program spawns a running MatLab process on the local machine, and sets up input/output pipes from it to the program [Matlab API(2001)]. The same comments given above for Mathematica also apply here. • Mathcad. Unfortunately, publically available documentation about MathCad is scarce. MathCad can link to Microsoft-compliant dynamic link libraries (DLL) at runtime, and it would seem like it is also possible to do the reverse, i.e. use an external C++ driver program to use MathCad facilities; however the exact mechanism by which this is implemented seems to be a proprietary piece of information, and hence we cannot comment on it. • Reduce. The commercial distribution of Reduce includes the full source code (in standard Lisp), so it would seem feasible to try to compile the Lisp source code to an object file that would then be linked against a C/C++/Fortran driver program; however, this would fall into a “hacking trick” category more than into established use; moreover, this is true for each CAS that comes with source code. In practice, Reduce has no native mechanism for allowing easy linking with C/C++/Fortran programs, although it does have a facility for writing out its functions/procedure to C/Fortran code (with no symbolic computation). • MuPad. MuPad allows linking of external compiled binary modules via an API, however it is not possible to do the reverse, i.e. use MuPad’s facilities within an external C/C++/Fortran driver pro- gram [MuPad(2001), MuPad Documentation(2001)]. MuPad can export its functions/procedures to C/Fortran code (with no symbolic computation). 2.2 Free Software CASes This list comprises some of the most widespread general-purpose “free software” CASes. In all cases, the source code is available. Packages like GAP [GAP(2001)] or Singular [Singular(2001)] do not appear here because they are too specific in nature. SciLab [SciLab(2001)] does not appear because although it offers some runtime dynamic linking from C/C++/Fortran compiled code, its symbolic capabilities are only present when interfacing through Maple, i.e. symbolic computation within SciLab is actually carried out by Maple. Octave [Octave(2001)], like SciLab, does not have built-in symbolic computation facilities, although it does have a library that external program can link against. • Maxima. Maxima [Maxima(2001)] is a version of the MIT-developed MACSYMA system, modifed to run under GNU Common LISP. It is a wholly interactive system, and it has no support for external linking. • JACAL. JACAL [JACAL(2001)] is a symbolic mathematics system for the simplification and manipulation of equations and single and multiple valued algebraic expressions, written in Scheme. It has no support for external linking. • yacas. Yacas (Yet Another CAS, [yacas(2001)]) is a small computer algebra system based on a lisp interpreter. It can run in “web server mode”, so that any client can connect remotely and perform calculations. Data are passed back and forth via the http protocol. In this sense, it would be possible to implement a C/C++/Fortran client code. However, no local binary linking is possible. • GiNaC. The acronym stands for GiNaC is Not a CAS [GiNaC(2001)], and indeed this package keeps its promise. It is a library for doing symbolic computation (see [BFK01]); it is coded in C++ and designed to be used from C++. Symbolic computation performed by GiNaC extends to symbolic manipulation and symbolic differentiation, but it does not include symbolic integration or an algorithm for automatic simplification of symbolic expression (the authors argue that there is no such thing as a “standard for simplifying expressions”, so the way to carry it out is best left 3 to the user).
Recommended publications
  • Utilizing MATHEMATICA Software to Improve Students' Problem Solving
    International Journal of Education and Research Vol. 7 No. 11 November 2019 Utilizing MATHEMATICA Software to Improve Students’ Problem Solving Skills of Derivative and its Applications Hiyam, Bataineh , Jordan University of Science and Technology, Jordan Ali Zoubi, Yarmouk University, Jordan Abdalla Khataybeh, Yarmouk University, Jordan Abstract Traditional methods of teaching calculus (1) at most Jordanian universities are usually used. This paper attempts to introduce an innovative approach for teaching Calculus (1) using Computerized Algebra Systems (CAS). This paper examined utilizing Mathematica as a supporting tool for the teaching learning process of Calculus (1), especially for derivative and its applications. The research created computerized educational materials using Mathematica, which was used as an approach for teaching a (25) students as experimental group and another (25) students were taught traditionally as control group. The understandings of both samples were tested using problem solving test of 6 questions. The results revealed the experimental group outscored the control group significantly on the problem solving test. The use of Mathematica not just improved students’ abilities to interpret graphs and make connection between the graph of a function and its derivative, but also motivate students’ thinking in different ways to come up with innovative solutions for unusual and non routine problems involving the derivative and its applications. This research suggests that CAS tools should be integrated to teaching calculus (1) courses. Keywords: Mathematica, Problem solving, Derivative, Derivative’s applivations. INTRODUCTION The major technological advancements assisted decision makers and educators to pay greater attention on making the learner as the focus of the learning-teaching process. The use of computer algebra systems (CAS) in teaching mathematics has proved to be more effective compared to traditional teaching methods (Irving & Bell, 2004; Dhimar & Petal, 2013; Abdul Majid, huneiti, Al- Nafa & Balachander, 2012).
    [Show full text]
  • Performance Analysis of Effective Symbolic Methods for Solving Band Matrix Slaes
    Performance Analysis of Effective Symbolic Methods for Solving Band Matrix SLAEs Milena Veneva ∗1 and Alexander Ayriyan y1 1Joint Institute for Nuclear Research, Laboratory of Information Technologies, Joliot-Curie 6, 141980 Dubna, Moscow region, Russia Abstract This paper presents an experimental performance study of implementations of three symbolic algorithms for solving band matrix systems of linear algebraic equations with heptadiagonal, pen- tadiagonal, and tridiagonal coefficient matrices. The only assumption on the coefficient matrix in order for the algorithms to be stable is nonsingularity. These algorithms are implemented using the GiNaC library of C++ and the SymPy library of Python, considering five different data storing classes. Performance analysis of the implementations is done using the high-performance computing (HPC) platforms “HybriLIT” and “Avitohol”. The experimental setup and the results from the conducted computations on the individual computer systems are presented and discussed. An analysis of the three algorithms is performed. 1 Introduction Systems of linear algebraic equations (SLAEs) with heptadiagonal (HD), pentadiagonal (PD) and tridiagonal (TD) coefficient matrices may arise after many different scientific and engineering prob- lems, as well as problems of the computational linear algebra where finding the solution of a SLAE is considered to be one of the most important problems. On the other hand, special matrix’s char- acteristics like diagonal dominance, positive definiteness, etc. are not always feasible. The latter two points explain why there is a need of methods for solving of SLAEs which take into account the band structure of the matrices and do not have any other special requirements to them. One possible approach to this problem is the symbolic algorithms.
    [Show full text]
  • The Yacas Book of Algorithms
    The Yacas Book of Algorithms by the Yacas team 1 Yacas version: 1.3.6 generated on November 25, 2014 This book is a detailed description of the algorithms used in the Yacas system for exact symbolic and arbitrary-precision numerical computations. Very few of these algorithms are new, and most are well-known. The goal of this book is to become a compendium of all relevant issues of design and implementation of these algorithms. 1This text is part of the Yacas software package. Copyright 2000{2002. Principal documentation authors: Ayal Zwi Pinkus, Serge Winitzki, Jitse Niesen. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". Contents 1 Symbolic algebra algorithms 3 1.1 Sparse representations . 3 1.2 Implementation of multivariate polynomials . 4 1.3 Integration . 5 1.4 Transforms . 6 1.5 Finding real roots of polynomials . 7 2 Number theory algorithms 10 2.1 Euclidean GCD algorithms . 10 2.2 Prime numbers: the Miller-Rabin test and its improvements . 10 2.3 Factorization of integers . 11 2.4 The Jacobi symbol . 12 2.5 Integer partitions . 12 2.6 Miscellaneous functions . 13 2.7 Gaussian integers . 13 3 A simple factorization algorithm for univariate polynomials 15 3.1 Modular arithmetic . 15 3.2 Factoring using modular arithmetic .
    [Show full text]
  • CAS (Computer Algebra System) Mathematica
    CAS (Computer Algebra System) Mathematica- UML students can download a copy for free as part of the UML site license; see the course website for details From: Wikipedia 2/9/2014 A computer algebra system (CAS) is a software program that allows [one] to compute with mathematical expressions in a way which is similar to the traditional handwritten computations of the mathematicians and other scientists. The main ones are Axiom, Magma, Maple, Mathematica and Sage (the latter includes several computer algebras systems, such as Macsyma and SymPy). Computer algebra systems began to appear in the 1960s, and evolved out of two quite different sources—the requirements of theoretical physicists and research into artificial intelligence. A prime example for the first development was the pioneering work conducted by the later Nobel Prize laureate in physics Martin Veltman, who designed a program for symbolic mathematics, especially High Energy Physics, called Schoonschip (Dutch for "clean ship") in 1963. Using LISP as the programming basis, Carl Engelman created MATHLAB in 1964 at MITRE within an artificial intelligence research environment. Later MATHLAB was made available to users on PDP-6 and PDP-10 Systems running TOPS-10 or TENEX in universities. Today it can still be used on SIMH-Emulations of the PDP-10. MATHLAB ("mathematical laboratory") should not be confused with MATLAB ("matrix laboratory") which is a system for numerical computation built 15 years later at the University of New Mexico, accidentally named rather similarly. The first popular computer algebra systems were muMATH, Reduce, Derive (based on muMATH), and Macsyma; a popular copyleft version of Macsyma called Maxima is actively being maintained.
    [Show full text]
  • SNC: a Cloud Service Platform for Symbolic-Numeric Computation Using Just-In-Time Compilation
    This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TCC.2017.2656088, IEEE Transactions on Cloud Computing IEEE TRANSACTIONS ON CLOUD COMPUTING 1 SNC: A Cloud Service Platform for Symbolic-Numeric Computation using Just-In-Time Compilation Peng Zhang1, Member, IEEE, Yueming Liu1, and Meikang Qiu, Senior Member, IEEE and SQL. Other types of Cloud services include: Software as a Abstract— Cloud services have been widely employed in IT Service (SaaS) in which the software is licensed and hosted in industry and scientific research. By using Cloud services users can Clouds; and Database as a Service (DBaaS) in which managed move computing tasks and data away from local computers to database services are hosted in Clouds. While enjoying these remote datacenters. By accessing Internet-based services over lightweight and mobile devices, users deploy diversified Cloud great services, we must face the challenges raised up by these applications on powerful machines. The key drivers towards this unexploited opportunities within a Cloud environment. paradigm for the scientific computing field include the substantial Complex scientific computing applications are being widely computing capacity, on-demand provisioning and cross-platform interoperability. To fully harness the Cloud services for scientific studied within the emerging Cloud-based services environment computing, however, we need to design an application-specific [4-12]. Traditionally, the focus is given to the parallel scientific platform to help the users efficiently migrate their applications. In HPC (high performance computing) applications [6, 12, 13], this, we propose a Cloud service platform for symbolic-numeric where substantial effort has been given to the integration of computation– SNC.
    [Show full text]
  • Performance Analysis of Effective Symbolic Methods for Solving Band Matrix Slaes
    EPJ Web of Conferences 214, 05004 (2019) https://doi.org/10.1051/epjconf/201921405004 CHEP 2018 Performance Analysis of Effective Symbolic Methods for Solving Band Matrix SLAEs 1, 1, Milena Veneva ∗ and Alexander Ayriyan ∗∗ 1Joint Institute for Nuclear Research, Laboratory of Information Technologies, Joliot-Curie 6, 141980 Dubna, Moscow region, Russia Abstract. This paper presents an experimental performance study of imple- mentations of three symbolic algorithms for solving band matrix systems of linear algebraic equations with heptadiagonal, pentadiagonal, and tridiagonal coefficient matrices. The only assumption on the coefficient matrix in order for the algorithms to be stable is nonsingularity. These algorithms are implemented using the GiNaC library of C++ and the SymPy library of Python, considering five different data storing classes. Performance analysis of the implementations is done using the high-performance computing (HPC) platforms “HybriLIT” and “Avitohol”. The experimental setup and the results from the conducted computations on the individual computer systems are presented and discussed. An analysis of the three algorithms is performed. 1 Introduction Systems of linear algebraic equations (SLAEs) with heptadiagonal (HD), pentadiagonal (PD) and tridiagonal (TD) coefficient matrices may arise after many different scientific and engi- neering problems, as well as problems of the computational linear algebra where finding the solution of a SLAE is considered to be one of the most important problems. On the other hand, special matrix’s characteristics like diagonal dominance, positive definiteness, etc. are not always feasible. The latter two points explain why there is a need of methods for solving of SLAEs which take into account the band structure of the matrices and do not have any other special requirements to them.
    [Show full text]
  • Sage: Unifying Mathematical Software for Scientists, Engineers, and Mathematicians
    Sage: Unifying Mathematical Software for Scientists, Engineers, and Mathematicians 1 Introduction The goal of this proposal is to further the development of Sage, which is comprehensive unified open source software for mathematical and scientific computing that builds on high-quality mainstream methodologies and tools. Sage [12] uses Python, one of the world's most popular general-purpose interpreted programming languages, to create a system that scales to modern interdisciplinary prob- lems. Sage is also Internet friendly, featuring a web-based interface (see http://www.sagenb.org) that can be used from any computer with a web browser (PC's, Macs, iPhones, Android cell phones, etc.), and has sophisticated interfaces to nearly all other mathematics software, includ- ing the commercial programs Mathematica, Maple, MATLAB and Magma. Sage is not tied to any particular commercial mathematics software platform, is open source, and is completely free. With sufficient new work, Sage has the potential to have a transformative impact on the compu- tational sciences, by helping to set a high standard for reproducible computational research and peer reviewed publication of code. Our vision is that Sage will have a broad impact by supporting cutting edge research in a wide range of areas of computational mathematics, ranging from applied numerical computation to the most abstract realms of number theory. Already, Sage combines several hundred thousand lines of new code with over 5 million lines of code from other projects. Thousands of researchers use Sage in their work to find new conjectures and results (see [13] for a list of over 75 publications that use Sage).
    [Show full text]
  • GNU Texmacs User Manual Joris Van Der Hoeven
    GNU TeXmacs User Manual Joris van der Hoeven To cite this version: Joris van der Hoeven. GNU TeXmacs User Manual. 2013. hal-00785535 HAL Id: hal-00785535 https://hal.archives-ouvertes.fr/hal-00785535 Preprint submitted on 6 Feb 2013 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. GNU TEXMACS user manual Joris van der Hoeven & others Table of contents 1. Getting started ...................................... 11 1.1. Conventionsforthismanual . .......... 11 Menuentries ..................................... 11 Keyboardmodifiers ................................. 11 Keyboardshortcuts ................................ 11 Specialkeys ..................................... 11 1.2. Configuring TEXMACS ..................................... 12 1.3. Creating, saving and loading documents . ............ 12 1.4. Printingdocuments .............................. ........ 13 2. Writing simple documents ............................. 15 2.1. Generalities for typing text . ........... 15 2.2. Typingstructuredtext ........................... ......... 15 2.3. Content-basedtags
    [Show full text]
  • Biblioteka PARI/GP W Zastosowaniu Do Systemu Ćwiczeń Laboratoryjnych
    Biblioteka PARI/GP w zastosowaniu do systemu ćwiczeń laboratoryjnych Bartosz Dzirba Gabriel Kujawski opiekun: prof. dr hab. Zbigniew Kotulski 1 Plan prezentacji . Ćwiczenie laboratoryjne . Przykład protokołu (TBD) . Systemy algebry . PARI/GP wstęp problemy… biblioteka 2 Ćwiczenie laboratoryjne wstęp . Tematyka: Kolektywne uzgadnianie klucza . Założenia: Praktyczne zapoznanie studenta z protokołami uzgadniania klucza Wykonanie wybranych protokołów Możliwość łatwej rozbudowy Działanie w laboratorium komputerowym . Potrzebne elementy: Aplikacja Biblioteki protokołów System algebry 3 Ćwiczenie laboratoryjne efekt pracy . Aplikacja sieciowa KUK . Zaimplementowane protokoły dwustronne grupowe (różne topologie) . Scenariusze z atakami MitM kontrola klucza . Realne testy dla kilkunastu uczestników . Przykładowy skrypt ćwiczenia 4 Tree-based Burmester Desmedt topologia KEY A1 A2 A3 A4 A5 A6 5 Tree-based Burmester Desmedt runda 1 KEY A DH0, g1, PID 1 DH0, g1, PID A2 A3 A4 A5 A6 6 Tree-based Burmester Desmedt runda 2 KEY A1 DH1, g2, PID DH1, g3, PID A2 A3 DH0, g3, PID DH0, g3, PID DH0, g2, PID A4 A5 A6 7 Tree-based Burmester Desmedt runda 3 KEY A1 KEY, E (S), SID 12 KEY, E13(S), SID KEY A2 A3 KEY DH1, g5, PID DH1, g4, PID DH1, g6, PID A4 A5 A6 8 Tree-based Burmester Desmedt runda 4 KEY A1 KEY A2 A3 KEY KEY, E35(S), SID KEY, E36(S), SID KEY, E24(S), SID KEY A4 KEY A5 KEY A6 9 Systemy algebry wstęp . Potrzeby: obsługa dużych liczb operacje modulo p znajdowanie generatora grupy znajdowanie elementu odwrotnego modulo p znajdowanie liczb pierwszych możliwość wykorzystania w MS VC++ .NET 2008 . Możliwe podejścia: wykorzystanie gotowego systemu napisanie własnej biblioteki 10 Systemy algebry dostępne możliwości Crypto++ Yacas OpenSSL PARI/GP cryptlib Maxima MathCAD Axiom Maple 11 PARI/GP wstęp .
    [Show full text]
  • Ginac 1.8.1 an Open Framework for Symbolic Computation Within the C++ Programming Language 8 August 2021
    GiNaC 1.8.1 An open framework for symbolic computation within the C++ programming language 8 August 2021 https://www.ginac.de Copyright c 1999-2021 Johannes Gutenberg University Mainz, Germany Permission is granted to make and distribute verbatim copies of this manual provided the copy- right notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the condi- tions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. i Table of Contents GiNaC :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::::: 2 1.1 License :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2 A Tour of GiNaC::::::::::::::::::::::::::::::::::::::::::::::: 3 2.1 How to use it from within C++ :::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.2 What it can do for you::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 3 Installation:::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 3.1 Prerequisites ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 3.2 Configuration :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 3.3 Building GiNaC ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.4 Installing GiNaC::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 4 Basic concepts:::::::::::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Introduction to the Ginac Framework for Symbolic Computation Within the C++ Programming Language
    J. Symbolic Computation (2002) 33, 1–12 doi:10.1006/jsco.2001.0494 Available online at http://www.idealibrary.com on Introduction to the GiNaC Framework for Symbolic Computation within the C++ Programming Language CHRISTIAN BAUER, ALEXANDER FRINK AND RICHARD KRECKEL Institute of Physics, Johannes-Gutenberg-University, Mainz, Germany The traditional split into a low level language and a high level language in the design of computer algebra systems may become obsolete with the advent of more versatile computer languages. We describe GiNaC, a special-purpose system that deliberately denies the need for such a distinction. It is entirely written in C++ and the user can interact with it directly in that language. It was designed to provide efficient handling of multivariate polynomials, algebras and special functions that are needed for loop calculations in theoretical quantum field theory. It also bears some potential to become a more general purpose symbolic package. c 2002 Academic Press 1. Introduction Historically, in the design and implementation of symbolic computation engines, the focus has always been rather on algebraic capabilities than on language design. The need for efficient computation in all fields of science has led to the development of powerful algorithms. Thus, the border line between inexact numerical and exact analytical com- putation has moved, such that more computation may be done exactly before resorting to numerical methods. This development has had great influence on the working practice in such fields as engineering (e.g. robotics), computer science (e.g. networks), physics (e.g. high energy physics) and even mathematics (from group theory to automatic theo- rem proving in geometry).
    [Show full text]
  • Sage & Algebraic Techniques for the Lazy Symmetric Cryptographer
    Sage & Algebraic Techniques for the Lazy Symmetric Cryptographer Martin R. Albrecht @martinralbrecht Crypto Group, DTU Compute, Denmark IceBreak, Reykjavik, Iceland kicebreak Outline Sage Introduction Highlevel Features Fields & Areas Algebraic Techniques Introduction Equations Solvers ...for the Lazy Cryptographer Outline Sage Introduction Highlevel Features Fields & Areas Algebraic Techniques Introduction Equations Solvers ...for the Lazy Cryptographer Blurb Sage open-source mathematical soware system “Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.” Sage is a free open-source mathematics soware system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface. First release óþþ¢ Latest version ¢.É released óþÕì-þ¢-þì > ìþþ releases Shell, webbrowser (GUI), library > Õþ developers ∼ Õþþ components > óþþ papers cite Sage > óÕþþ subscribers [sage-support] > Õþþ,þþþ web visitors/month > ä, ¢þþ downloads/month How to use it Sage can be used via the command line, as a webapp hosted on your local computer and via the Internet, or embedded on any website. Check out: http://aleph.sagemath.org and https://cloud.sagemath.com/ “How do I do ...in Sage?” ...It’s easy: implement it and send us a patch. Sage is a largely volunteer-driven eort, this means that ▸ developers work on whatever suits their needs best; ▸ the quality of code in Sage varies: ▸ is a generic or a specialised, optimised implementation used, ▸ how much attention is paid to details, ▸ is your application an untested “corner case”, ▸ how extensive are the tests, the documentation, or ▸ is the version of a particular package up to date.
    [Show full text]