2026-06-18 13:44:36 +02:00
2026-06-18 13:36:06 +02:00
2026-06-18 13:36:06 +02:00
2026-06-18 13:44:36 +02:00

PANIC

Portable Algorithms and Numerics In C++

PANIC is a from-scratch C++ foundation for numerical and scientific computing. The goal is not to compete with mature, highly optimized libraries. The goal is to build readable, portable, dependency-light implementations of the core pieces needed for experiments, learning, embedded systems, and scientific code.

PANIC is intentionally written from first principles. Math functions, vector operations, matrix operations, tensor structures, neural-network components, and future simulation tools are implemented directly instead of being wrapped around large external dependencies.

Goals

  • Write clear numerical code that can be understood and modified.
  • Keep the core portable and dependency-light.
  • Provide optional parallel implementations where useful.
  • Build toward embedded and microcontroller-friendly use.
  • Support scientific computing experiments from a common foundation.

Planned modules

  • panic::math - scalar math, vector operations, matrix operations, tensor operations
  • panic::tensor - tensor, matrix, and vector data structures
  • panic::random - random number generation and sampling utilities
  • panic::neural_network - neural-network layers, activations, losses, and training utilities
  • panic::interpolation - interpolation of systems

Philosophy

PANIC exists because sometimes the point is not to use the most convenient tool. Sometimes the point is to understand the tool by rebuilding it.

This project favors clarity, portability, and experimentation over peak performance.

Status

Early development. Interfaces, file structure, and module names may change frequently.

License and contributions

PANIC is licensed under the GNU General Public License v3.0.

This project is built with limited resources, questionable confidence, and a desire to understand numerical computing from the ground up. Feedback is greatly appreciated, whether it is about bugs, design choices, performance, portability, documentation, or places where the implementation could be made clearer.

If you improve something, collaboration is very welcome. Contributions are especially appreciated when they preserve the main goal of the project: readable, portable, dependency-light numerical code that can be understood and changed.

PANIC is not meant to be perfect. It is meant to be open, inspectable, and improvable.

Use of LLM assistance

Large language models may be used in a limited capacity during the development of PANIC, mainly for brainstorming, documentation drafts, code review ideas, naming, structure discussions, and exploring implementation approaches.

LLM-generated suggestions are not treated as authoritative. Code, algorithms, numerical methods, and design decisions should be reviewed, tested, and understood before being included in the project.

The goal of PANIC is to build a readable and inspectable numerical codebase. Any use of LLM assistance should support that goal, not replace understanding, verification, or careful implementation.

S
Description
Portable Algorithms and Numerics In C++
Readme GPL-3.0
406 KiB
Languages
C++ 98.8%
CMake 0.8%
Shell 0.4%