Skip to content

olekssy/ican-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub last commit GitHub Version C++ Version C

"Oh say, can you C?"

A storage of Source Code bits and pieces written in C and C++.

Description

Collection of standalone applications of high-performance code in pure C, for solving CPU-intensive computational problems. Files are structured into directories, according to the level of complexity, origin and purpose.

Algorithms

LeetCode challenges, algorithms, data structures, etc.

  • Arrays 101

Math

Applied math: number theory, linear algebra, complex numbers, etc.

  • 64-bit prime integers calculator
  • Fibonacci series
  • approximate pi with the Nilakantha series
  • algorithm for generating Mandelbrot set based on Source

Finance

Quantitative finance models and algorithms

  • mortgage calculator
  • perpetuity PV calculator

Other

Astronomy, cryptography and other exciting stuff

  • algorithm for approximating Lagrangian points L1, L2, L3 for Moon-Earth, Earth, Mars, Jupiter
  • RSA encryption keys generator
  • Caesar cipher for strings encryption

Liners

Simple programs that do not fall into any particular cathegory

Clone, Compile, Run

To make the source code executable, you need to compile it first. Source code follows C11 standard. Make sure your compiler is up to date or at least can handle C99.

Clone repository

git clone https://github.com/lialkaas/ican-c.git

Navigate to the folder in Terminal

cd ~/ican-c

Compile Source code into executable. Likely, in UNIX system cc stands for alias of installed compiler. If not, call the name of your compiler directly (e.g. gcc, clang, etc.)

cc filename.c -o filename

Note: some apps depends on math.h, that requires -lm flag for compiling.

cc filename.c -o filename -lm

Finally, run executable by calling it

./filename

C++

Compile C++ code with clang++ and flags

clang++ -std=c++2a -Wall -O1 filename.cpp -o filename.o

License and Copyright

Copyright (c) 2021 Oleksii Lialka

Licensed under the MIT License.

About

Collection of C source code for HPC math, finance and fun

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published