Skip to content

Commit

Permalink
Make LinearAlgebra a dependency and add MatMulMode
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Oct 22, 2024
1 parent d9735c9 commit d9dcd1e
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 106 deletions.
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.22.17"

[deps]
CRlibm_jll = "4e9b3aee-d8a1-5a3d-ad8b-7d824db253f0"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
RoundingEmulator = "5eaf0fd0-dfba-4ccb-bf02-d820a40db705"

Expand All @@ -13,14 +14,12 @@ DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[extensions]
IntervalArithmeticDiffRulesExt = "DiffRules"
IntervalArithmeticForwardDiffExt = "ForwardDiff"
IntervalArithmeticRecipesBaseExt = "RecipesBase"
IntervalArithmeticIntervalSetsExt = "IntervalSets"
IntervalArithmeticLinearAlgebraExt = "LinearAlgebra"

[compat]
CRlibm_jll = "1"
Expand Down
28 changes: 23 additions & 5 deletions src/IntervalArithmetic.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
"""
IntervalArithmetic
Library for validated numerics using interval arithmetic.
Default settings:
- power mode is set to `:fast`
- matrix multiplication mode is set to `:slow`
Learn more: https://github.com/JuliaIntervals/IntervalArithmetic.jl
"""
module IntervalArithmetic

import CRlibm_jll
Expand All @@ -8,16 +19,23 @@ using MacroTools: MacroTools, prewalk, postwalk, @capture
#

include("intervals/intervals.jl")
# convenient alias
const RealOrComplexI{T} = Union{Interval{T},Complex{Interval{T}}}
const ComplexI{T} = Complex{Interval{T}}
const RealIntervalType{T} = Union{BareInterval{T},Interval{T}}
export RealOrComplexI, ComplexI, RealIntervalType

#

include("display.jl")
export setdisplay

#

include("symbols.jl")

# convenient alias
const RealOrComplexI{T} = Union{Interval{T},Complex{Interval{T}}}
const ComplexI{T} = Complex{Interval{T}}
const RealIntervalType{T} = Union{BareInterval{T},Interval{T}}
export RealOrComplexI, ComplexI, RealIntervalType
#

include("matmul.jl")

end
2 changes: 1 addition & 1 deletion src/intervals/intervals.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Construction and composability with numbers
include("construction.jl")
export BareInterval, bareinterval, decoration, ill, trv, def, dac, com,
Interval, interval, isguaranteed, @interval, @I_str
Interval, interval, isguaranteed, @interval, @I_str
include("parsing.jl")
include("real_interface.jl")
include("exact_literals.jl")
Expand Down
Loading

0 comments on commit d9dcd1e

Please sign in to comment.