Wednesday, May 29, 2024

The Sage Who Made Scientific Computing Transparent And Affordable

- Advertisement -

Do you remember Julia, a dynamic programming language for technical computing. Now, let us have a look at SageMath (previously known as SAGE, an abbreviation for System for Algebra and Geometry Experimentation), a cross-platform, python based computer algebraic system for scientific computing. The latest stable release of this software, version 6.9.

Fig. 1: A communication engineer can make use of Sagemath for signal processing
Fig. 1: A communication engineer can make use of Sagemath for signal processing

Borne out of the frustration of a teacher
William Stein, who was then assistant professor at Harvard University, was unhappy with commercial mathematical software. The frustration was two-fold; one, the huge licence fee charged by commercial giants like MATLAB, Mathematica, Maple, Magma and others, and second, unavailability of the code.

As the code is hidden from the user, mathematicians were not able to cross-check and understand how the computer arrived at such a solution.

- Advertisement -

When Stein started designing SageMath, he quickly realised that there are a lot of mathematical software for various applications available as open source. Rather than reinventing the wheel, he only needed to integrate all of these into a common interface. For this, he chose Python environment. However, the software has since evolved to get thousands of unique lines of code providing new functionalities, apart from just providing a common interface.

Box 1

Some noteworthy features
SageMath software provides a unique environment for the computation and visualisation of scientific data. Two-dimensional and three-dimensional graphs of symbolic functions and numerical data can be made. Some interesting features are:

User interface. There are three ways in which the user can interact with the software. When the software is running on the server or local system, the user can access it with the help of a Web browser. A text based command line interface using Python has been developed. The user can also access the software as a Python library.

Support for parallel-processing. SageMath is a cross-platform software that allows parallel processing. Users can make use of multiple processors and multi-core processors for parallel processing. They can also use distributed systems to get their computational jobs done.

Use of Python. Instead of writing a new code for every mathematical application, the software reuses other open source software to get the work done. The new code is written only if none of the other software could meet the requirement.

Fig 2
Fig. 2: Using SageMath, data can be represented in two and three dimensions

Box 2Additional functionalities are written as a new code and everything is glued together by a common interface.

Instead of inventing a new language for interfacing, the software makes use of Python as the gluing language to interact with all components. Python, being a well-known language in the scientific research community, is used to make the interface less complicated.

Necessity, the mother of all invention
The initial release of the software was made in early 2005. Whenever the scientific community felt the need for software to suit a particular mathematical application, the developers strictly followed the concept of release-early, release-often concept. This is the reason why there were more than 300 releases of the software in the last decade.

Reviews about the software in various forums suggest that developers’ hard work has really paid off. “SageMath is easy to use and very powerful. And I like the server-client principle behind it. Go on with the great work, SageMath motivated me to take the step from C to Python in just a few hours,” comments Patrick Hammer, a user of the software.

“Sage is a work of art! It has a very clean syntax, is extremely well-documented and the coding is very clean. An average Python programmer like myself could create new functions in Sage. I have always wanted something like MATLAB but the price tag is a bit well… pricey for a 12-year-old. SAGE fits the bill perfectly,” says Dhaivat Pandya, who was then just 12 years old.

Is Sage giving up the game to its open source rivals?
The answer is ‘Definitely not!’ It is true that there is a negative increase in the user community for the software. Some users have migrated to other open source alternatives. Still, SageMath software is immensely used among mathematicians and the scientific research community.

In one of the recent blogs, Prof. Smith identifies the reasons for the fall in the number of users. First, installation is not that easy. Second, limited resources in terms of books and supplementing resources make its usage difficult. Third, the software is missing key functionality needed in support of undergraduate teaching.

Developers are constantly trying to sort these issues out and provide adequate solutions. In order to overcome the issues related to installation, a full Web application called SageMathCloud was developed.

Open access books have been written for undergraduate courses based on this software. The software has been made more suitable for undergraduate STEM (short for science, tech, engineering and maths) courses.

Shift in focus
Learning from the experience of diminishing popularity, developers of this software are now shifting their focus to the following three categories of users: engineers employed in various industries, researchers in mathematics who are now not using this software and students in STEM courses.

Among these, the most promising group is the students who take undergraduate STEM courses. For a student who studies electronics engineering, purchase of a computation tool like MATLAB is not that feasible. Here comes the relevance of an open source alternative like SageMath.

Moreover, open source tools allow access to the source code, which is invaluable when it comes to the learning experience.

Last, but not the least, in classrooms, you need not worry about state-of-art performance that the industry demands. Summing it all up, the shift in focus to cater to the academia more will be the game changer in favour of SageMath in the near future.


The author is assistant professor, department of ECE at SETCEM, Thrissur

SHARE YOUR THOUGHTS & COMMENTS

Unique DIY Projects

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators