Skip to content

A number's conjugate is made under the setting in force - #2192

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-numbers-conjugate-is-made-under-the-settings-in-force
Oct 28, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-numbers-conjugate-is-made-under-the-settings-in-force

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Complex.Conjugate was cached on the instance, and built by Complex.Create under the downcasting setting of its first caller. A complex division conjugates its divisor. So one division by i with downcasting off left 0 - 1i, in decimals, as the conjugate of Complex.ImaginaryOne, the instance every i is. Every later caller, in every thread, got that value.

On #2190, two tests failed in the full suite and passed alone: conj(i) against -i, and the documented example of MathS.Conjugate. Whichever test ran first decided the outcome.

The conjugate is now built each time it is asked for, under the setting in force, as every other number is.

Input Was (2.6.0) Now
Complex.ImaginaryOne.Conjugate, after (1 / Complex.ImaginaryOne).Evaled with DowncastingEnabled off 0 - 1i -i

The regression test divides by i with downcasting off before it conjugates. Without the change it fails with 0 - 1i.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Oct 28, 2026
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.54%. Comparing base (3f6c444) to head (97596b8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2192      +/-   ##
==========================================
- Coverage   86.54%   86.54%   -0.01%     
==========================================
  Files         297      297              
  Lines       66324    66324              
  Branches    19267    19267              
==========================================
- Hits        57402    57400       -2     
  Misses       4852     4852              
- Partials     4070     4072       +2     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.10% <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 Δ
...Continuous/Entity.Continuous.Complex.Definition.cs 82.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

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

Complex.Conjugate was kept on the instance, made by Complex.Create under whatever downcasting
setting its first caller had. A division by a complex number conjugates the divisor, so a division
by i with the downcasting off left 0 - 1i, in decimals, as the conjugate of Complex.ImaginaryOne,
the one instance every i is. conj(i) was that for every caller after it, in every thread.

Two tests on #2190's branch failed in the full suite and passed alone: conj(i) against -i, and
MathS.Conjugate's documented example. Which ran first decided it.

The conjugate is now made each time it is asked for, under the setting in force, as every other
number is: the division that asks for it reads the modulus the same way (#1615). A regression test
divides by i with the downcasting off first; it fails without the change, with 0 - 1i.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet force-pushed the a-numbers-conjugate-is-made-under-the-settings-in-force branch from 024130f to 97596b8 Compare October 28, 2026 22:23
@Rafael-SOWNet
Rafael-SOWNet merged commit 7bb72a6 into master Oct 28, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 28, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-numbers-conjugate-is-made-under-the-settings-in-force branch October 29, 2026 00:26
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