Get the latest tech news

No portable way to detect string-to-float conversion errors in standard C


his is kinda a sequel-ish to my previous post, in which i go over the math_errhandling macro, and how math error handling is done in glibc and musl (as well as how it's specified in the standard). to summarize: math_errhandling is a macro which indicates which error-handling mechanisms are supported by math.h functions: errno ( MATH_ERRNO) and/or floating-point exceptions ( MATH_ERREXCEPT).

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of string

string

Photo of float

float

Photo of standard c

standard c

Related news:

News photo

Float and integer arithmetic follow two different paradigms

News photo

David Fincher to End Deal With Netflix, Adding to String of Departures

News photo

OpenAI data center chief Chris Malone is out, the latest in a string of executive exits