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

fe #9

Closed
JeffreySarnoff opened this issue Feb 4, 2021 · 6 comments
Closed

fe #9

JeffreySarnoff opened this issue Feb 4, 2021 · 6 comments

Comments

@JeffreySarnoff
Copy link

Julia v"1.7-Dev" (have not tried it with v"1.6-"

using SetRounding
setrounding(Float64,RoundNearest)

ERROR: could not load symbol "fesetround":
The specified procedure could not be found.
Stacktrace:
 [1] setrounding_raw
   @ ~\.julia\packages\SetRounding\MjtxK\src\SetRounding.jl:45 [inlined]
 [2] setrounding(#unused#::Type{Float64}, r::RoundingMode{:Nearest})
   @ SetRounding ~\.julia\packages\SetRounding\MjtxK\src\SetRounding.jl:47
 [3] top-level scope
   @ REPL[34]:1
@dpsanders
Copy link
Member

Seems to be working for me on 1.6-beta1.
I don't have a 1.7-dev available right now.

@lucaferranti
Copy link
Member

Hi @JeffreySarnoff, this should be fixed with #10 and the newest release (0.2.1) should not have this issue anymore. Can you test again with your machine whether it works? If you still have this issue I will investigate more.

@JeffreySarnoff
Copy link
Author

good news -- I will check it

@JeffreySarnoff
Copy link
Author

JeffreySarnoff commented Mar 19, 2021

Your latest SetRounding works as shown below (no error)
on Windows under Julia v1.6-current and Julia v1.7-current.

julia> using SetRounding
julia> setrounding(Float64,RoundNearest)
0
```

@JeffreySarnoff
Copy link
Author

Here is the demonstration.

using SetRounding
setrounding(Float64, RoundDown)

rounded_down = fma( sqrt(2.0), sqrt(2.0), -2.0 );

setrounding(Float64, RoundUp)

rounded_up   = fma(  sqrt(2.0), sqrt(2.0), -2.0 );

setrounding(Float64, RoundNearest)

@assert rounded_down < rounded_up
@assert signbit(rounded_down) && !signbit(rounded_up)
@assert !iszero(rounded_down) && !iszero(rounded_up)

@JeffreySarnoff
Copy link
Author

happy to close this

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

3 participants