On 21 November 2013 15:36, Glenn Fowler <[email protected]> wrote: > On Thu, Nov 21, 2013 at 9:05 AM, Cedric Blancher <[email protected]> > wrote: >> >> On 21 November 2013 14:34, Glenn Fowler <[email protected]> wrote: >> > nice find >> > proposed descriptions for getpayload[fl]() setpayload[fl]() >> >> What are the exact prototypes for a float, double and long double >> arguments? >> >> > setpayloadsig[fl]() are in >> > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1664.pdf >> > as a bonus these functions provide a way to create a nan without >> > resorting >> > to strtod("nan",0) >> > i.e., exactly what ast need because it provides strtod() sfscanf() etc. >> > this is what i was anticipating in the ast nan payload patch >> > >> > the only disconnect is that the api deals with floating payloads but >> > describes the payloads themselves as non-negative integers >> > I guess they do this in case the largest payload value is greater than >> > the >> > largest native integer >> >> nans can only be positive integers >= 1 > > > the proposed api probably needs some tightening > its does not mention what is returned for a nan that has no payload > specified
Its undefined and implementation specific? :) > like you note it only allows positive integer payloads which excludes 0 Well, that's the mathematics viewpoint. The C datatypes are always positive or negative. Ced -- Cedric Blancher <[email protected]> Institute Pasteur _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
