8 Commits

Author SHA1 Message Date
Roland Reichwein
0a56d40bdd
Fix undefined behaviour of etl::absolute() for etl::numeric_limits<T>::min (#1333)
absolute_unsigned() already handled that case correctly. Now adding this
check to absolute() also. It can be caught at compile time now, if in a
constexpr context. Also separating integral and non-integral versions
via enable_if.

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-03-12 16:38:10 +00:00
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
John Wellbelove
bc78ebb72e Fixed spelling of gdc to gcd 2025-09-18 09:07:34 +01:00
John Wellbelove
0e6e961039 #1126 to_arithmetic does not compile on C++98 2025-07-19 15:54:06 +01:00
John Wellbelove
096099d659 Enabled constexpr test for C++14 and above only 2024-05-14 00:06:01 +01:00
John Wellbelove
896bc51f87 Added gcd & lcm constexpr tests 2024-05-13 23:48:55 +01:00
John Wellbelove
b42af2a829 Added GCD and LCM algorithms 2024-05-13 13:45:27 +01:00
John Wellbelove
61da85fa77 Removed float-equal warnings
Added functions is_nan, is_infinity, is_zero & is_exactly_equal
Fixed array-bounds warnings for GCC and -O2 optimisation
2023-11-21 15:13:24 +00:00