Skip to content

Set rounding mode for some rounding functions of libm#953

Merged
ptitSeb merged 1 commit intoptitSeb:masterfrom
Hagb:libm-rounding
Apr 15, 2024
Merged

Set rounding mode for some rounding functions of libm#953
ptitSeb merged 1 commit intoptitSeb:masterfrom
Hagb:libm-rounding

Conversation

@Hagb
Copy link
Contributor

@Hagb Hagb commented Apr 14, 2024

This PR rewrites fesetround and fegetround to set and get the rounding mode in x86emu, and applies the rounding mode on rounding functions ({,l,ll}rint{,f,l} and nearbyint{,f,l}). Test24 (feround) can pass with this patch.
The rounding mode can also be applied on other math functions if needed.

This commit rewrites fesetround and fegetround to set and get the
rounding mode in x86emu, and applies the rounding mode on rounding
functions (`{,l,ll}rint{,f,l}` and `nearbyint{,f,l}`).
@Hagb
Copy link
Contributor Author

Hagb commented Apr 14, 2024

Well I have a question. What is meant by "weak" for a symbol map? And in which situation should we use a weak map?

@ptitSeb
Copy link
Owner

ptitSeb commented Apr 15, 2024

Well I have a question. What is meant by "weak" for a symbol map? And in which situation should we use a weak map?

This is a linker thing. That means the symbols can be overriden by one from another library basicaly. There is no simple way to know wich symbol is weak, you need to look at the original libs symbol for that.

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

Successfully merging this pull request may close these issues.

2 participants