Math package for Android “Micro-Math”: what's new?
So six months have passed since I transferred my math package to Android , Micro-Math, to the status of free open source applications and published the code on github . Thanks to this step, Micro-Mathematics received a powerful impetus for development, and I myself - a valuable and very positive experience in communicating with the community. In this short article I want to introduce a new version of the application, which is now being prepared for release, and also to share all the positive that was received as part of the work on the release. This note is for those who are interested in both general development issues for Android and open source software, and applied issues related to mathematical calculations.
The main results for six months
Reviews on Google Play, stars and all that is certainly interesting, but as I understand it, it’s not very informative compared to the activity of enthusiasts in the github repository. Thanks to people like @KOLANICH , @ Symbian9 , @tianxiaogu , @plottar , they managed not only to fix annoying errors, but also to give in to gas and implement many new functions, for example:
- The app is now published on F-Droid in addition to Google Play
- Implemented automatic assembly and publication of the application on github after each commit using Travis CI, which I wrote about here
- Implemented support for color profiles and added several fun themes.
@afmachado, on his own initiative, translated the application into Portuguese. Such a translation is not easy, because in addition to text resources, the application contains very voluminous documentation, without the translation of which such an activity does not make much sense. But @afmachado accomplished the feat and translated it, too. The presence of a large amount of supporting documentation from the point of view of multilingual support is a problem - because of it, translations of the application into Ukrainian, French and Spanish “hung”. But, on the other hand, I cannot imagine a sufficiently complicated mathematical package without such documentation.
Integration with SMath Studio
@ Symbian9 added a simple, at first glance, query: the ability to work with SMath Studio documents . When I was just starting to develop Micro-Mathematics, I hadn’t planned anything like that. But now I see that power is not in disparate applications, but in some ecosystem, albeit small. And such user requests literally forced me to rethink integration issues with other systems and contact the author of SMath Studio, Andrei Ivashov .
A long, detailed and very critical joint discussion of our products prompted us to think about coordinating the development of our systems. Andrew, for his part, has implemented a μMath plug-in that allows you to open Micro-Math files in SMath Studio.
I added the ability to open SMath Studio files in Micro-Mathematics, since both formats are implemented on the basis of XML. And it is this integration that is the key feature of the new version, which is now being prepared for release.
So, starting from version 2.17, in “Micro-Mathematics”, on a mobile device, you can open the SMath Studio document, continue working on the road, save the result (in the “Micro-Mathematics” format), and if you have a large PC,
hide in the attic open this document already on it in SMath Studio, and work, work.
Naturally, due to the historically established independent development of these two products, there are serious limitations. Micro-Mathematics does not yet support loops, matrices, string functions, as well as all the functionality implemented by third-party developers in SMath Studio plugins. There are differences in the set of supported units of measure, in the presentation of function graphs, in indexing arrays (in SMath Studio they start from one, and in Micro-Mathematics from scratch). Of all the standard examples that come with SMath Studio, only one opens without errors, since all the others contain either loops or matrices. This document gives a good idea of compatibility - it contains all the designs that are supported by both systems.
In general, there are many directions in which it is possible (and necessary) to carry out unification. In version 2.17, some steps in this direction have already been taken:
- new built-in functions added to “Micro-Math”
- some built-in functions are removed or renamed as in SMath Studio
- As there are more and more built-in functions, it’s possible to customize the mathematical palette to hide unused functions from it
- Implemented support for units. Supported units are collected in this document . The excellent JScience library really helped . Although it is outdated, it fully covers all the functionality associated with the units.
Now, the mass of mathematical functionality that is lacking in Micro-Mathematics is clearly visible. There is room to grow. To prevent this growth from creating new problems, in version 2.17 I combed the computing core a bit. Adding new built-in functions is now much easier. All built-in functions are collected here.and grouped in thematic classes, for example, trigonometric, exponential, logical, etc. Each built-in function, in addition to properties (type, icon, description, number of parameters) also contains a method for calculating values and optional methods for checking arguments and calculating the first derivative. If there are people who want to expand the list of built-in functions (add, for example, statistics, spectral analysis, special functions) - I beg you. Now it has become even easier, fortunately, much of this has already been implemented in The Apache Commons Mathematics Library . Roughly speaking, it remains only to correctly connect the implementations available there and write tests. Although there may be nuances.
Given all of the above, as well as discussions of “Micro-Mathematics” with different people, I see three main areas of further development:
- Improved interface: implementing drag and drop formulas, resizing objects not only through the settings window, but also through scaling, customizable color, size and styles of text. Even more boring themes. A request is still open to add high-contrast black and white themes. Due to the large number of colors used, it is difficult. You may need to change, for example, the error display. In any case, I invite those who feel in themselves a designer vein to help with both advice and deed.
- Further integration with SMath Studio. Unification of calculations, automatic testing, user interface (as far as possible, taking into account the fundamental differences between the mobile platform and PC). If anyone is the proud owner of the SMath Studio calculations collection, you are welcome to try them in Micro-Mathematics (taking into account the limitations that I wrote about above).
- Extension of the mathematical functional: vectors and matrices and everything related to it (multiplication, addition, subtraction, transposition, inversion). Statistics functions, spectral analysis, special functions. Cycles. Perhaps elements of analytical calculations based on third-party libraries of the same Symja , for example, simplify, highlight the general, taking the derivative.
An interesting case has occurred. There is one very troubled enthusiast, he took the core of drawing formulas from “Micro-Mathematics”, attached to it a library of analytical calculations Symja, and it turned out to be a very funny calculator . It is difficult to say how such a calculator will be popular, but the direct use of code by other developers cannot but rejoice.
This, perhaps, will complete my story. Thanks.