On Mon, Mar 4, 2019 at 2:39 PM Wilco Dijkstra <wilco.dijks...@arm.com> wrote: > > Hi Richard, > > >On Thu, Feb 21, 2019 at 6:09 PM Wilco Dijkstra <wilco.dijks...@arm.com> > >wrote: > >> > >> Hi Richard, > >> > >> >>Fix an issue with sinl (atanl (sqrtl (LDBL_MAX)) returning 0.0 > >> >>instead of 1.0 by using x < sqrtl (LDBL_MAX) in match.pd. > >> > > >> > Wasn't that a intermediate problem with the mpfr exponent range limiting? > >> > Please check whether that's still needed. > >> > >> I tested it with trunk about an hour ago, and it included Jacub's patch. > >> Are there other fixes outstanding which haven't been committed yet? > > > > Not that I know of. Did we root-cause the bogus folding to 0.0? Because > > I don't really understand why using < can "fix" this... > > Yes, the underlying issue is that build_sinatan_real returns the first value > that does > overflow when squared. Maybe that wasn't intended, but using less-than on the > first > value that does overflow works. With my patch (now committed) the test passes > in > all rounding modes. > > Like I mentioned, in the future this check could use a much smaller value > based on > the size of the mantissa - that's safer since you're not close to infinity. > > > Latest trunk also still gives an assertion failure in mpc with the > > gcc.dg/torture/builtin-math-5.c > > which started at the same time as the other mpc/mpfr releated issues: > > > > build/src/mpc/src/pow.c:631: MPC assertion failed: z_imag || mpfr_number_p > > (MPC_RE(u)) > > build/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-5.c:95:3: internal > > compiler error: Aborted > > 0x6725ab crash_signal > > build/src/gcc/gcc/toplev.c:326 > > > > Ick. Is there a PR about this? > > This happens when using an old mpc (0.8.2). It's valid according to the > configure check, > however it works with the 1.0.3 version that download-prerequisites uses. > Maybe we should > increase the minimum mpc version in configure?
I guess it might be enough to adjust the recommended version and notice caveats when using older ones in install.texi (IIRC we already do that to some extent). Richard. > Wilco