Repository navigation
Take an arccotangent at its jump from the side its argument arrives from - #2420
Merged
Rafael-SOWNet merged 1 commit intoNov 13, 2026
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2420 +/- ##
==========================================
- Coverage 86.82% 86.80% -0.02%
==========================================
Files 312 312
Lines 69523 69545 +22
Branches 20305 20312 +7
==========================================
+ Hits 60360 60366 +6
- Misses 4930 4942 +12
- Partials 4233 4237 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The library's arccotangent is arctan(1/t), with range (-pi/2, pi/2]: arccot(-0.001) = -1.5698, arccot(0) = pi/2, arccot(0.001) = 1.5698. It jumps at 0, and a limit read the value there, so arccot(x) at 0 was pi/2 from the left, where it is -pi/2, and pi/2 two-sided, where no limit exists. A quotient over it inherited the wrong sign: arccot(x)/x from the left was -oo, where it is +oo. Where the argument arrives at 0, the arccotangent is now answered from the sign its argument arrives with: pi/2 from above, -pi/2 from below, and nothing two-sided unless both sides arrive with the same sign. Substitution and the factor-taking-out paths no longer read the value at the jump, and SitsOnAJump names the arccotangent's jump alongside sgn's. (arccot(x) - pi/2)/x at 0 two-sided was pinned as -1 in LimitTest, which holds for the (0, pi) convention only; under this library's range its left side is +oo. The case moves to the new test as one-sided rows. The sign of an expression vanishing at the point was read from its first non-vanishing derivative there. Where that derivative holds an arccotangent at its jump, putting the point in reads the jump's value, so x arccot(x), positive on both sides of 0, came out negative from the left; that reading now declines and the factors are read instead. An argument that is 0 everywhere is answered with the constant pi/2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rafael-SOWNet
force-pushed
the
feature/an-arccotangent-at-its-jump-is-taken-from-the-side
branch
from
November 13, 2026 13:23
806e47d to
447c0b4
Compare
Rafael-SOWNet
deleted the
feature/an-arccotangent-at-its-jump-is-taken-from-the-side
branch
November 13, 2026 14:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This library's arccotangent is
arctan(1/t), with range(-pi/2, pi/2]:arccot(-0.001)is-1.5698,arccot(0)ispi/2andarccot(0.001)is1.5698. It jumps at 0. A limit read the value at 0, soarccot(x)at 0 waspi/2from the left, where it is-pi/2, andpi/2two-sided, where there is no limit. Quotients over it inherited the wrong sign.Where the argument arrives at 0, the arccotangent is now answered from the sign it arrives with:
pi/2from above,-pi/2from below. A two-sided limit has a value only when both sides arrive with the same sign. Substitution and the paths that take a factor out no longer read the value at the jump.SitsOnAJumpnow names the arccotangent's jump next tosgn's.arccot(x)pi/2pi/2-pi/2arccot(x)pi/2pi/2pi/2arccot(x)pi/2pi/2NaNarccot(-x^2)pi/2pi/2-pi/2arccot(x) + arctan(x)pi/2pi/2NaNarccot(x) / x-oo-oo+ooarccot(x) / xNaNNaN+oox * arccot(x) / sin(x)^2NaNNaN+oo(arccot(x) - pi/2) / x-1-1NaN(arccot(x) - pi/2) / x-1-1-1(arccot(x) + pi/2) / x-oo-oo-1arccot(x + 1)pi/4pi/4pi/4arccot(x * arccot(x))pi/2pi/2pi/2sgn(x * arccot(x))-11sgn(x * arccot(x))NaN1floor(x * arccot(x))-101 / (x * arccot(x))-oo-ooarccot(x * sin(1/x))pi/2pi/2arccot((x^2 - 1) - (x - 1)(x + 1))pi/2pi/2pi/2Each value on this branch follows from
arccot(t) = pi/2 - t + O(t^3)fort -> 0+and-pi/2 - t + O(t^3)fort -> 0-. The rows that changed are in BREAKING-CHANGES.md, and the new test pins them.The sign of an expression that vanishes at the point was read from its first non-vanishing derivative there. Where that derivative holds
arccot(x), putting 0 in reads the value at the jump, sox * arccot(x), which is positive on both sides of 0, came out negative from the left. On master that gave the wrongsgnandfloorrows above. Once arccot was taken from the side, it also turnedarccot(x * arccot(x))into-pi/2. That reading now declines, and the sign is read from the factors instead. An argument that is 0 everywhere gets the constantpi/2. An independent review of this branch found these cases.LimitTest.TestEquivalenceTableTo0pinned(arccot(x) - pi/2) / xat 0, two-sided, as-1. That holds only for the textbook(0, pi)range. Under this library's range the left side is+oo, so the row moves to the new test as one-sided cases.Checked on this branch:
🤖 Generated with Claude Code