Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very big BigFloat behaves differently depending on OS #48678

Closed
Kolaru opened this issue Feb 14, 2023 · 3 comments
Closed

Very big BigFloat behaves differently depending on OS #48678

Kolaru opened this issue Feb 14, 2023 · 3 comments
Labels
bignums BigInt and BigFloat system:windows Affects only Windows upstream The issue is with an upstream dependency, e.g. LLVM

Comments

@Kolaru
Copy link

Kolaru commented Feb 14, 2023

On Windows:

julia> big"-5.87565e+1388255822130839282"
-Inf

julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 4 × Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 4 virtual cores

On Ubuntu (WSL):

julia> big"-5.87565e+1388255822130839282"
-5.875649999999999999999999999999999999999999999999999999999999999999999999999983e+1388255822130839282

julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 4 virtual cores

It was first noticed on CI on JuliaIntervals/IntervalArithmetic.jl#555.

@vtjnash vtjnash added the upstream The issue is with an upstream dependency, e.g. LLVM label Feb 14, 2023
@vtjnash
Copy link
Member

vtjnash commented Feb 14, 2023

In C on the Win64 platform, the long datatype on Windows cannot represent as large of a value as it can on LP64 systems

@giordano giordano added system:windows Affects only Windows bignums BigInt and BigFloat labels Feb 15, 2023
@giordano
Copy link
Contributor

I can't find other tickets about this, but I was pretty sure this was reported by other users before because it's easy to trip on this. But as Jameson said, this is a limitation of MPFR on Windows, there's little we can do about it.

@giordano
Copy link
Contributor

Oh, here it is: #40661. Closing as duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bignums BigInt and BigFloat system:windows Affects only Windows upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

No branches or pull requests

3 participants