Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
juobs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Javier Ugarrio
juobs
Commits
0aa16ede
Commit
0aa16ede
authored
Sep 15, 2025
by
Antonino D'Anna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added abs(::uwreal)
parent
0bca4b09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
src/juobs_linalg.jl
src/juobs_linalg.jl
+23
-1
No files found.
src/juobs_linalg.jl
View file @
0aa16ede
...
...
@@ -859,9 +859,31 @@ function Base.getindex(uw::uwreal, ii::Int64)
idx
=
getindex
(
value
(
uw
),
ii
)
return
uw
# uwreal([getindex(value(uw), kwargs...), err(uw)], " ")
end
"""
Base.abs2(uw::uwreal)
Return the square absolute value.
## Warning
Previously this function returned the absolute value of `uw`, not the square absolute value.
The function was changed to make it consistent with `Base.abs2()` in Julia.
When used, a warning is printed to informe of this change future users, feel free to remove the warning
from your branch!
"""
function
Base
.
abs2
(
uw
::
uwreal
)
return
(
uw
^
2
)
^
0.5
@warn
"This function was updated by Antonino to make it consisted with the Julia version of it.
Check the documentation for info and then feel free to comment out this warning in your branch"
return
uw
^
2
end
"""
Base.abs(uw::uwreal)
Return the absolute value of `uw` by taking the square root of `uw^2`.
"""
Base
.
abs
(
uw
::
uwreal
)
=
sqrt
(
uw
^
2
);
"""
Base.:*(x::uwreal, y::Matrix{uwreal})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment