Skip to content

Documentation about "Conversion from rational to floating-point" #56726

Open
@ArnoStrouwen

Description

The docs state:

Conversion from rational to floating-point respects the following identity for any integral values of a and b, with the exception of the two cases b == 0 and a == 0 && b < 0:

julia> a = 1; b = 2;

julia> isequal(float(a//b), a/b)
true

https://docs.julialang.org/en/v1/manual/complex-and-rational-numbers/

I do not understand the first case (b == 0), because:

julia> isequal(float(1//0),1/0)
true
julia> isequal(float(-1//0),-1/0)
true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentationmathsMathematical functionsrationalsThe Rational type and values thereof

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions