Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-24 Thread Steve Kargl
On Wed, Jan 24, 2024 at 11:13:05AM +0200, Janne Blomqvist wrote: > On Wed, Jan 24, 2024 at 10:28 AM FX Coudert wrote: > > > Now, if > > > the OS adds cospi() to libm and it's in libm's symbol map, then the > > > cospi() used by gfortran depends on the search order of the loaded > > > libraries. >

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-24 Thread Harald Anlauf
Am 24.01.24 um 10:13 schrieb Janne Blomqvist: On Wed, Jan 24, 2024 at 10:28 AM FX Coudert wrote: Now, if the OS adds cospi() to libm and it's in libm's symbol map, then the cospi() used by gfortran depends on the search order of the loaded libraries. We only include the fallback math

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-24 Thread Janne Blomqvist
On Wed, Jan 24, 2024 at 10:28 AM FX Coudert wrote: > > Now, if > > the OS adds cospi() to libm and it's in libm's symbol map, then the > > cospi() used by gfortran depends on the search order of the loaded > > libraries. > > We only include the fallback math functions in libgfortran when they are

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-24 Thread FX Coudert
Hi, > Hopefully, FX sees this as my emails to gmail bounce. I am seeing this email. > Now, if > the OS adds cospi() to libm and it's in libm's symbol map, then the > cospi() used by gfortran depends on the search order of the loaded > libraries. We only include the fallback math functions in

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-23 Thread Steve Kargl
On Tue, Jan 23, 2024 at 01:37:54PM +0200, Janne Blomqvist wrote: > > > - If I get this right, to take one example, the Fortran front-end will emit > > a call to gfortran_acospi_r4(), libgfortran provides this as a wrapper > > calling acospif(), which is called either from libm or from

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-23 Thread Steve Kargl
On Tue, Jan 23, 2024 at 01:37:54PM +0200, Janne Blomqvist wrote: > On Tue, Jan 23, 2024 at 11:09 AM FX Coudert wrote: > > > > Hi Steve, > > Hello, long time no see. Time is short and we're all busy with life, but it is nice to see familiar names! > > > Thanks for the patch. I’ll take time to

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-23 Thread Steve Kargl
On Tue, Jan 23, 2024 at 06:40:27AM -0800, Steve Kargl wrote: > On Tue, Jan 23, 2024 at 10:08:43AM +0100, FX Coudert wrote: > > Hi Steve, > > > > Thanks for the patch. I’ll take time to do a proper review, but > > after a first read I had the following questions: > > > > - "an OS's libm may/will

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-23 Thread Steve Kargl
On Tue, Jan 23, 2024 at 10:08:43AM +0100, FX Coudert wrote: > Hi Steve, > > Thanks for the patch. I’ll take time to do a proper review, but > after a first read I had the following questions: > > - "an OS's libm may/will contain cospi(), etc.”: do those functions > conform to any standard? Are

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-23 Thread Janne Blomqvist
On Tue, Jan 23, 2024 at 11:09 AM FX Coudert wrote: > > Hi Steve, Hello, long time no see. > Thanks for the patch. I’ll take time to do a proper review, but after a first > read I had the following questions: > > - "an OS's libm may/will contain cospi(), etc.”: do those functions conform > to

Re: [Fortran] half-cycle trig functions and atan[d] fixes

2024-01-23 Thread FX Coudert
Hi Steve, Thanks for the patch. I’ll take time to do a proper review, but after a first read I had the following questions: - "an OS's libm may/will contain cospi(), etc.”: do those functions conform to any standard? Are there plans to implement them outside FreeBSD at this point? - On

[Fortran] half-cycle trig functions and atan[d] fixes

2024-01-20 Thread Steve Kargl
All, I have attached a new patch to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113152 which addresses the following issues. PR113152 -- implement half-cycle trigonometric functions PR113412 -- better error message for atan(y,x) PR113413 -- implement atand(y,x) The patch clocks in at 3488