dimitris kalamaras

mathematics, social network analysis, free software…

Category: Mathematics (Page 2 of 2)

Turbo Editor

This is a simple text editor, called TED (Turbo EDitor). It opens text files or creates new ones in the same directory as the executable. It has a limit in the rows of the text file, but you can easily extend it by changing the appropriate variable. With small text files, ie less than 200 lines, it should work with them easily. The user interface is completely DOS oriented. Dont expect mouse support or any Hi-Tech GUI. It is just a small DOS program which was originally created to demonstrate string manipulation algorithms in Turbo Pascal. Thus, it provides you with actions like SEARCH string, DELETE string, INSERT string etc.
This program is the same algorithmically with CED, the text editor in C++ section.

Prime numbers’ generator

This is a Prime Numbers’ Generator from Integers up to 2,000,000,000, written in Turbo Pascal.
This program generates the prime numbers up to a given arithmetic limit, using 4 (four) different known methods. They are all based in modulo algebra. The methods are:

  1. This uses the mathematical definition of a prime number to generate them. A prime is only divided by 1 and himself. Disadvantage: The method is very slow.
  2. In this method, each number N is modulo divided only with the half of the numbers below it (N/2). Thus, the search is becoming faster than the first method.
  3. In the third method, a number, let N, is modulo divided only with the numbers up to sqrt{N}. As a result of that, the generation process is 10 times faster than the previous methods.
  4. The fourth method is the best of all. It is based on the 3rd method, only it bypass the sqrt{x} praxis, by modulo dividing each number N with the first, the second and the third prime number and then, if there is a residue, it modulo divides N with j, where j is an integer from j*j cdots N with step 2. The above trick has the eye-blink effect: the method generates primes (within a reasonable range) before you blink your eyes….:-)

Read More

Sombrero!

The first blog post is usually some general introduction about the writer. I don’t like those posts so I start by testing my MathML installation.

To test it, let me try to write the “sombrero” function:

z={sin(sqrt(x^2 + y^2))} / sqrt (x^2 + y^2)

which is automagically constructed by Ron Fredericks‘ WP Math Publisher plugin using this line of code:


[ pmath size=12]
z=sin (sqrt (x^2 + y^2)) / (sqrt (x^2 + y^2))[ /pmath]

Page 2 of 2

Creative Commons License
Licensed under a Creative Commons Attribution-ShareAlike 4.0 International License - Powered by Linux