id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9013,Create enum to make sign result more readable.,Joaquim Duran Comas ,John Maddock,"The function 'sign' return 1, 0 or -1 depending on the signal of the z, but comparing the result with -1, 0 or 1 constants could make the source code bad readable specially for people that doesn't know what the 'sign' function return. {{{ if (math::sign(value) == -1){ .... } }}} I propose to create an enumerate type to test the result of the function with a constant, to create a more readable code. The compatibility with the previous implementation of the function is not broken. Suggested implementation of code: {{{ enum Sign { SIGN_NEGATIVE = -1, SIGN_ZERO = 0, SIGN_POSITIVE = 1 } template inline Sign sign BOOST_NO_MACRO_EXPAND(const T& z) { return (z == 0) ? SIGN_ZERO : (boost::math::signbit)(z) ? SIGN_NEGATIVE : SIGN_POSITIVE; } }}} The previous example comparison could be write as: {{{ if (math::sign(value) == math::SIGN_NEGATIVE){ .... } }}} ",Feature Requests,new,To Be Determined,math,Boost 1.54.0,Cosmetic,,"math, sign, enum type",