Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve support for custom Number types #50

Merged
merged 11 commits into from
Jul 16, 2024
Merged

Conversation

aplavin
Copy link
Contributor

@aplavin aplavin commented Jul 10, 2024

Some common number types subtype <: Number and not <: Real, while being real-like underneath sometimes. Here, we fix/generalize "realness" checks to make them correct for such number types.

Tests use Unitful as an example of a <: Number type. For example, functions like x^2 and x^3 are now invertible for unitful x.

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.24%. Comparing base (1d4cbb7) to head (7086087).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
- Coverage   99.27%   99.24%   -0.03%     
==========================================
  Files           6        6              
  Lines         137      132       -5     
==========================================
- Hits          136      131       -5     
  Misses          1        1              

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

src/functions.jl Show resolved Hide resolved
src/functions.jl Outdated Show resolved Hide resolved
src/functions.jl Outdated Show resolved Hide resolved
src/functions.jl Outdated Show resolved Hide resolved
src/functions.jl Show resolved Hide resolved
src/functions.jl Show resolved Hide resolved
src/functions.jl Outdated Show resolved Hide resolved
@aplavin
Copy link
Contributor Author

aplavin commented Jul 11, 2024

done that + bumped version in Project.toml

@oschulz
Copy link
Collaborator

oschulz commented Jul 11, 2024

Looks good to me - any objections, @devmotion ?

@oschulz oschulz merged commit 5f6b4da into JuliaMath:master Jul 16, 2024
8 of 9 checks passed
@oschulz
Copy link
Collaborator

oschulz commented Jul 16, 2024

@aplavin aplavin deleted the numtypes branch September 13, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants