Skip to content

Improve accuracy of norm(::MathType{<:FixedPoint}) - #214

Merged
kimikage merged 1 commit into
JuliaGraphics:masterfrom
kimikage:norm_accuracy
Oct 21, 2026
Merged

kimikage merged 1 commit into
JuliaGraphics:masterfrom
kimikage:norm_accuracy

Conversation

@kimikage

Copy link
Copy Markdown
Collaborator

Fixes #183
This does not change the return type. (cf. Issue #213)

This also specializes the cases for AbstractGray and where p==2.

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.05%. Comparing base (09119c4) to head (7b4227e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #214      +/-   ##
==========================================
+ Coverage   98.00%   98.05%   +0.05%     
==========================================
  Files           3        3              
  Lines         250      257       +7     
==========================================
+ Hits          245      252       +7     
  Misses          5        5              

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

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

@kimikage

Copy link
Copy Markdown
Collaborator Author
julia> @btime norm(rgb) setup=(rgb=rand(RGB{Float32}));
  27.309 ns (0 allocations: 0 bytes) # before
  9.000 ns (0 allocations: 0 bytes)  # after

julia> versioninfo()
Julia Version 1.13.2
Commit 45b6d15e34 (2026-10-14 20:33 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  WORD_SIZE: 64
  LLVM: libLLVM-20.1.8 (ORCJIT, tigerlake)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 8 virtual cores)

@kimikage
kimikage force-pushed the norm_accuracy branch 2 times, most recently from f105e6f to e7966a8 Compare October 21, 2026 15:37
@kimikage
kimikage merged commit 91ea608 into JuliaGraphics:master Oct 21, 2026
11 checks passed
@kimikage
kimikage deleted the norm_accuracy branch October 21, 2026 16:14
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.

spurious underflow in norm

1 participant