>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:
>> As discussed in the Ryu thread, herewith a draft of a patch to use >> strtof() for float4 input (rather than using strtod() with its >> double-rounding issue). Tom> The errno handling in strtof seems bizarrely overcomplex; why do Tom> you need the separate caller_errno variable? Eh. I was preserving the conventional behaviour of setting errno only on errors and not resetting it to 0, but I suppose you could argue that that is overkill given that the function is called only in one place that's supposed to have already set errno to 0. (And yes, I missed a couple of files and the windows build breaks, working on those) >> This includes a fallback to use strtod() the old way if the platform >> lacks strtof(). A variant file for the new regression tests is needed >> for such platforms; I've taken a stab at setting this up for the one >> platform we know will need it (if there are others, the buildfarm will >> let us know in due course). Tom> I'm not that much on board with introducing test cases that we Tom> know, beyond question, are going to be portability headaches. What Tom> will we actually gain with this, compared to just not having the Tom> test case? The purpose of the test case is to ensure that we're getting the right values on input. If these values fail on any platform that anyone actually cares about, then I think we need to know about it. -- Andrew (irc:RhodiumToad)