JuliaPhysics / JuliaPhysics/Unitful.jl

Either angles or cld don't work consistently

Open
#686 6 comments 0 reactions 0 assignees View on GitHub
bug dimensionless
Dominant language
Julia
Stars
675
Forks
124
Avg merge
3h 38m
Merged PRs (30d)
1

Description

Adding zero shouldn't silently influence results in a quite unexpected way:
```
julia> round(Int, cld(0+5u"°", 1u"°"))
57

julia> round(Int, cld(5u"°", 1u"°"))
5
```
Either it should throw an error, or remain consistent. Not sure what part exactly is to blame here: angles handling or the `cld` method. Probably the former?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the two Julia expressions comparing cld with and without the added zero, then inspect the angle-handling and cld paths to identify where their behavior diverges. Done means the zero case either raises an error or produces a result consistent with the equivalent expression, with regression coverage for both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.