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

bug: weird issues with big MultiFloats #38

Open
nsajko opened this issue Dec 24, 2022 · 0 comments
Open

bug: weird issues with big MultiFloats #38

nsajko opened this issue Dec 24, 2022 · 0 comments

Comments

@nsajko
Copy link
Contributor

nsajko commented Dec 24, 2022

julia> using MultiFloats

julia> MultiFloats.use_standard_multifloat_arithmetic(20)

julia> g(n::Integer) = rand(MultiFloat{Float64, n})
g (generic function with 1 method)

julia> x = g(20)
-2.2914735159347884e+302

julia> 1 < x
false

julia> x < -1
true

julia> Float64(x)
0.6714350546186427

So it seems there are multiple issues here:

  1. rand produces a number of huge magnitude
  2. rand produces negative number
  3. the conversion to Float64 (producing a positive number) is not consistent with the < operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant