Discussion:
Python (was Re: I did not inhale)
(too old to reply)
James Kuyper
2024-08-18 20:08:36 UTC
Permalink
[...]
Without looking it up, what does the C standard library "fegetmode"
function do?
Nothing, it's specific to GNU libc.
? It's in every draft version of the C standard that I have since
n2346.pdf, dated 2019-03-13. In the latest draft I have, n3096.pdf, it
is described as follows:

7.6.5.1
"The fegetmode function
Synopsis
#include <fenv.h>
int fegetmode(femode_t *modep);

Description
The fegetmode function attempts to store all the dynamic floating-point
control modes in the object pointed to by modep.

Returns
The fegetmode function returns zero if the modes were successfully
stored. Otherwise, it returns a nonzero value."
Keith Thompson
2024-08-18 21:14:46 UTC
Permalink
Post by James Kuyper
[...]
Without looking it up, what does the C standard library "fegetmode"
function do?
Nothing, it's specific to GNU libc.
? It's in every draft version of the C standard that I have since
n2346.pdf, dated 2019-03-13.
[...]

You're right. It's not in C11 or C17, but it is in the C23 drafts.

My mistake.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+***@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Keith Thompson
2024-08-18 22:02:21 UTC
Permalink
Post by Keith Thompson
Post by James Kuyper
[...]
Without looking it up, what does the C standard library "fegetmode"
function do?
Nothing, it's specific to GNU libc.
? It's in every draft version of the C standard that I have since
n2346.pdf, dated 2019-03-13.
[...]
You're right. It's not in C11 or C17, but it is in the C23 drafts.
My mistake.
The earliest reference I can find to fegetmode is in n2314,
"Floating-point extensions for C", 2018-11-12. The earliest draft
standard that refers to it is n2346, 2019-03-13.

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2314.pdf
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2346.pdf
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+***@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Loading...