hypotl(LDBL_MAX, 0.0L) = inf
airplanemath
airplanemath@aol.com
Sun Apr 25 15:39:17 GMT 2021
On Mon, Apr 19 2021, Corinna Vinschen via Cygwin wrote:
> On Apr 17 10:02, airplanemath via Cygwin wrote:
>> Given that hypot(DBL_MAX, 0.0) = DBL_MAX and hypotf(FLT_MAX, 0.0f) =
>> FLT_MAX, I suspect this is a problem in hypotl. Am I missing
>> something?
>
> No. This is a bug in newlib's hypotl. Newlib mainly targest embedded
> systems and as such wasn't very much interested in long double
> arithmetic for a long time.
>
> Having said that, there's an easier way out for Cygwin: We just use
> the hypotl function from Mingw-w64 for Cygwin as well.
>
> I pushed this patch and uploaded new developer snapshots to
> https://cygwin/snapshots/
>
> Please give it a try.
Thank you. This fixes that problem and a related one for me.
>
>
> Thanks, Corinna
More information about the Cygwin
mailing list