IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
Loading...
Searching...
No Matches
kMath.hpp File Reference

Kernel math functions definitions. More...

#include <bit>
#include <concepts>
#include <type_traits>
#include <arch/types.hpp>
Include dependency graph for kMath.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  igros::klib::divmod_t< T >
 Combined division & modulo result. More...

Namespaces

namespace  igros
 IgrOS kernel: common types and literals.
namespace  igros::klib
 Freestanding kernel library: printing, math, alignment, flags, strings.

Concepts

concept  igros::klib::kdivisible
 Integers of the same signedness (mixed ones convert signed to unsigned silently).

Functions

constexpr auto igros::klib::kudivmod64 (const igros_quad_t dividend, const igros_quad_t divisor) noexcept -> divmod_t< igros_quad_t >
 64-bit unsigned division for 32-bit CPU (no 64-bit "/" and "%" without libgcc __udivdi3/__umoddi3)
template<std::integral T, std::integral D>
requires kdivisible<T, D>
constexpr auto igros::klib::kdivmod (const T dividend, const D divisor) noexcept -> divmod_t< T >
 Divide integer by integer of the same signedness.

Detailed Description

Kernel math functions definitions.

Date
03 Nov 2026
Author
Igor Baklykov

Definition in file kMath.hpp.