core.stdc.math functions that never set errno should be pure. These include: * cos, sin, tan, atan; * tanh, asinh; * frexp, modf; * cbrt; * erf; * ceil, floor, trunc, round, rint, nearbyint; * copysign, nan; * fdim, fmax, fmin; * fabs, abs, fma; * fpclassify, isfinite, isinf, isnan, isnormal, signbit; * isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered.
cos, sin, tan should be removed from list of pure functions. On some platforms they set errno, on others not. See discussion at https://github.com/dlang/druntime/pull/2045
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/4c1b9a3a3dfb2ac69bf98fdd5c633737ad7998c5 Fix Issue 18247 - core.stdc.math functions that never set errno should be pure https://github.com/dlang/druntime/commit/760fd82820dc686436fccb5617a4b8f9aa406ee7 Merge pull request #2045 from n8sh/pure-stdc-math Fix Issue 18247 - core.stdc.math functions that never set errno should be pure merged-on-behalf-of: Iain Buclaw <ibuclaw@gdcproject.org>