Skip to content
프로젝트

소개

Source code of calculators hosted at https://www.alpertron.com.ar

과학 및 공학

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

I have written 14 calculators in my free time. Their source code is open source, so you can use the code for your own projects.

I started writing these calculators as Java applets in 1997. In 2015 I ported them to C language. The code is compiled to WebAssembly or asm.js using Emscripten so it can run inside Web browsers.

The complete source code size is about 70 000 lines of code.

Running the programs as standalone executables

The main purpose of compiling the code is to run coverage tests. The file coverage.out.old holds the results of running all calculators with different inputs. After making a change in the code, I run this test again and the output should not be changed. When adding a new feature to the calculators, I add the new case to the coverage, and change the results file if the results are correct. These tests use the files Makefile and coverage.

You can use Makefile to generate standalone executables. Just run make clean and then make. If you want to build only one of the calculators, you can run make calculator, where calculator is one of the following words:

After building the calculators, you can run them. For example:

./polfact 0 "x^2+x+3" 2

The output is in HTML and it starts with a digit (this is used by the JavaScript code). All calculators can process expressions.

If you run the calculator without command line parameters, the program will show the expected arguments.

Static code analysis

Software quality assurance is realized with the coverage test explained in the previous section and static analysis. The latter is done by tools that scan the source code. The programs do not run in this case.

Results of static analysis and code coverage of this software using Codacy.

Badges from SonarCloud:

Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities

If you like these calculators and you want to support free software, you can donate via Paypal by clicking in the button below:

paypal

관련 프로젝트 살펴보기

불러오는 중…