Skip to content

Implement fma and fmac for APyFloat - #669

Draft
Theodor-Lindberg wants to merge 2 commits into
mainfrom
fma
Draft

Implement fma and fmac for APyFloat#669
Theodor-Lindberg wants to merge 2 commits into
mainfrom
fma

Conversation

@Theodor-Lindberg

Copy link
Copy Markdown
Collaborator

PR Summary

Implement fused multiply-add (fma) and fused multiply-accumulate (fmac) in APyFloat. Closes #98.

The plan in this PR is to implement the slow path first, as it is the easiest, and then add the fast path.
To help ensure correctness, the script for Berkeley TestFloat will be extended to include test case generation for fma.

PR Checklist

  • "closes #0000" is in the body of the PR description to link the related issue
  • new and changed code is tested
  • relevant changes added to CHANGELOG.md
  • new functionality is documented

@Theodor-Lindberg Theodor-Lindberg added enhancement New feature or request APyFloat labels Mar 25, 2025
@Theodor-Lindberg Theodor-Lindberg added this to the v0.4 milestone Mar 25, 2025
@codecov

codecov Bot commented Mar 25, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.15152% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.40%. Comparing base (ff904b0) to head (7d15e7d).
⚠️ Report is 315 commits behind head on main.

Files with missing lines Patch % Lines
src/apyfloat.cc 3.92% 47 Missing and 2 partials ⚠️
src/apyfloat_wrapper.cc 44.44% 5 Missing ⚠️
src/apyfloatarray.cc 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #669      +/-   ##
==========================================
- Coverage   85.65%   85.40%   -0.26%     
==========================================
  Files         100      100              
  Lines       17087    17149      +62     
  Branches     3081     3110      +29     
==========================================
+ Hits        14636    14646      +10     
- Misses        426      478      +52     
  Partials     2025     2025              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Theodor-Lindberg
Theodor-Lindberg force-pushed the fma branch 2 times, most recently from d68a6ab to 604a2b5 Compare March 26, 2025 13:52
@oscargus oscargus modified the milestones: v0.4, v0.5 Sep 11, 2025
@miklhh miklhh mentioned this pull request Mar 9, 2026
11 tasks
@oscargus oscargus modified the milestones: v0.5, v0.6 Mar 9, 2026
@oscargus oscargus modified the milestones: v0.6, v0.7 Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APyFloat enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add fused multiply-add (FMA)

2 participants