You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Using strtod() creates a double-rounding problem; the input decimalvalue is first rounded to the nearest double; rounding that to thenearest float may then give an incorrect result.An example is that 7.038531e-26 when input via strtod and then roundedto float4 gives 0xAE43FEp-107 instead of the correct 0xAE43FDp-107.Values output by earlier PG versions with extra_float_digits=3 shouldall be read in with the same values as previously. However, valuessupplied by other software using shortest representations could bemis-read.On platforms that lack a strtof() entirely, we fall back to the oldincorrect rounding behavior. (As strtof() is required by C99, suchplatforms are considered of primarily historical interest.) On VS2013,some workarounds are used to get correct error handling.The regression tests now test for the correct input values, soplatforms that lack strtof() will need resultmap entries. An entry forHP-UX 10 is included (more may be needed).Reviewed-By: Tom LaneDiscussion:https://postgr.es/m/871s5emitx.fsf@news-spur.riddles.org.ukDiscussion:https://postgr.es/m/87d0owlqpv.fsf@news-spur.riddles.org.uk