Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

setrounding is broken inside a function #16

@dlfivefifty

Description

@dlfivefifty

The following used to work but is now broken:

julia> function divideby3(x)
           a = setrounding(Float64, RoundDown) do
               x/3.0
           end
           b = setrounding(Float64, RoundUp) do
               x/3.0
           end
           a,b
       end
divideby3 (generic function with 1 method)

julia> x = 0.1
0.1

julia> divideby3(x)
(0.03333333333333333, 0.03333333333333333)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions