-
Notifications
You must be signed in to change notification settings - Fork 3.4k
support fesetround(FE_UPWARD)? #19908
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
Comments
I have also encountered this issue recently and I really hope to find an effective solution. |
Can you give an example that fails? Does it fail to build or does it fail to produce the correct results? |
IIUC this is a feature is missing from the underlying WebAssembly instruction set. IIUC we have no way to control the floating point unit in this way. @tlively can you confirm? Update: It looks like there is an active proposal to add rounding mode control: https://github.com/WebAssembly/rounding-mode-control. The discussion that let to this proposal is WebAssembly/design#1456. However from the looks of the proposal it doesn't look like it would provide a way to implement |
Yes, that is correct. While having an ambient rounding mode was considered, most folks want per-operation rounding mode instead because it is more in line with WebAssembly's design principles. The people in that discussion might be interested in hearing more about your use case, @renqh123. For the time being, you will have to change your code to not depend on an ambient rounding mode. |
Please include the following in your bug report:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.43 (a6b8143)
clang version 17.0.0 (https://github.com/llvm/llvm-project 71513a71cdf380efd6a44be6939e2cb979a62407)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: D:\emsdk\upstream\bin
Failing command line in full:
fesetround(FE_UPWARD) not work. My code relies on it, what should I do?
The text was updated successfully, but these errors were encountered: