Skip to content

Improve the documentation for pow #732

@schillic

Description

@schillic
julia> using IntervalArithmetic

julia> x = interval(-4, -2)
[-4.0, -2.0]_com

julia> pow(x, 2)
∅_trv

The problem seems to be in these lines:

domain = _unsafe_bareinterval(T, zero(T), typemax(T))
x = intersect_interval(x, domain)
isempty_interval(x) && return emptyinterval(BareInterval{R})

It is unclear to me why domain should be nonnegative. Clearly you can take a power of a negative number.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions