JuliaPhysics / JuliaPhysics/Unitful.jl

Float32 degrees and Int radians is promoted to Float64

Open
#767 0 comments 0 reactions 0 assignees View on GitHub
floating-point
Dominant language
Julia
Stars
675
Forks
124
Avg merge
3h 38m
Merged PRs (30d)
1

Description

`promote(1f0°, 2rad)` returns a `Float64` pair, while many other combinations of `Float32` and `Int` arguments are promoted to a (imho correct) `Float32` pair.

```julia
julia> promote(1f0°, 2rad)
(0.01745329238474369, 2.0)

julia> promote(1f0, 2)
(1.0f0, 2.0f0)

julia> promote(1f0°, 2)
(0.017453292f0, 2.0f0)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the three `promote` examples from the issue, then trace the promotion methods handling a `Float32` degree value with an `Int` radian value. Done means the degree-and-radian combination promotes to a `Float32` pair consistently with the other shown combinations, with tests covering the behavior.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.