Skip to content

Compiled real and imaginary parts of a value that is not there are not there - #2312

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
compiled-parts-of-a-value-that-is-not-there-are-not-there
Nov 1, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
compiled-parts-of-a-value-that-is-not-there-are-not-there

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Both compilers take Re and Im of a System.Numerics.Complex as one part alone, so a NaN in the other part was dropped. x / x at 0 compiles to NaN + NaN i. Its imaginary part is NaN with an imaginary part of 0, and the imaginary part of that is 0. So the compiled forms had a value where the interpreter, and the compiled x / x, have none. A NaN in either part is now the whole number's, as Im of a NaN double already was.

at x = 0 evaluated FastExpression and LINQ, master now
Im(Im(x / x)) NaN <0; 0> <NaN; 0>
Im(Re(x / x)) NaN <0; 0> <NaN; 0>
Im(Im(sqrt(x) / sqrt(x))) NaN <0; 0> <NaN; 0>
Re(x) at 1 + NaN i <1; 0> <NaN; 0>
  • Found among work/compilesweep's findings as Im(Im(min(x, x))) off the real line. No issue was filed.
  • Re and Im first compiled in The conjugate, the argument, the parts and the Iverson bracket compile #2196, after 2.6.0, which refused them, so no released answer changes and there's no BREAKING-CHANGES.md entry.
  • Five of the six new cases fail on master. Re(Im(x / x)) was already NaN and stays as a control. The suite, the trio, F#, AOT and the eight harnesses pass.

🤖 Generated with Claude Code

…t there

Both compilers take Re and Im of a System.Numerics.Complex as the one part alone, so a NaN
in the other part was dropped. x / x at 0 compiles to NaN + NaN i, its imaginary part to
NaN with an imaginary part of 0, and the imaginary part of that to 0: Im(Im(x / x)) and
Im(Re(x / x)) compiled to 0 at 0, where the interpreter, and the compiled x / x, have no
value. A NaN in either part is now the whole number's, as Im of a NaN double already was.

Found among work/compilesweep's findings, as Im(Im(min(x, x))) off the real line. No
issue was filed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 1, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Nov 1, 2026
@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.76%. Comparing base (a1fb7ae) to head (73f4844).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2312      +/-   ##
==========================================
- Coverage   86.77%   86.76%   -0.01%     
==========================================
  Files         311      311              
  Lines       68199    68199              
  Branches    19821    19823       +2     
==========================================
- Hits        59178    59174       -4     
- Misses       4880     4883       +3     
- Partials     4141     4142       +1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.31% <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 Δ
Sources/AngouriMath/Numerics/ComplexParts.cs 100.00% <100.00%> (ø)

... and 5 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 806f5f6 into master Nov 1, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Nov 1, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the compiled-parts-of-a-value-that-is-not-there-are-not-there branch November 1, 2026 15:47
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