1. 9
  1. 2

    There’s a very simple reason: There are no standard C++ math functions. There are standard C math functions that the C++ standard wraps. As such, their interfaces are defined in terms of C error-handling mechanisms.

    Note that the complaints about code generation in this article are confined to GCC. ICC (and, I think, XLC) provide vectorised implementations of the <math.h> routines so that the autovectoriser can emit them if you can otherwise vectorise a loop containing them. An implementation of this library was in the process of being contributed to LLVM but I don’t know what the status is (or whether LLVM will take advantage of it in the vectoriser).