History log of /freebsd-10-stable/lib/msun/src/math.h
Revision Date Author Comments
# 354596 10-Nov-2019 dim

MFC r354255:

Add __isnan()/__isnanf() aliases for compatibility with glibc and CUDA

Even though clang comes with a number of internal CUDA wrapper headers,
compiling sample CUDA programs will result in errors similar to:

In file included from <built-in>:1:
In file included from /usr/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:204:
/usr/home/arr/cuda/var/cuda-repo-10-0-local-10.0.130-410.48/usr/local/cuda-10.0//include/crt/math_functions.hpp:2910:7: error: no matching function for call to '__isnan'
if (__isnan(a)) {
^~~~~~~
/usr/lib/clang/9.0.0/include/__clang_cuda_device_functions.h:460:16: note: candidate function not viable: call to __device__ function from __host__ function
__DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
^

CUDA expects __isnan() and __isnanf() declarations to be available,
which are glibc specific extensions, equivalent to the regular isnan()
and isnanf().

To provide these, define __isnan() and __isnanf() as aliases of the
already existing static inline functions __inline_isnan() and
__inline_isnanf() from math.h.

Reported by: arrowd
PR: 241550


# 309510 03-Dec-2016 trasz

MFC r301761:

Fix frexpl() declaration to not include the field name.


# 284810 25-Jun-2015 tijl

MFC r271651, r271719, r272138, r272457, r272845, r275476, r275518, r275614,
r275819, r276176, r278154, r278160, r278339, r279127, r279240, r279491,
r279493, r279856, r283032, r284423, r284426, r284427, r284428

Merge changes to libm from the past 9 months. This includes improvements
to the Bessel functions and adds the C99 function lgammal.


# 271779 18-Sep-2014 tijl

MFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588
r268589 r268590 r268593 r268597 r269758 r270845 r270847 r270893 r270932
r270947 r271147

Merge libm work by kargl, bde and das from the past few months.
Besides optimisations and small bug fixes this includes new implementations
for C99 functions expl, coshl, sinhl, tanhl, erfl and erfcl.

Approved by: re (kib)


# 284810 25-Jun-2015 tijl

MFC r271651, r271719, r272138, r272457, r272845, r275476, r275518, r275614,
r275819, r276176, r278154, r278160, r278339, r279127, r279240, r279491,
r279493, r279856, r283032, r284423, r284426, r284427, r284428

Merge changes to libm from the past 9 months. This includes improvements
to the Bessel functions and adds the C99 function lgammal.


# 271779 18-Sep-2014 tijl

MFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588
r268589 r268590 r268593 r268597 r269758 r270845 r270847 r270893 r270932
r270947 r271147

Merge libm work by kargl, bde and das from the past few months.
Besides optimisations and small bug fixes this includes new implementations
for C99 functions expl, coshl, sinhl, tanhl, erfl and erfcl.

Approved by: re (kib)