Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200205142338.GB1663@brightrain.aerifal.cx>
Date: Wed, 5 Feb 2020 09:23:38 -0500
From: Rich Felker <dalias@...c.org>
To: "sysysongyue@...il.com" <sysysongyue@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: [BUG] catanf: overflow when the parameter is valid

On Wed, Feb 05, 2020 at 08:32:26AM -0500, Rich Felker wrote:
> On Wed, Feb 05, 2020 at 04:33:43PM +0800, sysysongyue@...il.com wrote:
> >    Hi!
> >    I wrote some testcases for catanf(), and found that catanf(1+0*I) return
> >    99999996802856924650656260769173209088+99999996802856924650656260769173209088*I,
> >    which should return pi/4 in expected. catanl, catanhf, and catanhl have
> >    the same problem. Is this a bug? Any patches existed?
> >    Thank you in advance!
> 
> Looks like the equivalent of commit
> 10e4bd3780050e75b72aac5d85c31816419bb17d for catan was not applied to
> catanf. It should be an easy fix. I'll look at it.
> 
> BTW your mail contained an empty plaintext part and the actual message
> was buried in the html version. I was able to dig it out to reply, but
> try to send text-only or at least with a matching text part since many
> readers probably can't see your email and the archive probably missed
> the body.

Proposed patch attached. It should be identical to the changes in
10e4bd3780050e75b72aac5d85c31816419bb17d except that it's applied to
catanf and catanl.

Rich

View attachment "catanfl.diff" of type "text/plain" (1359 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.