Skip to content
Closed
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
b3937f0
CCMath v0.3.0 (#123)
Rinzii Jun 13, 2026
43d339f
Move development to main and retire the dev branch (#142)
Rinzii Jun 13, 2026
39bf5da
Remove dependabot configuration (#145)
Rinzii Jun 13, 2026
87947b3
Run clang-format check on every pull request
Rinzii Jun 13, 2026
46c5b64
fix failing fuzzing on CI (#148)
Rinzii Jun 13, 2026
2c13185
Fix signed overflow in abs_diff
Rinzii Jun 14, 2026
a7554d5
Enforce clang-tidy in CI and resolve internal findings
Rinzii Jun 14, 2026
109a114
Fix overflow in ceil_div and support negative operands
Rinzii Jun 14, 2026
21abafa
Remove ext::mix in favor of ccm::lerp
Rinzii Jun 14, 2026
2c78a70
Remove ext::chgsign in favor of ccm::copysign
Rinzii Jun 14, 2026
54bbcc3
Reject zero alignment in ccm::pp::assume_aligned
Rinzii Jun 14, 2026
dcbf3e4
Restrict abs builtin dispatch to floating-point types
Rinzii Jun 15, 2026
c94a5f2
Fix narrowing in integer abs overloads
Rinzii Jun 15, 2026
219721b
Cast simd pack width to size_t for array storage
Rinzii Jun 15, 2026
37f1464
Enforce trailing newline at end of file
Rinzii Jun 15, 2026
30ba837
Extend clang-format to all sources and reformat
Rinzii Jun 15, 2026
f1cd16c
Add path and review-state PR labeling workflows
Rinzii Jun 15, 2026
18fa29f
Add issue and PR templates and main-branch guard
Rinzii Jun 15, 2026
769860a
Document contribution workflow and performance goals
Rinzii Jun 15, 2026
dc914cf
Consolidate cast checks into clang-tidy and skip vendored code
Rinzii Jun 16, 2026
9c82406
Add feature approval, label sync, and issue-form triage automation
Rinzii Jun 16, 2026
0305e32
Rewrite apt install fallback to satisfy shellcheck SC2015
Rinzii Jun 16, 2026
25de37b
Cleanup code
Rinzii Jun 16, 2026
f111d0e
General work
Rinzii Jun 16, 2026
b6220fc
Comment cleanup
Rinzii Jun 16, 2026
38db28d
ci: apply clang-format
github-actions[bot] Jun 16, 2026
e72a2bc
ci: apply clang-format
github-actions[bot] Jun 16, 2026
9382438
Improve general code quality
Rinzii Jun 16, 2026
c66e944
Improve general code quality
Rinzii Jun 16, 2026
61f12ee
Fix MSVC ccm::pp build by hoisting libm decls to global scope
Rinzii Jun 16, 2026
15e975a
Align pow_impl exact-sign block to satisfy clang-format
Rinzii Jun 16, 2026
288fab5
Fix MSVC ccm::pp simd test by ordering cmath before pp.hpp
Rinzii Jun 17, 2026
cc61fb1
Fix MSVC ccm::pp link by routing float s_fabs through double fabs
Rinzii Jun 17, 2026
30f6e63
Another MSVC fix
Rinzii Jun 17, 2026
1928475
Make Meson and Premake builds independent of CMake
Rinzii Jun 17, 2026
d5f3959
Widen version encoding to three digits per component
Rinzii Jun 17, 2026
3593fa3
Fix constexpr math on domain and special inputs
Rinzii Jun 17, 2026
3240107
Use generic kernels for MSVC runtime math fallback
Rinzii Jun 17, 2026
d6cdc22
Use the system libm for MSVC runtime math
Rinzii Jun 17, 2026
904194c
Remove the see tag pointing to cppref
Rinzii Jun 18, 2026
d0ba169
Support hosts without cfenv and add a fenv-disable flag
Rinzii Jun 18, 2026
ad11be2
Improvements to documentation
Rinzii Jun 18, 2026
8d97ef4
Improvements to documentation
Rinzii Jun 18, 2026
1d63bae
Begin support for freestanding and also add in improvements to measur…
Rinzii Jun 18, 2026
66a1eb0
Remove typo in _MSC_VER
Rinzii Jun 19, 2026
678ac7c
Make ext helpers guarded by default and switch angle helpers to radians
Rinzii Jun 19, 2026
5045886
Expand difficulty labels to six tiers and add a meta-issue label
Rinzii Jun 19, 2026
731c2a7
Add the issue label definitions and sync workflow
Rinzii Jun 19, 2026
1d38ed1
Expand difficulty labels to six tiers and add a meta-issue label (#205)
Rinzii Jun 19, 2026
00ec6c2
Add the issue label definitions and sync workflow (#206)
Rinzii Jun 19, 2026
3a3020f
Merge main into release/0.3.x
Rinzii Jun 19, 2026
18b60cc
Fix constexpr remainder and make fmod exact for large quotients
Rinzii Jun 19, 2026
3270351
Set a read-only default token permission for the lint workflow
Rinzii Jun 19, 2026
36002ba
Normalize spacing in the freestanding meson option
Rinzii Jun 19, 2026
e5a117f
Fix long double narrowing in the remquo dispatch
Rinzii Jun 19, 2026
707f775
Rework fmod
Rinzii Jun 20, 2026
d615122
Add fmod conformance tests and a binary64 kernel guard
Rinzii Jun 21, 2026
5f6c1f6
Avoid function-style casts in the fmod test
Rinzii Jun 21, 2026
119f4c5
Fix constexpr remainder and make fmod exact for large quotients (#208)
Rinzii Jun 22, 2026
a3de072
Apply updated formatting
Rinzii Jun 28, 2026
27ab357
Format big_int_test.cpp
Rinzii Jun 29, 2026
b6c99c3
Assert spec-correct fdim(inf, inf) instead of host libm
Rinzii Jun 29, 2026
8bc261c
Document the NaN and FE_INVALID idiom in remquo
Rinzii Jul 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 27 additions & 20 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@
AccessModifierOffset: -4
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveMacros: Consecutive
AlignConsecutiveShortCaseStatements:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: true
AlignEscapedNewlines: Right
AlignTrailingComments:
Kind: Always
AllowShortBlocksOnASingleLine: Always
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AlwaysBreakTemplateDeclarations: MultiLine
BasedOnStyle: LLVM
BinPackArguments: false
BinPackParameters: false
Expand All @@ -31,40 +36,43 @@ BraceWrapping:
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: true
SplitEmptyFunction: true
SplitEmptyNamespace: true
SplitEmptyRecord: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyNamespace: false
SplitEmptyRecord: false
BracedInitializerIndentWidth: 4
BreakAfterAttributes: Never
BreakBeforeBraces: Allman
BreakBeforeBraces: Custom
ColumnLimit: 160
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: false
DerivePointerAlignment: true
DerivePointerAlignment: false
FixNamespaceComments: true
IncludeBlocks: Regroup
IncludeCategories:
# Headers in "" with .h extension.
- Regex: '"([A-Za-z0-9\/-_])+\.h"'
- Regex: '"[-A-Za-z0-9_/]+\.h"'
Priority: 10
# Headers in "" with .hpp extension.
- Regex: '"([A-Za-z0-9\/-_])+\.hpp"'
- Regex: '"[-A-Za-z0-9_/]+\.hpp"'
Priority: 20
# Headers in <> with .h extension.
- Regex: '<([A-Za-z0-9\/-_])+\.h>'
- Regex: '<[-A-Za-z0-9_/]+\.h>'
Priority: 30
# Headers in <> with .hpp extension.
- Regex: '<([A-Za-z0-9\/-_])+\.hpp>'
- Regex: '<[-A-Za-z0-9_/]+\.hpp>'
Priority: 40
# Headers in <> without an extension.
- Regex: '<([A-Za-z0-9\/-_])+>'
- Regex: '<[-A-Za-z0-9_/]+>'
Priority: 50
IndentPPDirectives: BeforeHash
IndentWidth: 4
InsertNewlineAtEOF: true
Language: Cpp
NamespaceIndentation: All
PackConstructorInitializers: CurrentLine
PointerAlignment: Middle
ReferenceAlignment: Middle
SortIncludes: CaseInsensitive
SpaceAfterTemplateKeyword: true
SpaceBeforeParens: ControlStatements
Expand All @@ -74,11 +82,10 @@ Standard: c++17
TabWidth: 4
UseTab: Always
WhitespaceSensitiveMacros:
# Specific macros that suffer from formatting issues with white spaces
# Specific macros that suffer from formatting issues with white spaces.
- CCM_DISABLE_CLANG_WARNING
- CCM_ENABLE_CLANG_WARNING_AS_ERROR
- CCM_DISABLE_GCC_WARNING
- CCM_ENABLE_GCC_WARNING_AS_ERROR
- CCM_ENABLE_IGNORE_GCC_WARNING
- CCM_DISABLE_IGNORE_GCC_WARNING
...
- CCM_DISABLE_IGNORE_GCC_WARNING
11 changes: 10 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,28 @@ bugprone-*,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-use-constraints,
-modernize-avoid-c-arrays,
-modernize-use-nodiscard,
-modernize-use-auto,

performance-*,
-performance-avoid-endl,

readability-*,
-readability-identifier-length,
-readability-magic-numbers,
-readability-function-cognitive-complexity,
-readability-uppercase-literal-suffix,

cppcoreguidelines-*,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-special-member-func,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,

cert-dcl21-cpp,
cert-dcl58-cpp,
Expand All @@ -41,6 +49,7 @@ llvm-namespace-comment,
hicpp-exception-baseclass,
hicpp-multiway-paths-covered,
hicpp-no-assembler,
-hicpp-uppercase-literal-suffix,
misc-const-correctness,
misc-definitions-in-headers,
misc-header-include-cycle,
Expand Down
207 changes: 168 additions & 39 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,205 @@
name: Bug Report
description: Create a report to help us improve
description: Report incorrect results, build failures, or other defects in ccmath
title: '[BUG]: '
labels: ['bug']
labels: ['T: Bugfix', 'S: Untriaged']
body:
- type: checkboxes
attributes:
label: Due Diligence
description: Before you submit a bug report, please check the following
label: Due diligence
options:
- label: I have searched for similar issues before starting this bug report
- label: I searched existing issues and did not find a duplicate
required: true
- label: I reproduced this against the latest main (or a tagged release)
required: true

- type: input
id: function
attributes:
label: Affected function(s)
description: 'The ccm:: function(s) involved.'
placeholder: ccm::pow, ccm::sin
validations:
required: true

- type: dropdown
id: family
attributes:
label: Function family
options:
- basic
- compare
- expo
- fmanip
- hyper
- misc
- nearest
- power
- special
- trig
- not sure
validations:
required: true

- type: dropdown
id: code-path
attributes:
label: Code path
description: Where the wrong result comes from. Select all that apply.
multiple: true
options:
- constexpr (compile-time)
- runtime (scalar kernel)
- SIMD (vectorized)
- deterministic mode (CCMATH_ENABLE_DETERMINISTIC)
- not sure
validations:
required: true

- type: dropdown
id: scalar-type
attributes:
label: Scalar type
options:
- float
- double
- long double
- integral
- multiple / not applicable
validations:
required: true

- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
placeholder: e.g. ccm::sqrt(4) is incorrectly outputting 1.9999999... instead of 2.0 on clang-12 x86-64
description: What is wrong, in one or two sentences.
validations:
required: true

- type: textarea
id: input
attributes:
label: Input value(s)
description: Exact inputs. Prefer hex float so no precision is lost.
placeholder: 'x = 0x1.0000000000001p+0 (1.0000000000000002)'
validations:
required: true

- type: input
id: expected
attributes:
label: Expected result (and source of truth)
placeholder: '0x1.5bf0a8b145769p+1, per MPFR / the C++ standard'
validations:
required: true

- type: input
id: actual
attributes:
label: Actual result
placeholder: '0x1.5bf0a8b14576ap+1 (1 ULP high)'
validations:
required: true

- type: input
id: error
attributes:
label: Error magnitude (ULP) if known
validations:
required: false

- type: dropdown
id: rounding-mode
attributes:
label: Rounding mode
options:
- FE_TONEAREST (default)
- FE_DOWNWARD
- FE_UPWARD
- FE_TOWARDZERO
- unchanged / not sure
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to reproduce
description: Steps used to reproduce the bug.
label: Minimal reproduction
description: A self-contained snippet. A Godbolt link is ideal. Print exact bits, not via raw std::cout.
render: cpp
placeholder: |
1. Set the compiler to clang-12 on x86-64
2. Write the following code:
```cpp
#include <iostream> // std::cout and std::endl
#include <cstdio>
#include <ccmath/ccmath.hpp>
int main() {
std::cout << ccm::sqrt(4) << std::endl;
printf("%a\n", ccm::sqrt(4.0)); // expected 0x1p+1
}
```
3. Execute the program
4. See the output
validations:
required: true
- type: textarea
id: expected-behavior

- type: markdown
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: The output should be outputting 2.0 as this is the square root of 4, but it is outputting 1.9999999... instead.
value: '## Environment'

- type: input
id: ccmath-version
attributes:
label: ccmath version or commit
placeholder: v0.2.0 or commit 65cb8ba9
validations:
required: true
- type: markdown
attributes:
value: '# System information'

- type: input
id: compiler-version-and-type
id: compiler
attributes:
label: Compiler version and type
description: The name of your compile and it's version
placeholder: GCC 13.2.1 (20230801)
label: Compiler and version
placeholder: Clang 18.1.0
validations:
required: true

- type: dropdown
id: cpp-standard
attributes:
label: C++ standard
options:
- 'C++17'
- 'C++20'
- 'C++23'
- 'C++26'
validations:
required: true

- type: dropdown
id: arch
attributes:
label: Architecture
options:
- x86-64
- x86
- AArch64 / ARM
- RISC-V
- other
validations:
required: true

- type: input
id: opt-level
attributes:
label: Optimization level and relevant flags
placeholder: '-O2 -ffp-contract=fast'
validations:
required: false

- type: input
id: operating-system
id: os
attributes:
label: Operating System
description:
If applicable (i.e, an issue with how the code compiles for your OS) the OS version this bug is happening in
placeholder: Ubuntu Linux 22.04
label: Operating system
placeholder: Ubuntu 24.04
validations:
required: false

- type: textarea
id: screenshots
id: context
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
placeholder: As you can see here, the output is not showing up
value: Not applicable
label: Additional context
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Question or design discussion
url: https://discord.gg/p3mVxAbdmc
about: Usage questions, design discussion, and general help belong on Discord.
- name: Security vulnerability
url: https://github.com/Rinzii/ccmath/security/policy
about: Report security issues privately as described in SECURITY.md. Do not open a public issue.
Loading
Loading