Skip to content

[PPC/Pwr8] Half-precision conversion from BigInt #39330

@vchuravy

Description

@vchuravy

Conversion from BigInt

gmp                                (78) |         failed at 2021-01-19T21:39:56.822
Test Failed at /nobackup/users/vchuravy/dev/julia/test/gmp.jl:501
  Expression: T(big"2" ^ (n + 1) - big"2" ^ (n - precision(T))) === T(Inf)
   Evaluated: -Inf16 === Inf16

On Power9 julia -C pwr9

julia> T=Float16; n = exponent(floatmax(T))
15

julia> T(big"2" ^ (n + 1) - big"2" ^ (n - precision(T)))
Inf16

On Power9 julia -C pwr8

julia> T=Float16; n = exponent(floatmax(T))
15

julia> T(big"2" ^ (n + 1) - big"2" ^ (n - precision(T)))
-Inf16

Gist: https://gist.github.com/vchuravy/a0170b4d42e46d800aae53b3a80bb582

Duplicate of #38896 which I closed since fixing #38883 made it harder to reproduce until #39300

Upstream: https://bugs.llvm.org/show_bug.cgi?id=49092

Metadata

Metadata

Assignees

No one assigned

    Labels

    bignumsBigInt and BigFloatfloat16system:powerpcPowerPCupstreamThe issue is with an upstream dependency, e.g. LLVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions