| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
to compare std:array and native arrays
|
| |
|
|
|
|
| |
test_math_quaternion unit tests
|
| |
|
| |
|
|
|
|
| |
_f64; float_si_types.hpp holds previous SI float unit types
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enforce 'constexpr'; mat4f dropped Stack for constexpr; Dropped math.cpp having clear dependencies
Dropped math.cpp having clear dependencies
Adding ctor w/ initializer_list
Enforcing 'constexpr' where possible also enforces strict aliasing etc,
hence resulting in a more tight definition.
Template types for floating-point or integral types are used,
added the generic inner class typedef variations used in methods for clarity
and proper meta-programming.
alignas() on base type enforces utilization with arrays.
operator[] uses address of first element w/ strict alignment
and proper type (for constexpr).
|
| |
|
|
|
|
| |
matching float type based on size
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
base_math.hpp, cleaning up int_math.hpp and float_math.hpp
float_math.hpp:
- Using std::is_floating_point_v<T> instead of !std::numeric_limits<T>::is_integer
- round_to_int() returns `typename jau::sint_bytes<sizeof(T)>::type`,
i.e. proper integer-sized type
- row_to_string() + mat_to_string() definition in header
and using template floating point type
int_math.hpp:
- Adding equals() w/ integration template type,
complementing the floating point type variant
-
|
|
|
|
| |
used C++ version macro __cplusplus and compiler-id macros
|
|
|
|
| |
operator*(const Vec4f&)
|
|
|
|
| |
toMatrix(Mat4f&)
|
| |
|
|
|
|
| |
Drop passing temporaries as they are very cheap in native land; Add test_math_quaternion (WIP)
|
| |
|
| |
|
|
|
|
| |
via acos(dot(..))
|
|
|
|
| |
[v]format_string(..) for [v]printf(..) formatting a string
|
|
|
|
| |
names
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gfxbox2 and certain Jogl of mine classes to jau::math::**
Chosen CamelCase (PascalCase) for class types, differing from gfxbox2.
Status:
- Compile clean
- Tests
-- test_math_float.cpp: Covers epsilon/zero/equal/compare/IEC559 of float_math.hpp
-- test_math_vec.cpp: Covers Vec2f + Vec3f (TODO)
-- TODO: Mat4f, Quaternion, Frustum, ...
|
| |
|
|
|
|
| |
warning (=error)
|
| |
|
|
|
|
| |
{machine_->}equal{->s}(), add compare(), is_zero(), round_to_int(), adeg_to_rad(), rad_to_adeg()
|
|
|
|
| |
(Refine API doc, MathError: add ro-access to math_error_t)
|
|
|
|
| |
PRAGMA_DISABLE_WARNING_RESTRICT (gcc)
|
| |
|
|
|
|
|
|
|
| |
and whether native int128_t is available
We allow a compile time override via define JAU_FORCE_MP_WORD_32_BITS
as used by test_big_int01.*
|
|
|
|
| |
dec-string decoding (ctor), ctor via memory region, binary_encode() and general free math func wrapper
|
|
|
|
| |
(no leading '0'), return size_t
|
|
|
|
|
|
|
|
|
| |
potentially reduction in addressable space
big_int_t opearations target vast addressable memory space,
hence don't reduce it artificially.
nsize_t is intended for smaller memory indices only.
|
|
|
|
|
|
|
|
|
|
|
|
| |
'boolean isLittleEndian'; Remove 'nsize_t byte_offset' and rely on given pointer
Using a byte offset of type nsize_t would potentially reduce addressable space on a given platform
and is not required for C++ as the pointer arithmetic can be used by the caller.
Dropping the byte offset exposed the weakness of using a bool type for the little- big-endian switch,
as an integer is automatically converted to bool.
Hence we now use an enum class lb_endian only denoting little-, big-endian
and additional native (the actual platform's encoding).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(see below)
- ~big_int_t() -> calls clear() to ensure memory is zero'ed out (secure)
- Adjust 'noexcept', i.e. add where safe & drop where exceptions can be thrown
- Throw jau::MathError exceptions: MathDomainError and MathDivByZeroError,
resolving error handling
- Make certain functions private, keep API clean
- Add modulo operator overload and other certain useful ops (incomplete)
-
|
|
|
|
| |
Catch2's `REQUIRE_THROWS_MATCHES`; Let message() and backtrace() return const string& instead of copy
|
|
|
|
| |
specialisations
|
|
|
|
|
|
|
|
|
|
|
|
| |
crypto-properties, also just allowing to utilize big intgral math
Not all operations are supported yet,
however - a quick bringup test for simple arithmetic and to_*_string() works.
Merged with jaulib functionality (condensed)
and dropped assembly ops in big_int_ops (TODO: Add back).
Uses the Constant Time (CT) functionality from ct_utils.hpp and int_math_ct.hpp.
|
|
|
|
|
|
| |
commit)
Botan and jaulib is released under the Simplified BSD License (see license.txt)
|
|
|
|
|
|
|
|
|
| |
'ct_' as desired for cryptographic operations
For more information about constant time programming see
Wagner, Molnar, et al "The Program Counter Security Model"
This use-case has been retrieved from the Botan cryptography library.
|
| |
|
| |
|
|
|
|
| |
and alight_to
|
|
|
|
| |
bit_count(); Split perf-bench of test_int_math01 -> test_int_math_perf01
|
|
|
|
|
|
|
|
|
| |
JAU_INT_MATH_EXPERIMENTAL, ..
tested performance on x86_64 shows that the correct versions with branching abs, min, max and clamp
are of equal speed, if not even slightly faster.
hence it is probably sane and safe to use the correct versions only ;-)
|
|
|
|
| |
uint128_t
|