Re: draft patch for strtof()

2019-01-17 Thread Andrew Gierth
This one builds ok on appveyor with at least three different VS versions. Though I've not tried the exact combination of commands used by cfbot... yet. -- Andrew (irc:RhodiumToad) diff --git a/configure b/configure index 06fc3c6835..e3176e24e9 100755 --- a/configure +++ b/configure @@ -15802,6

Re: draft patch for strtof()

2019-01-17 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: Andrew> Because it turns out that Windows (at least the version running Andrew> on Appveyor) completely fucks this up; strtof() is apparently Andrew> returning infinity or zero _without setting errno_ for values Andrew> out of range for float: input of

Re: draft patch for strtof()

2019-01-16 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> (FWIW, I'm running the patch on gaur's host, just to confirm it >> does what you expect. Should have an answer in an hour or so ...) Tom> It does --- it compiles cleanly, and the float4 output matches Tom> float4-misrounded-input.out. Well I'm glad

Re: draft patch for strtof()

2019-01-16 Thread Tom Lane
I wrote: > (FWIW, I'm running the patch on gaur's host, just to confirm it > does what you expect. Should have an answer in an hour or so ...) It does --- it compiles cleanly, and the float4 output matches float4-misrounded-input.out. (This is the v1 patch not v2.)

Re: draft patch for strtof()

2019-01-16 Thread Andrew Gierth
> "Tom" == Tom Lane writes: > Andrew Gierth writes: >> See if Windows likes this one any better. Tom> Doubtful, because AFAICT it's the same patch. Sigh. copied wrong file. Let's try that again. -- Andrew (irc:RhodiumToad) diff --git a/configure b/configure index

Re: draft patch for strtof()

2019-01-16 Thread Tom Lane
Andrew Gierth writes: > See if Windows likes this one any better. Doubtful, because AFAICT it's the same patch. regards, tom lane

Re: draft patch for strtof()

2019-01-16 Thread Andrew Gierth
See if Windows likes this one any better. -- Andrew (irc:RhodiumToad) diff --git a/configure b/configure index 06fc3c6835..e3176e24e9 100755 --- a/configure +++ b/configure @@ -15802,6 +15802,19 @@ esac fi +ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof" +if test

Re: draft patch for strtof()

2019-01-16 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > 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, Oh, I

Re: draft patch for strtof()

2019-01-16 Thread Andrew Gierth
> "Tom" == Tom Lane 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

Re: draft patch for strtof()

2019-01-16 Thread Tom Lane
Andrew Gierth 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). The errno handling in strtof seems bizarrely overcomplex; why do you need the separate caller_errno variable? >