Skip to content

Compile mod over Complex in the LINQ compiler - #2210

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
mod-compiles-over-complex-in-linq
Oct 29, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
mod-compiles-over-complex-in-linq

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #2195: mod over Complex, which the LINQ compiler refused (The binary operator Modulo is not defined for the types 'System.Numerics.Complex').

Over Complex it now takes the remainder Compile (FastExpression) already takes, RealOnly.Mod: the floored remainder where both sides are real, and NaN where either is not, as the interpreter leaves (2 + i) mod 3 unevaluated. The two compilers agree, and over the reals nothing changes.

"x mod 3".ToEntity().Compile<Complex, Complex>("x") 2.6.0 now
at 7, -7, 2 + i UncompilableNodeException 1, 2, NaN

Tests: TheLinqCompilerTakesTheStackMachinesRemainderOverTheComplexNumbers. Full suite 17899/0, interactive trio, AOT smoke 66/0, all frameworks build (on the master before #2209; the chain runs on this branch).

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

The modulo operator is not defined for System.Numerics.Complex, so
Compile<Complex, ...> refused x mod 3. It now takes the remainder
Compile already takes, RealOnly.Mod: the floored one where both sides
are real, and NaN where either is not, as the interpreter leaves it
unevaluated. Over the reals nothing changes.

Part of #2195

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.58%. Comparing base (4db6c18) to head (189ef6d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2210   +/-   ##
=======================================
  Coverage   86.57%   86.58%           
=======================================
  Files         302      302           
  Lines       67045    67053    +8     
  Branches    19469    19470    +1     
=======================================
+ Hits        58045    58056   +11     
+ Misses       4897     4895    -2     
+ Partials     4103     4102    -1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.13% <100.00%> (+<0.01%) ⬆️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ctions/Compilation/IntoLinq/CompilationProtocol.cs 90.47% <100.00%> (+0.23%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit 15ce64f into master Oct 29, 2026
36 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 29, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the mod-compiles-over-complex-in-linq branch October 29, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant